/[svn]/gigedit/trunk/win32/gigedit.nsi.in
ViewVC logotype

Contents of /gigedit/trunk/win32/gigedit.nsi.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1451 - (show annotations) (download)
Tue Oct 16 16:24:16 2007 UTC (16 years, 6 months ago) by schoenebeck
File size: 4928 byte(s)
* added Windows installer

1 ; gigedit Windows installer
2
3 ; The name of the installer
4 Name "gigedit @GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@"
5
6 ; The file to write
7 OutFile "gigedit_@GIGEDIT_VER_MAJOR@_@GIGEDIT_VER_MINOR@_@GIGEDIT_VER_RELEASE@_setup.exe"
8
9 ; The default installation directory
10 InstallDir $PROGRAMFILES\gigedit
11
12 LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
13
14 ; Probably the best compression ratio
15 SetCompressor lzma
16
17 ;--------------------------------
18 ;Version Information
19
20 VIProductVersion "@GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@.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 @GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@ installer"
27 VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "@GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@"
28
29 ;--------------------------------
30
31 ; Pages
32
33 Page components
34 Page directory
35 Page instfiles
36
37 UninstPage uninstConfirm
38 UninstPage instfiles
39
40 ;--------------------------------
41
42 ; Check for the presence of gtkmm, and if false, ask the user whether to
43 ; download and install gtkmm now from the internet.
44 Function .onInit
45 Var /GLOBAL gtkmmSetupFile
46
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"
51 IfErrors +2 0
52 goto NoAbort
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
56 InstallGtkmm:
57 ClearErrors
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
60 IfErrors 0 +2
61 Goto InstallGtkmmFailed
62 ExecWait $gtkmmSetupFile
63 Delete $gtkmmSetupFile ; we don't need it anymore
64 IfErrors 0 +2
65 Goto InstallGtkmmFailed
66 Goto NoAbort
67 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
70 NoAbort:
71 FunctionEnd
72
73 ;--------------------------------
74
75 ; The stuff to install
76 Section "gigedit @GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@"
77
78 SectionIn RO
79
80 ; Set output path to the installation directory.
81 SetOutPath $INSTDIR
82
83 ; Put files there
84 File gigedit.exe
85 File libgigedit.dll
86 File libgig.dll
87 File libsndfile-1.dll
88 File ..\COPYING
89 File ..\README
90 File ..\NEWS
91 File ..\ChangeLog
92 File ..\AUTHORS
93
94 ; Write the uninstall keys for Windows
95 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit" "DisplayName" "gigedit @GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@"
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"
100
101 SectionEnd ; end the section
102
103 ; Optional section (can be disabled by the user)
104 Section "Start Menu Shortcuts"
105
106 CreateDirectory "$SMPROGRAMS\gigedit"
107 CreateShortCut "$SMPROGRAMS\gigedit\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
108 CreateShortCut "$SMPROGRAMS\gigedit\gigedit @GIGEDIT_VER_MAJOR@.@GIGEDIT_VER_MINOR@.@GIGEDIT_VER_RELEASE@.lnk" "$INSTDIR\gigedit.exe" "" "$INSTDIR\gigedit.exe" 0
109
110 SectionEnd
111
112 ;--------------------------------
113
114 ; Uninstaller
115
116 Section "Uninstall"
117
118 ; Remove registry keys
119 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gigedit"
120
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
129 Delete $INSTDIR\NEWS
130 Delete $INSTDIR\ChangeLog
131 Delete $INSTDIR\AUTHORS
132
133 ; Remove shortcuts, if any
134 Delete "$SMPROGRAMS\gigedit\*.*"
135
136 ; Remove directories used
137 RMDir "$SMPROGRAMS\gigedit"
138 RMDir "$INSTDIR"
139
140 SectionEnd

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC