2012-07-19 23:47:54 +00:00
# Auto-generated by EclipseNSIS Script Wizard
# 23-oct-2011 23:38:18
Name " UDS Actor "
# General Symbol Definitions
!define REGKEY " SOFTWARE\$(^Name) "
!define VERSION 1.0
!define COMPANY " Virtual Cable S.L. "
!define URL http : / /www .virtualcable.com
# MultiUser Symbol Definitions
!define MULTIUSER_EXECUTIONLEVEL Admin
!define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
!define MULTIUSER_INSTALLMODE_COMMANDLINE
!define MULTIUSER_INSTALLMODE_INSTDIR UDSActor
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY " ${REGKEY} "
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUE " Path "
# MUI Symbol Definitions
!define MUI_ICON " ${NSISDIR} \Contrib\Graphics\Icons\orange-install.ico "
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN $INSTDIR \ udsService.exe
!define MUI_FINISHPAGE_RUN_PARAMETERS - c
!define MUI_UNICON " ${NSISDIR} \Contrib\Graphics\Icons\orange-uninstall.ico "
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
!define MUI_LANGDLL_REGISTRY_ROOT HKLM
!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
!define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage
# Included files
!include MultiUser.nsh
!include Sections.nsh
!include MUI2.nsh
# Reserved Files
!insertmacro MUI_RESERVEFILE_LANGDLL
# Variables
Var StartMenuGroup
# Installer pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE license.txt
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
# Installer languages
!insertmacro MUI_LANGUAGE English
!insertmacro MUI_LANGUAGE Spanish
!insertmacro MUI_LANGUAGE French
!insertmacro MUI_LANGUAGE German
# Installer attributes
OutFile UDSActorSetup.exe
InstallDir UDSActor
CRCCheck on
XPStyle on
ShowInstDetails hide
VIProductVersion 1.0.0.0
VIAddVersionKey /LANG = ${LANG_ENGLISH} ProductName " UDS Actor "
VIAddVersionKey /LANG = ${LANG_ENGLISH} ProductVersion " ${VERSION} "
VIAddVersionKey /LANG = ${LANG_ENGLISH} CompanyName " ${COMPANY} "
VIAddVersionKey /LANG = ${LANG_ENGLISH} CompanyWebsite " ${URL} "
VIAddVersionKey /LANG = ${LANG_ENGLISH} FileVersion " ${VERSION} "
VIAddVersionKey /LANG = ${LANG_ENGLISH} FileDescription " "
VIAddVersionKey /LANG = ${LANG_ENGLISH} LegalCopyright " "
InstallDirRegKey HKLM " ${REGKEY} " Path
ShowUninstDetails show
# Installer sections
Section - Main SEC0000
SetOutPath $INSTDIR
SetOverwrite on
2012-07-31 11:33:51 +00:00
File ..\ udsService\ bin\ Release\ CookComputing.XmlRpcV2.dll
File ..\ udsService\ bin\ Release\ Interop.EventSystemLib.dll
File ..\ udsService\ bin\ Release\ Interop.SensEvents.dll
File ..\ udsService\ bin\ Release\ log4net.dll
File ..\ udsService\ bin\ Release\ udsgui.dll
File ..\ udsService\ bin\ Release\ logging.cfg
File ..\ udsService\ bin\ Release\ udsService.exe
File ..\ udsService\ bin\ Release\ udsService.exe.config
File ..\ udsService\ bin\ Release\ udstools.dll
2012-07-19 23:47:54 +00:00
SetOutPath $INSTDIR \ es
2012-07-31 11:33:51 +00:00
File ..\ udsService\ bin\ Release\ es\ udsgui.resources.dll
2012-07-19 23:47:54 +00:00
SetOutPath $INSTDIR \ fr
2012-07-31 11:33:51 +00:00
File ..\ udsService\ bin\ Release\ fr\ udsgui.resources.dll
2012-07-19 23:47:54 +00:00
SetOutPath $INSTDIR \ de
2012-07-31 11:33:51 +00:00
File ..\ udsService\ bin\ Release\ de\ udsgui.resources.dll
2012-07-19 23:47:54 +00:00
WriteRegStr HKLM " ${REGKEY}\Components " Main 1
SectionEnd
Section - post SEC0001
WriteRegStr HKLM " ${REGKEY} " Path $INSTDIR
SetOutPath $INSTDIR
WriteUninstaller $INSTDIR \ udsuninstall.exe
SetOutPath $SMPROGRAMS \ $StartMenu Group
CreateShortcut " $SMPROGRAMS \$StartMenuGroup\$(^UninstallLink).lnk " $INSTDIR \ udsuninstall.exe
CreateShortcut " $SMPROGRAMS \$StartMenuGroup\UDS Actor Configuration.lnk " $INSTDIR \ udsService.exe - c
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) " URLInfoAbout " ${URL} "
WriteRegStr HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) " DisplayIcon $INSTDIR \ udsuninstall.exe
WriteRegStr HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) " UninstallString $INSTDIR \ udsuninstall.exe
WriteRegDWORD HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) " NoModify 1
WriteRegDWORD HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) " NoRepair 1
nsExec :: Exec /OEM " $INSTDIR \udsService.exe -i " # Add service after installation
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
nsExec :: Exec /OEM " $INSTDIR \udsService.exe -u " # Removes the service prior uninstall :-)
Delete /REBOOTOK $INSTDIR \ es\ udsgui.resources.dll
Delete /REBOOTOK $INSTDIR \ fr\ udsgui.resources.dll
Delete /REBOOTOK $INSTDIR \ de\ udsgui.resources.dll
Delete /REBOOTOK $INSTDIR \ udstools.dll
Delete /REBOOTOK $INSTDIR \ udsService.exe.config
Delete /REBOOTOK $INSTDIR \ udsService.exe
Delete /REBOOTOK $INSTDIR \ udsgui.dll
Delete /REBOOTOK $INSTDIR \ logging.cfg
Delete /REBOOTOK $INSTDIR \ log4net.dll
Delete /REBOOTOK $INSTDIR \ Interop.SensEvents.dll
Delete /REBOOTOK $INSTDIR \ Interop.EventSystemLib.dll
Delete /REBOOTOK $INSTDIR \ CookComputing.XmlRpcV2.dll
DeleteRegValue HKLM " ${REGKEY}\Components " Main
SectionEnd
Section - un.post UNSEC0001
DeleteRegKey HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name) "
Delete /REBOOTOK " $SMPROGRAMS \$StartMenuGroup\$(^UninstallLink).lnk "
Delete /REBOOTOK $INSTDIR \ udsuninstall.exe
DeleteRegValue HKLM " ${REGKEY} " Path
DeleteRegKey /IfEmpty HKLM " ${REGKEY}\Components "
DeleteRegKey /IfEmpty HKLM " ${REGKEY} "
RmDir /REBOOTOK $SMPROGRAMS \ $StartMenu Group
RmDir /REBOOTOK $INSTDIR
SectionEnd
# Installer functions
Function .onInit
InitPluginsDir
StrCpy $StartMenu Group " Virtual Cable\UDS Actor "
ReadRegDWORD $0 HKLM " SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5 " SP
${if} $0 != 1
MessageBox MB_OK " $(^NoDotNet) "
Abort
${EndIf}
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro MULTIUSER_INIT
FunctionEnd
# Uninstaller functions
Function un.onInit
StrCpy $StartMenu Group " Virtual Cable\UDS Actor "
!insertmacro MUI_UNGETLANGUAGE
!insertmacro MULTIUSER_UNINIT
!insertmacro SELECT_UNSECTION Main ${UNSEC0000}
FunctionEnd
# Installer Language Strings
LangString ^ NoDotNet ${LANG_ENGLISH} " .NET 3.5 sp1 Required.$\nPlease, install it to proceed "
LangString ^ NoDotNet ${LANG_SPANISH} " Se requiere .NET 3.5 sp1.$\nPor favor, instalelo para proceder "
LangString ^ NoDotNet ${LANG_FRENCH} " .NET Framework 3.5 SP1 requis.$\nVeuillez, installez-le de proc<6F> der "
LangString ^ NoDotNet ${LANG_GERMAN} " Erforderlich ist. NET 3.5 sp1.$\nPor Bitte installieren Sie es, um fortzufahren "
LangString ^ UninstallLink ${LANG_ENGLISH} " Uninstall $(^Name) "
LangString ^ UninstallLink ${LANG_SPANISH} " Desinstalar $(^Name) "
LangString ^ UninstallLink ${LANG_FRENCH} " D<EFBFBD> sinstaller $(^Name) "
LangString ^ UninstallLink ${LANG_GERMAN} " deinstallieren $(^Name) "