# Auto-generated by EclipseNSIS Script Wizard # 20.11.2007 12:16:48 Name 5DLibs # Defines !define REGKEY "SOFTWARE\$(^Name)" !define VERSION 0.6.1 !define COMPANY "X" !define URL "" # MUI defines !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-colorful.ico" !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup !define MUI_STARTMENUPAGE_DEFAULTFOLDER 5D !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-colorful.ico" !define MUI_UNFINISHPAGE_NOAUTOCLOSE # Included files !include Sections.nsh !include MUI.nsh # Variables Var StartMenuGroup # Installer pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES # Installer languages !insertmacro MUI_LANGUAGE German # Installer attributes OutFile 5DLibs.exe InstallDir $PROGRAMFILES\5D\share CRCCheck on XPStyle on ShowInstDetails show VIProductVersion 0.1.0.0 VIAddVersionKey ProductName 5DLibs VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" VIAddVersionKey FileVersion "${VERSION}" VIAddVersionKey FileDescription "" VIAddVersionKey LegalCopyright "" InstallDirRegKey HKLM "${REGKEY}" Path ShowUninstDetails show # Installer sections Section -Main SEC0000 SetOutPath $INSTDIR\WIN32 SetOverwrite on File /x .svn /x *.zip /x *.sign /x *.DLL /x *.exe *.5D SetOutPath $INSTDIR\Time SetOverwrite on File /x .svn /x *.zip /x *.sign ..\Time\*.5D SetOutPath $INSTDIR\Socket SetOverwrite on File /x .svn /x *.zip /x *.sign ..\Socket\*.5D SetOutPath $INSTDIR\Reactor SetOverwrite on File /x .svn /x *.zip /x *.sign ..\Reactor\*.5D SetOutPath $INSTDIR\File SetOverwrite on File /x .svn /x *.zip /x *.sign ..\File\*.5D SetOutPath $INSTDIR\doc File /r /x .svn ..\doc\* WriteRegStr HKLM "${REGKEY}\Components" Main 1 SetOutPath $SMPROGRAMS\$StartMenuGroup CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name) WIN32 Reference.lnk" "$INSTDIR\doc\WIN32\index.html" "" "$INSTDIR\share\5D.ico" "" SW_SHOWNORMAL "" "5D" SectionEnd Section -post SEC0001 WriteRegStr HKLM "${REGKEY}" Path $INSTDIR WriteUninstaller $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetOutPath $SMPROGRAMS\$StartMenuGroup CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_END WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 SectionEnd # Macro for selecting uninstaller sections !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID Push $R0 ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}" StrCmp $R0 1 0 next${UNSECTION_ID} !insertmacro SelectSection "${UNSECTION_ID}" GoTo done${UNSECTION_ID} next${UNSECTION_ID}: !insertmacro UnselectSection "${UNSECTION_ID}" done${UNSECTION_ID}: Pop $R0 !macroend # Uninstaller sections Section /o -un.Main UNSEC0000 RmDir /r /REBOOTOK $INSTDIR\WIN32 RmDir /r /REBOOTOK $INSTDIR\doc DeleteRegValue HKLM "${REGKEY}\Components" Main SectionEnd Section -un.post UNSEC0001 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name) Library Reference.lnk" Delete /REBOOTOK $INSTDIR\uninstall.exe Delete /REBOOTOK $INSTDIR\WIN32 DeleteRegValue HKLM "${REGKEY}" StartMenuGroup DeleteRegValue HKLM "${REGKEY}" Path DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components" DeleteRegKey /IfEmpty HKLM "${REGKEY}" RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup RmDir /REBOOTOK $INSTDIR Push $R0 StrCpy $R0 $StartMenuGroup 1 StrCmp $R0 ">" no_smgroup no_smgroup: Pop $R0 SectionEnd # Installer functions Function .onInit InitPluginsDir FunctionEnd # Uninstaller functions Function un.onInit ReadRegStr $INSTDIR HKLM "${REGKEY}" Path !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup !insertmacro SELECT_UNSECTION Main ${UNSEC0000} FunctionEnd