Originally Posted by gaffer
In Windows, the so-called portable apps are deliberately coded so that you simply run the executables and thats it. No installing, no compiling. No patches or config hacks required. It sounds like a PBI, right?
Actually this sounds like standard software development under UNIX and a few other platforms :-P.
Windows was so kind as to provide standard interfaces for storing most kinds of data (Qt wraps portably fwiw), but that is storing data in the registry. Many of the games I've used for example, look up information through the registry. Even PuTTY stores per user data into the registry, because that is the normal and natural way on Windows.
UNIX convention is to store data in a system directory, either compiled into the executable or found with relative paths; good software also documents an interface to override it, such as an environment variable or command line switch, as well as ways to append to it. User data is stored in hidden files in the users home directory, where they can be backed up just like any other regular file; as opposed to having to locate and export the relivent registry keys. This makes installing software virtually an "Xcopy installation" in WinTerms, in fact that is just what the install
program is made for.
Where the question of portability really becomes a problem on FreeBSD, is the ABI and library interfaces required to make the program runnable.
On Windows, you can basically compile code that will run any many related versions of Microsoft's operating systems as long as the dlls are there; it's one of the sweet aspects of developing for it. FreeBSD however, is bit more strict about it (and OpenBSD much more so). You shouldn't for example try running a program compiled for FreeBSD 7.0 on FreeBSD 5.5, and actually expect it to work like a charm. Doing the inverse may work with suitable adjustments but is not gaurrenteed to function correctly, let along at all.
An end result of that, TexLive will probably run on most forms of Windows NT, but your toast if you want the latest release to run on an older FreeBSD.
If I was going to make a USB stick for regular work. I would likely setup a programs folder with batch and shell scripts to handle environment changes. Within it, would likely be a set of folders per OS and version; e.g. /mnt/Programs/FreeBSD/7/bin/vim and G:\Programs\Windows\NT\vim\gvim.exe.
You can use ports, packages, or PBI to create the solution; but PBI make it a little harder. You can have everything pkg_add/pkg_delete/pkg_info and such use placed on your USB stick without ever touching your PC, and can manipulate them on that USB stick from any suitable FreeBSD machine, totally independantly. With a PBI, you have to install the files on your PC-BSD system, and copy the relevint files to your USB stick, and the management interface wasn't designed to handle anything outside the local systems Programs folder. So you are kind of on your own after that, the only plus is everything you need should be in the PBIs folder and hidden folders in Programs; documentation probably hasn't caught up but it is easy to explore how it all works.