1 |
; LinuxSampler Windows installer |
; LinuxSampler Windows installer |
2 |
; |
; |
3 |
; Copyright (C) 2007-2010, The LinuxSampler Developers |
; Copyright (C) 2007-2013, 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: |
; PREREQUISITES: |
9 |
; |
; |
10 |
; -> You must install the file cpudesc\cpudesc.dll into the NSIS's |
; -> You must install the file cpudesc\cpudesc.dll into the working |
11 |
; plugin directory before being able to compile this installer! |
; directory before being able to compile this installer! |
12 |
; |
; |
13 |
; -> The compiled binaries must be placed into the respective directories |
; -> The compiled binaries must be placed into the respective directories |
14 |
; under bin\ (you have to read this file in order to get those exact |
; under bin\ (you have to read this file in order to get those exact |
15 |
; locations and expected file names). |
; locations and expected file names). |
16 |
|
|
17 |
|
; NSIS plug-in for getting CPU information |
18 |
|
!addplugindir cpudesc |
19 |
|
|
20 |
; Probably the best compression ratio |
; Probably the best compression ratio |
21 |
SetCompressor lzma |
SetCompressor lzma |
22 |
|
|
23 |
;Include Modern UI |
;Include Modern UI |
24 |
!include "MUI.nsh" |
!include "MUI.nsh" |
25 |
!include "EnvVarUpdate.nsh" |
!include "EnvVarUpdate.nsh" |
26 |
|
!include "WordFunc.nsh" |
27 |
|
|
28 |
!define /date RELEASE_DATE "%Y%m%d" |
!define /date RELEASE_DATE "%Y%m%d" |
29 |
!searchparse /file bin/686/linuxsampler.pc `Version: ` LINUXSAMPLER_VERSION |
!searchparse /file bin/686/linuxsampler.pc `Version: ` LINUXSAMPLER_VERSION |
41 |
|
|
42 |
; Java Runtime Environment, needed for JSampler |
; Java Runtime Environment, needed for JSampler |
43 |
!define JRE_VERSION "1.6" |
!define JRE_VERSION "1.6" |
44 |
; jre-6u23-windows-i586.exe, 1.6.0_23-b05: |
; jre-7u11-windows-i586.exe: |
45 |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=45825" |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=73141" |
46 |
; jre-6u23-windows-x64.exe, 1.6.0_23-b05: |
; jre-7u11-windows-x64.exe: |
47 |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=43883" |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=73143" |
48 |
|
|
49 |
; The default installation directory |
; The default installation directory |
50 |
InstallDir "$PROGRAMFILES64\LinuxSampler" |
InstallDir "$PROGRAMFILES64\LinuxSampler" |
93 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org" |
94 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project" |
95 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" |
96 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2010 The LinuxSampler Project" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2013 The LinuxSampler Project" |
97 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})" |
98 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0" |
99 |
|
|
164 |
|
|
165 |
DetailPrint "Downloading JRE from: $jreUri" |
DetailPrint "Downloading JRE from: $jreUri" |
166 |
|
|
167 |
MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \ |
MessageBox MB_OK "JSampler requires Java ${JRE_VERSION} or later, \ |
168 |
be downloaded and installed" |
it will now be downloaded and installed" |
169 |
|
|
170 |
StrCpy $2 "$TEMP\Java Runtime Environment.exe" |
StrCpy $2 "$TEMP\Java Runtime Environment.exe" |
171 |
nsisdl::download /TIMEOUT=30000 "$jreUri" $2 |
nsisdl::download /TIMEOUT=30000 "$jreUri" $2 |
181 |
Function DetectJRE |
Function DetectJRE |
182 |
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ |
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ |
183 |
"CurrentVersion" |
"CurrentVersion" |
184 |
StrCmp $2 ${JRE_VERSION} done |
${VersionCompare} $2 ${JRE_VERSION} $R0 |
185 |
|
IntCmp $R0 1 done done |
186 |
|
|
187 |
StrCmp $binType BIN_TYPE_64BIT 0 downloadjre |
StrCmp $binType BIN_TYPE_64BIT 0 downloadjre |
188 |
|
|
192 |
ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ |
ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ |
193 |
"CurrentVersion" |
"CurrentVersion" |
194 |
SetRegView 64 ; restore 64 bit view |
SetRegView 64 ; restore 64 bit view |
195 |
StrCmp $3 ${JRE_VERSION} done |
${VersionCompare} $3 ${JRE_VERSION} $R0 |
196 |
|
IntCmp $R0 1 done done |
197 |
|
|
198 |
downloadjre: |
downloadjre: |
199 |
Call GetJRE |
Call GetJRE |
512 |
File bin\64\libstdc++-6.dll |
File bin\64\libstdc++-6.dll |
513 |
|
|
514 |
; shall we install the 32 bit version as well? |
; shall we install the 32 bit version as well? |
515 |
StrCmp $installing32BitToo "1" libgig686sse done |
StrCmp $installing32BitToo "1" libgig686sse |
516 |
|
StrCmp $installingQSampler "1" libgigForQsampler done |
517 |
|
|
518 |
|
; QSampler needs the 32 bit libgig dll |
519 |
|
libgigForQsampler: |
520 |
|
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
521 |
|
File bin\686sse\libgig-6.dll |
522 |
|
Goto done |
523 |
|
|
524 |
libgig686sse: |
libgig686sse: |
525 |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |