1 |
; LinuxSampler Windows installer |
; LinuxSampler Windows installer |
2 |
; |
; |
3 |
; Copyright (C) 2007-2012, The LinuxSampler Developers |
; Copyright (C) 2007-2015, 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. |
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-6u32-windows-i586.exe: |
; jre-8u45-windows-i586.exe: |
45 |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=63258" |
!define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=106246" |
46 |
; jre-6u32-windows-x64.exe: |
; jre-8u45-windows-x64.exe: |
47 |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=63259" |
!define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=106248" |
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-2012 The LinuxSampler Project" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2003-2014 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 |
503 |
libgig64: |
libgig64: |
504 |
SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" |
SetOutPath "$INSTDIR\${SUBDIR_64_BIT}" |
505 |
File bin\64\libgig-6.dll |
File bin\64\libgig-6.dll |
506 |
|
File bin\64\libakai-0.dll |
507 |
File bin\64\rifftree.exe |
File bin\64\rifftree.exe |
508 |
File bin\64\dlsdump.exe |
File bin\64\dlsdump.exe |
509 |
File bin\64\gigdump.exe |
File bin\64\gigdump.exe |
510 |
File bin\64\gigextract.exe |
File bin\64\gigextract.exe |
511 |
|
File bin\64\gigmerge.exe |
512 |
|
File bin\64\gig2mono.exe |
513 |
|
File bin\64\gig2stereo.exe |
514 |
|
File bin\64\korg2gig.exe |
515 |
|
File bin\64\korgdump.exe |
516 |
|
File bin\64\akaidump.exe |
517 |
|
File bin\64\akaiextract.exe |
518 |
|
File bin\64\sf2dump.exe |
519 |
|
File bin\64\sf2extract.exe |
520 |
; special dependencies for the 64 bit version |
; special dependencies for the 64 bit version |
521 |
File bin\64\libgcc_s_sjlj-1.dll |
File bin\64\libgcc_s_sjlj-1.dll |
522 |
File bin\64\libstdc++-6.dll |
File bin\64\libstdc++-6.dll |
523 |
|
|
524 |
; shall we install the 32 bit version as well? |
; shall we install the 32 bit version as well? |
525 |
StrCmp $installing32BitToo "1" libgig686sse done |
StrCmp $installing32BitToo "1" libgig686sse |
526 |
|
StrCmp $installingQSampler "1" libgigForQsampler done |
527 |
|
|
528 |
|
; QSampler needs the 32 bit libgig dll |
529 |
|
libgigForQsampler: |
530 |
|
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
531 |
|
File bin\686sse\libgig-6.dll |
532 |
|
Goto done |
533 |
|
|
534 |
libgig686sse: |
libgig686sse: |
535 |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
536 |
File bin\686sse\libgig-6.dll |
File bin\686sse\libgig-6.dll |
537 |
|
File bin\686sse\libakai-0.dll |
538 |
File bin\686sse\rifftree.exe |
File bin\686sse\rifftree.exe |
539 |
File bin\686sse\dlsdump.exe |
File bin\686sse\dlsdump.exe |
540 |
File bin\686sse\gigdump.exe |
File bin\686sse\gigdump.exe |
541 |
File bin\686sse\gigextract.exe |
File bin\686sse\gigextract.exe |
542 |
|
File bin\686sse\gigmerge.exe |
543 |
|
File bin\686sse\gig2mono.exe |
544 |
|
File bin\686sse\gig2stereo.exe |
545 |
|
File bin\686sse\korg2gig.exe |
546 |
|
File bin\686sse\korgdump.exe |
547 |
|
File bin\686sse\akaidump.exe |
548 |
|
File bin\686sse\akaiextract.exe |
549 |
|
File bin\686sse\sf2dump.exe |
550 |
|
File bin\686sse\sf2extract.exe |
551 |
Goto done |
Goto done |
552 |
|
|
553 |
libgig686: |
libgig686: |
554 |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
SetOutPath "$INSTDIR\${SUBDIR_32_BIT}" |
555 |
File bin\686\libgig-6.dll |
File bin\686\libgig-6.dll |
556 |
|
File bin\686\libakai-0.dll |
557 |
File bin\686\rifftree.exe |
File bin\686\rifftree.exe |
558 |
File bin\686\dlsdump.exe |
File bin\686\dlsdump.exe |
559 |
File bin\686\gigdump.exe |
File bin\686\gigdump.exe |
560 |
File bin\686\gigextract.exe |
File bin\686\gigextract.exe |
561 |
|
File bin\686\gigmerge.exe |
562 |
|
File bin\686\gig2mono.exe |
563 |
|
File bin\686\gig2stereo.exe |
564 |
|
File bin\686\korg2gig.exe |
565 |
|
File bin\686\korgdump.exe |
566 |
|
File bin\686\akaidump.exe |
567 |
|
File bin\686\akaiextract.exe |
568 |
|
File bin\686\sf2dump.exe |
569 |
|
File bin\686\sf2extract.exe |
570 |
Goto done |
Goto done |
571 |
|
|
572 |
done: |
done: |