/[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 1904 - (show annotations) (download)
Tue May 12 21:45:54 2009 UTC (14 years, 10 months ago) by schoenebeck
File size: 22667 byte(s)
* further bugfixes regarding the new installer

1 ; LinuxSampler Windows installer
2 ;
3 ; Copyright (C) 2007-2009, 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 NSIS's
11 ; plugin 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 ; Probably the best compression ratio
18 SetCompressor lzma
19
20 ;Include Modern UI
21 !include "MUI.nsh"
22 !include "EnvVarUpdate.nsh"
23
24 !define RELEASE_DATE "20090512"
25
26 ; The name of the installer
27 Name "LinuxSampler (${RELEASE_DATE})"
28
29 ; The file to write
30 OutFile "linuxsampler_${RELEASE_DATE}_setup.exe"
31
32 ; Java Runtime Environment, needed for JSampler
33 !define JRE_VERSION "1.6"
34 !define JRE_32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=29220"
35 !define JRE_64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=29222"
36
37 ; The default installation directory
38 InstallDir "$PROGRAMFILES64\LinuxSampler"
39
40 !define DEFAULT_VST_DIR "$PROGRAMFILES64\Steinberg\VstPlugins"
41
42 ; Get installation folder from registry if available
43 InstallDirRegKey HKLM "Software\LinuxSampler" "Main Directory"
44
45 ;--------------------------------
46 ;Interface Settings
47
48 !define MUI_HEADERIMAGE
49 !define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp"
50 !define MUI_ABORTWARNING
51
52 ;--------------------------------
53 ;Version Information
54
55 VIProductVersion "0.0.0.0"
56 VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "all-in-one installer"
57 VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org"
58 VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project"
59 VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" ""
60 VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "� 2003-2009 The LinuxSampler Project"
61 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})"
62 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0"
63
64 !define BIN_TYPE_64BIT "64 bit"
65 !define BIN_TYPE_686SSE "686 SSE"
66 !define BIN_TYPE_686 "686"
67
68 Var /GLOBAL binType
69
70 ;--------------------------------
71 ; Pages
72
73 !insertmacro MUI_PAGE_LICENSE "license.rtf"
74 !insertmacro MUI_PAGE_COMPONENTS
75 !insertmacro MUI_PAGE_DIRECTORY
76 !insertmacro MUI_PAGE_INSTFILES
77 !insertmacro MUI_UNPAGE_CONFIRM
78 !insertmacro MUI_UNPAGE_INSTFILES
79
80 ;--------------------------------
81 ;Languages
82
83 !insertmacro MUI_LANGUAGE "English"
84
85 ;--------------------------------
86
87 Function .onInit
88 Var /GLOBAL installingLinuxSampler
89 Var /GLOBAL installingJSampler
90 Var /GLOBAL installingQSampler
91 Var /GLOBAL installinggigedit
92 StrCpy $installingLinuxSampler "0"
93 StrCpy $installingJSampler "0"
94 StrCpy $installingQSampler "0"
95 StrCpy $installinggigedit "0"
96 FunctionEnd
97
98 ; detects CPU capabilities, determmines which native binary type to install
99 ; and selects the appropriate windows registry view (32 bit or 64 bit)
100 !macro DetectSystemType un
101 Function ${un}DetectSystemType
102 ; check if this is a 64 bit windows
103 System::Call "kernel32::GetCurrentProcess() i .s"
104 System::Call "kernel32::IsWow64Process(i s, *i .r0)"
105 IntCmp $0 0 not64bit
106 StrCpy $binType BIN_TYPE_64BIT
107 DetailPrint "64 bit Windows detected."
108 SetRegView 64
109 Goto DetectSystemDone
110
111 not64bit: ; a 32 bit system
112
113 SetRegView 32
114
115 ; check if CPU supports SSE
116 cpudesc::tell
117 Pop $0 ; full identification string in $0
118 StrCpy $1 $0 1, 34 ; pull out one character after SSE=
119 IntFmt $2 "%u" $1 ; and turn it into a number
120 IntCmpU $2 1 +1 +4 +4
121 StrCpy $binType BIN_TYPE_686SSE
122 DetailPrint "32 bit Windows, SSE CPU detected."
123 Goto DetectSystemDone
124 StrCpy $binType BIN_TYPE_686
125 DetailPrint "32 bit Windows (no SSE support) detected."
126
127 DetectSystemDone:
128 FunctionEnd
129 !macroend
130 !insertmacro DetectSystemType ""
131 !insertmacro DetectSystemType "un."
132
133 ; Check for the presence of gtkmm, and if false, ask the user whether to
134 ; download and install gtkmm now from the internet.
135 Function CheckForGtkmm
136 Var /GLOBAL gtkmmSetupFile
137
138 ClearErrors
139 ; This is just a lazy check for the presence of gtkmm, we should better use:
140 ; System::Call function (NSI internal function) to actually call an arbitrary
141 ; gtkmm function (/method) from a gtkmm DLL to make it certain
142 ReadRegStr $0 HKCU "Software\gtkmm\2.4" "Installer Language"
143 IfErrors +2 0
144 goto NoAbort
145 MessageBox MB_YESNO "gtkmm not found. Install it now (internet connection needed)?" IDYES InstallGtkmm
146 MessageBox MB_YESNO "gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
147 Abort ; causes installer to quit
148 InstallGtkmm:
149 ClearErrors
150 StrCpy $gtkmmSetupFile $TEMP\gtkmm-win32-runtime-2.10.11-1.exe
151 NSISdl::download "http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-runtime-2.10.11-1.exe" $gtkmmSetupFile
152 IfErrors 0 +2
153 Goto InstallGtkmmFailed
154 ExecWait $gtkmmSetupFile
155 Delete $gtkmmSetupFile ; we don't need it anymore
156 IfErrors 0 +2
157 Goto InstallGtkmmFailed
158 Goto NoAbort
159 InstallGtkmmFailed:
160 MessageBox MB_YESNO "Could not download gtkmm. gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
161 Abort ; causes installer to quit
162 NoAbort:
163 FunctionEnd
164
165 ; Downloads and launches the JRE installer from the internet
166 Function GetJRE
167 Var /GLOBAL jreUri
168
169 StrCmp $binType BIN_TYPE_64BIT 0 +3
170 StrCpy $jreUri ${JRE_64_URL}
171 Goto +2
172 StrCpy $jreUri ${JRE_32_URL}
173
174 DetailPrint "Downloading JRE from: $jreUri"
175
176 MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \
177 be downloaded and installed"
178
179 StrCpy $2 "$TEMP\Java Runtime Environment.exe"
180 nsisdl::download /TIMEOUT=30000 "$jreUri" $2
181 Pop $R0 ; Get the return value
182 StrCmp $R0 "success" +3
183 MessageBox MB_OK "Download failed: $R0"
184 Quit
185 ExecWait $2
186 Delete $2
187 FunctionEnd
188
189 ; Checks if the JRE is already installed, if not it will download and install it from the internet
190 Function DetectJRE
191 ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
192 "CurrentVersion"
193 StrCmp $2 ${JRE_VERSION} done
194
195 StrCmp $binType BIN_TYPE_64BIT 0 downloadjre
196
197 ; on 64 bit systems also check the 32 bit view of the registry, maybe
198 ; a 32 bit JRE was already installed
199 SetRegView 32
200 ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
201 "CurrentVersion"
202 SetRegView 64 ; restore 64 bit view
203 StrCmp $3 ${JRE_VERSION} done
204
205 downloadjre:
206 Call GetJRE
207
208 done:
209 FunctionEnd
210
211 ; Tries to find the location where VST plugins should be installed to
212 Function DetectVstPath
213 Var /GLOBAL vstPluginPath
214
215 ClearErrors
216 ReadRegStr $0 HKCU "Software\VST" "VSTPluginsPath"
217 IfErrors check2ndRegistryKey 0
218 StrCpy $vstPluginPath $0
219 DetailPrint "Found VST plugin directory in HKCU registry."
220 Goto done
221
222 check2ndRegistryKey:
223 ClearErrors
224 ReadRegStr $0 HKLM "Software\VST" "VSTPluginsPath"
225 IfErrors noRegistryKeyExists 0
226 StrCpy $vstPluginPath $0
227 DetailPrint "Found VST plugin directory in HKLM registry."
228 Goto done
229
230 noRegistryKeyExists:
231 ClearErrors
232 DetailPrint "No VST plugin directory defined in registry."
233 StrCpy $vstPluginPath "${DEFAULT_VST_DIR}"
234
235 done:
236 DetailPrint "Using the following as VST plugin directory: $vstPluginPath"
237 FunctionEnd
238
239 ;--------------------------------
240
241 ; primer things to do (before installing, not called on uninstall)
242 Section ""
243 Call DetectSystemType
244 Call DetectVstPath
245 SectionEnd
246
247 ;--------------------------------
248
249 ; The stuff to install
250 Section "LinuxSampler 0.5.1.12cvs" SecLinuxSampler
251 DetailPrint "Installing LinuxSampler binaries ..."
252 StrCpy $installingLinuxSampler "1"
253
254 ; Set output path to the installation directory.
255 SetOutPath $INSTDIR
256
257 StrCmp $binType BIN_TYPE_64BIT linuxsampler64
258 StrCmp $binType BIN_TYPE_686SSE linuxsampler686sse
259 Goto linuxsampler686
260
261 ; Files to install
262
263 linuxsampler64:
264 File bin\64\linuxsampler.exe
265 File bin\64\liblinuxsampler-1.dll
266 SetOutPath $vstPluginPath
267 File bin\64\LinuxSampler.dll
268 Goto done
269
270 linuxsampler686sse:
271 File bin\686sse\linuxsampler.exe
272 File bin\686sse\liblinuxsampler-1.dll
273 SetOutPath $vstPluginPath
274 File bin\686sse\LinuxSampler.dll
275 Goto done
276
277 linuxsampler686:
278 File bin\686\linuxsampler.exe
279 File bin\686\liblinuxsampler-1.dll
280 SetOutPath $vstPluginPath
281 File bin\686\LinuxSampler.dll
282 Goto done
283
284 done:
285 SectionEnd
286
287 Section "JSampler 'Fantasia' 0.8a-cvs6" SecJSampler
288 DetailPrint "Installing JSampler binaries ..."
289 ; make sure JRE is installed
290 Call DetectJRE
291 StrCpy $installingJSampler "1"
292 ; Set output path to the installation directory.
293 SetOutPath $INSTDIR
294 ; Files to install
295 File bin\Fantasia-0.8a-cvs6.jar
296 File jsampler.ico
297 SectionEnd
298
299 Section "QSampler 0.2.1.26" SecQSampler
300 DetailPrint "Installing QSampler binaries ..."
301 StrCpy $installingQSampler "1"
302 ; Set output path to the installation directory.
303 SetOutPath $INSTDIR
304 ; Files to install
305 File bin\686\qsampler.exe
306 File bin\686\QtCore4.dll
307 File bin\686\QtGui4.dll
308 File bin\686\mingwm10.dll
309 File qsampler.ico
310 SetOutPath $INSTDIR\share\locale
311 File bin\686\share\locale\qsampler_ru.qm
312 SectionEnd
313
314 Section "gigedit 0.1.1.x (cvs2009-05-10)" Secgigedit
315 DetailPrint "Installing gigedit binaries ..."
316 StrCpy $installinggigedit "1"
317
318 ; make sure gtkmm is installed
319 ; (commented out for now, since we include gtk(mm) DLLs with this
320 ; installer, so no check and no download necessary ATM)
321 ;Call CheckForGtkmm
322
323 ; Set output path to the installation directory.
324 SetOutPath $INSTDIR
325
326 StrCmp $binType BIN_TYPE_64BIT gigedit64
327 ; 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
328 ;StrCmp $binType BIN_TYPE_686SSE gigedit686sse
329 Goto gigedit686
330
331 ; Files to install
332
333 gigedit64:
334 File bin\64\gigedit.exe
335 File bin\64\libgigedit-1.dll
336 SetOutPath "$INSTDIR\plugins"
337 File bin\64\plugins\libgigeditlinuxsamplerplugin-1.dll
338 SetOutPath $INSTDIR
339 File bin\64\libatk-1.0-0.dll
340 File bin\64\libatkmm-1.6-1.dll
341 File bin\64\libcairo-2.dll
342 File bin\64\libcairomm-1.0-1.dll
343 File bin\64\libgdkmm-2.4-1.dll
344 File bin\64\libgdk_pixbuf-2.0-0.dll
345 File bin\64\libgdk-win32-2.0-0.dll
346 File bin\64\libgio-2.0-0.dll
347 File bin\64\libgiomm-2.4-1.dll
348 File bin\64\libglib-2.0-0.dll
349 File bin\64\libglibmm-2.4-1.dll
350 File bin\64\libgmodule-2.0-0.dll
351 File bin\64\libgobject-2.0-0.dll
352 File bin\64\libgthread-2.0-0.dll
353 File bin\64\libgtkmm-2.4-1.dll
354 File bin\64\libgtk-win32-2.0-0.dll
355 File bin\64\libintl-8.dll
356 File bin\64\libjpeg-62.dll
357 File bin\64\libpango-1.0-0.dll
358 File bin\64\libpangocairo-1.0-0.dll
359 File bin\64\libpangomm-1.4-1.dll
360 File bin\64\libpangowin32-1.0-0.dll
361 File bin\64\libpng12-0.dll
362 File bin\64\libsigc-2.0-0.dll
363 File bin\64\libtiff.dll
364 File bin\64\zlib1.dll
365 SetOutPath $INSTDIR\etc\gtk-2.0
366 File bin\64\etc\gtk-2.0\gtkrc
367 SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines
368 File bin\64\lib\gtk-2.0\2.10.0\engines\libwimp.dll
369 SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES
370 File bin\64\share\locale\de\LC_MESSAGES\gigedit.mo
371 File bin\64\share\locale\de\LC_MESSAGES\gtk20.mo
372 SetOutPath $INSTDIR\share\locale\sv\LC_MESSAGES
373 File bin\64\share\locale\sv\LC_MESSAGES\gigedit.mo
374 File bin\64\share\locale\sv\LC_MESSAGES\gtk20.mo
375 SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0
376 File bin\64\share\themes\MS-Windows\gtk-2.0\gtkrc
377 Goto done
378
379 gigedit686:
380 File bin\686\gigedit.exe
381 File bin\686\libgigedit-1.dll
382 SetOutPath "$INSTDIR\plugins"
383 File bin\686\plugins\libgigeditlinuxsamplerplugin-1.dll
384 SetOutPath $INSTDIR
385 File bin\686\intl.dll
386 File bin\686\jpeg62.dll
387 File bin\686\libatk-1.0-0.dll
388 File bin\686\libatkmm-1.6-1.dll
389 File bin\686\libcairo-2.dll
390 File bin\686\libcairomm-1.0-1.dll
391 File bin\686\libgdkmm-2.4-1.dll
392 File bin\686\libgdk_pixbuf-2.0-0.dll
393 File bin\686\libgdk-win32-2.0-0.dll
394 File bin\686\libgio-2.0-0.dll
395 File bin\686\libgiomm-2.4-1.dll
396 File bin\686\libglib-2.0-0.dll
397 File bin\686\libglibmm-2.4-1.dll
398 File bin\686\libgmodule-2.0-0.dll
399 File bin\686\libgobject-2.0-0.dll
400 File bin\686\libgthread-2.0-0.dll
401 File bin\686\libgtkmm-2.4-1.dll
402 File bin\686\libgtk-win32-2.0-0.dll
403 File bin\686\libpango-1.0-0.dll
404 File bin\686\libpangocairo-1.0-0.dll
405 File bin\686\libpangomm-1.4-1.dll
406 File bin\686\libpangowin32-1.0-0.dll
407 File bin\686\libpng12-0.dll
408 File bin\686\libsigc-2.0-0.dll
409 File bin\686\libtiff3.dll
410 File bin\686\zlib1.dll
411 SetOutPath $INSTDIR\etc\gtk-2.0
412 File bin\686\etc\gtk-2.0\gdk-pixbuf.loaders
413 File bin\686\etc\gtk-2.0\gtkrc
414 SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines
415 File bin\686\lib\gtk-2.0\2.10.0\engines\libwimp.dll
416 SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\loaders
417 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-ani.dll
418 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-bmp.dll
419 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-gif.dll
420 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-icns.dll
421 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-ico.dll
422 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-jpeg.dll
423 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-pcx.dll
424 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-png.dll
425 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-pnm.dll
426 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-ras.dll
427 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-tga.dll
428 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-tiff.dll
429 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-wbmp.dll
430 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-xbm.dll
431 File bin\686\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-xpm.dll
432 SetOutPath $INSTDIR\share\locale\de\LC_MESSAGES
433 File bin\686\share\locale\de\LC_MESSAGES\gigedit.mo
434 File bin\686\share\locale\de\LC_MESSAGES\gtk20.mo
435 SetOutPath $INSTDIR\share\locale\sv\LC_MESSAGES
436 File bin\686\share\locale\sv\LC_MESSAGES\gigedit.mo
437 File bin\686\share\locale\sv\LC_MESSAGES\gtk20.mo
438 SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0
439 File bin\686\share\themes\MS-Windows\gtk-2.0\gtkrc
440 Goto done
441
442 done:
443 SectionEnd
444
445 Section "libgig 3.2.1.x (cvs2009-05-03)" Seclibgig
446 DetailPrint "Installing libgig binaries ..."
447 ; We make this a mandatory component
448 SectionIn RO
449 ; Set output path to the installation directory.
450 SetOutPath $INSTDIR
451
452 StrCmp $binType BIN_TYPE_64BIT libgig64
453 StrCmp $binType BIN_TYPE_686SSE libgig686sse
454 Goto libgig686
455
456 ; Files to install
457
458 libgig64:
459 File bin\64\libgig-6.dll
460 File bin\64\rifftree.exe
461 File bin\64\dlsdump.exe
462 File bin\64\gigdump.exe
463 File bin\64\gigextract.exe
464 ; special dependency for the 64 bit version
465 File bin\64\libgcc_s_sjlj-1.dll
466 Goto done
467
468 libgig686sse:
469 File bin\686sse\libgig-6.dll
470 File bin\686sse\rifftree.exe
471 File bin\686sse\dlsdump.exe
472 File bin\686sse\gigdump.exe
473 File bin\686sse\gigextract.exe
474 Goto done
475
476 libgig686:
477 File bin\686\libgig-6.dll
478 File bin\686\rifftree.exe
479 File bin\686\dlsdump.exe
480 File bin\686\gigdump.exe
481 File bin\686\gigextract.exe
482 Goto done
483
484 done:
485
486 ; As this is a mandatory component, we misuse is for the following
487 ; common tasks as well ...
488
489 ; Add LinuxSampler and friends to the system's PATH variable
490 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
491
492 ; Write the uninstall keys for Windows
493 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}"
494 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'
495 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1
496 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1
497 WriteUninstaller "uninstall.exe"
498
499 ; Store installation folders
500 WriteRegStr HKLM "Software\LinuxSampler" "Main Directory" $INSTDIR
501 WriteRegStr HKLM "Software\LinuxSampler" "VST Directory" $vstPluginPath
502
503 ; Just for info, store the release date as well
504 WriteRegStr HKLM "Software\LinuxSampler" "Release Date" ${RELEASE_DATE}
505 SectionEnd
506
507 Section "libsndfile 1.0.19" Seclibsndfile
508 DetailPrint "Installing libsndfile binaries ..."
509 ; We make this a mandatory component
510 SectionIn RO
511 ; Set output path to the installation directory.
512 SetOutPath $INSTDIR
513
514 StrCmp $binType BIN_TYPE_64BIT libsndfile64
515 ; 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
516 ;StrCmp $binType BIN_TYPE_686SSE libsndfile686sse
517 Goto libsndfile686
518
519 ; Files to install
520
521 libsndfile64:
522 File bin\64\libsndfile-1.dll
523 Goto done
524
525 libsndfile686:
526 File bin\686\libsndfile-1.dll
527 Goto done
528
529 done:
530 SectionEnd
531
532 Section "Start Menu Shortcuts" SecShortcuts
533 Var /GLOBAL javawbin
534
535 ; Switch system variables to 'all users', to ensure we create the start
536 ; menu shortcuts for all users and not just for the current user.
537 SetShellVarContext all
538
539 ; try to resolve the full qualified path of the javaw binary
540 ClearErrors
541 SearchPath $javawbin javaw.exe
542 IfErrors 0 javawDetected
543 ClearErrors
544 ; if all fails, simply use SYSDIR (which should work almost always anyway)
545 DetailPrint "WRN: Could not resolve javaw.exe path, using SYSDIR."
546 StrCpy $javawbin "$SYSDIR\javaw.exe"
547 javawDetected:
548
549 CreateDirectory "$SMPROGRAMS\LinuxSampler"
550
551 CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
552
553 StrCmp $installingLinuxSampler '1' 0 +2
554 CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1.12cvs (stand alone backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0
555
556 StrCmp $installingJSampler '1' 0 +2
557 CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a-cvs6 (frontend).lnk' '$javawbin' '-jar "$INSTDIR\Fantasia-0.8a-cvs6.jar"' '$INSTDIR\jsampler.ico' 0
558
559 StrCmp $installingQSampler '1' 0 +2
560 CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1.26 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0
561
562 StrCmp $installinggigedit '1' 0 +2
563 CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1.x cvs2009-05-10 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
564 SectionEnd
565
566 ;--------------------------------
567
568 ; Uninstaller
569
570 Section "Uninstall"
571 Var /GLOBAL vstdir
572
573 Call un.DetectSystemType
574
575 DetailPrint "Removing LinuxSampler directory from PATH variable ..."
576 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"
577
578 DetailPrint "Searching for VST plugin ..."
579 ClearErrors
580 ReadRegStr $0 HKLM "Software\LinuxSampler" "VST Directory"
581 IfErrors usedefaultvstdir 0
582 StrCpy $vstdir $0
583 DetailPrint "VST plugin location found in registry."
584 Goto vstdirDetected
585 usedefaultvstdir:
586 DetailPrint "WRN: No VST plugin location found in registry, trying default location."
587 ClearErrors
588 StrCpy $vstdir "${DEFAULT_VST_DIR}"
589 vstdirDetected:
590
591 DetailPrint "Removing registry keys ..."
592 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"
593 DeleteRegKey HKLM "Software\LinuxSampler"
594
595 ; Workaround for Vista and younger: switch system variables to 'all users'
596 ; otherwise e.g. we couldn't delete start menu shortcuts below on those
597 ; systems, as those variables would point to the current user.
598 SetShellVarContext all
599
600 DetailPrint "Removing shortcuts (if any) from: $SMPROGRAMS ..."
601 Delete "$SMPROGRAMS\LinuxSampler\*.*"
602
603 DetailPrint "Removing VST plugin from: $vstdir ..."
604 Delete "$vstdir\LinuxSampler.dll"
605
606 DetailPrint "Removing directories used ..."
607 RMDir /r "$SMPROGRAMS\LinuxSampler"
608 RMDir /r "$INSTDIR"
609 SectionEnd
610
611 ;--------------------------------
612 ;Descriptions
613
614 ;Language strings
615 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."
616 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."
617 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!"
618 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."
619 LangString DESC_Seclibgig ${LANG_ENGLISH} "C++ program library for accessing DLS (Level 1 and Level 2) and Gigasampler format (v2 and v3) files. This library is required by LinuxSampler, gigedit and QSampler."
620 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."
621 LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."
622
623 ;Assign language strings to sections
624 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
625 !insertmacro MUI_DESCRIPTION_TEXT ${SecLinuxSampler} $(DESC_SecLinuxSampler)
626 !insertmacro MUI_DESCRIPTION_TEXT ${SecJSampler} $(DESC_SecJSampler)
627 !insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler)
628 !insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit)
629 !insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig)
630 !insertmacro MUI_DESCRIPTION_TEXT ${Seclibsndfile} $(DESC_Seclibsndfile)
631 !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts)
632 !insertmacro MUI_FUNCTION_DESCRIPTION_END

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC