/[svn]/misc/trunk/win32_installer/linuxsampler_all.nsi
ViewVC logotype

Diff of /misc/trunk/win32_installer/linuxsampler_all.nsi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1902 by schoenebeck, Tue May 12 15:54:11 2009 UTC revision 1926 by schoenebeck, Thu Jul 2 16:11:49 2009 UTC
# Line 21  SetCompressor lzma Line 21  SetCompressor lzma
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})"
# Line 31  OutFile "linuxsampler_${RELEASE_DATE}_se Line 31  OutFile "linuxsampler_${RELEASE_DATE}_se
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_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11292"  !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=31623"
36    
37  ; The default installation directory  ; The default installation directory
38  InstallDir "$PROGRAMFILES64\LinuxSampler"  InstallDir "$PROGRAMFILES64\LinuxSampler"
39    
40  !define DEFAULT_VST_DIR "$PROGRAMFILES\Steinberg\VstPlugins"  !define DEFAULT_VST_DIR "$PROGRAMFILES64\Steinberg\VstPlugins"
41    
42  ; Get installation folder from registry if available  ; Get installation folder from registry if available
43  InstallDirRegKey HKLM "Software\LinuxSampler" "Main Directory"  InstallDirRegKey HKLM "Software\LinuxSampler" "Main Directory"
# Line 64  VIAddVersionKey /LANG=${LANG_ENGLISH} "F Line 65  VIAddVersionKey /LANG=${LANG_ENGLISH} "F
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    
# Line 90  Function .onInit Line 93  Function .onInit
93    StrCpy $installingJSampler "0"    StrCpy $installingJSampler "0"
94    StrCpy $installingQSampler "0"    StrCpy $installingQSampler "0"
95    StrCpy $installinggigedit "0"    StrCpy $installinggigedit "0"
   
   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)"
# Line 126  Function DetectSystemType Line 126  Function DetectSystemType
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.
# Line 161  FunctionEnd Line 164  FunctionEnd
164    
165  ; Downloads and launches the JRE installer from the internet  ; Downloads and launches the JRE installer from the internet
166  Function GetJRE  Function GetJRE
167          MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \    Var /GLOBAL jreUri
                          be downloaded and installed"  
168    
169          StrCpy $2 "$TEMP\Java Runtime Environment.exe"    StrCmp $binType BIN_TYPE_64BIT 0 +3
170          nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2    StrCpy $jreUri ${JRE_64_URL}
171          Pop $R0 ;Get the return value    Goto +2
172                  StrCmp $R0 "success" +3    StrCpy $jreUri ${JRE_32_URL}
173                  MessageBox MB_OK "Download failed: $R0"  
174                  Quit    DetailPrint "Downloading JRE from: $jreUri"
175          ExecWait $2  
176          Delete $2    MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \
177                        be downloaded and installed"
178    
179      StrCpy $2 "$TEMP\Java Runtime Environment.exe"
180      nsisdl::download /TIMEOUT=30000 "$jreUri" $2
181      Pop $R0  ; Get the return value
182      StrCmp $R0 "success" +3
183      MessageBox MB_OK "Download failed: $R0"
184      Quit
185      ExecWait $2
186      Delete $2
187  FunctionEnd  FunctionEnd
188    
189  ; Checks if the JRE is already installed, if not it will download and install it from the internet  ; Checks if the JRE is already installed, if not it will download and install it from the internet
# Line 180  Function DetectJRE Line 192  Function DetectJRE
192               "CurrentVersion"               "CurrentVersion"
193    StrCmp $2 ${JRE_VERSION} done    StrCmp $2 ${JRE_VERSION} done
194    
195      StrCmp $binType BIN_TYPE_64BIT 0 downloadjre
196    
197      ; on 64 bit systems also check the 32 bit view of the registry, maybe
198      ; a 32 bit JRE was already installed
199      SetRegView 32
200      ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
201                 "CurrentVersion"
202      SetRegView 64  ; restore 64 bit view
203      StrCmp $3 ${JRE_VERSION} done
204    
205      downloadjre:
206    Call GetJRE    Call GetJRE
207    
208    done:    done:
# Line 215  FunctionEnd Line 238  FunctionEnd
238    
239  ;--------------------------------  ;--------------------------------
240    
241  ; primer things to do  ; primer things to do (before installing, not called on uninstall)
242  Section ""  Section ""
243      Call DetectSystemType
244    Call DetectVstPath    Call DetectVstPath
245  SectionEnd  SectionEnd
246    
# Line 239  Section "LinuxSampler 0.5.1.12cvs" SecLi Line 263  Section "LinuxSampler 0.5.1.12cvs" SecLi
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
# Line 246  Section "LinuxSampler 0.5.1.12cvs" SecLi Line 271  Section "LinuxSampler 0.5.1.12cvs" SecLi
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
# Line 253  Section "LinuxSampler 0.5.1.12cvs" SecLi Line 279  Section "LinuxSampler 0.5.1.12cvs" SecLi
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
# Line 260  Section "LinuxSampler 0.5.1.12cvs" SecLi Line 287  Section "LinuxSampler 0.5.1.12cvs" SecLi
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
# Line 268  Section "JSampler 'Fantasia' 0.8a-cvs6" Line 295  Section "JSampler 'Fantasia' 0.8a-cvs6"
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    
# Line 506  Section "libsndfile 1.0.19" Seclibsndfil Line 533  Section "libsndfile 1.0.19" Seclibsndfil
533  SectionEnd  SectionEnd
534    
535  Section "Start Menu Shortcuts" SecShortcuts  Section "Start Menu Shortcuts" SecShortcuts
536      Var /GLOBAL javawbin
537    
538    ; Switch system variables to 'all users', to ensure we create the start    ; Switch system variables to 'all users', to ensure we create the start
539    ; menu shortcuts for all users and not just for the current user.    ; menu shortcuts for all users and not just for the current user.
540    SetShellVarContext all    SetShellVarContext all
541    
542      ; try to resolve the full qualified path of the javaw binary
543      ClearErrors
544      SearchPath $javawbin javaw.exe
545      IfErrors 0 javawDetected
546      ClearErrors
547      ; if all fails, simply use SYSDIR (which should work almost always anyway)
548      DetailPrint "WRN: Could not resolve javaw.exe path, using SYSDIR."
549      StrCpy $javawbin "$SYSDIR\javaw.exe"
550      javawDetected:
551    
552    CreateDirectory "$SMPROGRAMS\LinuxSampler"    CreateDirectory "$SMPROGRAMS\LinuxSampler"
553    
554    CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0    CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
# Line 518  Section "Start Menu Shortcuts" SecShortc Line 557  Section "Start Menu Shortcuts" SecShortc
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' 'javaw' '-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
# Line 534  SectionEnd Line 573  SectionEnd
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    

Legend:
Removed from v.1902  
changed lines
  Added in v.1926

  ViewVC Help
Powered by ViewVC