/[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 1547 - (hide annotations) (download)
Wed Dec 5 01:01:01 2007 UTC (11 years, 8 months ago) by schoenebeck
File size: 9828 byte(s)
Initial CVS Import

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     ; The name of the installer
15     Name "LinuxSampler"
16    
17     ; The file to write
18     OutFile "linuxsampler_20071206_setup.exe"
19    
20     ; Java Runtime Environment, needed for JSampler
21     !define JRE_VERSION "1.6"
22     !define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11292"
23    
24     ; The default installation directory
25     InstallDir $PROGRAMFILES\LinuxSampler
26    
27     ; Get installation folder from registry if available
28     InstallDirRegKey HKCU "Software\LinuxSampler" ""
29    
30     ;LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
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     VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "LinuxSampler Installer"
44     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     VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "all-in-one installer"
49     VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.0.0"
50    
51     ;--------------------------------
52    
53     ; Pages
54    
55     ;Page license
56     ;Page components
57     ;Page directory
58     ;Page instfiles
59    
60     !insertmacro MUI_PAGE_LICENSE "license.rtf"
61     !insertmacro MUI_PAGE_COMPONENTS
62     !insertmacro MUI_PAGE_DIRECTORY
63     !insertmacro MUI_PAGE_INSTFILES
64     !insertmacro MUI_UNPAGE_CONFIRM
65     !insertmacro MUI_UNPAGE_INSTFILES
66    
67     ;UninstPage uninstConfirm
68     ;UninstPage instfiles
69    
70     ;LicenseData license.rtf
71    
72     ;--------------------------------
73     ;Languages
74    
75     !insertmacro MUI_LANGUAGE "English"
76    
77     ;--------------------------------
78    
79     ; 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     ; This is just a lazy check for the presence of gtkmm, we should better use:
85     ; System::Call function (NSI internal function) to actually call an arbitrary
86     ; gtkmm function (/method) from a gtkmm DLL to make it certain
87     ReadRegStr $0 HKCU "Software\gtkmm\2.4" "Installer Language"
88     IfErrors +2 0
89     goto NoAbort
90     MessageBox MB_YESNO "gtkmm not found. Install it now (internet connection needed)?" IDYES InstallGtkmm
91     MessageBox MB_YESNO "gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
92     Abort ; causes installer to quit
93     InstallGtkmm:
94     ClearErrors
95     StrCpy $gtkmmSetupFile $TEMP\gtkmm-win32-runtime-2.10.11-1.exe
96     NSISdl::download "http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-runtime-2.10.11-1.exe" $gtkmmSetupFile
97     IfErrors 0 +2
98     Goto InstallGtkmmFailed
99     ExecWait $gtkmmSetupFile
100     Delete $gtkmmSetupFile ; we don't need it anymore
101     IfErrors 0 +2
102     Goto InstallGtkmmFailed
103     Goto NoAbort
104     InstallGtkmmFailed:
105     MessageBox MB_YESNO "Could not download gtkmm. gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
106     Abort ; causes installer to quit
107     NoAbort:
108     FunctionEnd
109    
110     ; Downloads and launches the JRE installer from the internet
111     Function GetJRE
112     MessageBox MB_OK "JSampler requires Java ${JRE_VERSION}, it will now \
113     be downloaded and installed"
114    
115     StrCpy $2 "$TEMP\Java Runtime Environment.exe"
116     nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2
117     Pop $R0 ;Get the return value
118     StrCmp $R0 "success" +3
119     MessageBox MB_OK "Download failed: $R0"
120     Quit
121     ExecWait $2
122     Delete $2
123     FunctionEnd
124    
125     ; Checks if the JRE is already installed, if not it will download and install it from the internet
126     Function DetectJRE
127     ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \
128     "CurrentVersion"
129     StrCmp $2 ${JRE_VERSION} done
130    
131     Call GetJRE
132    
133     done:
134     FunctionEnd
135    
136     ;--------------------------------
137    
138     ; The stuff to install
139     Section "LinuxSampler 0.5.1" SecLinuxSampler
140     ; Set output path to the installation directory.
141     SetOutPath $INSTDIR
142     ; Files to install
143     ; File linuxsampler.exe
144     ; File liblinuxsampler.dll
145     SectionEnd
146    
147     Section "JSampler 'Fantasia' 0.0.1" SecJSampler
148     ; make sure JRE is installed
149     Call DetectJRE
150     ; Set output path to the installation directory.
151     SetOutPath $INSTDIR
152     ; Files to install
153     ; File jsampler.jar
154     SectionEnd
155    
156     Section "QSampler 0.2.0" SecQSampler
157     ; Set output path to the installation directory.
158     SetOutPath $INSTDIR
159     ; Files to install
160     ; File qsampler.exe
161     ; File liblscp.dll
162     SectionEnd
163    
164     Section "gigedit 0.1.1" Secgigedit
165     ; make sure gtkmm is installed
166     Call CheckForGtkmm
167     ; Set output path to the installation directory.
168     SetOutPath $INSTDIR
169     ; Files to install
170     ; File gigedit.exe
171     SetOutPath "$INSTDIR\Plugins"
172     ; File libgigedit.dll
173     SectionEnd
174    
175     Section "libgig 3.2.1" Seclibgig
176     ; We make this a mandatory component
177     SectionIn RO
178     ; Set output path to the installation directory.
179     SetOutPath $INSTDIR
180     ; Files to install
181     ; File libgig.dll
182     ; As this is a mandatory component, we misuse it to install the uninstaller as well ...
183     ; Write the uninstall keys for Windows
184     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "DisplayName" "LinuxSampler 2007-12-05"
185     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "UninstallString" '"$INSTDIR\uninstall.exe"'
186     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoModify" 1
187     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler" "NoRepair" 1
188     WriteUninstaller "uninstall.exe"
189     ;Store installation folder
190     WriteRegStr HKCU "Software\LinuxSampler" "" $INSTDIR
191     SectionEnd
192    
193     Section "libsndfile 1.0.17" Seclibsndfile
194     ; We make this a mandatory component
195     SectionIn RO
196     ; Set output path to the installation directory.
197     SetOutPath $INSTDIR
198     ; Files to install
199     ; File libsndfile-1.dll
200     SectionEnd
201    
202     Section "Start Menu Shortcuts" SecShortcuts
203     CreateDirectory "$SMPROGRAMS\LinuxSampler"
204     CreateShortCut "$SMPROGRAMS\LinuxSampler\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
205     CreateShortCut "$SMPROGRAMS\LinuxSampler\LinuxSampler (backend).lnk" "$INSTDIR\linuxsampler.exe" "" "$INSTDIR\linuxsampler.exe" 0
206     CreateShortCut "$SMPROGRAMS\LinuxSampler\JSampler Fantasia (frontend).lnk" "$INSTDIR\jjjjjsampler.exe" "" "$INSTDIR\jjjjjsampler.exe" 0
207     CreateShortCut "$SMPROGRAMS\LinuxSampler\QSampler (frontend).lnk" "$INSTDIR\qsampler.exe" "" "$INSTDIR\qsampler.exe" 0
208     CreateShortCut "$SMPROGRAMS\LinuxSampler\gigedit (stand alone).lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
209     SectionEnd
210    
211     ;--------------------------------
212    
213     ; Uninstaller
214    
215     Section "Uninstall"
216     ; Remove registry keys
217     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LinuxSampler"
218     ; Remove files and uninstaller
219     Delete $INSTDIR\*.*
220     ; Remove shortcuts, if any
221     Delete "$SMPROGRAMS\LinuxSampler\*.*"
222     ; Remove directories used
223     RMDir "$SMPROGRAMS\LinuxSampler"
224     RMDir "$INSTDIR"
225     SectionEnd
226    
227     ;--------------------------------
228     ;Descriptions
229    
230     ;Language strings
231     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."
232     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."
233     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!"
234     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!"
235     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."
236     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."
237     LangString DESC_SecShortcuts ${LANG_ENGLISH} "Installs start menu shortcuts for all applications."
238    
239     ;Assign language strings to sections
240     !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
241     !insertmacro MUI_DESCRIPTION_TEXT ${SecLinuxSampler} $(DESC_SecLinuxSampler)
242     !insertmacro MUI_DESCRIPTION_TEXT ${SecJSampler} $(DESC_SecJSampler)
243     !insertmacro MUI_DESCRIPTION_TEXT ${SecQSampler} $(DESC_SecQSampler)
244     !insertmacro MUI_DESCRIPTION_TEXT ${Secgigedit} $(DESC_Secgigedit)
245     !insertmacro MUI_DESCRIPTION_TEXT ${Seclibgig} $(DESC_Seclibgig)
246     !insertmacro MUI_DESCRIPTION_TEXT ${Seclibsndfile} $(DESC_Seclibsndfile)
247     !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts)
248     !insertmacro MUI_FUNCTION_DESCRIPTION_END

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC