You are here

Making application portable

8 posts / 0 new
Last post
jc1
Offline
Last seen: 15 years 1 month ago
Joined: 2009-03-02 18:32
Making application portable

Hi,

I have been reading about the Portable App format Specification (DRAFT 4) on this site. Please pardon my ignorance, but I am wondering what are the advantages of following these standard specifications and directory structures? As long as all files and settings of an app are contained within one folder, isn't that enough to make that application portable?

According to the specifications, an AppInfo directory contains an appinfo.ini file. I was told by someone at Codeguru that the application folder is not the proper place to store the ini files in Windows (since this location will fail in Windows Vista). Can someone comment on the accuracy this information, since I don't have windows Vista.

Thanks for your patience Smile

John T. Haller
John T. Haller's picture
Online
Last seen: 43 min 24 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Several Reasons

There are several reasons to follow the specification. First off, having a standardized structure makes it easy to keep the application and the user settings and data separated. This makes backing up just your user settings rather than having to take the time to backup the whole drive our easier (our included backup utility does this).

Second, it makes upgrades much easier. With simple files or simple all in one setups, the user is often left to their own devices trying to figure out what files to upgrade and which ones not to touch. Apps in PortableApps.com Format handle upgrades for the user without manual intervention.

Third, having a standardized format with a special name means a user can be sure they're getting a truly portable app. Most zipped apps that claim to be portable aren't and leave files behind, have features and settings break when you move PCs, etc. Apps in PortableApps.com Format have to work full portably.

As for the INIs in the App folder, you're refering to the Program Files folder in Vista which does have this restriction. It does not apply to portable apps.

Sometimes, the impossible can become possible, if you're awesome!

jc1
Offline
Last seen: 15 years 1 month ago
Joined: 2009-03-02 18:32
Thanks

John,

Thanks for taking the time to explain this. It makes perfect sense and the reasons seem obvious now. Perhaps put these up somewhere on your website?

As for the INIs in the App folder, you're refering to the Program Files folder in Vista which does have this restriction. It does not apply to portable apps."

Does this mean I cannot distribute a common application setup package that works both on Windows Vista and as a portable App? Currently, I am forced to store the ini file at C:\myapp.ini (where C: is the drive letter of user's machine). If someone decided to transfer application folder to another machine or a USB drive, then this ini file is left behind.

John T. Haller
John T. Haller's picture
Online
Last seen: 43 min 24 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not in PAF

Not in PortableApps.com Format. PAF apps have their own specialized installer that is different from a standard application installer. You could have an installer that installs it portably, but it is more complicated and most apps distributed as such aren't fully portable, so a user may think twice. It's best to distribute a standard one (that installs to Program Files, puts icons in the Start Menu, etc) and then a portable one separately as a paf.exe. The PortableApps.com Installer automatically detects existing installs of portable apps on devices so end users don't need much hand holding to set it up and automatically tell the PortableApps.com Platform that a new app was installed... and the installer doesn't leave anything behind on the local PC.

Sometimes, the impossible can become possible, if you're awesome!

jc1
Offline
Last seen: 15 years 1 month ago
Joined: 2009-03-02 18:32
thanks

PAF apps have their own specialized installer that is different from a standard application installer.

ok, I understand the concept now. I am looking at the script under the development section (PortableApps.com Installer 0.12.3). I have a standard windows installer for a bible reading software that I develop. The application is named SwordBible, available at http://www.swordwarrior.net. Seems like I would need to work with NSIS and some other plugins to create a portable installer. I have never worked with NSIS, so it might take me some time to follow the instructions. I am thinking someone who is already familiar with the process would be able to do this fairly quickly. I would be willing to pay for this, provided the fee is reasonable. The software is licensed under GNU GPL v2, and I am happy to do anything to assist. Thanks!

John T. Haller
John T. Haller's picture
Online
Last seen: 43 min 24 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Simple

It's simpler than you think. As long as you have your app in PortableApps.com Format, you don't need to write a single line of code to do a PortableApps.com Installer. You just fill out the config file with the name, etc. Details are on the page. A simpler generator is coming, too.

Sometimes, the impossible can become possible, if you're awesome!

jc1
Offline
Last seen: 15 years 1 month ago
Joined: 2009-03-02 18:32
Hi John, Thanks. It wasn't

Hi John,

Thanks. It wasn't that difficult (even though I had never used NSIS before). I have tried to follow DRAFT 4 specifications as closely as possible. If anything needs to be changed to meet the PortableApps.com guidelines, I would be happy to make the change. Here is a direct link to the installer.....

http://www.swordwarrior.net/files/SwordBible_Portable_5.4.paf.exe

More info available at http://www.swordwarrior.net

Would it be possible to list this application below the BPBible listing on PortableApps.com?

gmbudwrench
gmbudwrench's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2007-06-25 05:00
Check

with Chris Morgan, a dev here. He's responsible for the BPBible app and he might be able to help you, provided he's not involved with something else. He comes in fairly frequently.

Log in or register to post comments