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
This commit is contained in:
parent
083e5057af
commit
c380fb75b4
666
geany.nsi
666
geany.nsi
@ -1,333 +1,333 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Installer script for Geany (Windows Installer) ;
|
; Installer script for Geany (Windows Installer) ;
|
||||||
; Script generated by the HM NIS Edit Script Wizard. :
|
; Script generated by the HM NIS Edit Script Wizard. :
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;
|
||||||
; helper defines ;
|
; helper defines ;
|
||||||
;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;
|
||||||
!define PRODUCT_NAME "Geany"
|
!define PRODUCT_NAME "Geany"
|
||||||
!define PRODUCT_VERSION "0.13"
|
!define PRODUCT_VERSION "0.13"
|
||||||
!define PRODUCT_VERSION_ID "0.13.0.0"
|
!define PRODUCT_VERSION_ID "0.13.0.0"
|
||||||
!define PRODUCT_PUBLISHER "Enrico Tröger"
|
!define PRODUCT_PUBLISHER "Enrico Tröger"
|
||||||
!define PRODUCT_WEB_SITE "http://geany.uvena.de"
|
!define PRODUCT_WEB_SITE "http://geany.uvena.de"
|
||||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Geany.exe"
|
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Geany.exe"
|
||||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
||||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
||||||
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
|
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
|
||||||
|
|
||||||
!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
|
!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
|
||||||
|
|
||||||
; only used when embedding GTK+ installer
|
; only used when embedding GTK+ installer
|
||||||
!define GTK_INSTALLER "gtk+-2.10.6-1-setup.exe"
|
!define GTK_INSTALLER "gtk+-2.10.6-1-setup.exe"
|
||||||
|
|
||||||
SetCompressor /SOLID lzma
|
SetCompressor /SOLID lzma
|
||||||
XPStyle on
|
XPStyle on
|
||||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||||
!ifdef INCLUDE_GTK
|
!ifdef INCLUDE_GTK
|
||||||
OutFile "geany-${PRODUCT_VERSION}_setup.exe"
|
OutFile "geany-${PRODUCT_VERSION}_setup.exe"
|
||||||
!else
|
!else
|
||||||
OutFile "geany-${PRODUCT_VERSION}_nogtk_setup.exe"
|
OutFile "geany-${PRODUCT_VERSION}_nogtk_setup.exe"
|
||||||
!endif
|
!endif
|
||||||
InstallDir "$PROGRAMFILES\Geany"
|
InstallDir "$PROGRAMFILES\Geany"
|
||||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
||||||
ShowInstDetails hide
|
ShowInstDetails hide
|
||||||
ShowUnInstDetails hide
|
ShowUnInstDetails hide
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Version resource ;
|
; Version resource ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
VIProductVersion "${PRODUCT_VERSION_ID}"
|
VIProductVersion "${PRODUCT_VERSION_ID}"
|
||||||
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
|
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
|
||||||
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
|
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
|
||||||
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
|
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
|
||||||
VIAddVersionKey "LegalCopyright" "Copyright 2005-2007 by Enrico Tröger"
|
VIAddVersionKey "LegalCopyright" "Copyright 2005-2007 by Enrico Tröger"
|
||||||
VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
|
VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
; Init code ;
|
; Init code ;
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
Function .onInit
|
Function .onInit
|
||||||
; prevent running multiple instances of the installer
|
; prevent running multiple instances of the installer
|
||||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e'
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e'
|
||||||
Pop $R0
|
Pop $R0
|
||||||
StrCmp $R0 0 +3
|
StrCmp $R0 0 +3
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
; warn about a new install over an existing installation
|
; warn about a new install over an existing installation
|
||||||
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
|
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
|
||||||
StrCmp $R0 "" done
|
StrCmp $R0 "" done
|
||||||
|
|
||||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
||||||
"Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \
|
"Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \
|
||||||
IDNO done
|
IDNO done
|
||||||
|
|
||||||
;Run the uninstaller
|
;Run the uninstaller
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
|
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
|
||||||
|
|
||||||
done:
|
done:
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
; MUI Settings ;
|
; MUI Settings ;
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
!include "MUI.nsh"
|
!include "MUI.nsh"
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
!define MUI_ABORTWARNING
|
||||||
!define MUI_ICON "pixmaps\geany.ico"
|
!define MUI_ICON "pixmaps\geany.ico"
|
||||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico"
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico"
|
||||||
|
|
||||||
; Welcome page
|
; Welcome page
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
; License page
|
; License page
|
||||||
;!define MUI_LICENSEPAGE_RADIOBUTTONS
|
;!define MUI_LICENSEPAGE_RADIOBUTTONS
|
||||||
!insertmacro MUI_PAGE_LICENSE "${RESOURCEDIR}\Copying.txt"
|
!insertmacro MUI_PAGE_LICENSE "${RESOURCEDIR}\Copying.txt"
|
||||||
; Components page
|
; Components page
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
; Directory page
|
; Directory page
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
|
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
; Start menu page
|
; Start menu page
|
||||||
var ICONS_GROUP
|
var ICONS_GROUP
|
||||||
!define MUI_STARTMENUPAGE_NODISABLE
|
!define MUI_STARTMENUPAGE_NODISABLE
|
||||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany"
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
|
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
|
||||||
; Instfiles page
|
; Instfiles page
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
; Finish page
|
; Finish page
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\Geany.exe"
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\Geany.exe"
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
; Uninstaller pages
|
; Uninstaller pages
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
; Language files
|
; Language files
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
; Reserve files
|
; Reserve files
|
||||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||||
; MUI end ------
|
; MUI end ------
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Sections and InstTypes ;
|
; Sections and InstTypes ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
InstType "Full"
|
InstType "Full"
|
||||||
InstType "Minimal"
|
InstType "Minimal"
|
||||||
|
|
||||||
Section "!Program Files" SEC01
|
Section "!Program Files" SEC01
|
||||||
SectionIn RO 1 2
|
SectionIn RO 1 2
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
File "${RESOURCEDIR}\Geany.exe"
|
File "${RESOURCEDIR}\Geany.exe"
|
||||||
File "${RESOURCEDIR}\*.txt"
|
File "${RESOURCEDIR}\*.txt"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\data"
|
SetOutPath "$INSTDIR\data"
|
||||||
File "${RESOURCEDIR}\data\GPL-2"
|
File "${RESOURCEDIR}\data\GPL-2"
|
||||||
File "${RESOURCEDIR}\data\file*"
|
File "${RESOURCEDIR}\data\file*"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\share"
|
SetOutPath "$INSTDIR\share"
|
||||||
File /r "${RESOURCEDIR}\share\*"
|
File /r "${RESOURCEDIR}\share\*"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk" "$INSTDIR\Geany.exe"
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk" "$INSTDIR\Geany.exe"
|
||||||
CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\Geany.exe"
|
CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\Geany.exe"
|
||||||
CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\Geany.exe"
|
CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\Geany.exe"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Plugins" SEC02
|
Section "Plugins" SEC02
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File /r "${RESOURCEDIR}\plugins"
|
File /r "${RESOURCEDIR}\plugins"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Language Files" SEC03
|
Section "Language Files" SEC03
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File /r "${RESOURCEDIR}\lib"
|
File /r "${RESOURCEDIR}\lib"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Documentation" SEC04
|
Section "Documentation" SEC04
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File /r "${RESOURCEDIR}\doc"
|
File /r "${RESOURCEDIR}\doc"
|
||||||
|
|
||||||
; Shortcuts
|
; Shortcuts
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\index.html"
|
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\index.html"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk" "$INSTDIR\Documentation.url"
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk" "$INSTDIR\Documentation.url"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Autocompletion Tags" SEC05
|
Section "Autocompletion Tags" SEC05
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOutPath "$INSTDIR\data"
|
SetOutPath "$INSTDIR\data"
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
File "${RESOURCEDIR}\data\php.tags"
|
File "${RESOURCEDIR}\data\php.tags"
|
||||||
File "${RESOURCEDIR}\data\pascal.tags"
|
File "${RESOURCEDIR}\data\pascal.tags"
|
||||||
File "${RESOURCEDIR}\data\latex.tags"
|
File "${RESOURCEDIR}\data\latex.tags"
|
||||||
File "${RESOURCEDIR}\data\html_entities.tags"
|
File "${RESOURCEDIR}\data\html_entities.tags"
|
||||||
File "${RESOURCEDIR}\data\global.tags"
|
File "${RESOURCEDIR}\data\global.tags"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
; Include GTK runtime library but only if desired from command line
|
; Include GTK runtime library but only if desired from command line
|
||||||
!ifdef INCLUDE_GTK
|
!ifdef INCLUDE_GTK
|
||||||
Section "GTK 2.10 Runtime Environment" SEC06
|
Section "GTK 2.10 Runtime Environment" SEC06
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
File "gtk\*"
|
File "gtk\*"
|
||||||
SetOutPath "$INSTDIR\etc"
|
SetOutPath "$INSTDIR\etc"
|
||||||
File /r "gtk\etc\*"
|
File /r "gtk\etc\*"
|
||||||
SetOutPath "$INSTDIR\lib"
|
SetOutPath "$INSTDIR\lib"
|
||||||
File /r "gtk\lib\*"
|
File /r "gtk\lib\*"
|
||||||
SetOutPath "$INSTDIR\share"
|
SetOutPath "$INSTDIR\share"
|
||||||
File /r "gtk\share\*"
|
File /r "gtk\share\*"
|
||||||
/* code to embed GTK+ installer executable
|
/* code to embed GTK+ installer executable
|
||||||
File ${GTK_INSTALLER}
|
File ${GTK_INSTALLER}
|
||||||
ExecWait ${GTK_INSTALLER}
|
ExecWait ${GTK_INSTALLER}
|
||||||
*/
|
*/
|
||||||
SectionEnd
|
SectionEnd
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
Section "Context menus" SEC07
|
Section "Context menus" SEC07
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany"
|
WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany"
|
||||||
WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '$INSTDIR\geany.exe "%1"'
|
WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '$INSTDIR\geany.exe "%1"'
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section -AdditionalIcons
|
Section -AdditionalIcons
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
|
||||||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section -Post
|
Section -Post
|
||||||
WriteUninstaller "$INSTDIR\uninst.exe"
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
||||||
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Geany.exe"
|
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Geany.exe"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Geany.exe"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Geany.exe"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Section descriptions ;
|
; Section descriptions ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Class Builder' and 'Insert Special Characters'."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Class Builder' and 'Insert Special Characters'."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format."
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols."
|
||||||
!ifdef INCLUDE_GTK
|
!ifdef INCLUDE_GTK
|
||||||
!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."
|
!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."
|
||||||
!endif
|
!endif
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'"
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
; helper functions ;
|
; helper functions ;
|
||||||
;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
Function un.onUninstSuccess
|
Function un.onUninstSuccess
|
||||||
HideWindow
|
HideWindow
|
||||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
|
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onInit
|
Function un.onInit
|
||||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
||||||
Abort
|
Abort
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function OnDirLeave
|
Function OnDirLeave
|
||||||
ClearErrors
|
ClearErrors
|
||||||
SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
|
SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
|
||||||
GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
|
GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
|
||||||
FileOpen $0 "$1" "w" ; error to open?
|
FileOpen $0 "$1" "w" ; error to open?
|
||||||
FileWriteByte $0 "0"
|
FileWriteByte $0 "0"
|
||||||
IfErrors notPossible possible
|
IfErrors notPossible possible
|
||||||
|
|
||||||
notPossible:
|
notPossible:
|
||||||
RMDir "$INSTDIR" ; removes folder if empty
|
RMDir "$INSTDIR" ; removes folder if empty
|
||||||
MessageBox MB_OK "The given directory is not writeable. Please choose another one!"
|
MessageBox MB_OK "The given directory is not writeable. Please choose another one!"
|
||||||
Abort
|
Abort
|
||||||
possible:
|
possible:
|
||||||
FileClose $0
|
FileClose $0
|
||||||
Delete "$1"
|
Delete "$1"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
|
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
|
||||||
Delete "$INSTDIR\${PRODUCT_NAME}.url"
|
Delete "$INSTDIR\${PRODUCT_NAME}.url"
|
||||||
Delete "$INSTDIR\Documentation.url"
|
Delete "$INSTDIR\Documentation.url"
|
||||||
Delete "$INSTDIR\uninst.exe"
|
Delete "$INSTDIR\uninst.exe"
|
||||||
Delete "$INSTDIR\News.txt"
|
Delete "$INSTDIR\News.txt"
|
||||||
Delete "$INSTDIR\ReadMe.txt"
|
Delete "$INSTDIR\ReadMe.txt"
|
||||||
Delete "$INSTDIR\Thanks.txt"
|
Delete "$INSTDIR\Thanks.txt"
|
||||||
Delete "$INSTDIR\ToDo.txt"
|
Delete "$INSTDIR\ToDo.txt"
|
||||||
Delete "$INSTDIR\Authors.txt"
|
Delete "$INSTDIR\Authors.txt"
|
||||||
Delete "$INSTDIR\ChangeLog.txt"
|
Delete "$INSTDIR\ChangeLog.txt"
|
||||||
Delete "$INSTDIR\Copying.txt"
|
Delete "$INSTDIR\Copying.txt"
|
||||||
Delete "$INSTDIR\Geany.exe"
|
Delete "$INSTDIR\Geany.exe"
|
||||||
; GTK files
|
; GTK files
|
||||||
Delete "$INSTDIR\charset.dll"
|
Delete "$INSTDIR\charset.dll"
|
||||||
Delete "$INSTDIR\gspawn-win32-helper.exe"
|
Delete "$INSTDIR\gspawn-win32-helper.exe"
|
||||||
Delete "$INSTDIR\gspawn-win32-helper-console.exe"
|
Delete "$INSTDIR\gspawn-win32-helper-console.exe"
|
||||||
Delete "$INSTDIR\iconv.dll"
|
Delete "$INSTDIR\iconv.dll"
|
||||||
Delete "$INSTDIR\intl.dll"
|
Delete "$INSTDIR\intl.dll"
|
||||||
Delete "$INSTDIR\libgthread-2.0-0.dll"
|
Delete "$INSTDIR\libgthread-2.0-0.dll"
|
||||||
Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
|
Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
|
||||||
Delete "$INSTDIR\libpangocairo-1.0-0.dll"
|
Delete "$INSTDIR\libpangocairo-1.0-0.dll"
|
||||||
Delete "$INSTDIR\libpangowin32-1.0-0.dll"
|
Delete "$INSTDIR\libpangowin32-1.0-0.dll"
|
||||||
Delete "$INSTDIR\libgobject-2.0-0.dll"
|
Delete "$INSTDIR\libgobject-2.0-0.dll"
|
||||||
Delete "$INSTDIR\libpango-1.0-0.dll"
|
Delete "$INSTDIR\libpango-1.0-0.dll"
|
||||||
Delete "$INSTDIR\libpangoft2-1.0-0.dll"
|
Delete "$INSTDIR\libpangoft2-1.0-0.dll"
|
||||||
Delete "$INSTDIR\libpng13.dll"
|
Delete "$INSTDIR\libpng13.dll"
|
||||||
Delete "$INSTDIR\libatk-1.0-0.dll"
|
Delete "$INSTDIR\libatk-1.0-0.dll"
|
||||||
Delete "$INSTDIR\libcairo-2.dll"
|
Delete "$INSTDIR\libcairo-2.dll"
|
||||||
Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
|
Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
|
||||||
Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
|
Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
|
||||||
Delete "$INSTDIR\libglib-2.0-0.dll"
|
Delete "$INSTDIR\libglib-2.0-0.dll"
|
||||||
Delete "$INSTDIR\libgmodule-2.0-0.dll"
|
Delete "$INSTDIR\libgmodule-2.0-0.dll"
|
||||||
Delete "$INSTDIR\zlib1.dll"
|
Delete "$INSTDIR\zlib1.dll"
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
|
||||||
Delete "$QUICKLAUNCH\Geany.lnk"
|
Delete "$QUICKLAUNCH\Geany.lnk"
|
||||||
Delete "$DESKTOP\Geany.lnk"
|
Delete "$DESKTOP\Geany.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Geany.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
|
||||||
|
|
||||||
RMDir "$SMPROGRAMS\$ICONS_GROUP"
|
RMDir "$SMPROGRAMS\$ICONS_GROUP"
|
||||||
RMDir /r "$INSTDIR\doc"
|
RMDir /r "$INSTDIR\doc"
|
||||||
RMDir /r "$INSTDIR\plugins"
|
RMDir /r "$INSTDIR\plugins"
|
||||||
RMDir /r "$INSTDIR\data"
|
RMDir /r "$INSTDIR\data"
|
||||||
RMDir /r "$INSTDIR\etc"
|
RMDir /r "$INSTDIR\etc"
|
||||||
RMDir /r "$INSTDIR\lib"
|
RMDir /r "$INSTDIR\lib"
|
||||||
RMDir /r "$INSTDIR\share"
|
RMDir /r "$INSTDIR\share"
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
DeleteRegKey HKCR "*\shell\OpenWithGeany"
|
DeleteRegKey HKCR "*\shell\OpenWithGeany"
|
||||||
|
|
||||||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
||||||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
||||||
SetAutoClose true
|
SetAutoClose true
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
* MA 02110-1301, USA.
|
* MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* $Id: demoplugin.c 1749 2007-07-27 10:37:22Z ntrel $
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Export plugin. */
|
/* Export plugin. */
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
License for Scintilla and SciTE
|
License for Scintilla and SciTE
|
||||||
|
|
||||||
Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
|
Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
|
||||||
|
|
||||||
All Rights Reserved
|
All Rights Reserved
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
documentation for any purpose and without fee is hereby granted,
|
documentation for any purpose and without fee is hereby granted,
|
||||||
provided that the above copyright notice appear in all copies and that
|
provided that the above copyright notice appear in all copies and that
|
||||||
both that copyright notice and this permission notice appear in
|
both that copyright notice and this permission notice appear in
|
||||||
supporting documentation.
|
supporting documentation.
|
||||||
|
|
||||||
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
|
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
|
||||||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|
||||||
OR PERFORMANCE OF THIS SOFTWARE.
|
OR PERFORMANCE OF THIS SOFTWARE.
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: tex.c 283 2006-04-27 22:52:09Z eht16 $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright (c) 2000-2001, Jérôme Plût
|
* Copyright (c) 2000-2001, Jérôme Plût
|
||||||
* Copyright (c) 2006, Enrico Tröger
|
* Copyright (c) 2006, Enrico Tröger
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: lregex.c 576 2007-06-30 04:16:23Z elliotth $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003, Darren Hiebert
|
* Copyright (c) 2000-2003, Darren Hiebert
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: ruby.c 571 2007-06-24 23:32:14Z elliotth $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright (c) 2000-2001, Thaddeus Covert <sahuagin@mediaone.net>
|
* Copyright (c) 2000-2001, Thaddeus Covert <sahuagin@mediaone.net>
|
||||||
* Copyright (c) 2002 Matthias Veit <matthias_veit@yahoo.de>
|
* Copyright (c) 2002 Matthias Veit <matthias_veit@yahoo.de>
|
||||||
|
@ -1,297 +1,297 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: vhdl.c,v 1.0 2005/11/05
|
* $Id: vhdl.c,v 1.0 2005/11/05
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005, Klaus Dannecker
|
* Copyright (c) 2005, Klaus Dannecker
|
||||||
*
|
*
|
||||||
* This source code is released for free distribution under the terms of the
|
* This source code is released for free distribution under the terms of the
|
||||||
* GNU General Public License.
|
* GNU General Public License.
|
||||||
*
|
*
|
||||||
* This module contains functions for generating tags for the Vhdl HDL
|
* This module contains functions for generating tags for the Vhdl HDL
|
||||||
* (Hardware Description Language).
|
* (Hardware Description Language).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* INCLUDE FILES
|
* INCLUDE FILES
|
||||||
*/
|
*/
|
||||||
#include "general.h" /* must always come first */
|
#include "general.h" /* must always come first */
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
#include "keyword.h"
|
#include "keyword.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "read.h"
|
#include "read.h"
|
||||||
#include "vstring.h"
|
#include "vstring.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DATA DECLARATIONS
|
* DATA DECLARATIONS
|
||||||
*/
|
*/
|
||||||
typedef enum eException { ExceptionNone, ExceptionEOF } exception_t;
|
typedef enum eException { ExceptionNone, ExceptionEOF } exception_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
K_UNDEFINED = -1,
|
K_UNDEFINED = -1,
|
||||||
K_CONSTANT,
|
K_CONSTANT,
|
||||||
K_TYPE,
|
K_TYPE,
|
||||||
K_VARIABLE,
|
K_VARIABLE,
|
||||||
K_ATRIBUTE,
|
K_ATRIBUTE,
|
||||||
K_SIGNAL,
|
K_SIGNAL,
|
||||||
K_FUNCTION,
|
K_FUNCTION,
|
||||||
K_PROCEDURE,
|
K_PROCEDURE,
|
||||||
K_COMPONENT,
|
K_COMPONENT,
|
||||||
K_PACKAGE,
|
K_PACKAGE,
|
||||||
K_PROCESS,
|
K_PROCESS,
|
||||||
K_ENTITY,
|
K_ENTITY,
|
||||||
K_ARCHITECTURE,
|
K_ARCHITECTURE,
|
||||||
K_PORT
|
K_PORT
|
||||||
} vhdlKind;
|
} vhdlKind;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *keyword;
|
const char *keyword;
|
||||||
vhdlKind kind;
|
vhdlKind kind;
|
||||||
} keywordAssoc;
|
} keywordAssoc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DATA DEFINITIONS
|
* DATA DEFINITIONS
|
||||||
*/
|
*/
|
||||||
static int Ungetc;
|
static int Ungetc;
|
||||||
static int Lang_vhdl;
|
static int Lang_vhdl;
|
||||||
static jmp_buf Exception;
|
static jmp_buf Exception;
|
||||||
static vString* Name=NULL;
|
static vString* Name=NULL;
|
||||||
static vString* Lastname=NULL;
|
static vString* Lastname=NULL;
|
||||||
static vString* Keyword=NULL;
|
static vString* Keyword=NULL;
|
||||||
static vString* TagName=NULL;
|
static vString* TagName=NULL;
|
||||||
|
|
||||||
static kindOption VhdlKinds [] = {
|
static kindOption VhdlKinds [] = {
|
||||||
{ TRUE, 'c', "constant", "constants" },
|
{ TRUE, 'c', "constant", "constants" },
|
||||||
{ TRUE, 't', "type", "types" },
|
{ TRUE, 't', "type", "types" },
|
||||||
{ TRUE, 'v', "variable", "variables" },
|
{ TRUE, 'v', "variable", "variables" },
|
||||||
{ TRUE, 'a', "atribute", "atributes" },
|
{ TRUE, 'a', "atribute", "atributes" },
|
||||||
{ TRUE, 's', "signal", "signals" },
|
{ TRUE, 's', "signal", "signals" },
|
||||||
{ TRUE, 'f', "function", "functions" },
|
{ TRUE, 'f', "function", "functions" },
|
||||||
{ TRUE, 'p', "procedure", "procedure" },
|
{ TRUE, 'p', "procedure", "procedure" },
|
||||||
{ TRUE, 'k', "component", "components" },
|
{ TRUE, 'k', "component", "components" },
|
||||||
{ TRUE, 'l', "package", "packages" },
|
{ TRUE, 'l', "package", "packages" },
|
||||||
{ TRUE, 'm', "process", "process" },
|
{ TRUE, 'm', "process", "process" },
|
||||||
{ TRUE, 'n', "entity", "entity" },
|
{ TRUE, 'n', "entity", "entity" },
|
||||||
{ TRUE, 'o', "architecture", "architecture" },
|
{ TRUE, 'o', "architecture", "architecture" },
|
||||||
{ TRUE, 'u', "port", "ports" }
|
{ TRUE, 'u', "port", "ports" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static keywordAssoc VhdlKeywordTable [] = {
|
static keywordAssoc VhdlKeywordTable [] = {
|
||||||
{ "variable", K_VARIABLE },
|
{ "variable", K_VARIABLE },
|
||||||
{ "constant", K_CONSTANT },
|
{ "constant", K_CONSTANT },
|
||||||
{ "variable", K_VARIABLE },
|
{ "variable", K_VARIABLE },
|
||||||
{ "type", K_TYPE },
|
{ "type", K_TYPE },
|
||||||
{ "subtype", K_TYPE },
|
{ "subtype", K_TYPE },
|
||||||
{ "signal", K_SIGNAL },
|
{ "signal", K_SIGNAL },
|
||||||
{ "function", K_FUNCTION },
|
{ "function", K_FUNCTION },
|
||||||
{ "procedure", K_PROCEDURE },
|
{ "procedure", K_PROCEDURE },
|
||||||
{ "component", K_COMPONENT },
|
{ "component", K_COMPONENT },
|
||||||
{ "package", K_PACKAGE },
|
{ "package", K_PACKAGE },
|
||||||
{ "process", K_PROCESS },
|
{ "process", K_PROCESS },
|
||||||
{ "entity", K_ENTITY },
|
{ "entity", K_ENTITY },
|
||||||
{ "architecture", K_ARCHITECTURE },
|
{ "architecture", K_ARCHITECTURE },
|
||||||
{ "inout", K_PORT },
|
{ "inout", K_PORT },
|
||||||
{ "in", K_PORT },
|
{ "in", K_PORT },
|
||||||
{ "out", K_PORT }
|
{ "out", K_PORT }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION DEFINITIONS
|
* FUNCTION DEFINITIONS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void initialize (const langType language)
|
static void initialize (const langType language)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
const size_t count = sizeof (VhdlKeywordTable) /
|
const size_t count = sizeof (VhdlKeywordTable) /
|
||||||
sizeof (VhdlKeywordTable [0]);
|
sizeof (VhdlKeywordTable [0]);
|
||||||
Lang_vhdl = language;
|
Lang_vhdl = language;
|
||||||
for (i = 0 ; i < count ; ++i)
|
for (i = 0 ; i < count ; ++i)
|
||||||
{
|
{
|
||||||
const keywordAssoc* const p = &VhdlKeywordTable [i];
|
const keywordAssoc* const p = &VhdlKeywordTable [i];
|
||||||
addKeyword (p->keyword, language, (int) p->kind);
|
addKeyword (p->keyword, language, (int) p->kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vUngetc (int c)
|
static void vUngetc (int c)
|
||||||
{
|
{
|
||||||
Assert (Ungetc == '\0');
|
Assert (Ungetc == '\0');
|
||||||
Ungetc = c;
|
Ungetc = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vGetc (void)
|
static int vGetc (void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
if (Ungetc == '\0')
|
if (Ungetc == '\0')
|
||||||
c = fileGetc ();
|
c = fileGetc ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
c = Ungetc;
|
c = Ungetc;
|
||||||
Ungetc = '\0';
|
Ungetc = '\0';
|
||||||
}
|
}
|
||||||
if (c == '-')
|
if (c == '-')
|
||||||
{
|
{
|
||||||
int c2 = fileGetc ();
|
int c2 = fileGetc ();
|
||||||
if (c2 == EOF)
|
if (c2 == EOF)
|
||||||
longjmp (Exception, (int) ExceptionEOF);
|
longjmp (Exception, (int) ExceptionEOF);
|
||||||
else if (c2 == '-') /* strip comment until end-of-line */
|
else if (c2 == '-') /* strip comment until end-of-line */
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
c = fileGetc ();
|
c = fileGetc ();
|
||||||
while (c != '\n' && c != EOF);
|
while (c != '\n' && c != EOF);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ungetc = c2;
|
Ungetc = c2;
|
||||||
}
|
}
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
longjmp (Exception, (int) ExceptionEOF);
|
longjmp (Exception, (int) ExceptionEOF);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isIdentifierCharacter (const int c)
|
static boolean isIdentifierCharacter (const int c)
|
||||||
{
|
{
|
||||||
return (boolean)(isalnum (c) || c == '_' || c == '`');
|
return (boolean)(isalnum (c) || c == '_' || c == '`');
|
||||||
}
|
}
|
||||||
|
|
||||||
static int skipWhite (int c)
|
static int skipWhite (int c)
|
||||||
{
|
{
|
||||||
while (c==' ')
|
while (c==' ')
|
||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean readIdentifier (vString *const name, int c)
|
static boolean readIdentifier (vString *const name, int c)
|
||||||
{
|
{
|
||||||
vStringClear (name);
|
vStringClear (name);
|
||||||
if (isIdentifierCharacter (c))
|
if (isIdentifierCharacter (c))
|
||||||
{
|
{
|
||||||
while (isIdentifierCharacter (c))
|
while (isIdentifierCharacter (c))
|
||||||
{
|
{
|
||||||
vStringPut (name, c);
|
vStringPut (name, c);
|
||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
}
|
}
|
||||||
vUngetc (c);
|
vUngetc (c);
|
||||||
vStringTerminate (name);
|
vStringTerminate (name);
|
||||||
}
|
}
|
||||||
return (boolean)(name->length > 0);
|
return (boolean)(name->length > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tagNameList (const vhdlKind kind, int c)
|
static void tagNameList (const vhdlKind kind, int c)
|
||||||
{
|
{
|
||||||
Assert (isIdentifierCharacter (c));
|
Assert (isIdentifierCharacter (c));
|
||||||
if (isIdentifierCharacter (c))
|
if (isIdentifierCharacter (c))
|
||||||
{
|
{
|
||||||
readIdentifier (TagName, c);
|
readIdentifier (TagName, c);
|
||||||
makeSimpleTag (TagName, VhdlKinds, kind);
|
makeSimpleTag (TagName, VhdlKinds, kind);
|
||||||
vUngetc (c);
|
vUngetc (c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void findTag (vString *const name)
|
static void findTag (vString *const name)
|
||||||
{
|
{
|
||||||
int c = '\0';
|
int c = '\0';
|
||||||
vhdlKind kind;
|
vhdlKind kind;
|
||||||
vStringCopyToLower (Keyword, name);
|
vStringCopyToLower (Keyword, name);
|
||||||
kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
|
kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
|
||||||
if (kind == K_UNDEFINED)
|
if (kind == K_UNDEFINED)
|
||||||
{
|
{
|
||||||
c = skipWhite (vGetc ());
|
c = skipWhite (vGetc ());
|
||||||
vStringCopyS(Lastname,vStringValue(name));
|
vStringCopyS(Lastname,vStringValue(name));
|
||||||
if (c == ':')
|
if (c == ':')
|
||||||
{
|
{
|
||||||
c = skipWhite (vGetc ());
|
c = skipWhite (vGetc ());
|
||||||
if (isIdentifierCharacter (c))
|
if (isIdentifierCharacter (c))
|
||||||
{
|
{
|
||||||
readIdentifier (name, c);
|
readIdentifier (name, c);
|
||||||
vStringCopyToLower (Keyword, name);
|
vStringCopyToLower (Keyword, name);
|
||||||
lookupKeyword (vStringValue (Keyword), Lang_vhdl);
|
lookupKeyword (vStringValue (Keyword), Lang_vhdl);
|
||||||
kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
|
kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
|
||||||
if (kind == K_PROCESS || kind == K_PORT)
|
if (kind == K_PROCESS || kind == K_PORT)
|
||||||
{
|
{
|
||||||
makeSimpleTag (Lastname, VhdlKinds, kind);
|
makeSimpleTag (Lastname, VhdlKinds, kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vUngetc (c);
|
vUngetc (c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (kind == K_SIGNAL) {
|
if (kind == K_SIGNAL) {
|
||||||
while (c!=':') {
|
while (c!=':') {
|
||||||
c = skipWhite (vGetc ());
|
c = skipWhite (vGetc ());
|
||||||
if (c==',')
|
if (c==',')
|
||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
if (isIdentifierCharacter (c))
|
if (isIdentifierCharacter (c))
|
||||||
tagNameList (kind, c);
|
tagNameList (kind, c);
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (kind == K_PROCESS) {
|
else if (kind == K_PROCESS) {
|
||||||
vStringCopyS(TagName,"unnamed");
|
vStringCopyS(TagName,"unnamed");
|
||||||
makeSimpleTag (TagName, VhdlKinds, kind);
|
makeSimpleTag (TagName, VhdlKinds, kind);
|
||||||
} else {
|
} else {
|
||||||
c = skipWhite (vGetc ());
|
c = skipWhite (vGetc ());
|
||||||
if (c=='\"')
|
if (c=='\"')
|
||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
if (isIdentifierCharacter (c))
|
if (isIdentifierCharacter (c))
|
||||||
tagNameList (kind, c);
|
tagNameList (kind, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void findVhdlTags (void)
|
static void findVhdlTags (void)
|
||||||
{
|
{
|
||||||
volatile boolean newStatement = TRUE;
|
volatile boolean newStatement = TRUE;
|
||||||
volatile int c = '\0';
|
volatile int c = '\0';
|
||||||
exception_t exception = (exception_t) setjmp (Exception);
|
exception_t exception = (exception_t) setjmp (Exception);
|
||||||
Name = vStringNew ();
|
Name = vStringNew ();
|
||||||
Lastname = vStringNew ();
|
Lastname = vStringNew ();
|
||||||
Keyword = vStringNew ();
|
Keyword = vStringNew ();
|
||||||
TagName = vStringNew ();
|
TagName = vStringNew ();
|
||||||
|
|
||||||
if (exception == ExceptionNone) while (c != EOF)
|
if (exception == ExceptionNone) while (c != EOF)
|
||||||
{
|
{
|
||||||
c = vGetc ();
|
c = vGetc ();
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case ';':
|
case ';':
|
||||||
case '\n':
|
case '\n':
|
||||||
newStatement = TRUE;
|
newStatement = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ' ':
|
case ' ':
|
||||||
case '\t':
|
case '\t':
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (newStatement && readIdentifier (Name, c)) {
|
if (newStatement && readIdentifier (Name, c)) {
|
||||||
findTag (Name);
|
findTag (Name);
|
||||||
}
|
}
|
||||||
newStatement = FALSE;
|
newStatement = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vStringDelete (Name);
|
vStringDelete (Name);
|
||||||
vStringDelete (Lastname);
|
vStringDelete (Lastname);
|
||||||
vStringDelete (Keyword);
|
vStringDelete (Keyword);
|
||||||
vStringDelete (TagName);
|
vStringDelete (TagName);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern parserDefinition* VhdlParser (void)
|
extern parserDefinition* VhdlParser (void)
|
||||||
{
|
{
|
||||||
static const char *const extensions [] = { "vhdl", "vhd", NULL };
|
static const char *const extensions [] = { "vhdl", "vhd", NULL };
|
||||||
parserDefinition* def = parserNew ("Vhdl");
|
parserDefinition* def = parserNew ("Vhdl");
|
||||||
def->kinds = VhdlKinds;
|
def->kinds = VhdlKinds;
|
||||||
def->kindCount = KIND_COUNT (VhdlKinds);
|
def->kindCount = KIND_COUNT (VhdlKinds);
|
||||||
def->extensions = extensions;
|
def->extensions = extensions;
|
||||||
def->parser = findVhdlTags;
|
def->parser = findVhdlTags;
|
||||||
def->initialize = initialize;
|
def->initialize = initialize;
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vi:set tabstop=8 shiftwidth=4: */
|
/* vi:set tabstop=8 shiftwidth=4: */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user