1 |
; LinuxSampler Windows installer |
; LinuxSampler Windows installer |
2 |
; |
; |
3 |
; Copyright (C) 2007-2009, The LinuxSampler Developers |
; Copyright (C) 2007-2010, 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. |
21 |
!include "MUI.nsh" |
!include "MUI.nsh" |
22 |
!include "EnvVarUpdate.nsh" |
!include "EnvVarUpdate.nsh" |
23 |
|
|
24 |
!define RELEASE_DATE "20090803" |
!define /date RELEASE_DATE "%Y%m%d" |
25 |
|
!searchparse /file bin/686/linuxsampler.pc `Version: ` LINUXSAMPLER_VERSION |
26 |
|
!searchparse /file bin/686/gig.pc `Version: ` LIBGIG_VERSION |
27 |
|
!searchparse /file bin/686/gigedit.version `` GIGEDIT_VERSION |
28 |
|
!define FANTASIA_VERSION "0.9" |
29 |
|
!searchparse /file bin/686/qsampler.version `` QSAMPLER_VERSION |
30 |
|
!searchparse /file bin/686/sndfile.pc `Version: ` SNDFILE_VERSION |
31 |
|
|
32 |
; The name of the installer |
; The name of the installer |
33 |
Name "LinuxSampler (${RELEASE_DATE})" |
Name "LinuxSampler (${RELEASE_DATE})" |
37 |
|
|
38 |
; Java Runtime Environment, needed for JSampler |
; Java Runtime Environment, needed for JSampler |
39 |
!define JRE_VERSION "1.6" |
!define JRE_VERSION "1.6" |
40 |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=31621" |
; jre-6u21-windows-i586.exe, 1.6.0_21-b74: |
41 |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=31623" |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=41724" |
42 |
|
; jre-6u21-windows-x64.exe, 1.6.0_21-b07: |
43 |
|
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=41293" |
44 |
|
|
45 |
; The default installation directory |
; The default installation directory |
46 |
InstallDir "$PROGRAMFILES64\LinuxSampler" |
InstallDir "$PROGRAMFILES64\LinuxSampler" |
60 |
!define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp" |
!define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp" |
61 |
!define MUI_ABORTWARNING |
!define MUI_ABORTWARNING |
62 |
|
|
|
;-------------------------------- |
|
|
;Version Information |
|
|
|
|
|
VIProductVersion "0.0.0.0" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "all-in-one installer" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2009 The LinuxSampler Project" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" |
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" |
|
|
|
|
63 |
!define BIN_TYPE_64BIT "64 bit" |
!define BIN_TYPE_64BIT "64 bit" |
64 |
!define BIN_TYPE_686SSE "686 SSE" |
!define BIN_TYPE_686SSE "686 SSE" |
65 |
!define BIN_TYPE_686 "686" |
!define BIN_TYPE_686 "686" |
82 |
!insertmacro MUI_LANGUAGE "English" |
!insertmacro MUI_LANGUAGE "English" |
83 |
|
|
84 |
;-------------------------------- |
;-------------------------------- |
85 |
|
;Version Information |
86 |
|
|
87 |
|
VIProductVersion "0.0.0.0" |
88 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "all-in-one installer" |
89 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org" |
90 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project" |
91 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" |
92 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2010 The LinuxSampler Project" |
93 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" |
94 |
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" |
95 |
|
|
96 |
|
;-------------------------------- |
97 |
|
|
98 |
Function .onInit |
Function .onInit |
99 |
Var /GLOBAL installingLinuxSampler |
Var /GLOBAL installingLinuxSampler |
149 |
!insertmacro DetectSystemType "" |
!insertmacro DetectSystemType "" |
150 |
!insertmacro DetectSystemType "un." |
!insertmacro DetectSystemType "un." |
151 |
|
|
|
; Check for the presence of gtkmm, and if false, ask the user whether to |
|
|
; download and install gtkmm now from the internet. |
|
|
; (NOTE: this function is currently unused, since we include the gtk(mm) |
|
|
; DLLs with the installer ATM, this is the recommended way by the gtk |
|
|
; project) |
|
|
Function CheckForGtkmm |
|
|
Var /GLOBAL gtkmmSetupFile |
|
|
|
|
|
ClearErrors |
|
|
; This is just a lazy check for the presence of gtkmm, we should better use: |
|
|
; System::Call function (NSI internal function) to actually call an arbitrary |
|
|
; gtkmm function (/method) from a gtkmm DLL to make it certain |
|
|
ReadRegStr $0 HKCU "Software\gtkmm\2.4" "Installer Language" |
|
|
IfErrors +2 0 |
|
|
goto NoAbort |
|
|
MessageBox MB_YESNO "gtkmm not found. Install it now (internet connection needed)?" IDYES InstallGtkmm |
|
|
MessageBox MB_YESNO "gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort |
|
|
Abort ; causes installer to quit |
|
|
InstallGtkmm: |
|
|
ClearErrors |
|
|
StrCpy $gtkmmSetupFile $TEMP\gtkmm-win32-runtime-2.10.11-1.exe |
|
|
NSISdl::download "http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-runtime-2.10.11-1.exe" $gtkmmSetupFile |
|
|
IfErrors 0 +2 |
|
|
Goto InstallGtkmmFailed |
|
|
ExecWait $gtkmmSetupFile |
|
|
Delete $gtkmmSetupFile ; we don't need it anymore |
|
|
IfErrors 0 +2 |
|
|
Goto InstallGtkmmFailed |
|
|
Goto NoAbort |
|
|
InstallGtkmmFailed: |
|
|
MessageBox MB_YESNO "Could not download gtkmm. gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort |
|
|
Abort ; causes installer to quit |
|
|
NoAbort: |
|
|
FunctionEnd |
|
|
|
|
152 |
; Downloads and launches the JRE installer from the internet |
; Downloads and launches the JRE installer from the internet |
153 |
Function GetJRE |
Function GetJRE |
154 |
Var /GLOBAL jreUri |
Var /GLOBAL jreUri |
272 |
;-------------------------------- |
;-------------------------------- |
273 |
|
|
274 |
; The stuff to install |
; The stuff to install |
275 |
Section "LinuxSampler 1.0.0" SecLinuxSampler |
Section "LinuxSampler ${LINUXSAMPLER_VERSION}" SecLinuxSampler |
276 |
DetailPrint "Installing LinuxSampler binaries ..." |
DetailPrint "Installing LinuxSampler binaries ..." |
277 |
StrCpy $installingLinuxSampler "1" |
StrCpy $installingLinuxSampler "1" |
278 |
|
|
317 |
done: |
done: |
318 |
SectionEnd |
SectionEnd |
319 |
|
|
320 |
Section "JSampler 'Fantasia' 0.9" SecJSampler |
Section "JSampler 'Fantasia' ${FANTASIA_VERSION}" SecJSampler |
321 |
DetailPrint "Installing JSampler binaries ..." |
DetailPrint "Installing JSampler binaries ..." |
322 |
; make sure JRE is installed |
; make sure JRE is installed |
323 |
Call DetectJRE |
Call DetectJRE |
329 |
File jsampler.ico |
File jsampler.ico |
330 |
SectionEnd |
SectionEnd |
331 |
|
|
332 |
Section "QSampler 0.2.2" SecQSampler |
Section "QSampler ${QSAMPLER_VERSION}" SecQSampler |
333 |
DetailPrint "Installing QSampler binaries ..." |
DetailPrint "Installing QSampler binaries ..." |
334 |
StrCpy $installingQSampler "1" |
StrCpy $installingQSampler "1" |
335 |
; Set output path to the installation directory. |
; Set output path to the installation directory. |
336 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
337 |
; Files to install |
; Files to install |
338 |
File bin\686\qsampler.exe |
File bin\686\qsampler.exe |
339 |
|
File bin\686\liblscp-6.dll |
340 |
File bin\686\QtCore4.dll |
File bin\686\QtCore4.dll |
341 |
File bin\686\QtGui4.dll |
File bin\686\QtGui4.dll |
342 |
File bin\686\mingwm10.dll |
File bin\686\mingwm10.dll |
343 |
|
File bin\686\libgcc_s_dw2-1.dll |
344 |
File qsampler.ico |
File qsampler.ico |
345 |
SetOutPath $INSTDIR\share\locale |
SetOutPath $INSTDIR\share\locale |
346 |
File bin\686\share\locale\qsampler_ru.qm |
File bin\686\share\locale\qsampler_ru.qm |
347 |
|
File bin\686\share\locale\qsampler_cs.qm |
348 |
|
File bin\686\share\locale\qt_ru.qm |
349 |
|
File bin\686\share\locale\qt_cs.qm |
350 |
SectionEnd |
SectionEnd |
351 |
|
|
352 |
Section "gigedit 0.2.0" Secgigedit |
Section "gigedit ${GIGEDIT_VERSION}" Secgigedit |
353 |
DetailPrint "Installing gigedit binaries ..." |
DetailPrint "Installing gigedit binaries ..." |
354 |
StrCpy $installinggigedit "1" |
StrCpy $installinggigedit "1" |
355 |
|
|
376 |
File bin\64\libatkmm-1.6-1.dll |
File bin\64\libatkmm-1.6-1.dll |
377 |
File bin\64\libcairo-2.dll |
File bin\64\libcairo-2.dll |
378 |
File bin\64\libcairomm-1.0-1.dll |
File bin\64\libcairomm-1.0-1.dll |
379 |
|
File bin\64\libexpat-1.dll |
380 |
|
File bin\64\libfontconfig-1.dll |
381 |
|
File bin\64\libfreetype-6.dll |
382 |
File bin\64\libgdkmm-2.4-1.dll |
File bin\64\libgdkmm-2.4-1.dll |
383 |
File bin\64\libgdk_pixbuf-2.0-0.dll |
File bin\64\libgdk_pixbuf-2.0-0.dll |
384 |
File bin\64\libgdk-win32-2.0-0.dll |
File bin\64\libgdk-win32-2.0-0.dll |
392 |
File bin\64\libgtkmm-2.4-1.dll |
File bin\64\libgtkmm-2.4-1.dll |
393 |
File bin\64\libgtk-win32-2.0-0.dll |
File bin\64\libgtk-win32-2.0-0.dll |
394 |
File bin\64\libintl-8.dll |
File bin\64\libintl-8.dll |
|
File bin\64\libjpeg-62.dll |
|
395 |
File bin\64\libpango-1.0-0.dll |
File bin\64\libpango-1.0-0.dll |
396 |
File bin\64\libpangocairo-1.0-0.dll |
File bin\64\libpangocairo-1.0-0.dll |
397 |
|
File bin\64\libpangoft2-1.0-0.dll |
398 |
File bin\64\libpangomm-1.4-1.dll |
File bin\64\libpangomm-1.4-1.dll |
399 |
File bin\64\libpangowin32-1.0-0.dll |
File bin\64\libpangowin32-1.0-0.dll |
400 |
File bin\64\libpng12-0.dll |
File bin\64\libpng14-14.dll |
401 |
File bin\64\libsigc-2.0-0.dll |
File bin\64\libsigc-2.0-0.dll |
|
File bin\64\libtiff.dll |
|
402 |
File bin\64\zlib1.dll |
File bin\64\zlib1.dll |
403 |
SetOutPath $INSTDIR\${SUBDIR_64_BIT}\etc\gtk-2.0 |
SetOutPath $INSTDIR\${SUBDIR_64_BIT}\etc\gtk-2.0 |
404 |
File bin\64\etc\gtk-2.0\gtkrc |
File bin\64\etc\gtk-2.0\gtkrc |
501 |
File bin\64\dlsdump.exe |
File bin\64\dlsdump.exe |
502 |
File bin\64\gigdump.exe |
File bin\64\gigdump.exe |
503 |
File bin\64\gigextract.exe |
File bin\64\gigextract.exe |
504 |
; special dependency for the 64 bit version |
; special dependencies for the 64 bit version |
505 |
File bin\64\libgcc_s_sjlj-1.dll |
File bin\64\libgcc_s_sjlj-1.dll |
506 |
|
File bin\64\libstdc++-6.dll |
507 |
|
|
508 |
; shall we install the 32 bit version as well? |
; shall we install the 32 bit version as well? |
509 |
StrCmp $installing32BitToo "1" libgig686sse done |
StrCmp $installing32BitToo "1" libgig686sse done |
554 |
WriteRegStr HKLM "Software\LinuxSampler" "Release Date" ${RELEASE_DATE} |
WriteRegStr HKLM "Software\LinuxSampler" "Release Date" ${RELEASE_DATE} |
555 |
SectionEnd |
SectionEnd |
556 |
|
|
557 |
Section "libsndfile 1.0.20" Seclibsndfile |
Section "libsndfile ${SNDFILE_VERSION}" Seclibsndfile |
558 |
DetailPrint "Installing libsndfile binaries ..." |
DetailPrint "Installing libsndfile binaries ..." |
559 |
; We make this a mandatory component |
; We make this a mandatory component |
560 |
SectionIn RO |
SectionIn RO |
569 |
libsndfile64: |
libsndfile64: |
570 |
SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" |
SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" |
571 |
File bin\64\libsndfile-1.dll |
File bin\64\libsndfile-1.dll |
572 |
|
File bin\64\libFLAC-8.dll |
573 |
|
File bin\64\libogg-0.dll |
574 |
|
File bin\64\libvorbis-0.dll |
575 |
|
File bin\64\libvorbisenc-2.dll |
576 |
|
|
577 |
; shall we install the 32 bit version as well? |
; shall we install the 32 bit version as well? |
578 |
StrCmp $installing32BitToo "1" libsndfile686 done |
StrCmp $installing32BitToo "1" libsndfile686 done |
580 |
libsndfile686: |
libsndfile686: |
581 |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
582 |
File bin\686\libsndfile-1.dll |
File bin\686\libsndfile-1.dll |
583 |
|
File bin\686\libFLAC-8.dll |
584 |
|
File bin\686\libogg-0.dll |
585 |
|
File bin\686\libvorbis-0.dll |
586 |
|
File bin\686\libvorbisenc-2.dll |
587 |
Goto done |
Goto done |
588 |
|
|
589 |
done: |
done: |
619 |
|
|
620 |
StrCmp $installingLinuxSampler '1' 0 +3 |
StrCmp $installingLinuxSampler '1' 0 +3 |
621 |
SetOutPath $samplerDir |
SetOutPath $samplerDir |
622 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 1.0.0 (stand alone backend).lnk" "$samplerDir\linuxsampler.exe" "" "$samplerDir\linuxsampler.exe" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler ${LINUXSAMPLER_VERSION} (stand alone backend).lnk" "$samplerDir\linuxsampler.exe" "" "$samplerDir\linuxsampler.exe" 0 |
623 |
|
|
624 |
StrCmp $installingJSampler '1' 0 +3 |
StrCmp $installingJSampler '1' 0 +3 |
625 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
626 |
CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.9 (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.9.jar"' '$INSTDIR\jsampler.ico' 0 |
CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia ${FANTASIA_VERSION} (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.9.jar"' '$INSTDIR\jsampler.ico' 0 |
627 |
|
|
628 |
StrCmp $installingQSampler '1' 0 +3 |
StrCmp $installingQSampler '1' 0 +3 |
629 |
SetOutPath $INSTDIR |
SetOutPath $INSTDIR |
630 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.2 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler ${QSAMPLER_VERSION} (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 |
631 |
|
|
632 |
StrCmp $installinggigedit '1' 0 +3 |
StrCmp $installinggigedit '1' 0 +3 |
633 |
SetOutPath $samplerDir |
SetOutPath $samplerDir |
634 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.2.0 (stand alone).lnk" "$samplerDir\gigedit.exe" "" "$samplerDir\gigedit.exe" 0 |
CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit ${GIGEDIT_VERSION} (stand alone).lnk" "$samplerDir\gigedit.exe" "" "$samplerDir\gigedit.exe" 0 |
635 |
|
|
636 |
!insertmacro CreateInternetShortcut \ |
!insertmacro CreateInternetShortcut \ |
637 |
"$SMPROGRAMS\LinuxSampler\\Support LinuxSampler" \ |
"$SMPROGRAMS\LinuxSampler\\Support LinuxSampler" \ |