Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetCompressor /FINAL lzma
- ;--------------------------------
- ; Version number and other information.
- !define VERSION '11.0.0'
- !define COPYRIGHT_YEAR '1999-2012'
- ;--------------------------------
- ;Include Modern UI
- !define MUI_ABORTWARNING
- !include MUI2.nsh
- !include LogicLib.nsh
- !include DotNetVer.nsh
- ;--------------------------------
- ; The name of the installer
- Name "Zeta Producer ${VERSION}"
- OutFile "..\Master\zp11-setup.exe"
- ; The default installation directory
- InstallDir "$LOCALAPPDATA\Zeta Producer 11"
- ; Request application privileges for Windows Vista
- RequestExecutionLevel user
- BrandingText " "
- ;--------------------------------
- ;Interface Settings
- ; See http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html.
- !define MUI_ICON "box_software.ico"
- !define MUI_UNICON "box_software.ico"
- ; http://ontopreplica.codeplex.com/SourceControl/changeset/view/a65fdbb263dd#Installer%2fscript.nsi
- !define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\ZetaProducer11"
- ;--------------------------------
- ;Pages
- ; http://nsis.sourceforge.net/Adding_3_Extra_Text_Lines_on_MUI_Welcome-Finish_Pages
- ; http://forums.winamp.com/showthread.php?postid=2243980
- !define MUI_FINISHPAGE_TITLE_3LINES
- !define MUI_WELCOMEPAGE_TITLE_3LINES
- !define MUI_WELCOMEFINISHPAGE_BITMAP "start-exit.bmp"
- !define MUI_WELCOMEPAGE_TITLE $(mui_welcomepage_title)
- !define MUI_WELCOMEPAGE_TEXT $(mui_welcomepage_text)
- !insertmacro MUI_PAGE_WELCOME
- ;!insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
- ; http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html
- !define MUI_FINISHPAGE_RUN "$INSTDIR\Applications\producer.exe"
- !define MUI_FINISHPAGE_RUN_TEXT $(mui_finishpage_run_text)
- !define MUI_FINISHPAGE_TITLE $(mui_finishpage_title)
- !define MUI_FINISHPAGE_TEXT $(mui_finishpage_text)
- !insertmacro MUI_PAGE_FINISH
- !define MUI_FINISHPAGE_TITLE_3LINES
- !define MUI_WELCOMEPAGE_TITLE_3LINES
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
- ;--------------------------------
- ; Languages. AFTER THE PAGES!
- !insertmacro MUI_LANGUAGE "English"
- !insertmacro MUI_LANGUAGE "German"
- ;--------------------------------
- ; Language strings.
- ; Also see http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html
- LangString mui_welcomepage_title ${LANG_ENGLISH} "Install Zeta Producer 11"
- LangString mui_welcomepage_title ${LANG_GERMAN} "Zeta Producer 11 installieren"
- LangString mui_welcomepage_text ${LANG_ENGLISH} "With Zeta Producer 11 you built your professional looking website in minutes.$\r$\n$\r$\n$\r$\n$\r$\nTo start click the 'Install' button."
- LangString mui_welcomepage_text ${LANG_GERMAN} "Mit Zeta Producer 11 erstellen Sie Ihre eigene professionelle Website in wenigen Minuten.$\r$\n$\r$\n$\r$\n$\r$\nKlicken Sie zum Start auf 'Installieren'."
- LangString mui_finishpage_run_text ${LANG_ENGLISH} "Start Zeta Producer 11 now"
- LangString mui_finishpage_run_text ${LANG_GERMAN} "Zeta Producer 11 jetzt starten"
- LangString mui_finishpage_title ${LANG_ENGLISH} "Zeta Producer 11 successfully installed"
- LangString mui_finishpage_title ${LANG_GERMAN} "Zeta Producer 11 wurde erfolgreich installiert"
- LangString mui_finishpage_text ${LANG_ENGLISH} " "
- LangString mui_finishpage_text ${LANG_GERMAN} " "
- LangString shortcut_uninstall_text ${LANG_ENGLISH} "Uninstall Zeta Producer 11"
- LangString shortcut_uninstall_text ${LANG_GERMAN} "Zeta Producer 11 deinstallieren"
- LangString shortcut_web_text ${LANG_ENGLISH} "Zeta Producer 11 on the web"
- LangString shortcut_web_text ${LANG_GERMAN} "Zeta Producer 11 im Internet"
- LangString shortcut_tv_text ${LANG_ENGLISH} "Remote support"
- LangString shortcut_tv_text ${LANG_GERMAN} "Fernwartungs-Support"
- LangString shortcut_mdacrepair_text ${LANG_ENGLISH} "MDAC repair"
- LangString shortcut_mdacrepair_text ${LANG_GERMAN} "MDAC reparieren"
- LangString shortcut_tv_exe ${LANG_ENGLISH} "tv_qs_en.exe"
- LangString shortcut_tv_exe ${LANG_GERMAN} "tv_qs_de.exe"
- LangString mui_uninstall_text ${LANG_ENGLISH} "You are about to install Zeta Producer 11, version ${VERSION}.$\n$\nThe previous version $R1 is already installed. $\n$\nClick 'OK' to remove the previous version or 'Cancel' to cancel this upgrade."
- LangString mui_uninstall_text ${LANG_GERMAN} "Sie sind dabei Zeta Producer 11, Version ${VERSION} zu installieren.$\n$\nDie vorherige Version $R1 ist bereits installiert. $\n$\nKlicken Sie 'OK' um die vorherige Version zu entfernen oder 'Abbrechen' um die Installation abzubrechen."
- LangString mui_uninstall_text2 ${LANG_ENGLISH} "Zeta Producer 11 ${VERSION} (remove only)"
- LangString mui_uninstall_text2 ${LANG_GERMAN} "Zeta Producer 11 ${VERSION} (nur entfernen)"
- LangString uac_error_1 ${LANG_ENGLISH} "Unable to elevate. Error $0."
- LangString uac_error_1 ${LANG_GERMAN} "Benutzerkontenwechsel ist fehlgeschlagen. Fehler $0."
- LangString uac_error_2 ${LANG_ENGLISH} "This installer requires admin access. Aborting operation."
- LangString uac_error_2 ${LANG_GERMAN} "Diese Installation benötigt Administrator-Berechtigungen. Vorgang wird abgebrochen."
- LangString uac_error_3 ${LANG_ENGLISH} "This installer requires admin access. Please try again."
- LangString uac_error_3 ${LANG_GERMAN} "Diese Installation benötigt Administrator-Berechtigungen. Bitte versuchen Sie es erneut."
- LangString net_4_setup_failed_message ${LANG_ENGLISH} "Zeta Producer requires Microsoft .NET Framework 2 or 4. This software is not installed (completely) on your system. Please activate your internet connection repeat the installation of Zeta Producer."
- LangString net_4_setup_failed_message ${LANG_GERMAN} "Zeta Producer benötigt das Microsoft .NET Framework 2 oder 4. Dieses ist auf Ihrem System nicht (vollständig) installiert. Bitte aktivieren Sie Ihre Internetverbindung und wiederholen Sie die Installation von Zeta Producer."
- ; --------------------------------
- ; Version Information
- VIProductVersion "${VERSION}.0"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Zeta Producer 11"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "Zeta Producer 11 - Powerful and easy website creation for everyone"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Zeta Software GmbH"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Zeta Producer 11, developed by Zeta Software GmbH"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © ${COPYRIGHT_YEAR} Zeta Software GmbH"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Zeta Producer 11"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
- VIAddVersionKey /LANG=${LANG_GERMAN} "ProductName" "Zeta Producer 11"
- VIAddVersionKey /LANG=${LANG_GERMAN} "Comments" "Zeta Producer 11 - Professionelle Websites selbst erstellen"
- VIAddVersionKey /LANG=${LANG_GERMAN} "CompanyName" "Zeta Software GmbH"
- VIAddVersionKey /LANG=${LANG_GERMAN} "LegalTrademarks" "Zeta Producer 11, entwickelt von Zeta Software GmbH"
- VIAddVersionKey /LANG=${LANG_GERMAN} "LegalCopyright" "Copyright © ${COPYRIGHT_YEAR} Zeta Software GmbH"
- VIAddVersionKey /LANG=${LANG_GERMAN} "FileDescription" "Zeta Producer 11"
- VIAddVersionKey /LANG=${LANG_GERMAN} "FileVersion" "${VERSION}"
- ;--------------------------------
- ;;Function StartEndApp
- ;; Exec "$INSTDIR\Applications\producer.exe"
- ;;FunctionEnd
- ; http://nsis.sourceforge.net/UAC_plug-in
- Function MyFinishFunction
- ;;; UAC::Exec "$INSTDIR\Applications\producer.exe"
- ;; !insertmacro UAC.CallFunctionAsUser StartEndApp
- FunctionEnd
- ;--------------------------------
- Function .onInit
- ; UAC_Elevate:
- ; UAC::RunElevated
- ; StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
- ; StrCmp 0 $0 0 UAC_Err ; Error?
- ; StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
- ; Quit
- ;
- ; UAC_Err:
- ; MessageBox mb_iconstop "$(uac_error_1)"
- ; Abort
- ;
- ; UAC_ElevationAborted:
- ; # elevation was aborted, run as normal?
- ; MessageBox mb_iconstop "$(uac_error_2)"
- ; Abort
- ;
- ; UAC_Success:
- ; StrCmp 1 $3 +4 ;Admin?
- ; StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
- ; MessageBox mb_iconstop "$(uac_error_3)"
- ; goto UAC_Elevate
- ;;;;;; !insertmacro MUI_LANGDLL_DISPLAY
- ReadRegStr $R0 HKCU "${REG_UNINSTALL}" "UninstallString"
- StrCmp $R0 "" done
- ReadRegStr $R1 HKCU "${REG_UNINSTALL}" "DisplayVersion"
- MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
- "$(mui_uninstall_text)" \
- IDOK uninst
- Abort
- ;Run the uninstaller
- uninst:
- ClearErrors
- ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
- IfErrors no_remove_uninstaller
- ;You can either use Delete /REBOOTOK in the uninstaller or add some code
- ;here to remove the uninstaller. Use a registry key to check
- ;whether the user has chosen to uninstall. If you are using an uninstaller
- ;components page, make sure all sections are uninstalled.
- no_remove_uninstaller:
- done:
- FunctionEnd
- ;--------------------------------
- Function .onInstSuccess
- ; For fixing Kaspersky's VBScript hijack.
- ExecWait 'regsvr32 /s "vbscript.dll"'
- ;UAC::Unload
- FunctionEnd
- Function .onInstFailed
- ;UAC::Unload
- FunctionEnd
- ;Function .onUserAbort
- ; UAC::Unload
- ;FunctionEnd
- ;--------------------------------
- ; The stuff to install
- Section "All files"
- SetOutPath "$INSTDIR"
- File "dotNetFx40_Full_setup.exe"
- ; Need .NET 2 or .NET 4.
- ${If} ${HasDotNet4.0}
- ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 0
- ExecWait "$INSTDIR\dotNetFx40_Full_setup.exe" $0
- ${If} $0 != 0
- MessageBox MB_OK|MB_ICONEXCLAMATION $(net_4_setup_failed_message)
- Quit
- ${EndIf}
- ${EndIf}
- ${Else}
- ${If} ${HasDotNet2.0}
- ${If} ${DOTNETVER_2_0} AtLeastDotNetServicePack 1
- ; Do nothing, everything required is present.
- ${Else}
- ExecWait "$INSTDIR\dotNetFx40_Full_setup.exe" $0
- ${If} $0 != 0
- MessageBox MB_OK|MB_ICONEXCLAMATION $(net_4_setup_failed_message)
- Quit
- ${EndIf}
- ${EndIf}
- ${Else}
- ExecWait "$INSTDIR\dotNetFx40_Full_setup.exe" $0
- ${If} $0 != 0
- MessageBox MB_OK|MB_ICONEXCLAMATION $(net_4_setup_failed_message)
- Quit
- ${EndIf}
- ${EndIf}
- ${EndIf}
- Delete "$INSTDIR\dotNetFx40_Full_setup.exe"
- ; Store installation folder
- WriteRegStr HKCU "Software\Zeta Producer 11" "" $INSTDIR
- ; ----
- ; Write uninstall strings.
- WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayIcon" '"$INSTDIR\Applications\producer.exe"'
- WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayName" "$(mui_uninstall_text2)"
- WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayVersion" "${VERSION}"
- WriteRegStr HKCU "${REG_UNINSTALL}" "InstallLocation" '"$INSTDIR"'
- WriteRegStr HKCU "${REG_UNINSTALL}" "UninstallString" '"$INSTDIR\uninstall.exe"'
- WriteRegStr HKCU "${REG_UNINSTALL}" "Publisher" "Zeta Software GmbH"
- WriteRegStr HKCU "${REG_UNINSTALL}" "URLInfoAbout" "http://www.zeta-producer.com"
- WriteRegStr HKCU "${REG_UNINSTALL}" "HelpLink" "http://www.zeta-producer.com"
- WriteRegDWord HKCU "${REG_UNINSTALL}" "NoModify" 1
- WriteRegDWord HKCU "${REG_UNINSTALL}" "NoRepair" 1
- ; ----
- ; Main files. But only those who are not written to.
- ; See "File" command documationation at:
- ; http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.5
- SetOutPath "$INSTDIR"
- File /r /x ".svn" /x "*.pdb" /x "*.lnk" "..\Origin\*.*"
- ; Files that come completely from the web design departement.
- SetOutPath "$INSTDIR\Packaging"
- File /r /x ".svn" ".\Temporary\Packaging\*.*"
- ; Icons for links.
- SetOutPath "$INSTDIR"
- File /x ".svn" "earth.ico"
- ; ----
- ; Create uninstaller. KEEP AT LAST POSITION!
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- SectionEnd
- ;--------------------------------
- ; Uninstaller Section
- Function un.onInit
- ; UAC_Elevate:
- ; UAC::RunElevated
- ; StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
- ; StrCmp 0 $0 0 UAC_Err ; Error?
- ; StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
- ; Quit
- ;
- ; UAC_Err:
- ; MessageBox mb_iconstop "$(uac_error_1)"
- ; Abort
- ;
- ; UAC_ElevationAborted:
- ; # elevation was aborted, run as normal?
- ; MessageBox mb_iconstop "$(uac_error_2)"
- ; Abort
- ;
- ; UAC_Success:
- ; StrCmp 1 $3 +4 ;Admin?
- ; StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
- ; MessageBox mb_iconstop "$(uac_error_3)"
- ; goto UAC_Elevate
- FunctionEnd
- Function un.OnUnInstSuccess
- ; UAC::Unload
- FunctionEnd
- Function un.OnUnInstFailed
- ; UAC::Unload
- FunctionEnd
- ;--------------------------------
- Section "Uninstall"
- ; Files.
- RMDir /r "$INSTDIR"
- SetShellVarContext current
- ; Links.
- RMDir /r "$SMPROGRAMS\Zeta Producer 11"
- Delete "$SMPROGRAMS\ZetaProducer11.lnk"
- Delete "$SMPROGRAMS\Zeta Producer 11.lnk"
- Delete "$DESKTOP\ZetaProducer11.lnk"
- Delete "$DESKTOP\Zeta Producer 11.lnk"
- ; Registry.
- DeleteRegKey HKCU "${REG_UNINSTALL}"
- DeleteRegKey /ifempty HKCU "Software\Zeta Producer 11"
- ; Uninstall itself.
- Delete "$INSTDIR\Uninstall.exe"
- SectionEnd
- ;--------------------------------
- ; Optional section (can be disabled by the user)
- Section "Start Menu Shortcuts"
- SetShellVarContext current
- CreateDirectory "$SMPROGRAMS\Zeta Producer 11"
- CreateShortCut "$SMPROGRAMS\Zeta Producer 11\Desktop CMS Zeta Producer 11.lnk" "$INSTDIR\Applications\producer.exe"
- CreateShortCut "$SMPROGRAMS\Zeta Producer 11\$(shortcut_web_text).lnk" "http://www.zeta-producer.com" "" "$INSTDIR\earth.ico" 0
- CreateShortCut "$SMPROGRAMS\Zeta Producer 11\$(shortcut_tv_text).lnk" "$INSTDIR\Applications\$(shortcut_tv_exe)"
- CreateShortCut "$SMPROGRAMS\Zeta Producer 11.lnk" "$INSTDIR\Applications\producer.exe"
- CreateShortCut "$DESKTOP\Zeta Producer 11.lnk" "$INSTDIR\Applications\producer.exe"
- CreateShortCut "$SMPROGRAMS\Zeta Producer 11\$(shortcut_mdacrepair_text).lnk" "http://zeta.li/mdac-repair" "" "$INSTDIR\earth.ico" 0
- SectionEnd
- ;--------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement