I'm working on a small program that I would like to make have portable support. I'm wondering how best to do this. I would like to make it in such a way that a portable version for MSW, Mac, and even Linux could be installed on a USB/external device.
Detection: Currently my program only uses detection of a 'portable.cfg' file in the program executable directory, but I'm considering changing it to use command line options instead so that a launcher could easily customize it. This also allows one program to be used, and not having two different compilations for portable and installed versions.
The thing I'd like to be able to do is to share user data and common program data for each version, so the MSW, Mac, and Linux version would only have one set of data instead of having a copy of each data. At the same time there is still a need for platform-specific program/user data directories for things such as cached script byte-codes that may not be in the same format on each platform.
Any suggestions on directory structure/etc for this would be welcome. Any directories should be customizable though by entries in the 'portable.cfg' or command line options, maybe like: 'myapp /userdatadir "..\..\Data" ...'
well everyone here probably only knows about portable apps for windows, since most computers you would take your portableapps to are windows. i don't really think compatibility with mac and linux is too beneficial for a portable version. would portable apps for linux work? i know apps need to be compiled for different types of linux like debian or redhat so i would think there would be problems, maybe not though. i guess this could work as long as you have all the different files for the different platform versions. if you do this though you should have the portable version as a separate download unlike what you were saying because a portable version including files for windows, linux and mac would probably take up a bit more space. As far as a suggested directory structure, you could do it like our apps here and have all program files under App and all user data files under Data and the launchers for the different os's are in the root folder. I could play around with it if i had a copy of your program.
I read about PortableApps for linux. All there is to it is some absolute and relative paths.
Insert original signature here with Greasemonkey Script.
yeah, that would be another way. if you can make wine portable then you could just use the windows program files set. i think there's a wine for mac too but i'm not sure.
There is.