Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Set svn:keywords and svn:eol-style for all files.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2089 ea778897-0a13-0410-b9d1-a72fbfd435f5
  • Loading branch information...
commit c380fb75b40f505bcf1f32110d4a57cd8a39ffcc 1 parent 083e505
Enrico Tröger authored
666  geany.nsi
... ...
@@ -1,333 +1,333 @@
1  
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2  
-; Installer script for Geany (Windows Installer)      ;
3  
-; Script generated by the HM NIS Edit Script Wizard.  :
4  
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5  
-
6  
-
7  
-;;;;;;;;;;;;;;;;;;;
8  
-; helper defines  ;
9  
-;;;;;;;;;;;;;;;;;;;
10  
-!define PRODUCT_NAME "Geany"
11  
-!define PRODUCT_VERSION "0.13"
12  
-!define PRODUCT_VERSION_ID "0.13.0.0"
13  
-!define PRODUCT_PUBLISHER "Enrico Tröger"
14  
-!define PRODUCT_WEB_SITE "http://geany.uvena.de"
15  
-!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Geany.exe"
16  
-!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
17  
-!define PRODUCT_UNINST_ROOT_KEY "HKLM"
18  
-!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
19  
-
20  
-!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
21  
-
22  
-; only used when embedding GTK+ installer
23  
-!define GTK_INSTALLER "gtk+-2.10.6-1-setup.exe"
24  
-
25  
-SetCompressor /SOLID lzma
26  
-XPStyle on
27  
-Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
28  
-!ifdef INCLUDE_GTK
29  
-OutFile "geany-${PRODUCT_VERSION}_setup.exe"
30  
-!else
31  
-OutFile "geany-${PRODUCT_VERSION}_nogtk_setup.exe"
32  
-!endif
33  
-InstallDir "$PROGRAMFILES\Geany"
34  
-InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
35  
-ShowInstDetails hide
36  
-ShowUnInstDetails hide
37  
-
38  
-;;;;;;;;;;;;;;;;;;;;;
39  
-; Version resource  ;
40  
-;;;;;;;;;;;;;;;;;;;;;
41  
-VIProductVersion "${PRODUCT_VERSION_ID}"
42  
-VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
43  
-VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
44  
-VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
45  
-VIAddVersionKey "LegalCopyright" "Copyright 2005-2007 by Enrico Tröger"
46  
-VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
47  
-
48  
-;;;;;;;;;;;;;;;;
49  
-; Init code    ;
50  
-;;;;;;;;;;;;;;;;
51  
-Function .onInit
52  
-  ; prevent running multiple instances of the installer
53  
-  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e'
54  
-  Pop $R0
55  
-  StrCmp $R0 0 +3
56  
-    MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
57  
-    Abort
58  
-
59  
-  ; warn about a new install over an existing installation
60  
-  ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
61  
-  StrCmp $R0 "" done
62  
-
63  
-  MessageBox MB_YESNO|MB_ICONEXCLAMATION \
64  
-  "Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \
65  
-  IDNO done
66  
-
67  
-  ;Run the uninstaller
68  
-  ClearErrors
69  
-  ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
70  
-
71  
-  done:
72  
-FunctionEnd
73  
-
74  
-
75  
-;;;;;;;;;;;;;;;;
76  
-; MUI Settings ;
77  
-;;;;;;;;;;;;;;;;
78  
-!include "MUI.nsh"
79  
-
80  
-!define MUI_ABORTWARNING
81  
-!define MUI_ICON "pixmaps\geany.ico"
82  
-!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico"
83  
-
84  
-; Welcome page
85  
-!insertmacro MUI_PAGE_WELCOME
86  
-; License page
87  
-;!define MUI_LICENSEPAGE_RADIOBUTTONS
88  
-!insertmacro MUI_PAGE_LICENSE "${RESOURCEDIR}\Copying.txt"
89  
-; Components page
90  
-!insertmacro MUI_PAGE_COMPONENTS
91  
-; Directory page
92  
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
93  
-!insertmacro MUI_PAGE_DIRECTORY
94  
-; Start menu page
95  
-var ICONS_GROUP
96  
-!define MUI_STARTMENUPAGE_NODISABLE
97  
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany"
98  
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
99  
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
100  
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
101  
-!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
102  
-; Instfiles page
103  
-!insertmacro MUI_PAGE_INSTFILES
104  
-; Finish page
105  
-!define MUI_FINISHPAGE_RUN "$INSTDIR\Geany.exe"
106  
-!insertmacro MUI_PAGE_FINISH
107  
-; Uninstaller pages
108  
-!insertmacro MUI_UNPAGE_INSTFILES
109  
-; Language files
110  
-!insertmacro MUI_LANGUAGE "English"
111  
-; Reserve files
112  
-!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
113  
-; MUI end ------
114  
-
115  
-
116  
-;;;;;;;;;;;;;;;;;;;;;;;;;;;
117  
-; Sections and InstTypes  ;
118  
-;;;;;;;;;;;;;;;;;;;;;;;;;;;
119  
-InstType "Full"
120  
-InstType "Minimal"
121  
-
122  
-Section "!Program Files" SEC01
123  
-  SectionIn RO 1 2
124  
-  SetOutPath "$INSTDIR"
125  
-  SetOverwrite ifnewer
126  
-  File "${RESOURCEDIR}\Geany.exe"
127  
-  File "${RESOURCEDIR}\*.txt"
128  
-
129  
-  SetOutPath "$INSTDIR\data"
130  
-  File "${RESOURCEDIR}\data\GPL-2"
131  
-  File "${RESOURCEDIR}\data\file*"
132  
-
133  
-  SetOutPath "$INSTDIR\share"
134  
-  File /r "${RESOURCEDIR}\share\*"
135  
-
136  
-  SetOutPath "$INSTDIR"
137  
-  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
138  
-  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
139  
-  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk" "$INSTDIR\Geany.exe"
140  
-  CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\Geany.exe"
141  
-  CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\Geany.exe"
142  
-  !insertmacro MUI_STARTMENU_WRITE_END
143  
-SectionEnd
144  
-
145  
-Section "Plugins" SEC02
146  
-  SectionIn 1
147  
-  SetOverwrite ifnewer
148  
-  SetOutPath "$INSTDIR"
149  
-  File /r "${RESOURCEDIR}\plugins"
150  
-SectionEnd
151  
-
152  
-Section "Language Files" SEC03
153  
-  SectionIn 1
154  
-  SetOutPath "$INSTDIR"
155  
-  File /r "${RESOURCEDIR}\lib"
156  
-SectionEnd
157  
-
158  
-Section "Documentation" SEC04
159  
-  SectionIn 1
160  
-  SetOverwrite ifnewer
161  
-  SetOutPath "$INSTDIR"
162  
-  File /r "${RESOURCEDIR}\doc"
163  
-
164  
-; Shortcuts
165  
-  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
166  
-  WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\index.html"
167  
-  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk" "$INSTDIR\Documentation.url"
168  
-  !insertmacro MUI_STARTMENU_WRITE_END
169  
-SectionEnd
170  
-
171  
-Section "Autocompletion Tags" SEC05
172  
-  SectionIn 1
173  
-  SetOutPath "$INSTDIR\data"
174  
-  SetOverwrite ifnewer
175  
-  File "${RESOURCEDIR}\data\php.tags"
176  
-  File "${RESOURCEDIR}\data\pascal.tags"
177  
-  File "${RESOURCEDIR}\data\latex.tags"
178  
-  File "${RESOURCEDIR}\data\html_entities.tags"
179  
-  File "${RESOURCEDIR}\data\global.tags"
180  
-SectionEnd
181  
-
182  
-; Include GTK runtime library but only if desired from command line
183  
-!ifdef INCLUDE_GTK
184  
-Section "GTK 2.10 Runtime Environment" SEC06
185  
-  SectionIn 1
186  
-  SetOutPath "$INSTDIR"
187  
-  SetOverwrite ifnewer
188  
-  File "gtk\*"
189  
-  SetOutPath "$INSTDIR\etc"
190  
-  File /r "gtk\etc\*"
191  
-  SetOutPath "$INSTDIR\lib"
192  
-  File /r "gtk\lib\*"
193  
-  SetOutPath "$INSTDIR\share"
194  
-  File /r "gtk\share\*"
195  
-/* code to embed GTK+ installer executable
196  
-  File ${GTK_INSTALLER}
197  
-  ExecWait ${GTK_INSTALLER}
198  
-*/
199  
-SectionEnd
200  
-!endif
201  
-
202  
-Section "Context menus" SEC07
203  
-  SectionIn 1
204  
-  WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany"
205  
-  WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '$INSTDIR\geany.exe "%1"'
206  
-SectionEnd
207  
-
208  
-Section -AdditionalIcons
209  
-  SetOutPath $INSTDIR
210  
-  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
211  
-  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
212  
-  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
213  
-  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
214  
-  !insertmacro MUI_STARTMENU_WRITE_END
215  
-SectionEnd
216  
-
217  
-Section -Post
218  
-  WriteUninstaller "$INSTDIR\uninst.exe"
219  
-  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Geany.exe"
220  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
221  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
222  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Geany.exe"
223  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
224  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
225  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
226  
-  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
227  
-SectionEnd
228  
-
229  
-;;;;;;;;;;;;;;;;;;;;;;;;;
230  
-; Section descriptions  ;
231  
-;;;;;;;;;;;;;;;;;;;;;;;;;
232  
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
233  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files."
234  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Class Builder' and 'Insert Special Characters'."
235  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface."
236  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
237  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
238  
-!ifdef INCLUDE_GTK
239  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need this files to run Geany. If you have already installed a GTK Runtime Environment (2.6 or higher), you can skip it."
240  
-!endif
241  
-  !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
242  
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
243  
-
244  
-
245  
-
246  
-;;;;;;;;;;;;;;;;;;;;;
247  
-; helper functions  ;
248  
-;;;;;;;;;;;;;;;;;;;;;
249  
-Function un.onUninstSuccess
250  
-  HideWindow
251  
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
252  
-FunctionEnd
253  
-
254  
-Function un.onInit
255  
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
256  
-  Abort
257  
-FunctionEnd
258  
-
259  
-Function OnDirLeave
260  
-  ClearErrors
261  
-  SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
262  
-  GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
263  
-  FileOpen $0 "$1" "w" ; error to open?
264  
-  FileWriteByte $0 "0"
265  
-  IfErrors notPossible possible
266  
-
267  
-notPossible:
268  
-  RMDir "$INSTDIR" ; removes folder if empty
269  
-  MessageBox MB_OK "The given directory is not writeable. Please choose another one!"
270  
-  Abort
271  
-possible:
272  
-  FileClose $0
273  
-  Delete "$1"
274  
-FunctionEnd
275  
-
276  
-Section Uninstall
277  
-  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
278  
-  Delete "$INSTDIR\${PRODUCT_NAME}.url"
279  
-  Delete "$INSTDIR\Documentation.url"
280  
-  Delete "$INSTDIR\uninst.exe"
281  
-  Delete "$INSTDIR\News.txt"
282  
-  Delete "$INSTDIR\ReadMe.txt"
283  
-  Delete "$INSTDIR\Thanks.txt"
284  
-  Delete "$INSTDIR\ToDo.txt"
285  
-  Delete "$INSTDIR\Authors.txt"
286  
-  Delete "$INSTDIR\ChangeLog.txt"
287  
-  Delete "$INSTDIR\Copying.txt"
288  
-  Delete "$INSTDIR\Geany.exe"
289  
-  ; GTK files
290  
-  Delete "$INSTDIR\charset.dll"
291  
-  Delete "$INSTDIR\gspawn-win32-helper.exe"
292  
-  Delete "$INSTDIR\gspawn-win32-helper-console.exe"
293  
-  Delete "$INSTDIR\iconv.dll"
294  
-  Delete "$INSTDIR\intl.dll"
295  
-  Delete "$INSTDIR\libgthread-2.0-0.dll"
296  
-  Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
297  
-  Delete "$INSTDIR\libpangocairo-1.0-0.dll"
298  
-  Delete "$INSTDIR\libpangowin32-1.0-0.dll"
299  
-  Delete "$INSTDIR\libgobject-2.0-0.dll"
300  
-  Delete "$INSTDIR\libpango-1.0-0.dll"
301  
-  Delete "$INSTDIR\libpangoft2-1.0-0.dll"
302  
-  Delete "$INSTDIR\libpng13.dll"
303  
-  Delete "$INSTDIR\libatk-1.0-0.dll"
304  
-  Delete "$INSTDIR\libcairo-2.dll"
305  
-  Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
306  
-  Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
307  
-  Delete "$INSTDIR\libglib-2.0-0.dll"
308  
-  Delete "$INSTDIR\libgmodule-2.0-0.dll"
309  
-  Delete "$INSTDIR\zlib1.dll"
310  
-
311  
-  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
312  
-  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
313  
-  Delete "$QUICKLAUNCH\Geany.lnk"
314  
-  Delete "$DESKTOP\Geany.lnk"
315  
-  Delete "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk"
316  
-  Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
317  
-
318  
-  RMDir "$SMPROGRAMS\$ICONS_GROUP"
319  
-  RMDir /r "$INSTDIR\doc"
320  
-  RMDir /r "$INSTDIR\plugins"
321  
-  RMDir /r "$INSTDIR\data"
322  
-  RMDir /r "$INSTDIR\etc"
323  
-  RMDir /r "$INSTDIR\lib"
324  
-  RMDir /r "$INSTDIR\share"
325  
-  RMDir "$INSTDIR"
326  
-
327  
-  DeleteRegKey HKCR "*\shell\OpenWithGeany"
328  
-
329  
-  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
330  
-  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
331  
-  SetAutoClose true
332  
-SectionEnd
333  
-
  1
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2
+; Installer script for Geany (Windows Installer)      ;
  3
+; Script generated by the HM NIS Edit Script Wizard.  :
  4
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  5
+
  6
+
  7
+;;;;;;;;;;;;;;;;;;;
  8
+; helper defines  ;
  9
+;;;;;;;;;;;;;;;;;;;
  10
+!define PRODUCT_NAME "Geany"
  11
+!define PRODUCT_VERSION "0.13"
  12
+!define PRODUCT_VERSION_ID "0.13.0.0"
  13
+!define PRODUCT_PUBLISHER "Enrico Tröger"
  14
+!define PRODUCT_WEB_SITE "http://geany.uvena.de"
  15
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Geany.exe"
  16
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
  17
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
  18
+!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
  19
+
  20
+!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
  21
+
  22
+; only used when embedding GTK+ installer
  23
+!define GTK_INSTALLER "gtk+-2.10.6-1-setup.exe"
  24
+
  25
+SetCompressor /SOLID lzma
  26
+XPStyle on
  27
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
  28
+!ifdef INCLUDE_GTK
  29
+OutFile "geany-${PRODUCT_VERSION}_setup.exe"
  30
+!else
  31
+OutFile "geany-${PRODUCT_VERSION}_nogtk_setup.exe"
  32
+!endif
  33
+InstallDir "$PROGRAMFILES\Geany"
  34
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
  35
+ShowInstDetails hide
  36
+ShowUnInstDetails hide
  37
+
  38
+;;;;;;;;;;;;;;;;;;;;;
  39
+; Version resource  ;
  40
+;;;;;;;;;;;;;;;;;;;;;
  41
+VIProductVersion "${PRODUCT_VERSION_ID}"
  42
+VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
  43
+VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
  44
+VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
  45
+VIAddVersionKey "LegalCopyright" "Copyright 2005-2007 by Enrico Tröger"
  46
+VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
  47
+
  48
+;;;;;;;;;;;;;;;;
  49
+; Init code    ;
  50
+;;;;;;;;;;;;;;;;
  51
+Function .onInit
  52
+  ; prevent running multiple instances of the installer
  53
+  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e'
  54
+  Pop $R0
  55
+  StrCmp $R0 0 +3
  56
+    MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
  57
+    Abort
  58
+
  59
+  ; warn about a new install over an existing installation
  60
+  ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
  61
+  StrCmp $R0 "" done
  62
+
  63
+  MessageBox MB_YESNO|MB_ICONEXCLAMATION \
  64
+  "Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \
  65
+  IDNO done
  66
+
  67
+  ;Run the uninstaller
  68
+  ClearErrors
  69
+  ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
  70
+
  71
+  done:
  72
+FunctionEnd
  73
+
  74
+
  75
+;;;;;;;;;;;;;;;;
  76
+; MUI Settings ;
  77
+;;;;;;;;;;;;;;;;
  78
+!include "MUI.nsh"
  79
+
  80
+!define MUI_ABORTWARNING
  81
+!define MUI_ICON "pixmaps\geany.ico"
  82
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico"
  83
+
  84
+; Welcome page
  85
+!insertmacro MUI_PAGE_WELCOME
  86
+; License page
  87
+;!define MUI_LICENSEPAGE_RADIOBUTTONS
  88
+!insertmacro MUI_PAGE_LICENSE "${RESOURCEDIR}\Copying.txt"
  89
+; Components page
  90
+!insertmacro MUI_PAGE_COMPONENTS
  91
+; Directory page
  92
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
  93
+!insertmacro MUI_PAGE_DIRECTORY
  94
+; Start menu page
  95
+var ICONS_GROUP
  96
+!define MUI_STARTMENUPAGE_NODISABLE
  97
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany"
  98
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
  99
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
  100
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
  101
+!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
  102
+; Instfiles page
  103
+!insertmacro MUI_PAGE_INSTFILES
  104
+; Finish page
  105
+!define MUI_FINISHPAGE_RUN "$INSTDIR\Geany.exe"
  106
+!insertmacro MUI_PAGE_FINISH
  107
+; Uninstaller pages
  108
+!insertmacro MUI_UNPAGE_INSTFILES
  109
+; Language files
  110
+!insertmacro MUI_LANGUAGE "English"
  111
+; Reserve files
  112
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
  113
+; MUI end ------
  114
+
  115
+
  116
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
  117
+; Sections and InstTypes  ;
  118
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
  119
+InstType "Full"
  120
+InstType "Minimal"
  121
+
  122
+Section "!Program Files" SEC01
  123
+  SectionIn RO 1 2
  124
+  SetOutPath "$INSTDIR"
  125
+  SetOverwrite ifnewer
  126
+  File "${RESOURCEDIR}\Geany.exe"
  127
+  File "${RESOURCEDIR}\*.txt"
  128
+
  129
+  SetOutPath "$INSTDIR\data"
  130
+  File "${RESOURCEDIR}\data\GPL-2"
  131
+  File "${RESOURCEDIR}\data\file*"
  132
+
  133
+  SetOutPath "$INSTDIR\share"
  134
+  File /r "${RESOURCEDIR}\share\*"
  135
+
  136
+  SetOutPath "$INSTDIR"
  137
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  138
+  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  139
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk" "$INSTDIR\Geany.exe"
  140
+  CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\Geany.exe"
  141
+  CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\Geany.exe"
  142
+  !insertmacro MUI_STARTMENU_WRITE_END
  143
+SectionEnd
  144
+
  145
+Section "Plugins" SEC02
  146
+  SectionIn 1
  147
+  SetOverwrite ifnewer
  148
+  SetOutPath "$INSTDIR"
  149
+  File /r "${RESOURCEDIR}\plugins"
  150
+SectionEnd
  151
+
  152
+Section "Language Files" SEC03
  153
+  SectionIn 1
  154
+  SetOutPath "$INSTDIR"
  155
+  File /r "${RESOURCEDIR}\lib"
  156
+SectionEnd
  157
+
  158
+Section "Documentation" SEC04
  159
+  SectionIn 1
  160
+  SetOverwrite ifnewer
  161
+  SetOutPath "$INSTDIR"
  162
+  File /r "${RESOURCEDIR}\doc"
  163
+
  164
+; Shortcuts
  165
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  166
+  WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\index.html"
  167
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk" "$INSTDIR\Documentation.url"
  168
+  !insertmacro MUI_STARTMENU_WRITE_END
  169
+SectionEnd
  170
+
  171
+Section "Autocompletion Tags" SEC05
  172
+  SectionIn 1
  173
+  SetOutPath "$INSTDIR\data"
  174
+  SetOverwrite ifnewer
  175
+  File "${RESOURCEDIR}\data\php.tags"
  176
+  File "${RESOURCEDIR}\data\pascal.tags"
  177
+  File "${RESOURCEDIR}\data\latex.tags"
  178
+  File "${RESOURCEDIR}\data\html_entities.tags"
  179
+  File "${RESOURCEDIR}\data\global.tags"
  180
+SectionEnd
  181
+
  182
+; Include GTK runtime library but only if desired from command line
  183
+!ifdef INCLUDE_GTK
  184
+Section "GTK 2.10 Runtime Environment" SEC06
  185
+  SectionIn 1
  186
+  SetOutPath "$INSTDIR"
  187
+  SetOverwrite ifnewer
  188
+  File "gtk\*"
  189
+  SetOutPath "$INSTDIR\etc"
  190
+  File /r "gtk\etc\*"
  191
+  SetOutPath "$INSTDIR\lib"
  192
+  File /r "gtk\lib\*"
  193
+  SetOutPath "$INSTDIR\share"
  194
+  File /r "gtk\share\*"
  195
+/* code to embed GTK+ installer executable
  196
+  File ${GTK_INSTALLER}
  197
+  ExecWait ${GTK_INSTALLER}
  198
+*/
  199
+SectionEnd
  200
+!endif
  201
+
  202
+Section "Context menus" SEC07
  203
+  SectionIn 1
  204
+  WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany"
  205
+  WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '$INSTDIR\geany.exe "%1"'
  206
+SectionEnd
  207
+
  208
+Section -AdditionalIcons
  209
+  SetOutPath $INSTDIR
  210
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  211
+  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  212
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  213
+  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
  214
+  !insertmacro MUI_STARTMENU_WRITE_END
  215
+SectionEnd
  216
+
  217
+Section -Post
  218
+  WriteUninstaller "$INSTDIR\uninst.exe"
  219
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Geany.exe"
  220
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
  221
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
  222
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Geany.exe"
  223
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
  224
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  225
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
  226
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
  227
+SectionEnd
  228
+
  229
+;;;;;;;;;;;;;;;;;;;;;;;;;
  230
+; Section descriptions  ;
  231
+;;;;;;;;;;;;;;;;;;;;;;;;;
  232
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  233
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files."
  234
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Class Builder' and 'Insert Special Characters'."
  235
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface."
  236
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
  237
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
  238
+!ifdef INCLUDE_GTK
  239
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need this files to run Geany. If you have already installed a GTK Runtime Environment (2.6 or higher), you can skip it."
  240
+!endif
  241
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
  242
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
  243
+
  244
+
  245
+
  246
+;;;;;;;;;;;;;;;;;;;;;
  247
+; helper functions  ;
  248
+;;;;;;;;;;;;;;;;;;;;;
  249
+Function un.onUninstSuccess
  250
+  HideWindow
  251
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
  252
+FunctionEnd
  253
+
  254
+Function un.onInit
  255
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
  256
+  Abort
  257
+FunctionEnd
  258
+
  259
+Function OnDirLeave
  260
+  ClearErrors
  261
+  SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
  262
+  GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
  263
+  FileOpen $0 "$1" "w" ; error to open?
  264
+  FileWriteByte $0 "0"
  265
+  IfErrors notPossible possible
  266
+
  267
+notPossible:
  268
+  RMDir "$INSTDIR" ; removes folder if empty
  269
+  MessageBox MB_OK "The given directory is not writeable. Please choose another one!"
  270
+  Abort
  271
+possible:
  272
+  FileClose $0
  273
+  Delete "$1"
  274
+FunctionEnd
  275
+
  276
+Section Uninstall
  277
+  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
  278
+  Delete "$INSTDIR\${PRODUCT_NAME}.url"
  279
+  Delete "$INSTDIR\Documentation.url"
  280
+  Delete "$INSTDIR\uninst.exe"
  281
+  Delete "$INSTDIR\News.txt"
  282
+  Delete "$INSTDIR\ReadMe.txt"
  283
+  Delete "$INSTDIR\Thanks.txt"
  284
+  Delete "$INSTDIR\ToDo.txt"
  285
+  Delete "$INSTDIR\Authors.txt"
  286
+  Delete "$INSTDIR\ChangeLog.txt"
  287
+  Delete "$INSTDIR\Copying.txt"
  288
+  Delete "$INSTDIR\Geany.exe"
  289
+  ; GTK files
  290
+  Delete "$INSTDIR\charset.dll"
  291
+  Delete "$INSTDIR\gspawn-win32-helper.exe"
  292
+  Delete "$INSTDIR\gspawn-win32-helper-console.exe"
  293
+  Delete "$INSTDIR\iconv.dll"
  294
+  Delete "$INSTDIR\intl.dll"
  295
+  Delete "$INSTDIR\libgthread-2.0-0.dll"
  296
+  Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
  297
+  Delete "$INSTDIR\libpangocairo-1.0-0.dll"
  298
+  Delete "$INSTDIR\libpangowin32-1.0-0.dll"
  299
+  Delete "$INSTDIR\libgobject-2.0-0.dll"
  300
+  Delete "$INSTDIR\libpango-1.0-0.dll"
  301
+  Delete "$INSTDIR\libpangoft2-1.0-0.dll"
  302
+  Delete "$INSTDIR\libpng13.dll"
  303
+  Delete "$INSTDIR\libatk-1.0-0.dll"
  304
+  Delete "$INSTDIR\libcairo-2.dll"
  305
+  Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
  306
+  Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
  307
+  Delete "$INSTDIR\libglib-2.0-0.dll"
  308
+  Delete "$INSTDIR\libgmodule-2.0-0.dll"
  309
+  Delete "$INSTDIR\zlib1.dll"
  310
+
  311
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
  312
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
  313
+  Delete "$QUICKLAUNCH\Geany.lnk"
  314
+  Delete "$DESKTOP\Geany.lnk"
  315
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk"
  316
+  Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
  317
+
  318
+  RMDir "$SMPROGRAMS\$ICONS_GROUP"
  319
+  RMDir /r "$INSTDIR\doc"
  320
+  RMDir /r "$INSTDIR\plugins"
  321
+  RMDir /r "$INSTDIR\data"
  322
+  RMDir /r "$INSTDIR\etc"
  323
+  RMDir /r "$INSTDIR\lib"
  324
+  RMDir /r "$INSTDIR\share"
  325
+  RMDir "$INSTDIR"
  326
+
  327
+  DeleteRegKey HKCR "*\shell\OpenWithGeany"
  328
+
  329
+  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  330
+  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  331
+  SetAutoClose true
  332
+SectionEnd
  333
+
2  plugins/export.c
@@ -19,7 +19,7 @@
19 19
  *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 20
  *      MA 02110-1301, USA.
21 21
  *
22  
- * $Id: demoplugin.c 1749 2007-07-27 10:37:22Z ntrel $
  22
+ * $Id$
23 23
  */
24 24
 
25 25
 /* Export plugin. */
38  scintilla/License.txt
... ...
@@ -1,20 +1,20 @@
1  
-License for Scintilla and SciTE
2  
-
3  
-Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
4  
-
5  
-All Rights Reserved 
6  
-
7  
-Permission to use, copy, modify, and distribute this software and its 
8  
-documentation for any purpose and without fee is hereby granted, 
9  
-provided that the above copyright notice appear in all copies and that 
10  
-both that copyright notice and this permission notice appear in 
11  
-supporting documentation. 
12  
-
13  
-NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
14  
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
15  
-AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 
16  
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
17  
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
18  
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
19  
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 
  1
+License for Scintilla and SciTE
  2
+
  3
+Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
  4
+
  5
+All Rights Reserved 
  6
+
  7
+Permission to use, copy, modify, and distribute this software and its 
  8
+documentation for any purpose and without fee is hereby granted, 
  9
+provided that the above copyright notice appear in all copies and that 
  10
+both that copyright notice and this permission notice appear in 
  11
+supporting documentation. 
  12
+
  13
+NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  14
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
  15
+AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 
  16
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
  17
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
  18
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
  19
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 
20 20
 OR PERFORMANCE OF THIS SOFTWARE. 
2  tagmanager/latex.c
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2  
- *   $Id: tex.c 283 2006-04-27 22:52:09Z eht16 $
  2
+ *   $Id$
3 3
  *
4 4
  *   Copyright (c) 2000-2001, Jérôme Plût
5 5
  *   Copyright (c) 2006, Enrico Tröger
2  tagmanager/lregex.c
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2  
-*   $Id: lregex.c 576 2007-06-30 04:16:23Z elliotth $
  2
+*   $Id$
3 3
 *
4 4
 *   Copyright (c) 2000-2003, Darren Hiebert
5 5
 *
2  tagmanager/ruby.c
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2  
-*   $Id: ruby.c 571 2007-06-24 23:32:14Z elliotth $
  2
+*   $Id$
3 3
 *
4 4
 *   Copyright (c) 2000-2001, Thaddeus Covert <sahuagin@mediaone.net>
5 5
 *   Copyright (c) 2002 Matthias Veit <matthias_veit@yahoo.de>
594  tagmanager/vhdl.c
... ...
@@ -1,297 +1,297 @@
1  
-/*
2  
-*   $Id: vhdl.c,v 1.0 2005/11/05
3  
-*
4  
-*   Copyright (c) 2005, Klaus Dannecker
5  
-*
6  
-*   This source code is released for free distribution under the terms of the
7  
-*   GNU General Public License.
8  
-*
9  
-*   This module contains functions for generating tags for the Vhdl HDL
10  
-*   (Hardware Description Language).
11  
-*
12  
-*/
13  
-
14  
-/*
15  
- *   INCLUDE FILES
16  
- */
17  
-#include "general.h"	/* must always come first */
18  
-
19  
-#include <string.h>
20  
-#include <setjmp.h>
21  
-
22  
-#include "keyword.h"
23  
-#include "parse.h"
24  
-#include "read.h"
25  
-#include "vstring.h"
26  
-
27  
-/*
28  
- *   DATA DECLARATIONS
29  
- */
30  
-typedef enum eException { ExceptionNone, ExceptionEOF } exception_t;
31  
-
32  
-typedef enum {
33  
-    K_UNDEFINED = -1,
34  
-    K_CONSTANT,
35  
-    K_TYPE,
36  
-    K_VARIABLE,
37  
-    K_ATRIBUTE,
38  
-    K_SIGNAL,
39  
-    K_FUNCTION,
40  
-    K_PROCEDURE,
41  
-    K_COMPONENT,
42  
-    K_PACKAGE,
43  
-    K_PROCESS,
44  
-    K_ENTITY,
45  
-    K_ARCHITECTURE,
46  
-    K_PORT
47  
-} vhdlKind;
48  
-
49  
-typedef struct {
50  
-    const char *keyword;
51  
-    vhdlKind kind;
52  
-} keywordAssoc;
53  
-
54  
-/*
55  
- *   DATA DEFINITIONS
56  
- */
57  
-static int Ungetc;
58  
-static int Lang_vhdl;
59  
-static jmp_buf Exception;
60  
-static vString* Name=NULL;
61  
-static vString* Lastname=NULL;
62  
-static vString* Keyword=NULL;
63  
-static vString* TagName=NULL;
64  
-
65  
-static kindOption VhdlKinds [] = {
66  
- { TRUE, 'c', "constant",     "constants" },
67  
- { TRUE, 't', "type",         "types" },
68  
- { TRUE, 'v', "variable",     "variables" },
69  
- { TRUE, 'a', "atribute",     "atributes" },
70  
- { TRUE, 's', "signal",       "signals" },
71  
- { TRUE, 'f', "function",     "functions" },
72  
- { TRUE, 'p', "procedure",    "procedure" },
73  
- { TRUE, 'k', "component",    "components" },
74  
- { TRUE, 'l', "package",      "packages" },
75  
- { TRUE, 'm', "process",      "process" },
76  
- { TRUE, 'n', "entity",       "entity" },
77  
- { TRUE, 'o', "architecture", "architecture" },
78  
- { TRUE, 'u', "port",         "ports" }
79  
-};
80  
-
81  
-static keywordAssoc VhdlKeywordTable [] = {
82  
-    { "variable",     K_VARIABLE },
83  
-    { "constant",     K_CONSTANT },
84  
-    { "variable",     K_VARIABLE },
85  
-    { "type",         K_TYPE },
86  
-    { "subtype",      K_TYPE },
87  
-    { "signal",       K_SIGNAL },
88  
-    { "function",     K_FUNCTION },
89  
-    { "procedure",    K_PROCEDURE },
90  
-    { "component",    K_COMPONENT },
91  
-    { "package",      K_PACKAGE },
92  
-    { "process",      K_PROCESS },
93  
-    { "entity",       K_ENTITY },
94  
-    { "architecture", K_ARCHITECTURE },
95  
-    { "inout",        K_PORT },
96  
-    { "in",           K_PORT },
97  
-    { "out",          K_PORT }
98  
-};
99  
-
100  
-
101  
-/*
102  
- *   FUNCTION DEFINITIONS
103  
- */
104  
-
105  
-static void initialize (const langType language)
106  
-{
107  
-    size_t i;
108  
-    const size_t count = sizeof (VhdlKeywordTable) /
109  
-			 sizeof (VhdlKeywordTable [0]);
110  
-    Lang_vhdl = language;
111  
-    for (i = 0  ;  i < count  ;  ++i)
112  
-    {
113  
-		const keywordAssoc* const p = &VhdlKeywordTable [i];
114  
-		addKeyword (p->keyword, language, (int) p->kind);
115  
-    }
116  
-}
117  
-
118  
-static void vUngetc (int c)
119  
-{
120  
-    Assert (Ungetc == '\0');
121  
-    Ungetc = c;
122  
-}
123  
-
124  
-static int vGetc (void)
125  
-{
126  
-    int c;
127  
-    if (Ungetc == '\0')
128  
-	c = fileGetc ();
129  
-    else
130  
-    {
131  
-		c = Ungetc;
132  
-		Ungetc = '\0';
133  
-    }
134  
-    if (c == '-')
135  
-    {
136  
-		int c2 = fileGetc ();
137  
-		if (c2 == EOF)
138  
-			longjmp (Exception, (int) ExceptionEOF);
139  
-		else if (c2 == '-')   /* strip comment until end-of-line */
140  
-		{
141  
-			do
142  
-			c = fileGetc ();
143  
-			while (c != '\n'  &&  c != EOF);
144  
-		}
145  
-		else
146  
-			Ungetc = c2;
147  
-	}
148  
-    if (c == EOF)
149  
-		longjmp (Exception, (int) ExceptionEOF);
150  
-	return c;
151  
-}
152  
-
153  
-static boolean isIdentifierCharacter (const int c)
154  
-{
155  
-    return (boolean)(isalnum (c)  ||  c == '_'  ||  c == '`');
156  
-}
157  
-
158  
-static int skipWhite (int c)
159  
-{
160  
-    while (c==' ')
161  
-	c = vGetc ();
162  
-    return c;
163  
-}
164  
-
165  
-static boolean readIdentifier (vString *const name, int c)
166  
-{
167  
-    vStringClear (name);
168  
-    if (isIdentifierCharacter (c))
169  
-    {
170  
-		while (isIdentifierCharacter (c))
171  
-		{
172  
-			vStringPut (name, c);
173  
-			c = vGetc ();
174  
-		}
175  
-		vUngetc (c);
176  
-		vStringTerminate (name);
177  
-    }
178  
-    return (boolean)(name->length > 0);
179  
-}
180  
-
181  
-static void tagNameList (const vhdlKind kind, int c)
182  
-{
183  
-    Assert (isIdentifierCharacter (c));
184  
-	if (isIdentifierCharacter (c))
185  
-	{
186  
-		readIdentifier (TagName, c);
187  
-		makeSimpleTag (TagName, VhdlKinds, kind);
188  
-		vUngetc (c);
189  
-	}
190  
-}
191  
-
192  
-static void findTag (vString *const name)
193  
-{
194  
-	int c = '\0';
195  
-	vhdlKind kind;
196  
-    vStringCopyToLower (Keyword, name);
197  
-    kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
198  
-    if (kind == K_UNDEFINED)
199  
-	{
200  
-		c = skipWhite (vGetc ());
201  
-		vStringCopyS(Lastname,vStringValue(name));
202  
-			if (c == ':')
203  
-			{
204  
-				c = skipWhite (vGetc ());
205  
-				if (isIdentifierCharacter (c))
206  
-				{
207  
-					readIdentifier (name, c);
208  
-					vStringCopyToLower (Keyword, name);
209  
-					lookupKeyword (vStringValue (Keyword), Lang_vhdl);
210  
-					kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
211  
-					if (kind == K_PROCESS || kind == K_PORT)
212  
-					{
213  
-						makeSimpleTag (Lastname, VhdlKinds, kind);
214  
-					}
215  
-				}
216  
-			} else {
217  
-				vUngetc (c);
218  
-			}
219  
-	}
220  
-	else
221  
-	{
222  
-		if (kind == K_SIGNAL) {
223  
-			while (c!=':') {
224  
-				c = skipWhite (vGetc ());
225  
-				if (c==',')
226  
-					c = vGetc ();
227  
-				if (isIdentifierCharacter (c))
228  
-					tagNameList (kind, c);
229  
-				else
230  
-					break;
231  
-				c = vGetc ();
232  
-			}
233  
-		}
234  
-		else if (kind == K_PROCESS) {
235  
-			vStringCopyS(TagName,"unnamed");
236  
-			makeSimpleTag (TagName, VhdlKinds, kind);
237  
-		} else {
238  
-			c = skipWhite (vGetc ());
239  
-			if (c=='\"')
240  
-				c = vGetc ();
241  
-			if (isIdentifierCharacter (c))
242  
-				tagNameList (kind, c);
243  
-		}
244  
-	}
245  
-}
246  
-
247  
-static void findVhdlTags (void)
248  
-{
249  
-    volatile boolean newStatement = TRUE;
250  
-    volatile int c = '\0';
251  
-    exception_t exception = (exception_t) setjmp (Exception);
252  
-	Name = vStringNew ();
253  
-    Lastname = vStringNew ();
254  
-    Keyword = vStringNew ();
255  
-    TagName = vStringNew ();
256  
-
257  
-    if (exception == ExceptionNone) while (c != EOF)
258  
-    {
259  
-		c = vGetc ();
260  
-		switch (c)
261  
-		{
262  
-			case ';':
263  
-			case '\n':
264  
-			newStatement = TRUE;
265  
-			break;
266  
-
267  
-			case ' ':
268  
-			case '\t':
269  
-			break;
270  
-
271  
-			default:
272  
-			if (newStatement && readIdentifier (Name, c)) {
273  
-				findTag (Name);
274  
-				}
275  
-			newStatement = FALSE;
276  
-			break;
277  
-		}
278  
-    }
279  
-    vStringDelete (Name);
280  
-    vStringDelete (Lastname);
281  
-    vStringDelete (Keyword);
282  
-    vStringDelete (TagName);
283  
-}
284  
-
285  
-extern parserDefinition* VhdlParser (void)
286  
-{
287  
-    static const char *const extensions [] = { "vhdl", "vhd", NULL };
288  
-    parserDefinition* def = parserNew ("Vhdl");
289  
-    def->kinds      = VhdlKinds;
290  
-    def->kindCount  = KIND_COUNT (VhdlKinds);
291  
-    def->extensions = extensions;
292  
-    def->parser     = findVhdlTags;
293  
-    def->initialize = initialize;
294  
-    return def;
295  
-}
296  
-
297  
-/* vi:set tabstop=8 shiftwidth=4: */
  1
+/*
  2
+*   $Id: vhdl.c,v 1.0 2005/11/05
  3
+*
  4
+*   Copyright (c) 2005, Klaus Dannecker
  5
+*
  6
+*   This source code is released for free distribution under the terms of the
  7
+*   GNU General Public License.
  8
+*
  9
+*   This module contains functions for generating tags for the Vhdl HDL
  10
+*   (Hardware Description Language).
  11
+*
  12
+*/
  13
+
  14
+/*
  15
+ *   INCLUDE FILES
  16
+ */
  17
+#include "general.h"	/* must always come first */
  18
+
  19
+#include <string.h>
  20
+#include <setjmp.h>
  21
+
  22
+#include "keyword.h"
  23
+#include "parse.h"
  24
+#include "read.h"
  25
+#include "vstring.h"
  26
+
  27
+/*
  28
+ *   DATA DECLARATIONS
  29
+ */
  30
+typedef enum eException { ExceptionNone, ExceptionEOF } exception_t;
  31
+
  32
+typedef enum {
  33
+    K_UNDEFINED = -1,
  34
+    K_CONSTANT,
  35
+    K_TYPE,
  36
+    K_VARIABLE,
  37
+    K_ATRIBUTE,
  38
+    K_SIGNAL,
  39
+    K_FUNCTION,
  40
+    K_PROCEDURE,
  41
+    K_COMPONENT,
  42
+    K_PACKAGE,
  43
+    K_PROCESS,
  44
+    K_ENTITY,
  45
+    K_ARCHITECTURE,
  46
+    K_PORT
  47
+} vhdlKind;
  48
+
  49
+typedef struct {
  50
+    const char *keyword;
  51
+    vhdlKind kind;
  52
+} keywordAssoc;
  53
+
  54
+/*
  55
+ *   DATA DEFINITIONS
  56
+ */
  57
+static int Ungetc;
  58
+static int Lang_vhdl;
  59
+static jmp_buf Exception;
  60
+static vString* Name=NULL;
  61
+static vString* Lastname=NULL;
  62
+static vString* Keyword=NULL;
  63
+static vString* TagName=NULL;
  64
+
  65
+static kindOption VhdlKinds [] = {
  66
+ { TRUE, 'c', "constant",     "constants" },
  67
+ { TRUE, 't', "type",         "types" },
  68
+ { TRUE, 'v', "variable",     "variables" },
  69
+ { TRUE, 'a', "atribute",     "atributes" },
  70
+ { TRUE, 's', "signal",       "signals" },
  71
+ { TRUE, 'f', "function",     "functions" },
  72
+ { TRUE, 'p', "procedure",    "procedure" },
  73
+ { TRUE, 'k', "component",    "components" },
  74
+ { TRUE, 'l', "package",      "packages" },
  75
+ { TRUE, 'm', "process",      "process" },
  76
+ { TRUE, 'n', "entity",       "entity" },
  77
+ { TRUE, 'o', "architecture", "architecture" },
  78
+ { TRUE, 'u', "port",         "ports" }
  79
+};
  80
+
  81
+static keywordAssoc VhdlKeywordTable [] = {
  82
+    { "variable",     K_VARIABLE },
  83
+    { "constant",     K_CONSTANT },
  84
+    { "variable",     K_VARIABLE },
  85
+    { "type",         K_TYPE },
  86
+    { "subtype",      K_TYPE },
  87
+    { "signal",       K_SIGNAL },
  88
+    { "function",     K_FUNCTION },
  89
+    { "procedure",    K_PROCEDURE },
  90
+    { "component",    K_COMPONENT },
  91
+    { "package",      K_PACKAGE },
  92
+    { "process",      K_PROCESS },
  93
+    { "entity",       K_ENTITY },
  94
+    { "architecture", K_ARCHITECTURE },
  95
+    { "inout",        K_PORT },
  96
+    { "in",           K_PORT },
  97
+    { "out",          K_PORT }
  98
+};
  99
+
  100
+
  101
+/*
  102
+ *   FUNCTION DEFINITIONS
  103
+ */
  104
+
  105
+static void initialize (const langType language)
  106
+{
  107
+    size_t i;
  108
+    const size_t count = sizeof (VhdlKeywordTable) /
  109
+			 sizeof (VhdlKeywordTable [0]);
  110
+    Lang_vhdl = language;
  111
+    for (i = 0  ;  i < count  ;  ++i)
  112
+    {
  113
+		const keywordAssoc* const p = &VhdlKeywordTable [i];
  114
+		addKeyword (p->keyword, language, (int) p->kind);
  115
+    }
  116
+}
  117
+
  118
+static void vUngetc (int c)
  119
+{
  120
+    Assert (Ungetc == '\0');
  121
+    Ungetc = c;
  122
+}
  123
+
  124
+static int vGetc (void)
  125
+{
  126
+    int c;
  127
+    if (Ungetc == '\0')
  128
+	c = fileGetc ();
  129
+    else
  130
+    {
  131
+		c = Ungetc;
  132
+		Ungetc = '\0';
  133
+    }
  134
+    if (c == '-')
  135
+    {
  136
+		int c2 = fileGetc ();
  137
+		if (c2 == EOF)
  138
+			longjmp (Exception, (int) ExceptionEOF);
  139
+		else if (c2 == '-')   /* strip comment until end-of-line */
  140
+		{
  141
+			do
  142
+			c = fileGetc ();
  143
+			while (c != '\n'  &&  c != EOF);
  144
+		}
  145
+		else
  146
+			Ungetc = c2;
  147
+	}
  148
+    if (c == EOF)
  149
+		longjmp (Exception, (int) ExceptionEOF);
  150
+	return c;
  151
+}
  152
+
  153
+static boolean isIdentifierCharacter (const int c)
  154
+{
  155
+    return (boolean)(isalnum (c)  ||  c == '_'  ||  c == '`');
  156
+}
  157
+
  158
+static int skipWhite (int c)
  159
+{
  160
+    while (c==' ')
  161
+	c = vGetc ();
  162
+    return c;
  163
+}
  164
+
  165
+static boolean readIdentifier (vString *const name, int c)
  166
+{
  167
+    vStringClear (name);
  168
+    if (isIdentifierCharacter (c))
  169
+    {
  170
+		while (isIdentifierCharacter (c))
  171
+		{
  172
+			vStringPut (name, c);
  173
+			c = vGetc ();
  174
+		}
  175
+		vUngetc (c);
  176
+		vStringTerminate (name);
  177
+    }
  178
+    return (boolean)(name->length > 0);
  179
+}
  180
+
  181
+static void tagNameList (const vhdlKind kind, int c)
  182
+{
  183
+    Assert (isIdentifierCharacter (c));
  184
+	if (isIdentifierCharacter (c))
  185
+	{
  186
+		readIdentifier (TagName, c);
  187
+		makeSimpleTag (TagName, VhdlKinds, kind);
  188
+		vUngetc (c);
  189
+	}