/[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 1587 - (hide annotations) (download)
Tue Dec 11 16:39:05 2007 UTC (14 years, 8 months ago) by schoenebeck
File size: 10100 byte(s)
* added Windows icon for QSampler

1 schoenebeck 1547 ; LinuxSampler Windows installer
2     ;
3     ; Copyright (C) 2007, The LinuxSampler Developers
4     ;
5     ; All-in-one Installer for all subprojects / software components of the
6     ; LinuxSampler Project.
7    
8     ; Probably the best compression ratio
9     SetCompressor lzma
10    
11     ;Include Modern UI
12     !include "MUI.nsh"
13    
14 schoenebeck 1581 !define RELEASE_DATE "20071207"
15    
16 schoenebeck 1547 ; The name of the installer
17 schoenebeck 1581 Name "LinuxSampler (${RELEASE_DATE})"
18 schoenebeck 1547
19     ; The file to write
20 schoenebeck 1581 OutFile "linuxsampler_${RELEASE_DATE}_setup.exe"
21 schoenebeck 1547
22     ; Java Runtime Environment, needed for JSampler
23     !define JRE_VERSION "1.6"
24     !define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11292"
25    
26     ; The default installation directory
27     InstallDir $PROGRAMFILES\LinuxSampler
28    
29     ; Get installation folder from registry if available
30     InstallDirRegKey HKCU "Software\LinuxSampler" ""
31    
32     ;--------------------------------
33     ;Interface Settings
34    
35     !define MUI_HEADERIMAGE
36     !define MUI_HEADERIMAGE_BITMAP "linuxsampler.bmp"
37     !define MUI_ABORTWARNING
38    
39     ;--------------------------------
40     ;Version Information
41    
42     VIProductVersion "0.0.0.0"
43 schoenebeck 1581 VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "all-in-one installer"
44 schoenebeck 1547 VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "http://linuxsampler.org"
45     VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project"
46     VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" ""
47     VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "� 2003-2007 The LinuxSampler Project"
48 schoenebeck 1581 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "LinuxSampler Installer (${RELEASE_DATE})"
49 schoenebeck 1547 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0"
50    
51     ;--------------------------------
52     ; Pages
53    
54     !insertmacro MUI_PAGE_LICENSE "license.rtf"
55     !insertmacro MUI_PAGE_COMPONENTS
56     !insertmacro MUI_PAGE_DIRECTORY
57     !insertmacro MUI_PAGE_INSTFILES
58     !insertmacro MUI_UNPAGE_CONFIRM
59     !insertmacro MUI_UNPAGE_INSTFILES
60    
61     ;--------------------------------
62     ;Languages
63    
64     !insertmacro MUI_LANGUAGE "English"
65    
66     ;--------------------------------
67    
68 schoenebeck 1581 Function .onInit
69     Var /GLOBAL installingLinuxSampler
70     Var /GLOBAL installingJSampler
71     Var /GLOBAL installingQSampler
72     Var /GLOBAL installinggigedit
73     StrCpy $installingLinuxSampler "0"
74     StrCpy $installingJSampler "0"
75     StrCpy $installingQSampler "0"
76     StrCpy $installinggigedit "0"
77     FunctionEnd
78    
79 schoenebeck 1547 ; Check for the presence of gtkmm, and if false, ask the user whether to
80     ; download and install gtkmm now from the internet.
81     Function CheckForGtkmm
82     Var /GLOBAL gtkmmSetupFile
83    
84 schoenebeck 1581 ClearErrors
85 schoenebeck 1547 ; This is just a lazy check for the presence of gtkmm, we should better use:
86     ; System::Call function (NSI internal function) to actually call an arbitrary
87     ; gtkmm function (/method) from a gtkmm DLL to make it certain
88     ReadRegStr $0 HKCU "Software\gtkmm\2.4" "Installer Language"
89     IfErrors +2 0
90     goto NoAbort
91     MessageBox MB_YESNO "gtkmm not found. Install it now (internet connection needed)?" IDYES InstallGtkmm
92     MessageBox MB_YESNO "gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
93     Abort ; causes installer to quit
94     InstallGtkmm:
95     ClearErrors
96     StrCpy $gtkmmSetupFile $TEMP\gtkmm-win32-runtime-2.10.11-1.exe
97     NSISdl::download "http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-runtime-2.10.11-1.exe" $gtkmmSetupFile
98     IfErrors 0 +2
99     Goto InstallGtkmmFailed
100     ExecWait $gtkmmSetupFile
101     Delete $gtkmmSetupFile ; we don't need it anymore
102     IfErrors 0 +2
103     Goto InstallGtkmmFailed
104     Goto NoAbort
105     InstallGtkmmFailed:
106     MessageBox MB_YESNO "Could not download gtkmm. gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
107     Abort ; causes installer to quit
108     NoAbort:
109     FunctionEnd
110    
111     ; Downloads and launches the JRE installer from the internet
112     Function GetJRE
113     MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \
114     be downloaded and installed"
115    
116     StrCpy $2 "$TEMP\Java Runtime Environment.exe"
117     nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2
118     Pop $R0 ;Get the return value
119     StrCmp $R0 "success" +3
120     MessageBox MB_OK "Download failed: $R0"
121     Quit
122     ExecWait $2
123     Delete $2
124     FunctionEnd
125    
126     ; Checks if the JRE is already installed, if not it will download and install it from the internet
127     Function DetectJRE
128     ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
129     "CurrentVersion"
130     StrCmp $2 ${JRE_VERSION} done
131    
132     Call GetJRE
133    
134     done:
135     FunctionEnd
136    
137     ;--------------------------------
138    
139     ; The stuff to install
140     Section "LinuxSampler 0.5.1" SecLinuxSampler
141 schoenebeck 1581 StrCpy $installingLinuxSampler "1"
142 schoenebeck 1547 ; Set output path to the installation directory.
143     SetOutPath $INSTDIR
144     ; Files to install
145 schoenebeck 1581 File linuxsampler.exe
146     File liblinuxsampler-1.dll
147 schoenebeck 1547 SectionEnd
148    
149 schoenebeck 1581 Section "JSampler 'Fantasia' 0.8a" SecJSampler
150 schoenebeck 1547 ; make sure JRE is installed
151     Call DetectJRE
152 schoenebeck 1581 StrCpy $installingJSampler "1"
153 schoenebeck 1547 ; Set output path to the installation directory.
154     SetOutPath $INSTDIR
155     ; Files to install
156 schoenebeck 1581 File Fantasia-0.8a.jar
157     File jsampler.ico
158 schoenebeck 1547 SectionEnd
159    
160 schoenebeck 1581 Section "QSampler 0.2.1" SecQSampler
161     StrCpy $installingQSampler "1"
162 schoenebeck 1547 ; Set output path to the installation directory.
163     SetOutPath $INSTDIR
164     ; Files to install
165 schoenebeck 1581 File qsampler.exe
166     File QtCore4.dll
167     File QtGui4.dll
168     File mingwm10.dll
169 schoenebeck 1587 File qsampler.ico
170 schoenebeck 1547 SectionEnd
171    
172     Section "gigedit 0.1.1" Secgigedit
173 schoenebeck 1581 StrCpy $installinggigedit "1"
174 schoenebeck 1547 ; make sure gtkmm is installed
175     Call CheckForGtkmm
176     ; Set output path to the installation directory.
177     SetOutPath $INSTDIR
178     ; Files to install
179 schoenebeck 1581 File gigedit.exe
180     File libsndfile-1.dll
181     SetOutPath "$INSTDIR\plugins"
182     File libgigedit.dll
183 schoenebeck 1547 SectionEnd
184    
185     Section "libgig 3.2.1" Seclibgig
186     ; We make this a mandatory component
187     SectionIn RO
188     ; Set output path to the installation directory.
189     SetOutPath $INSTDIR
190     ; Files to install
191 schoenebeck 1581 File libgig-6.dll
192     File rifftree.exe
193     File dlsdump.exe
194     File gigdump.exe
195     File gigextract.exe
196 schoenebeck 1547 ; As this is a mandatory component, we misuse it to install the uninstaller as well ...
197     ; Write the uninstall keys for Windows
198 schoenebeck 1581 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler ${RELEASE_DATE}"
199 schoenebeck 1547 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'
200     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1
201     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1
202     WriteUninstaller "uninstall.exe"
203     ;Store installation folder
204     WriteRegStr HKCU "Software\LinuxSampler" "" $INSTDIR
205     SectionEnd
206    
207     Section "Start Menu Shortcuts" SecShortcuts
208 schoenebeck 1581
209 schoenebeck 1547 CreateDirectory "$SMPROGRAMS\LinuxSampler"
210 schoenebeck 1581
211 schoenebeck 1547 CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
212 schoenebeck 1581
213     StrCmp $installingLinuxSampler '1' 0 +2
214     CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler 0.5.1 (backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0
215    
216     StrCmp $installingJSampler '1' 0 +2
217     CreateShortCut '$SMPROGRAMS\LinuxSampler\JSampler Fantasia 0.8a (frontend).lnk' 'javaw' '-jar "$INSTDIR\Fantasia-0.8a.jar"' '$INSTDIR\jsampler.ico' 0
218    
219     StrCmp $installingQSampler '1' 0 +2
220 schoenebeck 1587 CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler 0.2.1 (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.ico" 0
221 schoenebeck 1581
222     StrCmp $installinggigedit '1' 0 +2
223     CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit 0.1.1 (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
224    
225 schoenebeck 1547 SectionEnd
226    
227     ;--------------------------------
228    
229     ; Uninstaller
230    
231     Section "Uninstall"
232     ; Remove registry keys
233     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"
234     ; Remove files and uninstaller
235     Delete $INSTDIR\*.*
236 schoenebeck 1581 Delete $INSTDIR\plugins\*.*
237 schoenebeck 1547 ; Remove shortcuts, if any
238     Delete "$SMPROGRAMS\LinuxSampler\*.*"
239     ; Remove directories used
240     RMDir "$SMPROGRAMS\LinuxSampler"
241 schoenebeck 1581 RMDir "$INSTDIR\plugins"
242 schoenebeck 1547 RMDir "$INSTDIR"
243     SectionEnd
244    
245     ;--------------------------------
246     ;Descriptions
247    
248     ;Language strings
249     LangString DESC_SecLinuxSampler ${LANG_ENGLISH} "Sampler backend, 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."
250     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."
251     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!"
252     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. NOTE: this is yet an early development version!"
253     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."
254     LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."
255    
256     ;Assign language strings to sections
257     !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
258     !insertmacro MUI_DESCRIPTION_TEXT ${SecLinuxSampler} $(DESC_SecLinuxSampler)
259     !insertmacro MUI_DESCRIPTION_TEXT ${SecJSampler} $(DESC_SecJSampler)
260     !insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler)
261     !insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit)
262     !insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig)
263     !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts)
264     !insertmacro MUI_FUNCTION_DESCRIPTION_END

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC