2 ; JabRef Application launcher
5 ; Jelude launcher - http://www.sfu.ca/~tyuen/jelude/
6 ; Java Launcher http://nsis.sourceforge.net/archive/nsisweb.php?page=326&instances=0,64
8 ; Christopher Oezbek - oezi@oezi.de - 2006
10 ;--------- CONFIGURATION ---------
11 !define APPNAME "JabRef"
13 !define JARFILE "JabRef.jar"
20 OutFile "dist\${APPNAME}.exe"
21 ;-------- END CONFIGURATION ------
35 StrCpy $R0 '"$R0" -jar "${JARFILE}" $R1'
43 Function GetParameters
53 StrCpy $R0 $CMDLINE 1 $R2
60 StrCpy $R0 $CMDLINE 1 $R2
62 StrCpy $R0 $CMDLINE "" $R2
71 ; 1 - in .\jre directory (JRE Installed with application)
72 ; 2 - in JAVA_HOME environment variable
74 ; 4 - assume java.exe in current dir or PATH
79 StrCpy $R0 "$EXEDIR\jre\bin\javaw.exe"
80 IfFileExists $R0 JreFound
84 ReadEnvStr $R0 "JAVA_HOME"
85 StrCpy $R0 "$R0\bin\javaw.exe"
89 ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
90 ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
91 StrCpy $R0 "$R0\bin\javaw.exe"
95 MessageBox MB_ICONEXCLAMATION|MB_YESNO \
96 'Could not find a Java Runtime Environment installed on your computer. \
97 $\nWithout it you cannot run "${APPNAME}". \
98 $\n$\nWould you like to visit the Java website to download it?' \
100 ExecShell open "http://java.sun.com/getjava"