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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1581 - (hide annotations) (download)
Fri Dec 7 17:52:39 2007 UTC (16 years, 4 months ago) by schoenebeck
File size: 10079 byte(s)
* windows installer release 20071207

1 schoenebeck 1547 ; LinuxSampler Windows installer
2     ;
3     ; Copyright (C) 2007, The LinuxSampler Developers
4     ;
5     ; All-in-one Installer for all subprojects / software components of the
6     ; LinuxSampler Project.
7    
8     ; Probably the best compression ratio
9     SetCompressor lzma
10    
11     ;Include Modern UI
12     !include "MUI.nsh"
13    
14 schoenebeck 1581 !define RELEASE_DATE "20071207"
15    
16 schoenebeck 1547 ; The name of the installer
17 schoenebeck 1581 Name "LinuxSampler (${RELEASE_DATE})"
18 schoenebeck 1547
19     ; The file to write
20 schoenebeck 1581 OutFile "linuxsampler_${RELEASE_DATE}_setup.exe"
21 schoenebeck 1547
22     ; Java Runtime Environment, needed for JSampler
23     !define JRE_VERSION "1.6"
24     !define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11292"
25    
26     ; The default installation directory
27     InstallDir $PROGRAMFILES\LinuxSampler
28    
29     ; Get installation folder from registry if available
30     InstallDirRegKey HKCU "Software\LinuxSampler" ""
31    
32     ;--------------------------------
33     ;Interface Settings
34    
35     !define MUI_HEADERIMAGE
36     !define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp"
37     !define MUI_ABORTWARNING
38    
39     ;--------------------------------
40     ;Version Information
41    
42     VIProductVersion "0.0.0.0"
43 schoenebeck 1581 VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "all-in-one installer"
44 schoenebeck 1547 VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org"
45     VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project"
46     VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" ""
47     VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "� 2003-2007 The LinuxSampler Project"
48 schoenebeck 1581 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})"
49 schoenebeck 1547 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0"
50    
51     ;--------------------------------
52     ; Pages
53    
54     !insertmacro MUI_PAGE_LICENSE "license.rtf"
55     !insertmacro MUI_PAGE_COMPONENTS
56     !insertmacro MUI_PAGE_DIRECTORY
57     !insertmacro MUI_PAGE_INSTFILES
58     !insertmacro MUI_UNPAGE_CONFIRM
59     !insertmacro MUI_UNPAGE_INSTFILES
60    
61     ;--------------------------------
62     ;Languages
63    
64     !insertmacro MUI_LANGUAGE "English"
65    
66     ;--------------------------------
67    
68 schoenebeck 1581 Function .onInit
69     Var /GLOBAL installingLinuxSampler
70     Var /GLOBAL installingJSampler
71     Var /GLOBAL installingQSampler
72     Var /GLOBAL installinggigedit
73     StrCpy $installingLinuxSampler "0"
74     StrCpy $installingJSampler "0"
75     StrCpy $installingQSampler "0"
76     StrCpy $installinggigedit "0"
77     FunctionEnd
78    
79 schoenebeck 1547 ; Check for the presence of gtkmm, and if false, ask the user whether to
80     ; download and install gtkmm now from the internet.
81     Function CheckForGtkmm
82     Var /GLOBAL gtkmmSetupFile
83    
84 schoenebeck 1581 ClearErrors
85 schoenebeck 1547 ; This is just a lazy check for the presence of gtkmm, we should better use:
86     ; System::Call function (NSI internal function) to actually call an arbitrary
87     ; gtkmm function (/method) from a gtkmm DLL to make it certain
88     ReadRegStr $0 HKCU "Software\gtkmm\2.4" "Installer Language"
89     IfErrors +2 0
90     goto NoAbort
91     MessageBox MB_YESNO "gtkmm not found. Install it now (internet connection needed)?" IDYES InstallGtkmm
92     MessageBox MB_YESNO "gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
93     Abort ; causes installer to quit
94     InstallGtkmm:
95     ClearErrors
96     StrCpy $gtkmmSetupFile $TEMP\gtkmm-win32-runtime-2.10.11-1.exe
97     NSISdl::download "http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-runtime-2.10.11-1.exe" $gtkmmSetupFile
98     IfErrors 0 +2
99     Goto InstallGtkmmFailed
100     ExecWait $gtkmmSetupFile
101     Delete $gtkmmSetupFile ; we don't need it anymore
102     IfErrors 0 +2
103     Goto InstallGtkmmFailed
104     Goto NoAbort
105     InstallGtkmmFailed:
106     MessageBox MB_YESNO "Could not download gtkmm. gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
107     Abort ; causes installer to quit
108     NoAbort:
109     FunctionEnd
110    
111     ; Downloads and launches the JRE installer from the internet
112     Function GetJRE
113     MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \
114     be downloaded and installed"
115    
116     StrCpy $2 "$TEMP\Java Runtime Environment.exe"
117     nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2
118     Pop $R0 ;Get the return value
119     StrCmp $R0 "success" +3
120     MessageBox MB_OK "Download failed: $R0"
121     Quit
122     ExecWait $2
123     Delete $2
124     FunctionEnd
125    
126     ; Checks if the JRE is already installed, if not it will download and install it from the internet
127     Function DetectJRE
128     ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
129     "CurrentVersion"
130     StrCmp $2 ${JRE_VERSION} done
131    
132     Call GetJRE
133    
134     done:
135     FunctionEnd
136    
137     ;--------------------------------
138    
139     ; The stuff to install
140     Section "LinuxSampler 0.5.1" SecLinuxSampler
141 schoenebeck 1581 StrCpy $installingLinuxSampler "1"
142 schoenebeck 1547 ; Set output path to the installation directory.
143     SetOutPath $INSTDIR
144     ; Files to install
145 schoenebeck 1581 File linuxsampler.exe
146     File liblinuxsampler-1.dll
147 schoenebeck 1547 SectionEnd
148    
149 schoenebeck 1581 Section "JSampler 'Fantasia' 0.8a" SecJSampler
150 schoenebeck 1547 ; make sure JRE is installed
151     Call DetectJRE
152 schoenebeck 1581 StrCpy $installingJSampler "1"
153 schoenebeck 1547 ; Set output path to the installation directory.
154     SetOutPath $INSTDIR
155     ; Files to install
156 schoenebeck 1581 File Fantasia-0.8a.jar
157     File jsampler.ico
158 schoenebeck 1547 SectionEnd
159    
160 schoenebeck 1581 Section "QSampler 0.2.1" SecQSampler
161     StrCpy $installingQSampler "1"
162 schoenebeck 1547 ; Set output path to the installation directory.
163     SetOutPath $INSTDIR
164     ; Files to install
165 schoenebeck 1581 File qsampler.exe
166     File QtCore4.dll
167     File QtGui4.dll
168     File mingwm10.dll
169 schoenebeck 1547 SectionEnd
170    
171     Section "gigedit 0.1.1" Secgigedit
172 schoenebeck 1581 StrCpy $installinggigedit "1"
173 schoenebeck 1547 ; make sure gtkmm is installed
174     Call CheckForGtkmm
175     ; Set output path to the installation directory.
176     SetOutPath $INSTDIR
177     ; Files to install
178 schoenebeck 1581 File gigedit.exe
179     File libsndfile-1.dll
180     SetOutPath "$INSTDIR\plugins"
181     File libgigedit.dll
182 schoenebeck 1547 SectionEnd
183    
184     Section "libgig 3.2.1" Seclibgig
185     ; We make this a mandatory component
186     SectionIn RO
187     ; Set output path to the installation directory.
188     SetOutPath $INSTDIR
189     ; Files to install
190 schoenebeck 1581 File libgig-6.dll
191     File rifftree.exe
192     File dlsdump.exe
193     File gigdump.exe
194     File gigextract.exe
195 schoenebeck 1547 ; As this is a mandatory component, we misuse it to install the uninstaller as well ...
196     ; Write the uninstall keys for Windows
197 schoenebeck 1581 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}"
198 schoenebeck 1547 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'
199     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1
200     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1
201     WriteUninstaller "uninstall.exe"
202     ;Store installation folder
203     WriteRegStr HKCU "Software\LinuxSampler" "" $INSTDIR
204     SectionEnd
205    
206     Section "Start Menu Shortcuts" SecShortcuts
207 schoenebeck 1581
208 schoenebeck 1547 CreateDirectory "$SMPROGRAMS\LinuxSampler"
209 schoenebeck 1581
210 schoenebeck 1547 CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
211 schoenebeck 1581
212     StrCmp $installingLinuxSampler '1' 0 +2
213     CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1 (backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0
214    
215     StrCmp $installingJSampler '1' 0 +2
216     CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a (frontend).lnk' 'javaw' '-jar "$INSTDIR\Fantasia-0.8a.jar"' '$INSTDIR\jsampler.ico' 0
217    
218     StrCmp $installingQSampler '1' 0 +2
219     CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.exe" 0
220    
221     StrCmp $installinggigedit '1' 0 +2
222     CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
223    
224 schoenebeck 1547 SectionEnd
225    
226     ;--------------------------------
227    
228     ; Uninstaller
229    
230     Section "Uninstall"
231     ; Remove registry keys
232     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"
233     ; Remove files and uninstaller
234     Delete $INSTDIR\*.*
235 schoenebeck 1581 Delete $INSTDIR\plugins\*.*
236 schoenebeck 1547 ; Remove shortcuts, if any
237     Delete "$SMPROGRAMS\LinuxSampler\*.*"
238     ; Remove directories used
239     RMDir "$SMPROGRAMS\LinuxSampler"
240 schoenebeck 1581 RMDir "$INSTDIR\plugins"
241 schoenebeck 1547 RMDir "$INSTDIR"
242     SectionEnd
243    
244     ;--------------------------------
245     ;Descriptions
246    
247     ;Language strings
248     LangString DESC_SecLinuxSampler ${LANG_ENGLISH} "Sampler backend, 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."
249     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."
250     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!"
251     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!"
252     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."
253     LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."
254    
255     ;Assign language strings to sections
256     !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
257     !insertmacro MUI_DESCRIPTION_TEXT ${SecLinuxSampler} $(DESC_SecLinuxSampler)
258     !insertmacro MUI_DESCRIPTION_TEXT ${SecJSampler} $(DESC_SecJSampler)
259     !insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler)
260     !insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit)
261     !insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig)
262     !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts)
263     !insertmacro MUI_FUNCTION_DESCRIPTION_END

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC