I could be wrong but I believe you can set the locations of things like “user.home”, etc, using environmental variables in java. TripleA just uses system properties like user.home, it doesn’t have a “hard set location” for where to look for your user folder, etc.
Also, TripleA already is portable (the zip version).
If you are looking for portability to a computer that doesn’t have java installed, you should be able to get around that by doing the following:
Download the “all platforms zip” version.
Download the “windows version with java included”.
Install the windows version with java included.
Unzip the all platforms version to your usb disk.
copy and paste the “JRE” (or jre) folder from the installed ‘windows version with java included’ to the usb disk
and then copy and paste the “triplea.exe” from the installed ‘windows version with java included’ to the usb disk (overwrite old exe)
(you could optionally do these things by copying and pasting from the “source code only zip” if you do not have windows)
basically, to explain what is going on:
Because TripleA is a JAVA program, the real program is a .jar file, not the .exe
In fact, all the .exe has in it is an icon and simple batch like program that runs a single line: “run the GameRunner class inside the bin/triplea.jar file”
The windows with java installer does not actually “install” java on your computer. Instead it comes with an already installed copy of the entire java install folder, which you see as the “jre” folder. Then the triplea.exe is slightly different because instead of just running the bin/triplea.jar file, it first qualifies this statement by telling it to run the jar file using the jre folder as the location of “java”.
To further explain, when you “install” java on your computer, it installs itself to a folder (usually program files/java/) and then it also sets a few environmental variables like JAVA_HOME, and also some “path” variables. Path variables (i may or may not be using the right terminology) tell your computer that when you run a terminal command (command line or batch file or script command) like “javac blah blah”, it will look for a program called “javac” in any of the folders in your path. If your path doesn’t include that, then you can not run such commands. What this means is that writing this command: java -version, is the same thing as specifying the full path for java, which would be something like “C:\Program Files\Java\jdk1.6.0_38\jre\bin\java” -version. So instead of relying on “path” which would only be set if you had installed java yourself, the “windows installer with java” has a “jre” folder containing a full copy of the latest java, and then the triplea.exe that specifies to specifically look in “…/jre/bin/java” instead of just calling “java”. Similarly, the linux and mac script files that run triplea could be modified to specify the /jre/ folder.
So, we should technically already be portable, even to a computer without java. Please let me know the results when you do the above things.