<copy file="${nsis.installoptions.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsexec.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsisdl.dll}" todir="${tomcat.dist}" />
+ <!-- 32 bit -->
<copy file="res/procrun/tomcat${version.major}.exe"
tofile="${tomcat.dist}/bin/tomcat${version.major}.exe" />
<copy file="res/procrun/tomcat${version.major}w.exe"
tofile="${tomcat.dist}/bin/tomcat${version.major}w.exe" />
+ <!-- 64 bit amd -->
+ <copy file="res/procrun/amd64/tomcat${version.major}.exe"
+ tofile="${tomcat.dist}/bin/procrun/amd64/tomcat${version.major}.exe" />
+ <copy file="res/procrun/amd64/tomcat${version.major}w.exe"
+ tofile="${tomcat.dist}/bin/procrun/amd64/tomcat${version.major}w.exe" />
+ <!-- 64 bit ia -->
+ <copy file="res/procrun/ia64/tomcat${version.major}.exe"
+ tofile="${tomcat.dist}/bin/procrun/ia64/tomcat${version.major}.exe" />
+ <copy file="res/procrun/ia64/tomcat${version.major}w.exe"
+ tofile="${tomcat.dist}/bin/procrun/ia64/tomcat${version.major}w.exe" />
+ <!-- tc native -->
<copy file="${tomcat-native.home}/tcnative-1.dll.x86"
tofile="${tomcat.dist}/bin/tcnative-1.dll" />
SetOutPath $INSTDIR\bin
File bin\bootstrap.jar
File bin\tomcat-juli.jar
- File bin\*.exe
SetOutPath $INSTDIR\conf
File conf\*.*
SetOutPath $INSTDIR\webapps\ROOT
DetailPrint "Using Jvm: $2"
+ SetOutPath $INSTDIR\bin
+ ; Get the current platform x86 / AMD64 / IA64
+ ExpandEnvStrings $0 "%PROCESSOR_ARCHITEW6432%"
+ StrCmp $0 "%PROCESSOR_ARCHITEW6432%" 0 +2
+ ExpandEnvStrings $0 "%PROCESSOR_ARCHITECTURE%"
+ StrCmp $0 "x86" 0 +3
+ File /oname=tomcat@VERSION_MAJOR@.exe bin\tomcat@VERSION_MAJOR@.exe
+ File /oname=tomcat@VERSION_MAJOR@w.exe bin\tomcat@VERSION_MAJOR@w.exe
+ StrCmp $0 "AMD64" 0 +3
+ File /oname=tomcat@VERSION_MAJOR@.exe bin\procrun\amd64\tomcat@VERSION_MAJOR@.exe
+ File /oname=tomcat@VERSION_MAJOR@w.exe bin\procrun\amd64\tomcat@VERSION_MAJOR@w.exe
+ StrCmp $0 "IA64" 0 +3
+ File /oname=tomcat@VERSION_MAJOR@.exe bin\procrun\ia64\tomcat@VERSION_MAJOR@.exe
+ File /oname=tomcat@VERSION_MAJOR@w.exe bin\procrun\ia64\tomcat@VERSION_MAJOR@w.exe
+
InstallRetry:
ClearErrors
nsExec::ExecToLog '"$INSTDIR\bin\tomcat@VERSION_MAJOR@.exe" //IS//Tomcat@VERSION_MAJOR@ --DisplayName "Apache Tomcat @VERSION_MAJOR@" --Description "Apache Tomcat @VERSION@ Server - http://tomcat.apache.org/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat@VERSION_MAJOR@.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
SectionEnd
Function .onInit
+ ;Reset install dir for 64-bit
+ ExpandEnvStrings $0 "%PROGRAMW6432%"
+ StrCmp $0 "%PROGRAMW6432%" +2 0
+ StrCpy $INSTDIR "$0\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@"
;Extract Install Options INI Files
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "config.ini"
ClearErrors
+ ; Use the 64-bit registry on 64-bit machines
+ ExpandEnvStrings $0 "%PROGRAMW6432%"
+ StrCmp $0 "%PROGRAMW6432%" +2 0
+ SetRegView 64
+
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "JavaHome"
ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"