As a start I wanted to turn an executable Java JAR into a portable app. I've received permission from the creators, and the app itself is open source.
The JAR doesn't seem to create any registry settings. It creates a .SETTINGS file after the first use, and a .LOG after every puzzle you solve, and both of these files reside in the same directory as the JAR. For simplicity (or what I think is simplicity's sake), I assume one has Java Portable and Java Portable Launcher available (as if they were installed via the PA.c Menu).
I'm stumped. I've tried playing with the Launcher INI settings enabling Java, configuring the working directy to that of the JAR, telling it the executable is JavaPortableLauncher, etc. Nothing seems to work. I've made simple experiments using BAT scripts to pass the JAR name to the JavaPortableLauncher.exe to no avail. Obviously I don't know the commands to open files.
What am I doing wrong? Can anyone point to some documentation on how to pass commands through Java Portable Launcher?
I'll post some of my first attempt INIs at a later date.
** Update 1 **
I've successfully made a launcher.ini. This requires jPortable to be installed via the PA.c Menu. mc4d.props is a settings file created in the directory with the JAR, and it is moved to the \Data folder at shutdown. Another file which can be created to save one's progress is the MagicCube4D.log, by default saved to the system's desktop. This file is also stored in \Data and replaced at start. These files can be deleted to have a clean start up of MC4DP.
I am having problems using the regshot utility to prove that my MC4DP leaves no other traces in the registry. I will research the forums for help on that matter.
** Update 2 **
Thanks to Chris Morgan for pointing out I needed an = in my -D switch.[FilesMove] MagicCube4D.log=%USERPROFILE%\Desktop mc4d.props=%PAL:AppDir%\mc4d-4.0.180 [Activate] Java=require [Launch] ProgramExecutable=javaw.exe CommandLineArguments='-jar "%PAL:AppDir%\mc4d-4.0.180\mc4d-4.0.180.jar" -Duser.home="%PAL:DataDir%\Java"'
[Use <pre> for blocks, not <code> - mod Chris]