; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "PHP-GTK" !define PRODUCT_VERSION "1.0.1" !define PRODUCT_PUBLISHER "Michel Weimerskirch" !define PRODUCT_WEB_SITE "http://michel.weimerskirch.net" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\php-cgi.exe" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !insertmacro MUI_PAGE_LICENSE "readme.txt" ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "php-gtk.exe" InstallDir "$PROGRAMFILES\PHP-GTK" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" ShowInstDetails show ShowUnInstDetails show Section "MainSection" SEC01 SetOutPath "$INSTDIR" SetOverwrite on File "php-gtk\php-cgi.exe" File "php-gtk\php_win.exe" File "php-gtk\php_gtk_sqpane.dll" File "php-gtk\php_gtk_spaned.dll" File "php-gtk\php_gtk_scrollpane.dll" File "php-gtk\php_gtk_scintilla.dll" File "php-gtk\php_gtk_libglade.dll" File "php-gtk\php_gtk_extra.dll" File "php-gtk\php_gtk_combobutton.dll" File "php-gtk\php_gtk.dll" File "php-gtk\php.ini-gtk" File "php-gtk\php.ini" File "php-gtk\php.exe" File "php-gtk\php4ts.dll" File "php-gtk\libxml2.dll" File "php-gtk\libgtk-0.dll" File "php-gtk\libgthread-2.0-0.dll" File "php-gtk\libgobject-2.0-0.dll" File "php-gtk\libgmodule-2.0-0.dll" File "php-gtk\libglib-2.0-0.dll" File "php-gtk\libglade.dll" File "php-gtk\libgdk-0.dll" File "php-gtk\intl.dll" File "php-gtk\iconv.dll" File "php-gtk\gtkextra.dll" File "php-gtk\php_gtk.exe" WriteRegStr HKCR ".php-gtk" "" "PHPGTK.Script" WriteRegStr HKCR "PHPGTK.Script" "" "PHP-GTK Script" WriteRegStr HKCR "PHPGTK.Script\shell\Open\Command" "" '$INSTDIR\php_gtk.exe "%1"' WriteRegStr HKCR "PHPGTK.Script\shell\Open With Console Window\Command" "" '$INSTDIR\php.exe "%1"' WriteRegStr HKCR "PHPGTK.Script\DefaultIcon" "" "$INSTDIR\php_gtk.exe,0" WriteINIStr "$INSTDIR\php.ini" "PHP" "extension_dir" '"$INSTDIR"' SectionEnd Section -AdditionalIcons CreateShortCut "$SMPROGRAMS\PHP-GTK\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\php-cgi.exe" 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}" "DisplayIcon" "$INSTDIR\php-cgi.exe" 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}" "Publisher" "${PRODUCT_PUBLISHER}" SectionEnd Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." FunctionEnd 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 Abort FunctionEnd Section Uninstall Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\gtkextra.dll" Delete "$INSTDIR\iconv.dll" Delete "$INSTDIR\intl.dll" Delete "$INSTDIR\libgdk-0.dll" Delete "$INSTDIR\libglade.dll" Delete "$INSTDIR\libglib-2.0-0.dll" Delete "$INSTDIR\libgmodule-2.0-0.dll" Delete "$INSTDIR\libgobject-2.0-0.dll" Delete "$INSTDIR\libgthread-2.0-0.dll" Delete "$INSTDIR\libgtk-0.dll" Delete "$INSTDIR\libxml2.dll" Delete "$INSTDIR\php4ts.dll" Delete "$INSTDIR\php.exe" Delete "$INSTDIR\php.ini" Delete "$INSTDIR\php.ini-gtk" Delete "$INSTDIR\php_gtk.dll" Delete "$INSTDIR\php_gtk_combobutton.dll" Delete "$INSTDIR\php_gtk_extra.dll" Delete "$INSTDIR\php_gtk_libglade.dll" Delete "$INSTDIR\php_gtk_scintilla.dll" Delete "$INSTDIR\php_gtk_scrollpane.dll" Delete "$INSTDIR\php_gtk_spaned.dll" Delete "$INSTDIR\php_gtk_sqpane.dll" Delete "$INSTDIR\php_win.exe" Delete "$INSTDIR\php-cgi.exe" Delete "$INSTDIR\php_gtk.exe" Delete "$SMPROGRAMS\PHP-GTK\Uninstall.lnk" Delete "$DESKTOP\PHP-GTK.lnk" Delete "$SMPROGRAMS\PHP-GTK\PHP-GTK.lnk" RMDir "$SMPROGRAMS\PHP-GTK" RMDir "$INSTDIR" DeleteRegKey HKCR ".php-gtk" DeleteRegKey HKCR "PHPGTK.Script" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" SetAutoClose true SectionEnd