1 |
; LinuxSampler Windows installer |
; LinuxSampler Windows installer |
2 |
; |
; |
3 |
; Copyright (C) 2007, The LinuxSampler Developers |
; Copyright (C) 2007-2009, The LinuxSampler Developers |
4 |
; |
; |
5 |
; All-in-one Installer for all subprojects / software components of the |
; All-in-one Installer for all subprojects / software components of the |
6 |
; LinuxSampler Project. |
; LinuxSampler Project. |
7 |
|
; |
8 |
|
; PREREQUISITES: |
9 |
|
; |
10 |
|
; -> You must install the file cpudesc\cpudesc.dll into the NSIS's |
11 |
|
; plugin directory before being able to compile this installer! |
12 |
|
; |
13 |
|
; -> The compiled binaries must be placed into the respecitve directories |
14 |
|
; under bin\ (you have to read this file in order to get those exact |
15 |
|
; locations and expected file names). |
16 |
|
|
17 |
; Probably the best compression ratio |
; Probably the best compression ratio |
18 |
SetCompressor lzma |
SetCompressor lzma |
20 |
;Include Modern UI |
;Include Modern UI |
21 |
!include "MUI.nsh" |
!include "MUI.nsh" |
22 |
|
|
23 |
!define RELEASE_DATE "20071207" |
!define RELEASE_DATE "20090428" |
24 |
|
|
25 |
; The name of the installer |
; The name of the installer |
26 |
Name "LinuxSampler (${RELEASE_DATE})" |
Name "LinuxSampler (${RELEASE_DATE})" |
53 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org" |
54 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project" |
55 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" |
56 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2007 The LinuxSampler Project" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2009 The LinuxSampler Project" |
57 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" |
58 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" |
59 |
|
|
60 |
|
!define BIN_TYPE_64BIT "64 bit" |
61 |
|
!define BIN_TYPE_686SSE "686 SSE" |
62 |
|
!define BIN_TYPE_686 "686" |
63 |
|
|
64 |
;-------------------------------- |
;-------------------------------- |
65 |
; Pages |
; Pages |
66 |
|
|
89 |
StrCpy $installinggigedit "0" |
StrCpy $installinggigedit "0" |
90 |
FunctionEnd |
FunctionEnd |
91 |
|
|
92 |
|
; detects CPU capabilities and determmines which native binary type to install |
93 |
|
Function DetectSystemType |
94 |
|
Var /GLOBAL binType |
95 |
|
|
96 |
|
; check if this is a 64 bit windows |
97 |
|
System::Call "kernel32::GetCurrentProcess() i .s" |
98 |
|
System::Call "kernel32::IsWow64Process(i s, *i .r0)" |
99 |
|
IntCmp $0 0 not64bit |
100 |
|
StrCpy $binType BIN_TYPE_64BIT |
101 |
|
DetailPrint "64 bit Windows detected." |
102 |
|
Goto DetectSystemDone |
103 |
|
|
104 |
|
not64bit: ; a 32 bit system |
105 |
|
|
106 |
|
; check if CPU supports SSE |
107 |
|
cpudesc::tell |
108 |
|
Pop $0 ; full identification string in $0 |
109 |
|
StrCpy $1 $0 1, 34 ; pull out one character after SSE= |
110 |
|
IntFmt $2 "%u" $1 ; and turn it into a number |
111 |
|
IntCmpU $2 1 +1 +4 +4 |
112 |
|
StrCpy $binType BIN_TYPE_686SSE |
113 |
|
DetailPrint "32 bit Windows, SSE CPU detected." |
114 |
|
Goto DetectSystemDone |
115 |
|
StrCpy $binType BIN_TYPE_686 |
116 |
|
DetailPrint "32 bit Windows (no SSE support) detected." |
117 |
|
|
118 |
|
DetectSystemDone: |
119 |
|
FunctionEnd |
120 |
|
|
121 |
; 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 |
122 |
; download and install gtkmm now from the internet. |
; download and install gtkmm now from the internet. |
123 |
Function CheckForGtkmm |
Function CheckForGtkmm |
178 |
|
|
179 |
;-------------------------------- |
;-------------------------------- |
180 |
|
|
181 |
|
; primer things to do |
182 |
|
Section "" |
183 |
|
Call DetectSystemType |
184 |
|
SectionEnd |
185 |
|
|
186 |
|
;-------------------------------- |
187 |
|
|
188 |
; The stuff to install |
; The stuff to install |
189 |
Section "LinuxSampler 0.5.1" SecLinuxSampler |
Section "LinuxSampler 0.5.1" SecLinuxSampler |
190 |
|
DetailPrint "Installing LinuxSampler binaries ..." |
191 |
StrCpy $installingLinuxSampler "1" |
StrCpy $installingLinuxSampler "1" |
192 |
|
|
193 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
194 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
195 |
|
|
196 |
|
StrCmp $binType BIN_TYPE_64BIT linuxsampler64 |
197 |
|
StrCmp $binType BIN_TYPE_686SSE linuxsampler686sse |
198 |
|
Goto linuxsampler686 |
199 |
|
|
200 |
; Files to install |
; Files to install |
201 |
File linuxsampler.exe |
|
202 |
File liblinuxsampler-1.dll |
linuxsampler64: |
203 |
|
;File bin\64\linuxsampler.exe |
204 |
|
;File bin\64\liblinuxsampler-1.dll |
205 |
|
Goto done |
206 |
|
|
207 |
|
linuxsampler686sse: |
208 |
|
;File bin\686sse\linuxsampler.exe |
209 |
|
;File bin\686sse\liblinuxsampler-1.dll |
210 |
|
Goto done |
211 |
|
|
212 |
|
linuxsampler686: |
213 |
|
;File bin\686\linuxsampler.exe |
214 |
|
;File bin\686\liblinuxsampler-1.dll |
215 |
|
Goto done |
216 |
|
|
217 |
|
done: |
218 |
SectionEnd |
SectionEnd |
219 |
|
|
220 |
Section "JSampler 'Fantasia' 0.8a" SecJSampler |
Section "JSampler 'Fantasia' 0.8a" SecJSampler |
221 |
|
DetailPrint "Installing JSampler binaries ..." |
222 |
; make sure JRE is installed |
; make sure JRE is installed |
223 |
Call DetectJRE |
Call DetectJRE |
224 |
StrCpy $installingJSampler "1" |
StrCpy $installingJSampler "1" |
225 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
226 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
227 |
; Files to install |
; Files to install |
228 |
File Fantasia-0.8a.jar |
;File bin\Fantasia-0.8a.jar |
229 |
File jsampler.ico |
;File jsampler.ico |
230 |
SectionEnd |
SectionEnd |
231 |
|
|
232 |
Section "QSampler 0.2.1" SecQSampler |
Section "QSampler 0.2.1" SecQSampler |
233 |
|
DetailPrint "Installing QSampler binaries ..." |
234 |
StrCpy $installingQSampler "1" |
StrCpy $installingQSampler "1" |
235 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
236 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
237 |
; Files to install |
; Files to install |
238 |
File qsampler.exe |
;File bin\qsampler.exe |
239 |
File QtCore4.dll |
;File bin\QtCore4.dll |
240 |
File QtGui4.dll |
;File bin\QtGui4.dll |
241 |
File mingwm10.dll |
;File bin\mingwm10.dll |
242 |
File qsampler.ico |
;File qsampler.ico |
243 |
SectionEnd |
SectionEnd |
244 |
|
|
245 |
Section "gigedit 0.1.1" Secgigedit |
Section "gigedit 0.1.1" Secgigedit |
246 |
|
DetailPrint "Installing gigedit binaries ..." |
247 |
StrCpy $installinggigedit "1" |
StrCpy $installinggigedit "1" |
248 |
|
|
249 |
; make sure gtkmm is installed |
; make sure gtkmm is installed |
250 |
Call CheckForGtkmm |
Call CheckForGtkmm |
251 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
252 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
253 |
|
|
254 |
|
StrCmp $binType BIN_TYPE_64BIT gigedit64 |
255 |
|
StrCmp $binType BIN_TYPE_686SSE gigedit686sse |
256 |
|
Goto gigedit686 |
257 |
|
|
258 |
; Files to install |
; Files to install |
259 |
File gigedit.exe |
|
260 |
File libsndfile-1.dll |
gigedit64: |
261 |
SetOutPath "$INSTDIR\plugins" |
;File bin\64\gigedit.exe |
262 |
File libgigedit.dll |
SetOutPath "$INSTDIR\Plugins" |
263 |
|
;File bin\64\libgigedit.dll |
264 |
|
Goto done |
265 |
|
|
266 |
|
gigedit686sse: |
267 |
|
;File bin\686sse\gigedit.exe |
268 |
|
SetOutPath "$INSTDIR\Plugins" |
269 |
|
;File bin\686sse\libgigedit.dll |
270 |
|
Goto done |
271 |
|
|
272 |
|
gigedit686: |
273 |
|
;File bin\686\gigedit.exe |
274 |
|
SetOutPath "$INSTDIR\Plugins" |
275 |
|
;File bin\686\libgigedit.dll |
276 |
|
Goto done |
277 |
|
|
278 |
|
done: |
279 |
SectionEnd |
SectionEnd |
280 |
|
|
281 |
Section "libgig 3.2.1" Seclibgig |
Section "libgig 3.2.1" Seclibgig |
282 |
|
DetailPrint "Installing libgig binaries ..." |
283 |
; We make this a mandatory component |
; We make this a mandatory component |
284 |
SectionIn RO |
SectionIn RO |
285 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
286 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
287 |
|
|
288 |
|
StrCmp $binType BIN_TYPE_64BIT libgig64 |
289 |
|
StrCmp $binType BIN_TYPE_686SSE libgig686sse |
290 |
|
Goto libgig686 |
291 |
|
|
292 |
; Files to install |
; Files to install |
293 |
File libgig-6.dll |
|
294 |
File rifftree.exe |
libgig64: |
295 |
File dlsdump.exe |
;File bin\64\libgig-6.dll |
296 |
File gigdump.exe |
;File bin\64\rifftree.exe |
297 |
File gigextract.exe |
;File bin\64\dlsdump.exe |
298 |
|
;File bin\64\gigdump.exe |
299 |
|
;File bin\64\gigextract.exe |
300 |
|
Goto done |
301 |
|
|
302 |
|
libgig686sse: |
303 |
|
;File bin\686sse\libgig-6.dll |
304 |
|
;File bin\686sse\rifftree.exe |
305 |
|
;File bin\686sse\dlsdump.exe |
306 |
|
;File bin\686sse\gigdump.exe |
307 |
|
;File bin\686sse\gigextract.exe |
308 |
|
Goto done |
309 |
|
|
310 |
|
libgig686: |
311 |
|
;File bin\686\libgig-6.dll |
312 |
|
;File bin\686\rifftree.exe |
313 |
|
;File bin\686\dlsdump.exe |
314 |
|
;File bin\686\gigdump.exe |
315 |
|
;File bin\686\gigextract.exe |
316 |
|
Goto done |
317 |
|
|
318 |
|
done: |
319 |
|
|
320 |
; As this is a mandatory component, we misuse it to install the uninstaller as well ... |
; As this is a mandatory component, we misuse it to install the uninstaller as well ... |
321 |
; Write the uninstall keys for Windows |
; Write the uninstall keys for Windows |
322 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}" |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}" |
328 |
WriteRegStr HKCU "Software\LinuxSampler" "" $INSTDIR |
WriteRegStr HKCU "Software\LinuxSampler" "" $INSTDIR |
329 |
SectionEnd |
SectionEnd |
330 |
|
|
331 |
|
Section "libsndfile 1.0.17" Seclibsndfile |
332 |
|
DetailPrint "Installing libsndfile binaries ..." |
333 |
|
; We make this a mandatory component |
334 |
|
SectionIn RO |
335 |
|
; Set output path to the installation directory. |
336 |
|
SetOutPath $INSTDIR |
337 |
|
|
338 |
|
StrCmp $binType BIN_TYPE_64BIT libsndfile64 |
339 |
|
; I think we don't need a SSE optimized 32 bit binary for libsndfile, one 64bit and one simple 32 bit DLL should be sufficient |
340 |
|
;StrCmp $binType BIN_TYPE_686SSE libsndfile686sse |
341 |
|
Goto libsndfile686 |
342 |
|
|
343 |
|
; Files to install |
344 |
|
|
345 |
|
libsndfile64: |
346 |
|
;File bin\64\libsndfile-1.dll |
347 |
|
Goto done |
348 |
|
|
349 |
|
libsndfile686: |
350 |
|
;File bin\686\libsndfile-1.dll |
351 |
|
Goto done |
352 |
|
|
353 |
|
done: |
354 |
|
SectionEnd |
355 |
|
|
356 |
Section "Start Menu Shortcuts" SecShortcuts |
Section "Start Menu Shortcuts" SecShortcuts |
|
|
|
357 |
CreateDirectory "$SMPROGRAMS\LinuxSampler" |
CreateDirectory "$SMPROGRAMS\LinuxSampler" |
358 |
|
|
359 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
360 |
|
|
361 |
StrCmp $installingLinuxSampler '1' 0 +2 |
StrCmp $installingLinuxSampler '1' 0 +2 |
362 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1 (backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1 (backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0 |
363 |
|
|
364 |
StrCmp $installingJSampler '1' 0 +2 |
StrCmp $installingJSampler '1' 0 +2 |
365 |
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 (frontend).lnk' 'javaw' '-jar "$INSTDIR\Fantasia-0.8a.jar"' '$INSTDIR\jsampler.ico' 0 |
366 |
|
|
367 |
StrCmp $installingQSampler '1' 0 +2 |
StrCmp $installingQSampler '1' 0 +2 |
368 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 |
369 |
|
|
370 |
StrCmp $installinggigedit '1' 0 +2 |
StrCmp $installinggigedit '1' 0 +2 |
371 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0 |
|
|
|
372 |
SectionEnd |
SectionEnd |
373 |
|
|
374 |
;-------------------------------- |
;-------------------------------- |
398 |
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!" |
399 |
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. NOTE: this is yet an early development version!" |
400 |
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." |
401 |
|
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." |
402 |
LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications." |
LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications." |
403 |
|
|
404 |
;Assign language strings to sections |
;Assign language strings to sections |
408 |
!insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler) |
!insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler) |
409 |
!insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit) |
!insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit) |
410 |
!insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig) |
!insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig) |
411 |
|
!insertmacro MUI_DESCRIPTION_TEXT ${Seclibsndfile} $(DESC_Seclibsndfile) |
412 |
!insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts) |
!insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts) |
413 |
!insertmacro MUI_FUNCTION_DESCRIPTION_END |
!insertmacro MUI_FUNCTION_DESCRIPTION_END |