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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1902 - (hide annotations) (download)
Tue May 12 15:54:11 2009 UTC (14 years, 10 months ago) by schoenebeck
File size: 21521 byte(s)
* couple bugfixes regarding the new installer

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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC