Would it be possible to make this portable?
I found a post from a few years ago, but i dont think it has been followed up?
New: Run-Command (Dec 2, 2024), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
No Ads Nov/Dec!, Please donate today
Would it be possible to make this portable?
I found a post from a few years ago, but i dont think it has been followed up?
Is nobody interested in doing this? I think it would be a good addition.
Graham Yates
It can almost be done with the exception of the fact that it leaves a folder, launch4j-tmp in %ProgramFiles%\... which is in accessible to Vista+ users with UAC and can't be deleted without administrative rights, thus not allowing JStock to ever be fully portable.
It's a shame, too, because other than that, only one folder needs to be taken care of, %userprofile%\.jstock, and it'd be portable.
Sorry bro.
You shouldn't be running the Launch4J executable; you should analyse what it does and then do what it does directly with PAL (that's normally just command line arguments stuff). Then launch4j-tmp won't be created. Plus, you can do things like the -Duser.home trick.
Even if it were creating a directory in Program Files, that wouldn't be an issue because either it would fail to create it (if it required it, you would need admin, but that's not too bad) or (b) it would create it and you would also have admin so you could remove it.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Turns out that it's just the executable that gets passed some arguments and launches the original app... Looks like it can be done after all.
I'm on it.
For reference, it's covered in the manual: https://portableapps.com/manuals/PortableApps.comLauncher/topics/java.ht...
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Here's my launcher, which doesn't seem to want to cooperate:
launching java.exe briefly brings up the commandline windows, then leaves, and javaw.exe brings causes [ICON_EXCLAMATION] sound, minus the message box. Neither launches the app.
1. You don't need the single quotes around CommandLineArguments.
2. It seems that you're trying to run the Launch4J-based launcher. Find out which JAR it launches and pass it as
-jar {file.jar}
.Previously known as kAlug.
This launcher seems to work. What do the PortableApps.com experts think? I agree with comments in other posts here about the desirability of launching the JAR rather than the EXE. However, I just tried a "quick & dirty" to see if there was any real difficulty in the launcher. I don't want to take this over, I am just trying to help.
[Launch]
ProgramExecutable=jstock\jstock.exe
CommandLineArguments=-vm "%JAVA_HOME%\bin"
[Activate]
Java=find
[DirectoriesMove]
jstock=%USERPROFILE%\.jstock\1.0.6
[FilesMove]
jstock.ini=%PAL:AppDir%\jstock\jstock.ini
[DirectoriesCleanupIfEmpty]
1=%USERPROFILE%\.jstock
Regards,
Kim
Kim
I fixed this issue already. I'm just trying to learn this XML stuff and see if I need to handle it in the launcher now...
Thank you, looking forward to this.
Graham Yates
1. install jstock; and then copy the whole jstock directory into folder portableApps on your usb drive.
2. From there, rename jstock.exe to jstock.jar
3. Install jPortable & jPortableLauncher apps
4. Run jPortableLauncher. From JPortableLauncher app, nagigate to your jstock folder and select jstock.jar
5. Voila, jstock is up & running.
If you have other way to make jstock portable, pls post the solution here.
https://portableapps.com/node/31437