You are here

Help request NSIS/Java/Azureus

7 posts / 0 new
Last post
RMB Fixed
Offline
Last seen: 14 years 10 months ago
Joined: 2006-10-24 10:30
Help request NSIS/Java/Azureus

I have just started learning NSIS yesterday .
What I want to do is make a launcher for Azureus to
replace the original "Azureus.exe" because it is made with a
non-open source tool (exe4j) .
I can launch Azureus with the launcher I made as long as
I don't try to pass any command line options to it but I want the launcher
to define where the settings and default install-dir are located .
here's what the script looks like so far :

-----------------------------------------------------------------------
Name "Azureus"
Caption "Azureus"
Icon "Azureus.ico"
OutFile "Azureus.exe"
SilentInstall silent
AutoCloseWindow true
ShowInstDetails nevershow
!define APP "Azureus"
!define VER "1.0.0.0"
!define CLASSPATH "swt.jar;Azureus2.jar"
!define CLASS "org.gudy.azureus2.ui.swt.Main"

Section ""
Call GetJRE
Pop $R0
StrCpy $0 '"$R0" -classpath "${CLASSPATH}'

SetOutPath $EXEDIR
Exec $0
SectionEnd

Function GetJRE
Push $R0
Push $R1

ClearErrors
StrCpy $R0 "$EXEDIR\jre1.6.0_02\bin\javaw.exe"
IfFileExists $R0 JreFound
StrCpy $R0 ""

ClearErrors
ReadEnvStr $R0 "JAVA_HOME"
StrCpy $R0 "$R0\bin\javaw.exe"
IfErrors 0 JreFound

ClearErrors
StrCpy $R0 "$R0\bin\javaw.exe"

IfErrors 0 JreFound
StrCpy $R0 "javaw.exe"

JreFound:
Pop $R1
Exch $R0
FunctionEnd
--------------------------------------------------------------------------
Here are the commands I want to use :
-Dazureus.config.path=$EXEDIR\settings
-Dazureus.install.path=$EXEDIR
-Duser.dir=$EXEDIR

No matter what I do I get an error telling me that
"Exec expects 1 parameters, got 5."
and that leads me to believe it's a syntax-error
( I write the script in notepad++ )

I can start azureus form a DOS-prompt with something like this :
(full path to the jre)javaw "-cp swt.jar;Azureus2.jar" "-J-Xmx64m" "-J-Xms12m" "-J-XX:NewSize=6m" "-J-XX:MaxNewSize=10" "-J-XX:SurvivorRatio=6" "-J-XX:+UseParallelGC" "-J-XX:GCTimeRatio=9" "-J-XX:AdaptiveSizeDecrementScaleFactor=1"
"-Dazureus.config.path=Azureus_Portable\settings" "-Dazureus.install.path=Azureus_Portable" "-Duser.dir=Azureus_Portable" "-Dazureus.nativelauncher=1" org.gudy.azureus2.ui.swt.Main..

So, how do I do that with NSIS ?
I did search (and read the man) but I still don't get what I'm doing wrong ?
Once I have the launcher working I plan on making a Azureus Portable launcher so it works with the portableapps directory-structure .

Any suggestions will be appreciated

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Well,

WRT the error, you need quotes, like this: Exec "$0"
Also, head over to the NSIS site/forums for support questions like this.
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

RMB Fixed
Offline
Last seen: 14 years 10 months ago
Joined: 2006-10-24 10:30
The win-amp!! forum will

The win-amp!! forum will tell me to read section 3 of the "user-guide"
that will tell me to use "$0" or "command 'some argument" or
"You can arse the NSIS-command line without problems. It's possible."
so thanks a lot but no thanks I guess, it doesn't really matter any more .
I have it working without using some stupid wrapper for another wrapper
and it's "the fastest loading Azureus ever" (tm)(c)(r) P.A.F .
(that means "Patent Applied For" not "Portable Apps Format"
not that it matters much since my country doesn't acknowledge insane "software-patents". Smile )
Did I mention that it's only a 28 MB download including JAVA ?
just to bad it doesn't support the PAF DIR-structure..
.. and if Aelitis can't get their heads out of the BBC's *****
and make it portable themselves I might even fork it and call it "Dendrobates".

pkeffect
Offline
Last seen: 8 years 8 months ago
Joined: 2006-08-17 09:26
I don't understand why

I don't understand why people use this java bloated, crap software when there is the very small, fast and non-resource intensive uTorrent.

Guess people like....well hell I have no idea what people like. Blum

_______________________________________________
pkeffect.com

"We exist in a multidimensional polymorphic hyerspacial internode of neurotranslinguistic manifestations subjugated by hyperbolic quantum entanglement."

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2006-11-18 10:26
Because uTorrent was bought

Because uTorrent was bought out by a large company who is probably now injecting their stupid code to keep track of what you're doing and to appease the MPAA, RIAA, etc. since they're now "in bed with them".

http://en.wikipedia.org/wiki/%CE%9CTorrent#Purchase_by_BitTorrent.2C_Inc.

http://www.zeropaid.com/news/8096/%C2%B5Torrent+sells+out,+gets+bought+b....

http://tutorialninjas.net/2007/02/11/bittorrent-clients-gone-sour/

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

pkeffect
Offline
Last seen: 8 years 8 months ago
Joined: 2006-08-17 09:26
and you have to run a

and you have to run a current version for what reason ? Blum

_______________________________________________
pkeffect.com

"We exist in a multidimensional polymorphic hyerspacial internode of neurotranslinguistic manifestations subjugated by hyperbolic quantum entanglement."

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 5 months 1 week ago
Joined: 2006-11-18 10:26
You don't have to. Does

You don't have to. Does your post mention only running an older version of uTorrent? No.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Log in or register to post comments