/[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 1900 by schoenebeck, Mon May 11 19:50:03 2009 UTC revision 1902 by schoenebeck, Tue May 12 15:54:11 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 "20090511"  !define RELEASE_DATE "20090512"
25    
26  ; The name of the installer  ; The name of the installer
27  Name "LinuxSampler (${RELEASE_DATE})"  Name "LinuxSampler (${RELEASE_DATE})"
# Line 34  OutFile "linuxsampler_${RELEASE_DATE}_se Line 34  OutFile "linuxsampler_${RELEASE_DATE}_se
34  !define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11292"  !define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11292"
35    
36  ; The default installation directory  ; The default installation directory
37  InstallDir $PROGRAMFILES\LinuxSampler  InstallDir "$PROGRAMFILES64\LinuxSampler"
38    
39    !define DEFAULT_VST_DIR "$PROGRAMFILES\Steinberg\VstPlugins"
40    
41  ; Get installation folder from registry if available  ; Get installation folder from registry if available
42  InstallDirRegKey HKCU "Software\LinuxSampler" ""  InstallDirRegKey HKLM "Software\LinuxSampler" "Main Directory"
43    
44  ;--------------------------------  ;--------------------------------
45  ;Interface Settings  ;Interface Settings
# Line 88  Function .onInit Line 90  Function .onInit
90    StrCpy $installingJSampler "0"    StrCpy $installingJSampler "0"
91    StrCpy $installingQSampler "0"    StrCpy $installingQSampler "0"
92    StrCpy $installinggigedit "0"    StrCpy $installinggigedit "0"
93    
94      Call DetectSystemType
95  FunctionEnd  FunctionEnd
96    
97  ; detects CPU capabilities and determmines which native binary type to install  ; detects CPU capabilities, determmines which native binary type to install
98    ; and selects the appropriate windows registry view (32 bit or 64 bit)
99  Function DetectSystemType  Function DetectSystemType
100    Var /GLOBAL binType    Var /GLOBAL binType
101    
# Line 100  Function DetectSystemType Line 105  Function DetectSystemType
105    IntCmp $0 0 not64bit    IntCmp $0 0 not64bit
106    StrCpy $binType BIN_TYPE_64BIT    StrCpy $binType BIN_TYPE_64BIT
107    DetailPrint "64 bit Windows detected."    DetailPrint "64 bit Windows detected."
108      SetRegView 64
109    Goto DetectSystemDone    Goto DetectSystemDone
110    
111    not64bit: ; a 32 bit system    not64bit: ; a 32 bit system
112    
113      SetRegView 32
114    
115    ; check if CPU supports SSE    ; check if CPU supports SSE
116    cpudesc::tell    cpudesc::tell
117    Pop $0                     ; full identification string in $0    Pop $0                     ; full identification string in $0
# Line 199  Function DetectVstPath Line 207  Function DetectVstPath
207    noRegistryKeyExists:    noRegistryKeyExists:
208    ClearErrors    ClearErrors
209    DetailPrint "No VST plugin directory defined in registry."    DetailPrint "No VST plugin directory defined in registry."
210    StrCpy $vstPluginPath "$PROGRAMFILES\Steinberg\VstPlugins"    StrCpy $vstPluginPath "${DEFAULT_VST_DIR}"
211    
212    done:    done:
213    DetailPrint "Using the following as VST plugin directory: $vstPluginPath"    DetailPrint "Using the following as VST plugin directory: $vstPluginPath"
# Line 209  FunctionEnd Line 217  FunctionEnd
217    
218  ; primer things to do  ; primer things to do
219  Section ""  Section ""
   Call DetectSystemType  
220    Call DetectVstPath    Call DetectVstPath
221  SectionEnd  SectionEnd
222    
# Line 452  Section "libgig 3.2.1.x (cvs2009-05-03)" Line 459  Section "libgig 3.2.1.x (cvs2009-05-03)"
459    
460    done:    done:
461    
462    ; As this is a mandatory component, we add the common binary directory    ; As this is a mandatory component, we misuse is for the following
463    ; of LinuxSampler and friends to the system's PATH variable here ...    ; common tasks as well ...
464    
465      ; Add LinuxSampler and friends to the system's PATH variable
466    ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"    ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
467    
   ; As this is a mandatory component, we misuse it to install the uninstaller as well ...  
468    ; Write the uninstall keys for Windows    ; Write the uninstall keys for Windows
469    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}"    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}"
470    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'
471    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1
472    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1
473    WriteUninstaller "uninstall.exe"    WriteUninstaller "uninstall.exe"
474    ;Store installation folder  
475    WriteRegStr HKCU "Software\LinuxSampler" "" $INSTDIR    ; Store installation folders
476      WriteRegStr HKLM "Software\LinuxSampler" "Main Directory" $INSTDIR
477      WriteRegStr HKLM "Software\LinuxSampler" "VST Directory" $vstPluginPath
478    
479      ; Just for info, store the release date as well
480      WriteRegStr HKLM "Software\LinuxSampler" "Release Date" ${RELEASE_DATE}
481  SectionEnd  SectionEnd
482    
483  Section "libsndfile 1.0.19" Seclibsndfile  Section "libsndfile 1.0.19" Seclibsndfile
# Line 493  Section "libsndfile 1.0.19" Seclibsndfil Line 506  Section "libsndfile 1.0.19" Seclibsndfil
506  SectionEnd  SectionEnd
507    
508  Section "Start Menu Shortcuts" SecShortcuts  Section "Start Menu Shortcuts" SecShortcuts
509      ; Switch system variables to 'all users', to ensure we create the start
510      ; menu shortcuts for all users and not just for the current user.
511      SetShellVarContext all
512    
513    CreateDirectory "$SMPROGRAMS\LinuxSampler"    CreateDirectory "$SMPROGRAMS\LinuxSampler"
514    
515    CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0    CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
516    
517    StrCmp $installingLinuxSampler '1' 0 +2    StrCmp $installingLinuxSampler '1' 0 +2
518    CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1 (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
519    
520    StrCmp $installingJSampler '1' 0 +2    StrCmp $installingJSampler '1' 0 +2
521    CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a (frontend).lnk' 'javaw' '-jar "$INSTDIR\Fantasia-0.8a.jar"' '$INSTDIR\jsampler.ico' 0    CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a-cvs6 (frontend).lnk' 'javaw' '-jar "$INSTDIR\Fantasia-0.8a-cvs6.jar"' '$INSTDIR\jsampler.ico' 0
522    
523    StrCmp $installingQSampler '1' 0 +2    StrCmp $installingQSampler '1' 0 +2
524    CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1 (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
525    
526    StrCmp $installinggigedit '1' 0 +2    StrCmp $installinggigedit '1' 0 +2
527    CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0    CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1.x cvs2009-05-10 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
528  SectionEnd  SectionEnd
529    
530  ;--------------------------------  ;--------------------------------
# Line 515  SectionEnd Line 532  SectionEnd
532  ; Uninstaller  ; Uninstaller
533    
534  Section "Uninstall"  Section "Uninstall"
535      Var /GLOBAL vstdir
536    
537    DetailPrint "Removing LinuxSampler directory from PATH variable ..."    DetailPrint "Removing LinuxSampler directory from PATH variable ..."
538    ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"    ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"
539    
540      DetailPrint "Searching for VST plugin ..."
541      ClearErrors
542      ReadRegStr $0 HKLM "Software\LinuxSampler" "VST Directory"
543      IfErrors usedefaultvstdir 0
544      StrCpy $vstdir $0
545      DetailPrint "VST plugin location found in registry."
546      Goto vstdirDetected
547      usedefaultvstdir:
548      DetailPrint "WRN: No VST plugin location found in registry, trying default location."
549      ClearErrors
550      StrCpy $vstdir "${DEFAULT_VST_DIR}"
551      vstdirDetected:
552    
553    DetailPrint "Removing registry keys ..."    DetailPrint "Removing registry keys ..."
554    DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"    DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"
555      DeleteRegKey HKLM "Software\LinuxSampler"
556    
557    DetailPrint "Removing VST plugin ..."    ; Workaround for Vista and younger: switch system variables to 'all users'
558    Delete $vstPluginPath\LinuxSampler.dll    ; otherwise e.g. we couldn't delete start menu shortcuts below on those
559      ; systems, as those variables would point to the current user.
560      SetShellVarContext all
561    
562    DetailPrint "Removing shortcuts (if any) ..."    DetailPrint "Removing shortcuts (if any) from: $SMPROGRAMS ..."
563    Delete "$SMPROGRAMS\LinuxSampler\*.*"    Delete "$SMPROGRAMS\LinuxSampler\*.*"
564    
565      DetailPrint "Removing VST plugin from: $vstdir ..."
566      Delete "$vstdir\LinuxSampler.dll"
567    
568    DetailPrint "Removing directories used ..."    DetailPrint "Removing directories used ..."
569    RMDir "$SMPROGRAMS\LinuxSampler"    RMDir /r "$SMPROGRAMS\LinuxSampler"
570    RMDir /r "$INSTDIR"    RMDir /r "$INSTDIR"
571  SectionEnd  SectionEnd
572    
# Line 536  SectionEnd Line 574  SectionEnd
574  ;Descriptions  ;Descriptions
575    
576  ;Language strings  ;Language strings
577  LangString DESC_SecLinuxSampler ${LANG_ENGLISH} "Sampler backend (stand-alone application and VST plugin), including sampler engine, MIDI and audio drivers, native C++ API as well as network (LSCP) API. Use a frontend application like JSampler or QSampler to control the sampler."  LangString DESC_SecLinuxSampler ${LANG_ENGLISH} "Sampler backend (stand-alone and VST), including sampler engine, MIDI and audio drivers, native C++ API as well as network (LSCP) API. Use a frontend application like JSampler or QSampler to control the sampler."
578  LangString DESC_SecJSampler ${LANG_ENGLISH} "Graphical frontend (user interface) for LinuxSampler written in Java, supporting all current features of LinuxSampler. This is the 'Fantasia' distribution of JSampler, offering a modern skin based look."  LangString DESC_SecJSampler ${LANG_ENGLISH} "Graphical frontend (user interface) for LinuxSampler written in Java, supporting all current features of LinuxSampler. This is the 'Fantasia' distribution of JSampler, offering a modern skin based look."
579  LangString DESC_SecQSampler ${LANG_ENGLISH} "Graphical light-weight frontend (user interface) for LinuxSampler written in C++, offering a fast native user interface. NOTE: QSampler doesn't support all LinuxSampler features yet!"  LangString DESC_SecQSampler ${LANG_ENGLISH} "Graphical light-weight frontend (user interface) for LinuxSampler written in C++, offering a fast native user interface. NOTE: QSampler doesn't support all LinuxSampler features yet!"
580  LangString DESC_Secgigedit ${LANG_ENGLISH} "Graphical instrument editor for Gigasampler format v2 and v3 files. Can be used stand-alone or in conjunction with LinuxSampler. NOTE: this is yet an early development version!"  LangString DESC_Secgigedit ${LANG_ENGLISH} "Graphical instrument editor for Gigasampler format v2 and v3 files. Can be used stand-alone or in conjunction with LinuxSampler."
581  LangString DESC_Seclibgig ${LANG_ENGLISH} "C++ program library for accessing DLS (Level 1 and Level 2) and Gigasampler format (v2 and v3) files. This library is required by LinuxSampler, gigedit and QSampler."  LangString DESC_Seclibgig ${LANG_ENGLISH} "C++ program library for accessing DLS (Level 1 and Level 2) and Gigasampler format (v2 and v3) files. This library is required by LinuxSampler, gigedit and QSampler."
582  LangString DESC_Seclibsndfile ${LANG_ENGLISH} "C program library for reading and writing files containing sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format), used by gigedit to import samples."  LangString DESC_Seclibsndfile ${LANG_ENGLISH} "C program library for reading and writing files containing sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format), used by gigedit to import samples."
583  LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."  LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."

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

  ViewVC Help
Powered by ViewVC