1
; gigedit Windows installer
3
; The name of the installer
7
OutFile "gigedit_0_1_1_setup.exe"
9
; The default installation directory
10
InstallDir $PROGRAMFILES\gigedit
12
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
14
; Probably the best compression ratio
17
;--------------------------------
20
VIProductVersion "0.1.1.0"
21
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "gigedit"
22
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "a Gigasampler file editor"
23
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The LinuxSampler Project"
24
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" ""
25
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "� 2006,2007 Andreas Persson"
26
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "gigedit 0.1.1 installer"
27
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.1.1"
29
;--------------------------------
37
UninstPage uninstConfirm
40
;--------------------------------
42
; Check for the presence of gtkmm, and if false, ask the user whether to
43
; download and install gtkmm now from the internet.
45
Var /GLOBAL gtkmmSetupFile
47
; This is just a lazy check for the presence of gtkmm, we should better use:
48
; System::Call function (NSI internal function) to actually call an arbitrary
49
; gtkmm function (/method) from a gtkmm DLL to make it certain
50
ReadRegStr $0 HKCU "Software\gtkmm\2.4" "Installer Language"
53
MessageBox MB_YESNO "gtkmm not found. Install it now (internet connection needed)?" IDYES InstallGtkmm
54
MessageBox MB_YESNO "gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
55
Abort ; causes installer to quit
58
StrCpy $gtkmmSetupFile $TEMP\gtkmm-win32-runtime-2.10.11-1.exe
59
NSISdl::download "http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-runtime-2.10.11-1.exe" $gtkmmSetupFile
61
Goto InstallGtkmmFailed
62
ExecWait $gtkmmSetupFile
63
Delete $gtkmmSetupFile ; we don't need it anymore
65
Goto InstallGtkmmFailed
68
MessageBox MB_YESNO "Could not download gtkmm. gigedit won't work without gtkmm. Continue anyway?" IDYES NoAbort
69
Abort ; causes installer to quit
73
;--------------------------------
75
; The stuff to install
76
Section "gigedit 0.1.1"
80
; Set output path to the installation directory.
94
; Write the uninstall keys for Windows
95
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit" "DisplayName" "gigedit 0.1.1"
96
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit" "UninstallString" '"$INSTDIR\uninstall.exe"'
97
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit" "NoModify" 1
98
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit" "NoRepair" 1
99
WriteUninstaller "uninstall.exe"
101
SectionEnd ; end the section
103
; Optional section (can be disabled by the user)
104
Section "Start Menu Shortcuts"
106
CreateDirectory "$SMPROGRAMS\gigedit"
107
CreateShortCut "$SMPROGRAMS\gigedit\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
108
CreateShortCut "$SMPROGRAMS\gigedit\gigedit 0.1.1.lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
112
;--------------------------------
118
; Remove registry keys
119
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit"
121
; Remove files and uninstaller
122
Delete $INSTDIR\uninstall.exe
123
Delete $INSTDIR\gigedit.exe
124
Delete $INSTDIR\libgigedit.dll
125
Delete $INSTDIR\libgig.dll
126
Delete $INSTDIR\libsndfile-1.dll
127
Delete $INSTDIR\COPYING
128
Delete $INSTDIR\README
130
Delete $INSTDIR\ChangeLog
131
Delete $INSTDIR\AUTHORS
133
; Remove shortcuts, if any
134
Delete "$SMPROGRAMS\gigedit\*.*"
136
; Remove directories used
137
RMDir "$SMPROGRAMS\gigedit"