You are here

FrostWire Portable

8 posts / 0 new
Last post
Thaportablelife12
Offline
Last seen: 12 years 2 months ago
Joined: 2012-02-01 08:35
FrostWire Portable

I was working on making FrostWire Portable but the launcher don't work. I read the instructions (on this site) on making java apps portable, but the app won't load. The only thing it does is show the splash screen.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 2 hours 21 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
If you are after some help,

If you are after some help, you will have to provide us with a little more info.

For starters, what have you got so far in your App\Appinfo\Launcher\FrostWirePortable.ini?

Thaportablelife12
Offline
Last seen: 12 years 2 months ago
Joined: 2012-02-01 08:35
Here is the file's

Here is the file's code

[Launch]
ProgramExecutable=javaw.exe
CommandLineArguments=-Duser.home="%PAL:DataDir%\settings" -classpath "lib\FrostWire.jar;%JAVA_HOME%\lib\javaws.jar"
WorkingDirectory=%PAL:AppDir%\FrostWire
CloseEXE=FrostWire.exe
WaitForProgram=true
WaitForOtherInstances=false

[Activate]
Registry=true
Java=require

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\FrostWire.reg
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[RegistryKeys]
FrostWire_portable=HKEY_CURRENT_USER\Software\FrostWire

[RegistryCleanupIfEmpty]
1=HKCU\Software\JavaSoft\Prefs\com\frostwire
2=HKCU\Software\JavaSoft\Prefs\com
3=HKCU\Software\JavaSoft\Prefs
4=HKCU\Software\JavaSoft

[RegistryValueWrite]
HKCU\Software\JavaSoft\Prefs\com\frostwire\frostwire\docsdir=%PortableApps.comDocumentsDir:java.util.prefs%
Aluísio A. S. G.
Offline
Last seen: 7 years 9 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
HKCU; command-line

In [RegistryKeys], use HKCU instead of HKEY_CURRENT_USER..
Also check if the app does need any other command-line parameters.

Previously known as kAlug.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 2 hours 21 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
As well as what kAlug

As well as what kAlug said:

1) You should use %PAL:LastDrive:DoubleBackslash% instead of %PAL:LastDrive%\\ and %PAL:Drive:DoubleBackslash% instead of %PAL:Drive%\\
2) You are doing a find and replace on FrostWire.reg, but in your RegistryKeys section you are writing to FrostWire_portable.reg

Edit:
3) According to the documentation on RegistryValueWrite:

Note: if there is any possibility that the value does contain a colon, write the type explicitly.

Since you are using it to write an absolute path it will contain a colon, so you will need to explicitly set the type of the key.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 10 months ago
Joined: 2007-04-15 21:08
Assorted comments

There's nothing wrong with the HKEY_CURRENT_USER; it will work; HKCU is merely the current convention.

You should not use %PAL:LastDrive:DoubleBackslash% instead of %PAL:LastDrive%\\. PAL:LastDrive:DoubleBackslash won't exist if I correctly recall how I implemented it.

You should change the FrostWire_portable in [RegistryKeys] to FrostWire (or change the other the other way).

About the registry key type, you will need to prepend REG_SZ: at present to get it to work.

Did you intend to deal with HKCU\Software\FrostWire, or HKCU\Software\JavaSoft\Prefs\com\frostwire\frostwire? The latter, perhaps?

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

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 2 hours 21 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
As Chris says...

Ignore my comment about the DoubleBackslash thing, that's what I get for not checking the manual first.

The DoubleBackslash variable modifier is for directory variables, not drive variables.

SteelGeneral
Offline
Last seen: 11 years 10 months ago
Joined: 2009-04-09 23:39
Why not start with existing portable FrostWire?

Why not start with the existing portabe FrostWire https://portableapps.com/node/11822 and update it's launcher if necessary? Or get the author of it to update it.

1. Install the existing portable version on your PA flash drive.
in my case F:\PortableApps\FrostWirePortable\
2. Install the latest 5.2.11 FrostWire on a PC
in my system C:\Program Files (x86)\FrostWire 5\
3. Copy the files from the PC installation
C:\Program Files (x86)\FrostWire 5\
over the files in the portable installation
F:\PortableApps\FrostWirePortable\App\frostwire

It launches and runs fine. I don't have a clean PC without a FrostWire install at the moment to check for registry changes or left over files but it seems to run well.

I'd suggest updating the existing portable version or getting it's author to do so unless you really want to write a new launcher for it yourself. In any case the existing launcher may be a good reference starting point.

Just a thought...

Log in or register to post comments