home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / tweakfx / tweakfx_setup.exe / tweakfx.nsi < prev    next >
Text File  |  2004-09-21  |  4KB  |  127 lines

  1.  
  2. ; HM NIS Edit Wizard helper defines
  3. !define PRODUCT_NAME "Tweak FX"
  4. !define PRODUCT_VERSION "6.00"
  5. !define PRODUCT_ICON "\ico\tweakfx.ico"
  6. !define PRODUCT_PUBLISHER "George Smilianov"
  7. !define PRODUCT_WEB_SITE "http://www.smilianov.net"
  8. !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\makensis.exe"
  9. !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
  10. !define PRODUCT_UNINST_ROOT_KEY "HKLM"
  11.  
  12. !include "MUI.nsh"
  13.  
  14. ; MUI Settings
  15. !define MUI_ABORTWARNING
  16.  
  17. ; Welcome page
  18. !insertmacro MUI_PAGE_WELCOME
  19. ; License page
  20. !insertmacro MUI_PAGE_LICENSE "docs/license.txt"
  21. ; Directory page
  22. !insertmacro MUI_PAGE_DIRECTORY
  23. ; Instfiles page
  24. !insertmacro MUI_PAGE_INSTFILES
  25. ; Finish page
  26. !insertmacro MUI_PAGE_FINISH
  27.  
  28. ; Uninstaller pages
  29. !insertmacro MUI_UNPAGE_INSTFILES
  30. !insertmacro MUI_UNPAGE_FINISH
  31.  
  32. ; Language files
  33. !insertmacro MUI_LANGUAGE "English"
  34.  
  35. ; MUI end ------
  36.  
  37. Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
  38. OutFile "tweakfx_setup.exe"
  39. InstallDir "$PROGRAMFILES\Tweak FX"
  40. InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
  41. ShowInstDetails show
  42. ShowUnInstDetails show
  43.  
  44. Section "MainSection" SEC01
  45.   SetOverwrite ifnewer
  46.  
  47.   SetOutPath "$INSTDIR"
  48.   File *.*
  49.   
  50.   SetOutPath "$INSTDIR\docs"
  51.   File /r docs\*.*
  52.  
  53.   SetOutPath "$INSTDIR\html"
  54.   File /r html\*.*
  55.  
  56.   SetOutPath "$INSTDIR\ico"
  57.   File /r ico\*.*
  58.   
  59.   SetOutPath "$INSTDIR\misc"
  60.   File /r misc\*.*
  61.   
  62.   SetOutPath "$INSTDIR\plugins"
  63.   File /r plugins\*.*
  64.  
  65.   SetOutPath "$INSTDIR\source"
  66.   File /r source\*.*
  67.  
  68.   CreateShortCut "$DESKTOP\Tweak FX.lnk" "$INSTDIR\TFX.exe"
  69.   CreateDirectory "$SMPROGRAMS\Tweak FX"
  70.   CreateShortCut "$SMPROGRAMS\Tweak FX\Tweak FX.lnk" "$INSTDIR\TFX.exe"
  71.   CreateShortCut "$SMPROGRAMS\Tweak FX\Readme.lnk" "$INSTDIR\docs\readme.htm"
  72.   CreateShortCut "$SMPROGRAMS\Tweak FX\License.lnk" "$INSTDIR\docs\license.txt"
  73.   CreateShortCut "$SMPROGRAMS\Tweak FX\Tweak FX Folder.lnk" "$INSTDIR"
  74.   CreateShortCut "$SMPROGRAMS\Tweak FX\Uninstall.lnk" "$INSTDIR\uninst.exe"
  75.   
  76.   Exec 'regsvr32.exe /s "$INSTDIR\TABCTL32.OCX"'
  77.   Exec 'regsvr32.exe /s "$INSTDIR\INIControls.ocx"'
  78.   Exec 'regsvr32.exe /s "$INSTDIR\FileSrch.ocx"'
  79.  
  80.   SetAutoClose false
  81. SectionEnd
  82.  
  83. Section -Post
  84.   WriteUninstaller "$INSTDIR\uninst.exe"
  85.   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\makensis.exe"
  86.   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
  87.   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
  88.   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "${PRODUCT_ICON}"
  89.   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
  90.   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  91.   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
  92. SectionEnd
  93.  
  94.  
  95. Function un.onInit
  96.   MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2  "Are you sure you want to completely remove Tweak FX and all of its components?" IDYES +2
  97.   Abort
  98. FunctionEnd
  99.  
  100. Section Uninstall
  101.   Exec 'regsvr32.exe /s /u "$INSTDIR\TABCTL32.OCX"'
  102.   Exec 'regsvr32.exe /s /u "$INSTDIR\INIControls.ocx"'
  103.   Exec 'regsvr32.exe /s /u "$INSTDIR\FileSrch.ocx"'
  104.   
  105.   Delete "$SMPROGRAMS\Tweak FX\Uninstall.lnk"
  106.   Delete "$SMPROGRAMS\Tweak FX\Tweak FX Folder.lnk"
  107.   Delete "$SMPROGRAMS\Tweak FX\Readme.lnk"
  108.   Delete "$SMPROGRAMS\Tweak FX\License.lnk"
  109.   Delete "$SMPROGRAMS\Tweak FX\Tweak FX.lnk"
  110.   Delete "$SMPROGRAMS\Tweak FX"
  111.     
  112.   Delete "$DESKTOP\Tweak FX.lnk"
  113.  
  114.   RMDir "$SMPROGRAMS\Tweak FX"
  115.     
  116.   RMDir /r "$INSTDIR"
  117.  
  118.   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  119.   DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  120.   
  121.   Exec 'regsvr32.exe /s "$SYSDIR\TABCTL32.OCX"'
  122.   Exec 'regsvr32.exe /s "$SYSDIR\INIControls.ocx"'
  123.   Exec 'regsvr32.exe /s "$SYSDIR\FileSrch.ocx"'
  124.   
  125.   SetAutoClose false
  126. SectionEnd
  127.