Working on porting a java app.
Filesystem and Registry are clean apart from said.
In the manual under "CleanTemp" we are told this should not happen; Is this a bug or am I doing something wrong?(Note: Atm I'm cleaning it using [DirectoriesCleanupForce])
Here is my launcher.ini:
[Launch]
ProgramExecutable=PhpStorm\bin\PhpStorm.exe
DirectoryMoveOK=yes
RunAsAdmin = force
;[Environment]
;IDEA_PROPERTIES=c:\ideaconfig\idea.properties
[FileWrite1]
Type=ConfigWrite
File=%PAL:AppDir%\PhpStorm\bin\idea.properties
Entry=idea.config.path=
Value=%PAL:DataDir:ForwardSlash%/.WebIde10/config
[FileWrite2]
Type=ConfigWrite
File=%PAL:AppDir%\PhpStorm\bin\idea.properties
Entry=idea.system.path=
Value=%PAL:DataDir:ForwardSlash%/.WebIde10/system
[FileWrite3]
Type=ConfigWrite
File=%PAL:AppDir%\PhpStorm\bin\idea.properties
Entry=idea.plugins.path=
Value=%PAL:DataDir:ForwardSlash%/.WebIde10/config/plugins
[DirectoriesCleanupForce]
1=%LOCALAPPDATA%\Temp\PhpStormPortableTemp
Phpstorm.exe isn't the app. It's just the file to kick it off. As such, the launcher sees it exit and tries to clean up as soon as it does, which is wrong. You need to handle Java apps very specifically. See this section of the manual and particularly the example at the end with details on launching the JAR properly with the commandline and the WaitFor information.
https://portableapps.com/manuals/PortableApps.comLauncher/topics/java/
Sometimes, the impossible can become possible, if you're awesome!
Unfortunately doing this has the consequence that :
From Manual :
The problems this can cause far out way my original issue.
In addition, I wonder why I should use "[Activate]:Java", when I am now on my second java application, successfully ported without using this setting?
Thanks.
Right, so you just disable WaitForOtherInstances because you're only concerned with waiting for the instance of javaw.exe that you're starting. Then it'll work without issue.
Sometimes, the impossible can become possible, if you're awesome!
I see, looks like I misunderstood the "WaitForOtherInstances" setting. I understand your suggestion and the setting now, thank you.
Although, I'm having difficulty finding the correct javaw.exe cmd argument, and as I said, I can't see the point of going to this trouble, when its already working?
The fact that that directory remains means it's not working. That EXE just calls Javaw.exe with a specific commandline to start the JAR file. That's all it does. So you need to duplicate it in the launcher.ini.
Sometimes, the impossible can become possible, if you're awesome!
So , I found this in phpstorm.exe dir, seems there are some clue in the batch file - but beyond me to figure it out. I'm posting it just for interests sake, I don't expect you to come up with an answer :
Thanks for your assistance.
John's right about Java. But some extra comments on what you've posted:
RunAsAdmin=force
?There's no need. The PortableApps.com Launcher creates that, the PortableApps.com Launcher takes care of that. You should probably never even be using [DirectoriesCleanupForce] at all.
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
Chris Morgan said: "Why do you have RunAsAdmin=force?"
Your right, I can see how this might be a problem. I was concerned for it to be able to make changes to the wind 7/vista firewall settings, as I will be bundling it with a portable version of XAMP.
Chris Morgan said: "You shouldn't ever be doing this:[...]"
Because as mentioned, it wasn't being cleaned up.