You are here

make portable software

2 posts / 0 new
Last post
Last seen: 2 years 9 months ago
Joined: 2021-02-22 03:08
make portable software

I want to learn to make portable software. Can anyone guide me. Thanks very much

John Z
Last seen: 2 years 8 months ago
Joined: 2021-03-11 05:33
Portable Software

Well the forum seems quite busy ……

Here are some things to consider when making portable software.
1) Have the program determine its own current program directory at each startup. This will ensure that a specific drive letter is not required.
2) Create/reference all needed subdirectories under the program directory acquired from #1.
3) Best to not write anything to the system registry, instead use an ini file, or equivalent, in or under the program directory. If you do use the system registry you are supposed to remove what you added when the program is closing so this is typically more trouble than it is worth. Although M$ does not recommend ini files anymore they are still supported. You can also use a custom configuration method of your own as well. Always check that the ini file exist, create a default one if missing.
4) You can use the systems 'temp' or 'tmp' directories but don't expect anything to be retained. If you can't acquire the 'temp' or 'tmp' directory be sure to have another location in or under your program directory as a fallback.
5) Test your program by simply zipping it up, or 7z it, then unarchive it onto a USB drive and see if it run w/o problems.
6) Take the USB drive to a different computer and see if it runs OK.
7) if you use a (MRU)Most Recently Used Files, or Directories, technique be sure to test, and respond correctly, when the file or directory is not available.

That's pretty much it. If a program is truly portable it is a snap to package as a PortableApps package, but portability does not depend on using the PortableApps packaging. Almost everything I write is 'portable'.
Hope this is helpful.

John Z


Log in or register to post comments