21 |
!include "MUI.nsh" |
!include "MUI.nsh" |
22 |
!include "EnvVarUpdate.nsh" |
!include "EnvVarUpdate.nsh" |
23 |
|
|
24 |
!define RELEASE_DATE "20090512" |
!define RELEASE_DATE "20090623" |
25 |
|
|
26 |
; The name of the installer |
; The name of the installer |
27 |
Name "LinuxSampler (${RELEASE_DATE})" |
Name "LinuxSampler (${RELEASE_DATE})" |
31 |
|
|
32 |
; Java Runtime Environment, needed for JSampler |
; Java Runtime Environment, needed for JSampler |
33 |
!define JRE_VERSION "1.6" |
!define JRE_VERSION "1.6" |
34 |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=29220" |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=31621" |
35 |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=29222" |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=31623" |
36 |
|
|
37 |
; The default installation directory |
; The default installation directory |
38 |
InstallDir "$PROGRAMFILES64\LinuxSampler" |
InstallDir "$PROGRAMFILES64\LinuxSampler" |
65 |
!define BIN_TYPE_686SSE "686 SSE" |
!define BIN_TYPE_686SSE "686 SSE" |
66 |
!define BIN_TYPE_686 "686" |
!define BIN_TYPE_686 "686" |
67 |
|
|
68 |
|
Var /GLOBAL binType |
69 |
|
|
70 |
;-------------------------------- |
;-------------------------------- |
71 |
; Pages |
; Pages |
72 |
|
|
93 |
StrCpy $installingJSampler "0" |
StrCpy $installingJSampler "0" |
94 |
StrCpy $installingQSampler "0" |
StrCpy $installingQSampler "0" |
95 |
StrCpy $installinggigedit "0" |
StrCpy $installinggigedit "0" |
|
|
|
|
; We call this here for the uninstaller, its also called in the "" |
|
|
; section (for installing) just for seeing the debug output, as ouput |
|
|
; this init handler wont make it into the "Details" list. |
|
|
Call DetectSystemType |
|
96 |
FunctionEnd |
FunctionEnd |
97 |
|
|
98 |
; detects CPU capabilities, determmines which native binary type to install |
; detects CPU capabilities, determmines which native binary type to install |
99 |
; and selects the appropriate windows registry view (32 bit or 64 bit) |
; and selects the appropriate windows registry view (32 bit or 64 bit) |
100 |
Function DetectSystemType |
!macro DetectSystemType un |
101 |
Var /GLOBAL binType |
Function ${un}DetectSystemType |
|
|
|
102 |
; check if this is a 64 bit windows |
; check if this is a 64 bit windows |
103 |
System::Call "kernel32::GetCurrentProcess() i .s" |
System::Call "kernel32::GetCurrentProcess() i .s" |
104 |
System::Call "kernel32::IsWow64Process(i s, *i .r0)" |
System::Call "kernel32::IsWow64Process(i s, *i .r0)" |
126 |
|
|
127 |
DetectSystemDone: |
DetectSystemDone: |
128 |
FunctionEnd |
FunctionEnd |
129 |
|
!macroend |
130 |
|
!insertmacro DetectSystemType "" |
131 |
|
!insertmacro DetectSystemType "un." |
132 |
|
|
133 |
; Check for the presence of gtkmm, and if false, ask the user whether to |
; Check for the presence of gtkmm, and if false, ask the user whether to |
134 |
; download and install gtkmm now from the internet. |
; download and install gtkmm now from the internet. |
167 |
Var /GLOBAL jreUri |
Var /GLOBAL jreUri |
168 |
|
|
169 |
StrCmp $binType BIN_TYPE_64BIT 0 +3 |
StrCmp $binType BIN_TYPE_64BIT 0 +3 |
170 |
StrCpy $jreUri JRE_64_URL |
StrCpy $jreUri ${JRE_64_URL} |
171 |
Goto +2 |
Goto +2 |
172 |
StrCpy $jreUri JRE_32_URL |
StrCpy $jreUri ${JRE_32_URL} |
173 |
|
|
174 |
|
DetailPrint "Downloading JRE from: $jreUri" |
175 |
|
|
176 |
MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \ |
MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \ |
177 |
be downloaded and installed" |
be downloaded and installed" |
178 |
|
|
179 |
StrCpy $2 "$TEMP\Java Runtime Environment.exe" |
StrCpy $2 "$TEMP\Java Runtime Environment.exe" |
180 |
nsisdl::download /TIMEOUT=30000 $jreUri $2 |
nsisdl::download /TIMEOUT=30000 "$jreUri" $2 |
181 |
Pop $R0 ; Get the return value |
Pop $R0 ; Get the return value |
182 |
StrCmp $R0 "success" +3 |
StrCmp $R0 "success" +3 |
183 |
MessageBox MB_OK "Download failed: $R0" |
MessageBox MB_OK "Download failed: $R0" |
238 |
|
|
239 |
;-------------------------------- |
;-------------------------------- |
240 |
|
|
241 |
; primer things to do |
; primer things to do (before installing, not called on uninstall) |
242 |
Section "" |
Section "" |
243 |
Call DetectSystemType |
Call DetectSystemType |
244 |
Call DetectVstPath |
Call DetectVstPath |
263 |
linuxsampler64: |
linuxsampler64: |
264 |
File bin\64\linuxsampler.exe |
File bin\64\linuxsampler.exe |
265 |
File bin\64\liblinuxsampler-1.dll |
File bin\64\liblinuxsampler-1.dll |
266 |
|
File bin\64\libsqlite3-0.dll |
267 |
SetOutPath $vstPluginPath |
SetOutPath $vstPluginPath |
268 |
File bin\64\LinuxSampler.dll |
File bin\64\LinuxSampler.dll |
269 |
Goto done |
Goto done |
271 |
linuxsampler686sse: |
linuxsampler686sse: |
272 |
File bin\686sse\linuxsampler.exe |
File bin\686sse\linuxsampler.exe |
273 |
File bin\686sse\liblinuxsampler-1.dll |
File bin\686sse\liblinuxsampler-1.dll |
274 |
|
File bin\686\libsqlite3-0.dll |
275 |
SetOutPath $vstPluginPath |
SetOutPath $vstPluginPath |
276 |
File bin\686sse\LinuxSampler.dll |
File bin\686sse\LinuxSampler.dll |
277 |
Goto done |
Goto done |
279 |
linuxsampler686: |
linuxsampler686: |
280 |
File bin\686\linuxsampler.exe |
File bin\686\linuxsampler.exe |
281 |
File bin\686\liblinuxsampler-1.dll |
File bin\686\liblinuxsampler-1.dll |
282 |
|
File bin\686\libsqlite3-0.dll |
283 |
SetOutPath $vstPluginPath |
SetOutPath $vstPluginPath |
284 |
File bin\686\LinuxSampler.dll |
File bin\686\LinuxSampler.dll |
285 |
Goto done |
Goto done |
287 |
done: |
done: |
288 |
SectionEnd |
SectionEnd |
289 |
|
|
290 |
Section "JSampler 'Fantasia' 0.8a-cvs6" SecJSampler |
Section "JSampler 'Fantasia' 0.8a-cvs8" SecJSampler |
291 |
DetailPrint "Installing JSampler binaries ..." |
DetailPrint "Installing JSampler binaries ..." |
292 |
; make sure JRE is installed |
; make sure JRE is installed |
293 |
Call DetectJRE |
Call DetectJRE |
295 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
296 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
297 |
; Files to install |
; Files to install |
298 |
File bin\Fantasia-0.8a-cvs6.jar |
File bin\Fantasia-0.8a-cvs8.jar |
299 |
File jsampler.ico |
File jsampler.ico |
300 |
SectionEnd |
SectionEnd |
301 |
|
|
557 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1.12cvs (stand alone backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1.12cvs (stand alone backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0 |
558 |
|
|
559 |
StrCmp $installingJSampler '1' 0 +2 |
StrCmp $installingJSampler '1' 0 +2 |
560 |
CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a-cvs6 (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.8a-cvs6.jar"' '$INSTDIR\jsampler.ico' 0 |
CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a-cvs8 (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.8a-cvs8.jar"' '$INSTDIR\jsampler.ico' 0 |
561 |
|
|
562 |
StrCmp $installingQSampler '1' 0 +2 |
StrCmp $installingQSampler '1' 0 +2 |
563 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1.26 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1.26 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 |
573 |
Section "Uninstall" |
Section "Uninstall" |
574 |
Var /GLOBAL vstdir |
Var /GLOBAL vstdir |
575 |
|
|
576 |
|
Call un.DetectSystemType |
577 |
|
|
578 |
DetailPrint "Removing LinuxSampler directory from PATH variable ..." |
DetailPrint "Removing LinuxSampler directory from PATH variable ..." |
579 |
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR" |
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR" |
580 |
|
|