--- misc/trunk/win32_installer/linuxsampler_all.nsi 2009/07/02 23:02:17 1927 +++ misc/trunk/win32_installer/linuxsampler_all.nsi 2015/01/04 01:32:55 2686 @@ -1,27 +1,37 @@ ; LinuxSampler Windows installer ; -; Copyright (C) 2007-2009, The LinuxSampler Developers +; Copyright (C) 2007-2015, The LinuxSampler Developers ; ; All-in-one Installer for all subprojects / software components of the ; LinuxSampler Project. ; ; PREREQUISITES: ; -; -> You must install the file cpudesc\cpudesc.dll into the NSIS's -; plugin directory before being able to compile this installer! +; -> You must install the file cpudesc\cpudesc.dll into the working +; directory before being able to compile this installer! ; ; -> The compiled binaries must be placed into the respective directories ; under bin\ (you have to read this file in order to get those exact ; locations and expected file names). +; NSIS plug-in for getting CPU information +!addplugindir cpudesc + ; Probably the best compression ratio SetCompressor lzma ;Include Modern UI !include "MUI.nsh" !include "EnvVarUpdate.nsh" +!include "WordFunc.nsh" -!define RELEASE_DATE "20090623" +!define /date RELEASE_DATE "%Y%m%d" +!searchparse /file bin/686/linuxsampler.pc `Version: ` LINUXSAMPLER_VERSION +!searchparse /file bin/686/gig.pc `Version: ` LIBGIG_VERSION +!searchparse /file bin/686/gigedit.version `` GIGEDIT_VERSION +!define FANTASIA_VERSION "0.9" +!searchparse /file bin/686/qsampler.version `` QSAMPLER_VERSION +!searchparse /file bin/686/sndfile.pc `Version: ` SNDFILE_VERSION ; The name of the installer Name "LinuxSampler (${RELEASE_DATE})" @@ -31,8 +41,10 @@ ; Java Runtime Environment, needed for JSampler !define JRE_VERSION "1.6" -!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=31621" -!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=31623" +; jre-7u67-windows-i586.exe: +!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=95123" +; jre-7u67-windows-x64.exe: +!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=95125" ; The default installation directory InstallDir "$PROGRAMFILES64\LinuxSampler" @@ -52,18 +64,6 @@ !define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp" !define MUI_ABORTWARNING -;-------------------------------- -;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" - !define BIN_TYPE_64BIT "64 bit" !define BIN_TYPE_686SSE "686 SSE" !define BIN_TYPE_686 "686" @@ -86,6 +86,18 @@ !insertmacro MUI_LANGUAGE "English" ;-------------------------------- +;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-2014 The LinuxSampler Project" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" + +;-------------------------------- Function .onInit Var /GLOBAL installingLinuxSampler @@ -100,6 +112,12 @@ StrCpy $installing32BitToo "0" FunctionEnd +!macro CreateInternetShortcut FILENAME URL ICONFILE ICONINDEX +WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}" +WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconFile" "${ICONFILE}" +WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconIndex" "${ICONINDEX}" +!macroend + ; detects CPU capabilities, determines which native binary type to install ; and selects the appropriate windows registry view (32 bit or 64 bit) !macro DetectSystemType un @@ -135,41 +153,6 @@ !insertmacro DetectSystemType "" !insertmacro DetectSystemType "un." -; 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 - ; Downloads and launches the JRE installer from the internet Function GetJRE Var /GLOBAL jreUri @@ -181,8 +164,8 @@ DetailPrint "Downloading JRE from: $jreUri" - MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \ - be downloaded and installed" + MessageBox MB_OK "JSampler requires Java ${JRE_VERSION} or later, \ + it will now be downloaded and installed" StrCpy $2 "$TEMP\Java Runtime Environment.exe" nsisdl::download /TIMEOUT=30000 "$jreUri" $2 @@ -198,7 +181,8 @@ Function DetectJRE ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ "CurrentVersion" - StrCmp $2 ${JRE_VERSION} done + ${VersionCompare} $2 ${JRE_VERSION} $R0 + IntCmp $R0 1 done done StrCmp $binType BIN_TYPE_64BIT 0 downloadjre @@ -208,7 +192,8 @@ ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ "CurrentVersion" SetRegView 64 ; restore 64 bit view - StrCmp $3 ${JRE_VERSION} done + ${VersionCompare} $3 ${JRE_VERSION} $R0 + IntCmp $R0 1 done done downloadjre: Call GetJRE @@ -293,7 +278,7 @@ ;-------------------------------- ; The stuff to install -Section "LinuxSampler 0.5.1.12cvs" SecLinuxSampler +Section "LinuxSampler ${LINUXSAMPLER_VERSION}" SecLinuxSampler DetailPrint "Installing LinuxSampler binaries ..." StrCpy $installingLinuxSampler "1" @@ -306,12 +291,12 @@ linuxsampler64: SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" File bin\64\linuxsampler.exe - File bin\64\liblinuxsampler-1.dll + File bin\64\liblinuxsampler-3.dll File bin\64\libsqlite3-0.dll SetOutPath $vstPluginPath64 File /oname=LinuxSampler64.dll bin\64\LinuxSampler.dll MessageBox MB_YESNO \ - "It seems you are using a 64 bit Windows system. A native 64 bit\nversion of LinuxSampler and its VST plugin version will be\ninstalled accordingly.\n\nShall a 32 bit version of the LinuxSampler VST be installed as well?" \ + "It seems you are using a 64 bit Windows system. A native 64 bit version of LinuxSampler and its VST plugin version will be installed accordingly.$\r$\n$\r$\nShall a 32 bit version of the LinuxSampler VST be installed as well?" \ IDNO done ; so the other sections install their 32 bit versions as well @@ -320,7 +305,7 @@ linuxsampler686sse: SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686sse\linuxsampler.exe - File bin\686sse\liblinuxsampler-1.dll + File bin\686sse\liblinuxsampler-3.dll File bin\686\libsqlite3-0.dll SetOutPath $vstPluginPath File /oname=LinuxSampler32.dll bin\686sse\LinuxSampler.dll @@ -329,7 +314,7 @@ linuxsampler686: SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686\linuxsampler.exe - File bin\686\liblinuxsampler-1.dll + File bin\686\liblinuxsampler-3.dll File bin\686\libsqlite3-0.dll SetOutPath $vstPluginPath File /oname=LinuxSampler32.dll bin\686\LinuxSampler.dll @@ -338,7 +323,7 @@ done: SectionEnd -Section "JSampler 'Fantasia' 0.8a-cvs8" SecJSampler +Section "JSampler 'Fantasia' ${FANTASIA_VERSION}" SecJSampler DetailPrint "Installing JSampler binaries ..." ; make sure JRE is installed Call DetectJRE @@ -346,26 +331,31 @@ ; Set output path to the installation directory. SetOutPath $INSTDIR ; Files to install - File bin\Fantasia-0.8a-cvs8.jar + File bin\Fantasia-0.9.jar File jsampler.ico SectionEnd -Section "QSampler 0.2.1.26" SecQSampler +Section "QSampler ${QSAMPLER_VERSION}" SecQSampler DetailPrint "Installing QSampler binaries ..." StrCpy $installingQSampler "1" ; Set output path to the installation directory. SetOutPath $INSTDIR ; Files to install File bin\686\qsampler.exe + File bin\686\liblscp-6.dll File bin\686\QtCore4.dll File bin\686\QtGui4.dll File bin\686\mingwm10.dll + File bin\686\libgcc_s_dw2-1.dll File qsampler.ico SetOutPath $INSTDIR\share\locale File bin\686\share\locale\qsampler_ru.qm + File bin\686\share\locale\qsampler_cs.qm + File bin\686\share\locale\qt_ru.qm + File bin\686\share\locale\qt_cs.qm SectionEnd -Section "gigedit 0.1.1.x (cvs2009-05-10)" Secgigedit +Section "gigedit ${GIGEDIT_VERSION}" Secgigedit DetailPrint "Installing gigedit binaries ..." StrCpy $installinggigedit "1" @@ -384,14 +374,17 @@ gigedit64: SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" File bin\64\gigedit.exe - File bin\64\libgigedit-1.dll + File bin\64\libgigedit-2.dll SetOutPath "$INSTDIR\${SUBDIR_64_BIT}\plugins" - File bin\64\plugins\libgigeditlinuxsamplerplugin-1.dll + File bin\64\plugins\libgigeditlinuxsamplerplugin.dll SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" File bin\64\libatk-1.0-0.dll File bin\64\libatkmm-1.6-1.dll File bin\64\libcairo-2.dll File bin\64\libcairomm-1.0-1.dll + File bin\64\libexpat-1.dll + File bin\64\libfontconfig-1.dll + File bin\64\libfreetype-6.dll File bin\64\libgdkmm-2.4-1.dll File bin\64\libgdk_pixbuf-2.0-0.dll File bin\64\libgdk-win32-2.0-0.dll @@ -405,14 +398,13 @@ File bin\64\libgtkmm-2.4-1.dll File bin\64\libgtk-win32-2.0-0.dll File bin\64\libintl-8.dll - File bin\64\libjpeg-62.dll File bin\64\libpango-1.0-0.dll File bin\64\libpangocairo-1.0-0.dll + File bin\64\libpangoft2-1.0-0.dll File bin\64\libpangomm-1.4-1.dll File bin\64\libpangowin32-1.0-0.dll - File bin\64\libpng12-0.dll + File bin\64\libpng14-14.dll File bin\64\libsigc-2.0-0.dll - File bin\64\libtiff.dll File bin\64\zlib1.dll SetOutPath $INSTDIR\${SUBDIR_64_BIT}\etc\gtk-2.0 File bin\64\etc\gtk-2.0\gtkrc @@ -433,9 +425,9 @@ gigedit686: SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686\gigedit.exe - File bin\686\libgigedit-1.dll + File bin\686\libgigedit-2.dll SetOutPath "$INSTDIR\${SUBDIR_32_BIT}\plugins" - File bin\686\plugins\libgigeditlinuxsamplerplugin-1.dll + File bin\686\plugins\libgigeditlinuxsamplerplugin.dll SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686\intl.dll File bin\686\jpeg62.dll @@ -497,7 +489,7 @@ done: SectionEnd -Section "libgig 3.2.1.x (cvs2009-05-03)" Seclibgig +Section "libgig 3.3.0" Seclibgig DetailPrint "Installing libgig binaries ..." ; We make this a mandatory component SectionIn RO @@ -511,32 +503,67 @@ libgig64: SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" File bin\64\libgig-6.dll + File bin\64\libakai-0.dll File bin\64\rifftree.exe File bin\64\dlsdump.exe File bin\64\gigdump.exe File bin\64\gigextract.exe - ; special dependency for the 64 bit version + File bin\64\gigmerge.exe + File bin\64\gig2mono.exe + File bin\64\gig2stereo.exe + File bin\64\korg2gig.exe + File bin\64\korgdump.exe + File bin\64\akaidump.exe + File bin\64\akaiextract.exe + File bin\64\sf2dump.exe + ; special dependencies for the 64 bit version File bin\64\libgcc_s_sjlj-1.dll + File bin\64\libstdc++-6.dll ; shall we install the 32 bit version as well? - StrCmp $installing32BitToo "1" libgig686sse done + StrCmp $installing32BitToo "1" libgig686sse + StrCmp $installingQSampler "1" libgigForQsampler done + + ; QSampler needs the 32 bit libgig dll + libgigForQsampler: + SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" + File bin\686sse\libgig-6.dll + Goto done libgig686sse: SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686sse\libgig-6.dll + File bin\686sse\libakai-0.dll File bin\686sse\rifftree.exe File bin\686sse\dlsdump.exe File bin\686sse\gigdump.exe File bin\686sse\gigextract.exe + File bin\686sse\gigmerge.exe + File bin\686sse\gig2mono.exe + File bin\686sse\gig2stereo.exe + File bin\686sse\korg2gig.exe + File bin\686sse\korgdump.exe + File bin\686sse\akaidump.exe + File bin\686sse\akaiextract.exe + File bin\686sse\sf2dump.exe Goto done libgig686: SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686\libgig-6.dll + File bin\686\libakai-0.dll File bin\686\rifftree.exe File bin\686\dlsdump.exe File bin\686\gigdump.exe File bin\686\gigextract.exe + File bin\686\gigmerge.exe + File bin\686\gig2mono.exe + File bin\686\gig2stereo.exe + File bin\686\korg2gig.exe + File bin\686\korgdump.exe + File bin\686\akaidump.exe + File bin\686\akaiextract.exe + File bin\686\sf2dump.exe Goto done done: @@ -567,7 +594,7 @@ WriteRegStr HKLM "Software\LinuxSampler" "Release Date" ${RELEASE_DATE} SectionEnd -Section "libsndfile 1.0.19" Seclibsndfile +Section "libsndfile ${SNDFILE_VERSION}" Seclibsndfile DetailPrint "Installing libsndfile binaries ..." ; We make this a mandatory component SectionIn RO @@ -582,6 +609,10 @@ libsndfile64: SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" File bin\64\libsndfile-1.dll + File bin\64\libFLAC-8.dll + File bin\64\libogg-0.dll + File bin\64\libvorbis-0.dll + File bin\64\libvorbisenc-2.dll ; shall we install the 32 bit version as well? StrCmp $installing32BitToo "1" libsndfile686 done @@ -589,6 +620,10 @@ libsndfile686: SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" File bin\686\libsndfile-1.dll + File bin\686\libFLAC-8.dll + File bin\686\libogg-0.dll + File bin\686\libvorbis-0.dll + File bin\686\libvorbisenc-2.dll Goto done done: @@ -619,19 +654,29 @@ CreateDirectory "$SMPROGRAMS\LinuxSampler" + SetOutPath $INSTDIR CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - StrCmp $installingLinuxSampler '1' 0 +2 - CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1.12cvs (stand alone backend).lnk" "$samplerDir\linuxsampler.exe" "" "$samplerDir\linuxsampler.exe" 0 + StrCmp $installingLinuxSampler '1' 0 +3 + SetOutPath $samplerDir + CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler ${LINUXSAMPLER_VERSION} (stand alone backend).lnk" "$samplerDir\linuxsampler.exe" "" "$samplerDir\linuxsampler.exe" 0 - StrCmp $installingJSampler '1' 0 +2 - CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a-cvs8 (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.8a-cvs8.jar"' '$INSTDIR\jsampler.ico' 0 + StrCmp $installingJSampler '1' 0 +3 + SetOutPath $INSTDIR + CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia ${FANTASIA_VERSION} (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.9.jar"' '$INSTDIR\jsampler.ico' 0 - StrCmp $installingQSampler '1' 0 +2 - CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1.26 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 + StrCmp $installingQSampler '1' 0 +3 + SetOutPath $INSTDIR + CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler ${QSAMPLER_VERSION} (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0 - StrCmp $installinggigedit '1' 0 +2 - CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1.x cvs2009-05-10 (stand alone).lnk" "$samplerDir\gigedit.exe" "" "$samplerDir\gigedit.exe" 0 + StrCmp $installinggigedit '1' 0 +3 + SetOutPath $samplerDir + CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit ${GIGEDIT_VERSION} (stand alone).lnk" "$samplerDir\gigedit.exe" "" "$samplerDir\gigedit.exe" 0 + + !insertmacro CreateInternetShortcut \ + "$SMPROGRAMS\LinuxSampler\\Support LinuxSampler" \ + "http://www.linuxsampler.org/donations.html" \ + "" "0" SectionEnd ;--------------------------------