/[svn]/misc/trunk/win32_installer/linuxsampler_all.nsi
ViewVC logotype

Contents of /misc/trunk/win32_installer/linuxsampler_all.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3027 - (show annotations) (download)
Mon Oct 24 20:22:41 2016 UTC (7 years, 5 months ago) by persson
File size: 26898 byte(s)
* let installer remove some old files when updating
1 ; LinuxSampler Windows installer
2 ;
3 ; Copyright (C) 2007-2016, The LinuxSampler Developers
4 ;
5 ; All-in-one Installer for all subprojects / software components of the
6 ; LinuxSampler Project.
7 ;
8 ; PREREQUISITES:
9 ;
10 ; -> You must install the file cpudesc\cpudesc.dll into the working
11 ; directory before being able to compile this installer!
12 ;
13 ; -> 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
15 ; locations and expected file names).
16
17 ; NSIS plug-in for getting CPU information
18 !addplugindir cpudesc
19
20 ; Probably the best compression ratio
21 SetCompressor lzma
22
23 ;Include Modern UI
24 !include "MUI.nsh"
25 !include "EnvVarUpdate.nsh"
26 !include "WordFunc.nsh"
27
28 !define /date RELEASE_DATE "%Y%m%d"
29 !searchparse /file bin/686/linuxsampler.pc `Version: ` LINUXSAMPLER_VERSION
30 !searchparse /file bin/686/gig.pc `Version: ` LIBGIG_VERSION
31 !searchparse /file bin/686/gigedit.version `` GIGEDIT_VERSION
32 !define FANTASIA_VERSION "0.9"
33 !searchparse /file bin/686/qsampler.version `` QSAMPLER_VERSION
34 !searchparse /file bin/686/sndfile.pc `Version: ` SNDFILE_VERSION
35
36 ; The name of the installer
37 Name "LinuxSampler (${RELEASE_DATE})"
38
39 ; The file to write
40 OutFile "linuxsampler_${RELEASE_DATE}_setup.exe"
41
42 ; Java Runtime Environment, needed for JSampler
43 !define JRE_VERSION "1.6"
44 ; jre-8u111-windows-i586.exe:
45 !define JRE_32_URL "http://javadl.oracle.com/webapps/download/AutoDL?BundleId=216432"
46 ; jre-8u111-windows-x64.exe:
47 !define JRE_64_URL "http://javadl.oracle.com/webapps/download/AutoDL?BundleId=216434"
48
49 ; The default installation directory
50 InstallDir "$PROGRAMFILES64\LinuxSampler"
51 !define SUBDIR_32_BIT "32"
52 !define SUBDIR_64_BIT "64"
53
54 !define DEFAULT_VST_DIR64 "$PROGRAMFILES64\Steinberg\VstPlugins"
55 !define DEFAULT_VST_DIR "$PROGRAMFILES\Steinberg\VstPlugins"
56
57 ; Get installation folder from registry if available
58 InstallDirRegKey HKLM "Software\LinuxSampler" "Main Directory"
59
60 ;--------------------------------
61 ;Interface Settings
62
63 !define MUI_HEADERIMAGE
64 !define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp"
65 !define MUI_ABORTWARNING
66
67 !define BIN_TYPE_64BIT "64 bit"
68 !define BIN_TYPE_686SSE "686 SSE"
69 !define BIN_TYPE_686 "686"
70
71 Var /GLOBAL binType
72
73 ;--------------------------------
74 ; Pages
75
76 !insertmacro MUI_PAGE_LICENSE "license.rtf"
77 !insertmacro MUI_PAGE_COMPONENTS
78 !insertmacro MUI_PAGE_DIRECTORY
79 !insertmacro MUI_PAGE_INSTFILES
80 !insertmacro MUI_UNPAGE_CONFIRM
81 !insertmacro MUI_UNPAGE_INSTFILES
82
83 ;--------------------------------
84 ;Languages
85
86 !insertmacro MUI_LANGUAGE "English"
87
88 ;--------------------------------
89 ;Version Information
90
91 VIProductVersion "0.0.0.0"
92 VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "all-in-one installer"
93 VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org"
94 VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project"
95 VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" ""
96 VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "� 2003-2016 The LinuxSampler Project"
97 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})"
98 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0"
99
100 ;--------------------------------
101
102 Function .onInit
103 Var /GLOBAL installingLinuxSampler
104 Var /GLOBAL installingJSampler
105 Var /GLOBAL installingQSampler
106 Var /GLOBAL installinggigedit
107 Var /GLOBAL installing32BitToo
108 StrCpy $installingLinuxSampler "0"
109 StrCpy $installingJSampler "0"
110 StrCpy $installingQSampler "0"
111 StrCpy $installinggigedit "0"
112 StrCpy $installing32BitToo "0"
113 FunctionEnd
114
115 !macro CreateInternetShortcut FILENAME URL ICONFILE ICONINDEX
116 WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}"
117 WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconFile" "${ICONFILE}"
118 WriteINIStr "${FILENAME}.url" "InternetShortcut" "IconIndex" "${ICONINDEX}"
119 !macroend
120
121 ; detects CPU capabilities, determines which native binary type to install
122 ; and selects the appropriate windows registry view (32 bit or 64 bit)
123 !macro DetectSystemType un
124 Function ${un}DetectSystemType
125 ; check if this is a 64 bit windows
126 System::Call "kernel32::GetCurrentProcess() i .s"
127 System::Call "kernel32::IsWow64Process(i s, *i .r0)"
128 IntCmp $0 0 not64bit
129 StrCpy $binType BIN_TYPE_64BIT
130 DetailPrint "64 bit Windows detected."
131 SetRegView 64
132 Goto DetectSystemDone
133
134 not64bit: ; a 32 bit system
135
136 SetRegView 32
137
138 ; check if CPU supports SSE
139 cpudesc::tell
140 Pop $0 ; full identification string in $0
141 StrCpy $1 $0 1, 34 ; pull out one character after SSE=
142 IntFmt $2 "%u" $1 ; and turn it into a number
143 IntCmpU $2 1 +1 +4 +4
144 StrCpy $binType BIN_TYPE_686SSE
145 DetailPrint "32 bit Windows, SSE CPU detected."
146 Goto DetectSystemDone
147 StrCpy $binType BIN_TYPE_686
148 DetailPrint "32 bit Windows (no SSE support) detected."
149
150 DetectSystemDone:
151 FunctionEnd
152 !macroend
153 !insertmacro DetectSystemType ""
154 !insertmacro DetectSystemType "un."
155
156 ; Downloads and launches the JRE installer from the internet
157 Function GetJRE
158 Var /GLOBAL jreUri
159
160 StrCmp $binType BIN_TYPE_64BIT 0 +3
161 StrCpy $jreUri ${JRE_64_URL}
162 Goto +2
163 StrCpy $jreUri ${JRE_32_URL}
164
165 DetailPrint "Downloading JRE from: $jreUri"
166
167 MessageBox MB_OK "JSampler requires Java ${JRE_VERSION} or later, \
168 it will now be downloaded and installed"
169
170 StrCpy $2 "$TEMP\Java Runtime Environment.exe"
171 nsisdl::download /TIMEOUT=30000 "$jreUri" $2
172 Pop $R0 ; Get the return value
173 StrCmp $R0 "success" +3
174 MessageBox MB_OK "Download failed: $R0"
175 Quit
176 ExecWait $2
177 Delete $2
178 FunctionEnd
179
180 ; Checks if the JRE is already installed, if not it will download and install it from the internet
181 Function DetectJRE
182 ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
183 "CurrentVersion"
184 ${VersionCompare} $2 ${JRE_VERSION} $R0
185 IntCmp $R0 1 done done
186
187 StrCmp $binType BIN_TYPE_64BIT 0 downloadjre
188
189 ; on 64 bit systems also check the 32 bit view of the registry, maybe
190 ; a 32 bit JRE was already installed
191 SetRegView 32
192 ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
193 "CurrentVersion"
194 SetRegView 64 ; restore 64 bit view
195 ${VersionCompare} $3 ${JRE_VERSION} $R0
196 IntCmp $R0 1 done done
197
198 downloadjre:
199 Call GetJRE
200
201 done:
202 FunctionEnd
203
204 ; Tries to find the location where VST plugins should be installed to
205 Function DetectVstPath
206 Var /GLOBAL vstPluginPath
207 Var /GLOBAL vstPluginPath64
208
209 StrCmp $binType BIN_TYPE_64BIT 0 detectVst32
210 SetRegView 64 ; make sure we have the 64 bit registry view
211
212 ; ------- VST 64 bit detection -------
213
214 ClearErrors
215 ReadRegStr $0 HKCU "Software\VST" "VSTPluginsPath"
216 IfErrors check2ndRegistryKey64 0
217 StrCpy $vstPluginPath64 $0
218 DetailPrint "Found VST plugin (64 bit) directory in HKCU registry."
219 Goto done64
220
221 check2ndRegistryKey64:
222 ClearErrors
223 ReadRegStr $0 HKLM "Software\VST" "VSTPluginsPath"
224 IfErrors noRegistryKeyExists64 0
225 StrCpy $vstPluginPath64 $0
226 DetailPrint "Found VST plugin (64 bit) directory in HKLM registry."
227 Goto done64
228
229 noRegistryKeyExists64:
230 ClearErrors
231 DetailPrint "No VST plugin directory (64 bit) defined in registry."
232 StrCpy $vstPluginPath64 "${DEFAULT_VST_DIR64}"
233
234 done64:
235 SetRegView 32 ; make sure we have a 32 bit registry view
236
237 detectVst32: ; it follows the same thing for the 32 bit registry view
238
239 ; ------- VST 32 bit detection -------
240
241 ClearErrors
242 ReadRegStr $0 HKCU "Software\VST" "VSTPluginsPath"
243 IfErrors check2ndRegistryKey 0
244 StrCpy $vstPluginPath $0
245 DetailPrint "Found VST plugin (32 bit) directory in HKCU registry."
246 Goto done
247
248 check2ndRegistryKey:
249 ClearErrors
250 ReadRegStr $0 HKLM "Software\VST" "VSTPluginsPath"
251 IfErrors noRegistryKeyExists 0
252 StrCpy $vstPluginPath $0
253 DetailPrint "Found VST plugin (32 bit) directory in HKLM registry."
254 Goto done
255
256 noRegistryKeyExists:
257 ClearErrors
258 DetailPrint "No VST plugin directory (32 bit) defined in registry."
259 StrCpy $vstPluginPath "${DEFAULT_VST_DIR}"
260
261 done: ; ------- summary of detection -------
262
263 StrCmp $binType BIN_TYPE_64BIT 0 summaryVst32
264 SetRegView 64 ; restore 64 bit view
265 DetailPrint "Using the following as VST (64 bit) plugin directory: $vstPluginPath64"
266 summaryVst32:
267 DetailPrint "Using the following as VST (32 bit) plugin directory: $vstPluginPath"
268 FunctionEnd
269
270 ;--------------------------------
271
272 ; primer things to do (before installing, not called on uninstall)
273 Section ""
274 Call DetectSystemType
275 Call DetectVstPath
276 SectionEnd
277
278 ;--------------------------------
279
280 ; The stuff to install
281 Section "LinuxSampler ${LINUXSAMPLER_VERSION}" SecLinuxSampler
282 DetailPrint "Installing LinuxSampler binaries ..."
283 StrCpy $installingLinuxSampler "1"
284
285 StrCmp $binType BIN_TYPE_64BIT linuxsampler64
286 StrCmp $binType BIN_TYPE_686SSE linuxsampler686sse
287 Goto linuxsampler686
288
289 ; Files to install
290
291 linuxsampler64:
292 SetOutPath "$INSTDIR\${SUBDIR_64_BIT}"
293 File bin\64\linuxsampler.exe
294 File bin\64\liblinuxsampler-4.dll
295 File bin\64\libsqlite3-0.dll
296 SetOutPath $vstPluginPath64
297 File /oname=LinuxSampler64.dll bin\64\LinuxSampler.dll
298 MessageBox MB_YESNO \
299 "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?" \
300 IDNO done
301
302 ; so the other sections install their 32 bit versions as well
303 StrCpy $installing32BitToo "1"
304
305 linuxsampler686sse:
306 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
307 File bin\686sse\linuxsampler.exe
308 File bin\686sse\liblinuxsampler-4.dll
309 File bin\686\libsqlite3-0.dll
310 SetOutPath $vstPluginPath
311 File /oname=LinuxSampler32.dll bin\686sse\LinuxSampler.dll
312 Goto done
313
314 linuxsampler686:
315 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
316 File bin\686\linuxsampler.exe
317 File bin\686\liblinuxsampler-4.dll
318 File bin\686\libsqlite3-0.dll
319 SetOutPath $vstPluginPath
320 File /oname=LinuxSampler32.dll bin\686\LinuxSampler.dll
321 Goto done
322
323 done:
324 SectionEnd
325
326 Section "JSampler 'Fantasia' ${FANTASIA_VERSION}" SecJSampler
327 DetailPrint "Installing JSampler binaries ..."
328 ; make sure JRE is installed
329 Call DetectJRE
330 StrCpy $installingJSampler "1"
331 ; Set output path to the installation directory.
332 SetOutPath $INSTDIR
333 ; Files to install
334 File bin\Fantasia-0.9.jar
335 File jsampler.ico
336 SectionEnd
337
338 Section "QSampler ${QSAMPLER_VERSION}" SecQSampler
339 DetailPrint "Installing QSampler binaries ..."
340 StrCpy $installingQSampler "1"
341 ; Set output path to the installation directory.
342 SetOutPath $INSTDIR
343 ; Files to install
344 File bin\686\qsampler.exe
345 File bin\686\liblscp-6.dll
346 File bin\686\Qt5Core.dll
347 File bin\686\Qt5Gui.dll
348 File bin\686\Qt5Widgets.dll
349 File bin\686\libbz2-1.dll
350 File bin\686\libfreetype-6.dll
351 Delete $INSTDIR\${SUBDIR_32_BIT}\libglib-2.0-0.dll ; remove old version
352 File bin\686\libglib-2.0-0.dll
353 File bin\686\libgraphite2.dll
354 File bin\686\libharfbuzz-0.dll
355 File bin\686\libiconv-2.dll
356 File bin\686\libicudt57.dll
357 File bin\686\libicuin57.dll
358 File bin\686\libicuuc57.dll
359 File bin\686\libintl-8.dll
360 File bin\686\liblscp-6.dll
361 File bin\686\libpcre-1.dll
362 File bin\686\libpcre16-0.dll
363 File bin\686\libpng16-16.dll
364 Delete $INSTDIR\${SUBDIR_32_BIT}\zlib1.dll ; remove old version
365 File bin\686\zlib1.dll
366 File qt.conf
367 File qsampler.ico
368 SetOutPath $INSTDIR\plugins\platforms
369 File bin\686\plugins\platforms\qwindows.dll
370 SetOutPath $INSTDIR\share\locale
371 File bin\686\share\locale\qsampler_*.qm
372 File bin\686\share\locale\qt*_*.qm
373 SectionEnd
374
375 Section "gigedit ${GIGEDIT_VERSION}" Secgigedit
376 DetailPrint "Installing gigedit binaries ..."
377 StrCpy $installinggigedit "1"
378
379 ; make sure gtkmm is installed
380 ; (commented out for now, since we include gtk(mm) DLLs with this
381 ; installer, so no check and no download necessary ATM)
382 ;Call CheckForGtkmm
383
384 StrCmp $binType BIN_TYPE_64BIT gigedit64
385 ; I think we don't need a SSE optimized 32 bit binary for gigedit, one 64bit and one simple 32 bit version should be sufficient
386 ;StrCmp $binType BIN_TYPE_686SSE gigedit686sse
387 Goto gigedit686
388
389 ; Files to install
390
391 gigedit64:
392 SetOutPath "$INSTDIR\${SUBDIR_64_BIT}"
393 File bin\64\gigedit.exe
394 File bin\64\libgigedit-3.dll
395 SetOutPath "$INSTDIR\${SUBDIR_64_BIT}\plugins"
396 File bin\64\plugins\libgigeditlinuxsamplerplugin.dll
397 SetOutPath "$INSTDIR\${SUBDIR_64_BIT}"
398 File bin\64\libatk-1.0-0.dll
399 File bin\64\libatkmm-1.6-1.dll
400 File bin\64\libcairo-2.dll
401 File bin\64\libcairomm-1.0-1.dll
402 File bin\64\libexpat-1.dll
403 File bin\64\libfontconfig-1.dll
404 File bin\64\libfreetype-6.dll
405 File bin\64\libgdkmm-2.4-1.dll
406 File bin\64\libgdk_pixbuf-2.0-0.dll
407 File bin\64\libgdk-win32-2.0-0.dll
408 File bin\64\libgio-2.0-0.dll
409 File bin\64\libgiomm-2.4-1.dll
410 File bin\64\libglib-2.0-0.dll
411 File bin\64\libglibmm-2.4-1.dll
412 File bin\64\libgmodule-2.0-0.dll
413 File bin\64\libgobject-2.0-0.dll
414 File bin\64\libgthread-2.0-0.dll
415 File bin\64\libgtkmm-2.4-1.dll
416 File bin\64\libgtk-win32-2.0-0.dll
417 File bin\64\libintl-8.dll
418 File bin\64\libpango-1.0-0.dll
419 File bin\64\libpangocairo-1.0-0.dll
420 File bin\64\libpangoft2-1.0-0.dll
421 File bin\64\libpangomm-1.4-1.dll
422 File bin\64\libpangowin32-1.0-0.dll
423 File bin\64\libpng14-14.dll
424 File bin\64\libsigc-2.0-0.dll
425 File bin\64\zlib1.dll
426 SetOutPath $INSTDIR\${SUBDIR_64_BIT}\etc\gtk-2.0
427 File bin\64\etc\gtk-2.0\gtkrc
428 SetOutPath $INSTDIR\${SUBDIR_64_BIT}\lib\gtk-2.0\2.10.0\engines
429 File bin\64\lib\gtk-2.0\2.10.0\engines\libwimp.dll
430 SetOutPath $INSTDIR\${SUBDIR_64_BIT}\share\locale\de\LC_MESSAGES
431 File bin\64\share\locale\de\LC_MESSAGES\gigedit.mo
432 File bin\64\share\locale\de\LC_MESSAGES\gtk20.mo
433 SetOutPath $INSTDIR\${SUBDIR_64_BIT}\share\locale\sv\LC_MESSAGES
434 File bin\64\share\locale\sv\LC_MESSAGES\gigedit.mo
435 File bin\64\share\locale\sv\LC_MESSAGES\gtk20.mo
436 SetOutPath $INSTDIR\${SUBDIR_64_BIT}\share\themes\MS-Windows\gtk-2.0
437 File bin\64\share\themes\MS-Windows\gtk-2.0\gtkrc
438
439 ; shall we install the 32 bit version as well?
440 StrCmp $installing32BitToo "1" gigedit686 done
441
442 gigedit686:
443 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
444 File bin\686\gigedit.exe
445 File bin\686\libgigedit-3.dll
446 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}\plugins"
447 File bin\686\plugins\libgigeditlinuxsamplerplugin.dll
448 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
449 File bin\686\libatk-1.0-0.dll
450 File bin\686\libatkmm-1.6-1.dll
451 File bin\686\libcairo-2.dll
452 File bin\686\libcairo-gobject-2.dll
453 File bin\686\libcairomm-1.0-1.dll
454 File bin\686\libepoxy-0.dll
455 File bin\686\libexpat-1.dll
456 File bin\686\libffi-6.dll
457 File bin\686\libfontconfig-1.dll
458 File bin\686\libgdk_pixbuf-2.0-0.dll
459 File bin\686\libgdk-3-0.dll
460 File bin\686\libgdkmm-3.0-1.dll
461 File bin\686\libgio-2.0-0.dll
462 File bin\686\libgiomm-2.4-1.dll
463 File bin\686\libglibmm-2.4-1.dll
464 File bin\686\libgmodule-2.0-0.dll
465 File bin\686\libgobject-2.0-0.dll
466 File bin\686\libgtk-3-0.dll
467 File bin\686\libgtkmm-3.0-1.dll
468 File bin\686\libpango-1.0-0.dll
469 File bin\686\libpangocairo-1.0-0.dll
470 File bin\686\libpangoft2-1.0-0.dll
471 File bin\686\libpangomm-1.4-1.dll
472 File bin\686\libpangowin32-1.0-0.dll
473 File bin\686\libpixman-1-0.dll
474 File bin\686\libsigc-2.0-0.dll
475 SetOutPath $INSTDIR\${SUBDIR_32_BIT}\share
476 File /r bin\686\share\glib-2.0
477 File /r bin\686\share\icons
478 SetOutPath $INSTDIR\${SUBDIR_32_BIT}\share\locale
479 File /r bin\686\share\locale\de
480 File /r bin\686\share\locale\sv
481
482 done:
483 SectionEnd
484
485 Section "libgig ${LIBGIG_VERSION}" Seclibgig
486 DetailPrint "Installing libgig binaries ..."
487 ; We make this a mandatory component
488 SectionIn RO
489
490 StrCmp $binType BIN_TYPE_64BIT libgig64
491 StrCmp $binType BIN_TYPE_686SSE libgig686sse
492 Goto libgig686
493
494 ; Files to install
495
496 libgig64:
497 SetOutPath "$INSTDIR\${SUBDIR_64_BIT}"
498 File bin\64\libgig-7.dll
499 File bin\64\libakai-0.dll
500 File bin\64\rifftree.exe
501 File bin\64\dlsdump.exe
502 File bin\64\gigdump.exe
503 File bin\64\gigextract.exe
504 File bin\64\gigmerge.exe
505 File bin\64\gig2mono.exe
506 File bin\64\gig2stereo.exe
507 File bin\64\korg2gig.exe
508 File bin\64\korgdump.exe
509 File bin\64\akaidump.exe
510 File bin\64\akaiextract.exe
511 File bin\64\sf2dump.exe
512 File bin\64\sf2extract.exe
513 File bin\64\libgcc_s_sjlj-1.dll
514 File bin\64\libstdc++-6.dll
515
516 ; shall we install the 32 bit version as well?
517 StrCmp $installing32BitToo "1" libgig686sse
518 StrCmp $installingQSampler "1" libgigForQsampler done
519
520 ; QSampler needs the 32 bit libgig dll
521 libgigForQsampler:
522 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
523 File bin\686sse\libgig-7.dll
524 Goto libgig32common
525
526 libgig686sse:
527 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
528 File bin\686sse\libgig-7.dll
529 File bin\686sse\libakai-0.dll
530 File bin\686sse\rifftree.exe
531 File bin\686sse\dlsdump.exe
532 File bin\686sse\gigdump.exe
533 File bin\686sse\gigextract.exe
534 File bin\686sse\gigmerge.exe
535 File bin\686sse\gig2mono.exe
536 File bin\686sse\gig2stereo.exe
537 File bin\686sse\korg2gig.exe
538 File bin\686sse\korgdump.exe
539 File bin\686sse\akaidump.exe
540 File bin\686sse\akaiextract.exe
541 File bin\686sse\sf2dump.exe
542 File bin\686sse\sf2extract.exe
543 Goto libgig32common
544
545 libgig686:
546 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
547 File bin\686\libgig-7.dll
548 File bin\686\libakai-0.dll
549 File bin\686\rifftree.exe
550 File bin\686\dlsdump.exe
551 File bin\686\gigdump.exe
552 File bin\686\gigextract.exe
553 File bin\686\gigmerge.exe
554 File bin\686\gig2mono.exe
555 File bin\686\gig2stereo.exe
556 File bin\686\korg2gig.exe
557 File bin\686\korgdump.exe
558 File bin\686\akaidump.exe
559 File bin\686\akaiextract.exe
560 File bin\686\sf2dump.exe
561 File bin\686\sf2extract.exe
562
563 libgig32common:
564 Delete $INSTDIR\libgcc_s_dw2-1.dll ; remove old version
565 File bin\686\libgcc_s_dw2-1.dll
566 File bin\686\libwinpthread-1.dll
567 File bin\686\libstdc++-6.dll
568
569 done:
570
571 ; As this is a mandatory component, we misuse is for the following
572 ; common tasks as well ...
573
574 ; Add LinuxSampler and friends to the system's PATH variable
575 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
576 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\${SUBDIR_64_BIT}"
577 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\${SUBDIR_32_BIT}"
578
579 ; Write the uninstall keys for Windows
580 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}"
581 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'
582 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1
583 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1
584 WriteUninstaller "uninstall.exe"
585
586 ; Store installation folders
587 WriteRegStr HKLM "Software\LinuxSampler" "Main Directory" $INSTDIR
588 StrCmp $binType BIN_TYPE_64BIT 0 +3
589 WriteRegStr HKLM "Software\LinuxSampler" "VST 64 Directory" $vstPluginPath64
590 StrCmp $installing32BitToo "1" 0 +2
591 WriteRegStr HKLM "Software\LinuxSampler" "VST 32 Directory" $vstPluginPath
592
593 ; Just for info, store the release date as well
594 WriteRegStr HKLM "Software\LinuxSampler" "Release Date" ${RELEASE_DATE}
595 SectionEnd
596
597 Section "libsndfile ${SNDFILE_VERSION}" Seclibsndfile
598 DetailPrint "Installing libsndfile binaries ..."
599 ; We make this a mandatory component
600 SectionIn RO
601
602 StrCmp $binType BIN_TYPE_64BIT libsndfile64
603 ; 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
604 ;StrCmp $binType BIN_TYPE_686SSE libsndfile686sse
605 Goto libsndfile686
606
607 ; Files to install
608
609 libsndfile64:
610 SetOutPath "$INSTDIR\${SUBDIR_64_BIT}"
611 File bin\64\libsndfile-1.dll
612 File bin\64\libFLAC-8.dll
613 File bin\64\libogg-0.dll
614 File bin\64\libvorbis-0.dll
615 File bin\64\libvorbisenc-2.dll
616
617 ; shall we install the 32 bit version as well?
618 StrCmp $installing32BitToo "1" libsndfile686 done
619
620 libsndfile686:
621 SetOutPath "$INSTDIR\${SUBDIR_32_BIT}"
622 File bin\686\libsndfile-1.dll
623 File bin\686\libFLAC-8.dll
624 File bin\686\libogg-0.dll
625 File bin\686\libvorbis-0.dll
626 File bin\686\libvorbisenc-2.dll
627 File bin\686\libspeex-1.dll
628 Goto done
629
630 done:
631 SectionEnd
632
633 Section "Start Menu Shortcuts" SecShortcuts
634 Var /GLOBAL javawbin
635 Var /GLOBAL samplerDir
636
637 StrCmp $binType BIN_TYPE_64BIT 0 +3
638 StrCpy $samplerDir "$INSTDIR\${SUBDIR_64_BIT}"
639 Goto +2
640 StrCpy $samplerDir "$INSTDIR\${SUBDIR_32_BIT}"
641
642 ; Switch system variables to 'all users', to ensure we create the start
643 ; menu shortcuts for all users and not just for the current user.
644 SetShellVarContext all
645
646 ; try to resolve the full qualified path of the javaw binary
647 ClearErrors
648 SearchPath $javawbin javaw.exe
649 IfErrors 0 javawDetected
650 ClearErrors
651 ; if all fails, simply use SYSDIR (which should work almost always anyway)
652 DetailPrint "WRN: Could not resolve javaw.exe path, using SYSDIR."
653 StrCpy $javawbin "$SYSDIR\javaw.exe"
654 javawDetected:
655
656 CreateDirectory "$SMPROGRAMS\LinuxSampler"
657
658 SetOutPath $INSTDIR
659 CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
660
661 StrCmp $installingLinuxSampler '1' 0 +3
662 SetOutPath $samplerDir
663 CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler ${LINUXSAMPLER_VERSION} (stand alone backend).lnk" "$samplerDir\linuxsampler.exe" "" "$samplerDir\linuxsampler.exe" 0
664
665 StrCmp $installingJSampler '1' 0 +3
666 SetOutPath $INSTDIR
667 CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia ${FANTASIA_VERSION} (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.9.jar"' '$INSTDIR\jsampler.ico' 0
668
669 StrCmp $installingQSampler '1' 0 +3
670 SetOutPath $INSTDIR
671 CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler ${QSAMPLER_VERSION} (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0
672
673 StrCmp $installinggigedit '1' 0 +3
674 SetOutPath $samplerDir
675 CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit ${GIGEDIT_VERSION} (stand alone).lnk" "$samplerDir\gigedit.exe" "" "$samplerDir\gigedit.exe" 0
676
677 !insertmacro CreateInternetShortcut \
678 "$SMPROGRAMS\LinuxSampler\\Support LinuxSampler" \
679 "http://www.linuxsampler.org/donations.html" \
680 "" "0"
681 SectionEnd
682
683 ;--------------------------------
684
685 ; Uninstaller
686
687 Section "Uninstall"
688 Var /GLOBAL vstdir32
689 Var /GLOBAL vstdir64
690
691 Call un.DetectSystemType
692
693 DetailPrint "Removing LinuxSampler directories from PATH variable ..."
694 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"
695 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\${SUBDIR_32_BIT}"
696 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\${SUBDIR_64_BIT}"
697
698 StrCmp $binType BIN_TYPE_64BIT 0 uninstallVst32
699 DetailPrint "Searching for VST plugin (64 bit) ..."
700 ClearErrors
701 ReadRegStr $0 HKLM "Software\LinuxSampler" "VST 64 Directory"
702 IfErrors uninstallVst32 0
703 StrCpy $vstdir64 $0
704 DetailPrint "Removing VST plugin (64 bit) from: $vstdir64 ..."
705 Delete "$vstdir64\LinuxSampler64.dll"
706
707 uninstallVst32:
708
709 DetailPrint "Searching for VST plugin (32 bit) ..."
710 ClearErrors
711 ReadRegStr $0 HKLM "Software\LinuxSampler" "VST 32 Directory"
712 IfErrors uninstallVstDone 0
713 StrCpy $vstdir32 $0
714 DetailPrint "Removing VST plugin (32 bit) from: $vstdir32 ..."
715 Delete "$vstdir32\LinuxSampler32.dll"
716
717 uninstallVstDone:
718 ClearErrors
719
720 DetailPrint "Removing registry keys ..."
721 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"
722 DeleteRegKey HKLM "Software\LinuxSampler"
723
724 ; Workaround for Vista and younger: switch system variables to 'all users'
725 ; otherwise e.g. we couldn't delete start menu shortcuts below on those
726 ; systems, as those variables would point to the current user.
727 SetShellVarContext all
728
729 DetailPrint "Removing shortcuts (if any) from: $SMPROGRAMS ..."
730 Delete "$SMPROGRAMS\LinuxSampler\*.*"
731
732 DetailPrint "Removing directories used ..."
733 RMDir /r "$SMPROGRAMS\LinuxSampler"
734 RMDir /r "$INSTDIR"
735 SectionEnd
736
737 ;--------------------------------
738 ;Descriptions
739
740 ;Language strings
741 LangString DESC_SecLinuxSampler ${LANG_ENGLISH} "Sampler backend (stand-alone and VST), including sampler engine, MIDI and audio drivers, native C++ API as well as network (LSCP) API. Use a frontend application like JSampler or QSampler to control the sampler."
742 LangString DESC_SecJSampler ${LANG_ENGLISH} "Graphical frontend (user interface) for LinuxSampler written in Java, supporting all current features of LinuxSampler. This is the 'Fantasia' distribution of JSampler, offering a modern skin based look."
743 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!"
744 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."
745 LangString DESC_Seclibgig ${LANG_ENGLISH} "C++ program library for accessing DLS (Level 1 and Level 2) and GigaStudio/Gigasampler format (up to v4), SoundFont, AKAI and KORG files. This library is required by LinuxSampler, gigedit and QSampler."
746 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."
747 LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."
748
749 ;Assign language strings to sections
750 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
751 !insertmacro MUI_DESCRIPTION_TEXT ${SecLinuxSampler} $(DESC_SecLinuxSampler)
752 !insertmacro MUI_DESCRIPTION_TEXT ${SecJSampler} $(DESC_SecJSampler)
753 !insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler)
754 !insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit)
755 !insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig)
756 !insertmacro MUI_DESCRIPTION_TEXT ${Seclibsndfile} $(DESC_Seclibsndfile)
757 !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts)
758 !insertmacro MUI_FUNCTION_DESCRIPTION_END

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC