From: <che...@us...> - 2008-04-03 01:19:03
|
Revision: 1586 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1586&view=rev Author: chef_koch Date: 2008-04-02 18:18:53 -0700 (Wed, 02 Apr 2008) Log Message: ----------- reverted last change, was stupid and did not really thought about it, soory :( Modified Paths: -------------- trunk/plugins/IR Server Suite/Build Deploy Release.bat Added Paths: ----------- trunk/plugins/IR Server Suite/IR Server Suite.nsi.old trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh trunk/plugins/IR Server Suite/setup-languages.nsh trunk/plugins/IR Server Suite/setup.nsi Removed Paths: ------------- trunk/plugins/IR Server Suite/setup/ Modified: trunk/plugins/IR Server Suite/Build Deploy Release.bat =================================================================== --- trunk/plugins/IR Server Suite/Build Deploy Release.bat 2008-04-03 01:12:48 UTC (rev 1585) +++ trunk/plugins/IR Server Suite/Build Deploy Release.bat 2008-04-03 01:18:53 UTC (rev 1586) @@ -2,7 +2,7 @@ "%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\devenv.com" /rebuild Release "IR Server Suite.sln" -"%ProgramFiles%\NSIS\makensis.exe" setup\setup.nsi +"%ProgramFiles%\NSIS\makensis.exe" setup.nsi EXIT Copied: trunk/plugins/IR Server Suite/IR Server Suite.nsi.old (from rev 1585, trunk/plugins/IR Server Suite/setup/IR Server Suite.nsi.old) =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite.nsi.old (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Suite.nsi.old 2008-04-03 01:18:53 UTC (rev 1586) @@ -0,0 +1,996 @@ +;====================================== +; IR Server Suite.nsi +; +; (C) Copyright Aaron Dinnage, 2008 +;====================================== +!define DEBUG + +!ifdef DEBUG + !define BuildType "Debug" +!else + !define BuildType "Release" +!endif + +!include "x64.nsh" +!include "MUI.nsh" + +!define PRODUCT_NAME "IR Server Suite" +!define PRODUCT_VERSION "1.0.4.2" +!define PRODUCT_PUBLISHER "and-81" +!define PRODUCT_WEB_SITE "http://forum.team-mediaportal.com/mce_replacement_plugin-f165.html" + +Name "${PRODUCT_NAME}" +OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" +InstallDir "" +!ifdef DEBUG + ShowInstDetails show + ShowUninstDetails show +!else + ShowInstDetails hide + ShowUninstDetails hide +!endif +BrandingText "${PRODUCT_NAME} by Aaron Dinnage" +SetCompressor /SOLID /FINAL lzma +CRCCheck On + +; Variables +var DIR_INSTALL +var DIR_MEDIAPORTAL +var DIR_TVSERVER + +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" +!insertmacro MUI_PAGE_COMPONENTS + +; Main app install path +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp +!insertmacro MUI_PAGE_DIRECTORY + +; MediaPortal install path +!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreMP +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowMP +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveMP +!insertmacro MUI_PAGE_DIRECTORY + +; TV Server install path +!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreTV +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowTV +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveTV +!insertmacro MUI_PAGE_DIRECTORY + +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_INSTFILES + +!insertmacro MUI_LANGUAGE "English" + +;====================================== +;====================================== + +!macro initRegKeys + ${If} ${RunningX64} + + SetRegView 64 + + ${DisableX64FSRedirection} + + ; Get IR Server Suite installation directory ... + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ; Get MediaPortal installation directory ... + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\Team MediaPortal\MediaPortal" "ApplicationDir" + + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ${Endif} + + ; Get MediaPortal TV Server installation directory ... + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + + ReadRegStr $DIR_TVSERVER HKLM "Software\Team MediaPortal\MediaPortal TV Server" "InstallPath" + + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + + ${Endif} + + ${EnableX64FSRedirection} + + ${Else} + + SetRegView 32 + + ; Get IR Server Suite installation directory ... + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ; Get MediaPortal installation directory ... + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\Team MediaPortal\MediaPortal" "ApplicationDir" + + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ${Endif} + + ; Get MediaPortal TV Server installation directory ... + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + + ReadRegStr $DIR_TVSERVER HKLM "Software\Team MediaPortal\MediaPortal TV Server" "InstallPath" + + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + + ${Endif} + + ${Endif} +!macroend + +;====================================== +;====================================== + +Function .onInit + +!insertmacro initRegKeys + +FunctionEnd + +;====================================== + +Function .onInstSuccess + + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StartInputService SkipStartInputService + +StartInputService: + Exec '"$DIR_INSTALL\Input Service\Input Service.exe" /start' + +SkipStartInputService: + +FunctionEnd + +;====================================== + +Function DirectoryPreMP + SectionGetFlags 3 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP + + SectionGetFlags 4 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP + + SectionGetFlags 5 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP + + Abort + +EndDirectoryPreMP: +FunctionEnd + +;====================================== + +Function DirectoryPreTV + SectionGetFlags 6 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreTV + + Abort + +EndDirectoryPreTV: +FunctionEnd + +;====================================== + +Function DirectoryShowApp + !insertmacro MUI_HEADER_TEXT "Choose ${PRODUCT_NAME} Location" "Choose the folder in which to install ${PRODUCT_NAME}." + !insertmacro MUI_INNERDIALOG_TEXT 1041 "${PRODUCT_NAME} Folder" + !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_INSTALL" + !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." +FunctionEnd + +;====================================== + +Function DirectoryShowMP + !insertmacro MUI_HEADER_TEXT "Choose MediaPortal Location" "Choose the folder in which to install MediaPortal plugins." + !insertmacro MUI_INNERDIALOG_TEXT 1041 "MediaPortal Folder" + !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_MEDIAPORTAL" + !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." +FunctionEnd + +;====================================== + +Function DirectoryShowTV + !insertmacro MUI_HEADER_TEXT "Choose TV Server Location" "Choose the folder in which to install TV Server plugins." + !insertmacro MUI_INNERDIALOG_TEXT 1041 "TV Server Folder" + !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_TVSERVER" + !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install TV Server plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." +FunctionEnd + +;====================================== + +Function DirectoryLeaveApp + StrCpy $DIR_INSTALL $INSTDIR +FunctionEnd + +;====================================== + +Function DirectoryLeaveMP + StrCpy $DIR_MEDIAPORTAL $INSTDIR +FunctionEnd + +;====================================== + +Function DirectoryLeaveTV + StrCpy $DIR_TVSERVER $INSTDIR +FunctionEnd + +;====================================== + +!define LVM_GETITEMCOUNT 0x1004 +!define LVM_GETITEMTEXT 0x102D + +Function DumpLog + Exch $5 + Push $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $6 + + FindWindow $0 "#32770" "" $HWNDPARENT + GetDlgItem $0 $0 1016 + StrCmp $0 0 exit + FileOpen $5 $5 "w" + StrCmp $5 "" exit + SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6 + System::Alloc ${NSIS_MAX_STRLEN} + Pop $3 + StrCpy $2 0 + System::Call "*(i, i, i, i, i, i, i, i, i) i \ + (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1" + loop: StrCmp $2 $6 done + System::Call "User32::SendMessageA(i, i, i, i) i \ + ($0, ${LVM_GETITEMTEXT}, $2, r1)" + System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)" + FileWrite $5 "$4$\r$\n" + IntOp $2 $2 + 1 + Goto loop + done: + FileClose $5 + System::Free $1 + System::Free $3 + exit: + Pop $6 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 + Exch $5 +FunctionEnd + +;====================================== +;====================================== + +Section "-Prepare" + + DetailPrint "Preparing to install ..." + + ; Use the all users context + SetShellVarContext all + + ; Kill running Programs + DetailPrint "Terminating processes ..." + ExecWait '"taskkill" /F /IM Translator.exe' + ExecWait '"taskkill" /F /IM TrayLauncher.exe' + ExecWait '"taskkill" /F /IM WebRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' + ExecWait '"taskkill" /F /IM IRFileTool.exe' + ExecWait '"taskkill" /F /IM DebugClient.exe' + ExecWait '"taskkill" /F /IM KeyboardInputRelay.exe' + + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StopInputService SkipStopInputService + +StopInputService: + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /stop' + +SkipStopInputService: + Sleep 100 + +SectionEnd + +;====================================== + +Section "-Core" + + DetailPrint "Setting up paths and installing core files ..." + + ; Use the all users context + SetShellVarContext all + + ; Create install directory + CreateDirectory "$DIR_INSTALL" + + ; Write the installation paths into the registry + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "Install_Dir" "$DIR_INSTALL" + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" "$DIR_MEDIAPORTAL" + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" "$DIR_TVSERVER" + + ; Write documentation +!ifdef DEBUG + DetailPrint "Warning: Documentation is not included in debug builds" +!else + SetOutPath "$DIR_INSTALL" + SetOverwrite ifnewer + File "Documentation\${PRODUCT_NAME}.chm" +!endif + + ; Create app data directories + CreateDirectory "$APPDATA\${PRODUCT_NAME}" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Logs" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR Commands" + + ; Copy known set top boxes + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" + SetOutPath "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" + SetOverwrite ifnewer + File /r /x .svn "Set Top Boxes\*.*" + + ; Create a start menu shortcut folder + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" + +SectionEnd + +;====================================== + +Section "Input Service" SectionInputService + + DetailPrint "Installing Input Service ..." + + ; Use the all users context + SetShellVarContext all + + ; Uninstall current Input Service ... + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" UninstallInputService SkipUninstallInputService + +UninstallInputService: + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' + +SkipUninstallInputService: + Sleep 100 + + ; Installing Input Service + CreateDirectory "$DIR_INSTALL\Input Service" + SetOutPath "$DIR_INSTALL\Input Service" + SetOverwrite ifnewer + File "Input Service\Input Service\bin\${BuildType}\*.*" + + ; Installing Input Service Configuration + CreateDirectory "$DIR_INSTALL\Input Service Configuration" + SetOutPath "$DIR_INSTALL\Input Service Configuration" + SetOverwrite ifnewer + File "Input Service\Input Service Configuration\bin\${BuildType}\*.*" + + ; Install IR Server Plugins ... + DetailPrint "Installing IR Server Plugins ..." + CreateDirectory "$DIR_INSTALL\IR Server Plugins" + SetOutPath "$DIR_INSTALL\IR Server Plugins" + SetOverwrite ifnewer + + File "IR Server Plugins\Ads Tech PTV-335 Receiver\bin\${BuildType}\Ads Tech PTV-335 Receiver.*" + File "IR Server Plugins\CoolCommand Receiver\bin\${BuildType}\CoolCommand Receiver.*" + File "IR Server Plugins\Custom HID Receiver\bin\${BuildType}\Custom HID Receiver.*" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Direct Input Receiver.*" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Microsoft.DirectX.DirectInput.dll" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Microsoft.DirectX.dll" + File "IR Server Plugins\FusionRemote Receiver\bin\${BuildType}\FusionRemote Receiver.*" + File "IR Server Plugins\Girder Plugin\bin\${BuildType}\Girder Plugin.*" + File "IR Server Plugins\HCW Receiver\bin\${BuildType}\HCW Receiver.*" + File "IR Server Plugins\IgorPlug Receiver\bin\${BuildType}\IgorPlug Receiver.*" + ;File "IR Server Plugins\IR501 Receiver\bin\${BuildType}\IR501 Receiver.*" + File "IR Server Plugins\IR507 Receiver\bin\${BuildType}\IR507 Receiver.*" + ;File "IR Server Plugins\Ira Transceiver\bin\${BuildType}\Ira Transceiver.*" + File "IR Server Plugins\IRMan Receiver\bin\${BuildType}\IRMan Receiver.*" + File "IR Server Plugins\IRTrans Transceiver\bin\${BuildType}\IRTrans Transceiver.*" + ;File "IR Server Plugins\Keyboard Input\bin\${BuildType}\Keyboard Input.*" + File "IR Server Plugins\LiveDrive Receiver\bin\${BuildType}\LiveDrive Receiver.*" + File "IR Server Plugins\MacMini Receiver\bin\${BuildType}\MacMini Receiver.*" + File "IR Server Plugins\Microsoft MCE Transceiver\bin\${BuildType}\Microsoft MCE Transceiver.*" + ;File "IR Server Plugins\RC102 Receiver\bin\${BuildType}\RC102 Receiver.*" + File "IR Server Plugins\RedEye Blaster\bin\${BuildType}\RedEye Blaster.*" + File "IR Server Plugins\Serial IR Blaster\bin\${BuildType}\Serial IR Blaster.*" + ;File "IR Server Plugins\Speech Receiver\bin\${BuildType}\Speech Receiver.*" + File "IR Server Plugins\Technotrend Receiver\bin\${BuildType}\Technotrend Receiver.*" + File "IR Server Plugins\Technotrend Receiver\bin\${BuildType}\ttBdaDrvApi_Dll.dll" + ;File "IR Server Plugins\Tira Transceiver\bin\${BuildType}\Tira Transceiver.*" + File "IR Server Plugins\USB-UIRT Transceiver\bin\${BuildType}\USB-UIRT Transceiver.*" + File "IR Server Plugins\Wii Remote Receiver\bin\${BuildType}\Wii Remote Receiver.*" + File "IR Server Plugins\WiimoteLib\bin\${BuildType}\WiimoteLib.*" + File "IR Server Plugins\Windows Message Receiver\bin\${BuildType}\Windows Message Receiver.*" + File "IR Server Plugins\WinLirc Transceiver\bin\${BuildType}\WinLirc Transceiver.*" + File "IR Server Plugins\X10 Transceiver\bin\${BuildType}\X10 Transceiver.*" + File "IR Server Plugins\X10 Transceiver\bin\${BuildType}\Interop.X10.dll" + File "IR Server Plugins\XBCDRC Receiver\bin\${BuildType}\XBCDRC Receiver.*" + + ; Create App Data Folder for IR Server configuration files + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service" + + ; Copy Abstract Remote maps + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" + SetOutPath "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" + SetOverwrite ifnewer + File /r /x .svn "Input Service\Input Service\Abstract Remote Maps\*.*" + File "Input Service\Input Service\RemoteTable.xsd" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Input Service Configuration.lnk" "$DIR_INSTALL\Input Service Configuration\Input Service Configuration.exe" "" "$DIR_INSTALL\Input Service Configuration\Input Service Configuration.exe" 0 + + ; Launch Input Service + DetailPrint "Starting Input Service ..." + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /install' + +SectionEnd + +;====================================== + +Section "MP Control Plugin" SectionMPControlPlugin + + DetailPrint "Installing MP Control Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" + SetOverwrite ifnewer + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\MPControlPlugin.dll" + + ; Write input mapping + SetOutPath "$DIR_MEDIAPORTAL\InputDeviceMappings\defaults" + SetOverwrite ifnewer + File "MediaPortal Plugins\MP Control Plugin\InputMapping\MPControlPlugin.xml" + + ; Write app data + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" + SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" + SetOverwrite ifnewer + File /r /x .svn "MediaPortal Plugins\MP Control Plugin\AppData\*.*" + + ; Create Macro folder + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin\Macro" + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "MP Blast Zone Plugin" SectionMPBlastZonePlugin +!else +Section /o "MP Blast Zone Plugin" SectionMPBlastZonePlugin +!endif + + DetailPrint "Installing MP Blast Zone Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Windows" + SetOverwrite ifnewer + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\MPBlastZonePlugin.dll" + + ; Write app data + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin" + SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin" + SetOverwrite off + File "MediaPortal Plugins\MP Blast Zone Plugin\AppData\Menu.xml" + + ; Write skin files + SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo" + SetOverwrite on + File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" + + SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo wide" + SetOverwrite on + File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" + + ; Create Macro folder + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin\Macro" + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "TV2 Blaster Plugin" SectionTV2BlasterPlugin +!else +Section /o "TV2 Blaster Plugin" SectionTV2BlasterPlugin +!endif + + DetailPrint "Installing TV2 Blaster Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" + SetOverwrite ifnewer + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\TV2BlasterPlugin.dll" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin\Macro" + +SectionEnd + +;====================================== + +Section /o "TV3 Blaster Plugin" SectionTV3BlasterPlugin + + DetailPrint "Installing TV3 Blaster Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_TVSERVER\Plugins" + SetOverwrite ifnewer + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\TV3BlasterPlugin.dll" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin\Macro" + +SectionEnd + +;====================================== + +Section "Translator" SectionTranslator + + DetailPrint "Installing Translator ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Translator + CreateDirectory "$DIR_INSTALL\Translator" + SetOutPath "$DIR_INSTALL\Translator" + SetOverwrite ifnewer + File "Applications\Translator\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Default Settings" + + ; Copy in default settings files + SetOutPath "$APPDATA\${PRODUCT_NAME}\Translator\Default Settings" + SetOverwrite ifnewer + File "Applications\Translator\Default Settings\*.xml" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Translator.lnk" "$DIR_INSTALL\Translator\Translator.exe" "" "$DIR_INSTALL\Translator\Translator.exe" 0 + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "Tray Launcher" SectionTrayLauncher +!else +Section /o "Tray Launcher" SectionTrayLauncher +!endif + + DetailPrint "Installing Tray Launcher ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Translator + CreateDirectory "$DIR_INSTALL\Tray Launcher" + SetOutPath "$DIR_INSTALL\Tray Launcher" + SetOverwrite ifnewer + File "Applications\Tray Launcher\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Tray Launcher" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Tray Launcher.lnk" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" "" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" 0 + +SectionEnd + +;====================================== + +Section "Virtual Remote" SectionVirtualRemote + + DetailPrint "Installing Virtual Remote, Skin Editor, Smart Device versions, and Web Remote..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Virtual Remote and Web Remote + CreateDirectory "$DIR_INSTALL\Virtual Remote" + SetOutPath "$DIR_INSTALL\Virtual Remote" + SetOverwrite ifnewer + File "Applications\Virtual Remote\bin\${BuildType}\*.*" + File "Applications\Web Remote\bin\${BuildType}\WebRemote.*" + File "Applications\Virtual Remote Skin Editor\bin\${BuildType}\VirtualRemoteSkinEditor.*" + + ; Installing skins + CreateDirectory "$DIR_INSTALL\Virtual Remote\Skins" + SetOutPath "$DIR_INSTALL\Virtual Remote\Skins" + SetOverwrite ifnewer + File "Applications\Virtual Remote\Skins\*.*" + + ; Installing Virtual Remote for Smart Devices + CreateDirectory "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOutPath "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOverwrite ifnewer + File "Applications\Virtual Remote (PocketPC2003) Installer\${BuildType}\*.cab" + File "Applications\Virtual Remote (Smartphone2003) Installer\${BuildType}\*.cab" + File "Applications\Virtual Remote (WinCE5) Installer\${BuildType}\*.cab" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote Skin Editor.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemoteSkinEditor.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemoteSkinEditor.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote for Smart Devices.lnk" "$DIR_INSTALL\Virtual Remote\Smart Devices" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Web Remote.lnk" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" "" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" 0 + +SectionEnd + +;====================================== + +Section "IR Blast" SectionIRBlast + + DetailPrint "Installing IR Blast ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\IR Blast" + SetOutPath "$DIR_INSTALL\IR Blast" + SetOverwrite ifnewer + File "Applications\IR Blast (No Window)\bin\${BuildType}\*.*" + File "Applications\IR Blast\bin\${BuildType}\IRBlast.exe" + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "IR File Tool" SectionIRFileTool +!else +Section /o "IR File Tool" SectionIRFileTool +!endif + + DetailPrint "Installing IR File Tool ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\IR File Tool" + SetOutPath "$DIR_INSTALL\IR File Tool" + SetOverwrite ifnewer + File "Applications\IR File Tool\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR File Tool" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\IR File Tool.lnk" "$DIR_INSTALL\IR File Tool\IRFileTool.exe" "" "$DIR_INSTALL\IR File Tool\IRFileTool.exe" 0 + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "Keyboard Relay" SectionKeyboardInputRelay +!else +Section /o "Keyboard Relay" SectionKeyboardInputRelay +!endif + + DetailPrint "Installing Keyboard Input Relay ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\Keyboard Input Relay" + SetOutPath "$DIR_INSTALL\Keyboard Input Relay" + SetOverwrite ifnewer + File "Applications\Keyboard Input Relay\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Keyboard Input Relay" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Keyboard Input Relay.lnk" "$DIR_INSTALL\Keyboard Input Relay\KeyboardInputRelay.exe" "" "$DIR_INSTALL\Keyboard Input Relay\KeyboardInputRelay.exe" 0 + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "Dbox Tuner" SectionDboxTuner +!else +Section /o "Dbox Tuner" SectionDboxTuner +!endif + + DetailPrint "Installing Dbox Tuner ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\Dbox Tuner" + SetOutPath "$DIR_INSTALL\Dbox Tuner" + SetOverwrite ifnewer + File "Applications\Dbox Tuner\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Dbox Tuner" + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "HCW PVR Tuner" SectionHcwPvrTuner +!else +Section /o "HCW PVR Tuner" SectionHcwPvrTuner +!endif + + DetailPrint "Installing HCW PVR Tuner ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\HCW PVR Tuner" + SetOutPath "$DIR_INSTALL\HCW PVR Tuner" + SetOverwrite ifnewer + File "Applications\HCW PVR Tuner\bin\${BuildType}\*.*" + +SectionEnd + +;====================================== + +!ifdef DEBUG +Section "Debug Client" SectionDebugClient +!else +Section /o "Debug Client" SectionDebugClient +!endif + + DetailPrint "Installing Debug Client ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Debug Client + CreateDirectory "$DIR_INSTALL\Debug Client" + SetOutPath "$DIR_INSTALL\Debug Client" + SetOverwrite ifnewer + File "Applications\Debug Client\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Debug Client" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Debug Client.lnk" "$DIR_INSTALL\Debug Client\DebugClient.exe" "" "$DIR_INSTALL\Debug Client\DebugClient.exe" 0 + +SectionEnd + +;====================================== + +Section "-Complete" + + DetailPrint "Completing install ..." + + ; Use the all users context + SetShellVarContext all + + ; Create website link file + WriteIniStr "$DIR_INSTALL\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + + ; Write the uninstaller + WriteUninstaller "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + + ; Create start menu shortcuts + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation.lnk" "$DIR_INSTALL\${PRODUCT_NAME}.chm" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" "$DIR_INSTALL\${PRODUCT_NAME}.url" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Log Files.lnk" "$APPDATA\${PRODUCT_NAME}\Logs" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" "" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "${PRODUCT_PUBLISHER}" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoRepair" 1 + + ; Store the install log + StrCpy $0 "$APPDATA\${PRODUCT_NAME}\Logs\Install.log" + Push $0 + Call DumpLog + + ; Finish +!ifdef DEBUG + SetAutoClose false +!else + SetAutoClose true +!endif + +SectionEnd + +;====================================== +;====================================== + +; Section descriptions +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SectionInputService} "A windows service that provides access to your IR devices." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionMPControlPlugin} "Connects to the Input Service to control MediaPortal." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionMPBlastZonePlugin} "Lets you control your IR devices from within the MediaPortal GUI." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV2BlasterPlugin} "For tuning external channels (on Set Top Boxes) with the default MediaPortal TV engine." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV3BlasterPlugin} "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTranslator} "Control your whole PC." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTrayLauncher} "Simple tray application to launch an application of your choosing when a particular button is pressed." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote). Also includes a Skin Editor and Smart Device versions of Virtual Remote." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRBlast} "Command line tools for blasting IR codes." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRFileTool} "Tool for learning, modifying, testing, correcting and converting IR command files." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionKeyboardInputRelay} "Relays keyboard input to the Input Service to act on keypresses like remote buttons." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionDboxTuner} "Command line tuner for Dreambox devices." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionHcwPvrTuner} "Command line tuner for Hauppauge PVR devices." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionDebugClient} "Very simple testing tool for troubleshooting input and communications problems." +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;====================================== +;====================================== + +!ifndef DEBUG +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd +!endif + + +;====================================== + +Function un.onInit + + !insertmacro initRegKeys + + 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" + + ; Use the all users context + SetShellVarContext all + + ; Kill running Programs + DetailPrint "Terminating processes ..." + ExecWait '"taskkill" /F /IM Translator.exe' + ExecWait '"taskkill" /F /IM TrayLauncher.exe' + ExecWait '"taskkill" /F /IM WebRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' + ExecWait '"taskkill" /F /IM IRFileTool.exe' + ExecWait '"taskkill" /F /IM DebugClient.exe' + ExecWait '"taskkill" /F /IM KeyboardInputRelay.exe' + Sleep 100 + + ; Uninstall current Input Service ... + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" UninstallInputService SkipUninstallInputService + +UninstallInputService: + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' + +SkipUninstallInputService: + Sleep 100 + + ; Remove files and uninstaller + DetailPrint "Attempting to remove MediaPortal Blast Zone Plugin ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\MPUtils.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\IrssComms.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\IrssUtils.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\MPBlastZonePlugin.dll" + + DetailPrint "Attempting to remove MediaPortal Process Plugin Common Files ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\MPUtils.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\IrssComms.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\IrssUtils.dll" + + DetailPrint "Attempting to remove MediaPortal Control Plugin ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\MPControlPlugin.dll" + + DetailPrint "Attempting to remove MediaPortal TV2 Plugin ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\TV2BlasterPlugin.dll" + + DetailPrint "Attempting to remove MediaPortal TV3 Plugin ..." + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\MPUtils.dll" + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\IrssComms.dll" + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\IrssUtils.dll" + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\TV3BlasterPlugin.dll" + + DetailPrint "Removing Set Top Box presets ..." + RMDir /R "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" + + DetailPrint "Removing program files ..." + RMDir /R /REBOOTOK "$DIR_INSTALL" + + DetailPrint "Removing start menu shortcuts ..." + RMDir /R "$SMPROGRAMS\${PRODUCT_NAME}" + + ; Remove registry keys + DetailPrint "Removing registry keys ..." + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" + DeleteRegKey HKLM "Software\${PRODUCT_NAME}" + + ; Remove auto-runs + DetailPrint "Removing application auto-runs ..." + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Tray Launcher" + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Translator" + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Keyboard Input Relay" + +!ifdef DEBUG + SetAutoClose false +!else + SetAutoClose true +!endif + +SectionEnd + +;====================================== +;====================================== \ No newline at end of file Copied: trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh (from rev 1585, trunk/plugins/IR Server Suite/setup/setup-AddRemovePage.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh 2008-04-03 01:18:53 UTC (rev 1586) @@ -0,0 +1,162 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +#**********************************************************************************************************# +# +# This original header file is taken from: http://nsis.sourceforge.net/Add/Remove_Functionality +# and modified for our needs. +# +#**********************************************************************************************************# + +!include WordFunc.nsh +!include FileFunc.nsh + +!insertmacro VersionCompare +!insertmacro GetParent + +##### Add/Remove/Reinstall page +Var ReinstallPageCheck + +Function PageReinstall + ReadRegStr $R0 HKLM "${REG_UNINSTALL}" "InstallPath" + + ${If} $R0 == "" + Abort + ${EndIf} + + ReadRegDWORD $R0 HKLM "${REG_UNINSTALL}" "VersionMajor" + ReadRegDWORD $R1 HKLM "${REG_UNINSTALL}" "VersionMinor" + ReadRegDWORD $R2 HKLM "${REG_UNINSTALL}" "VersionRevision" + ReadRegDWORD $R3 HKLM "${REG_UNINSTALL}" "VersionBuild" + StrCpy $R0 $R0.$R1.$R2.$R3 + + ${VersionCompare} ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD} $R0 $R0 + ${If} $R0 == 0 + StrCpy $R1 "$(TEXT_ADDREMOVE_INFO_REPAIR)" + StrCpy $R2 "$(TEXT_ADDREMOVE_REPAIR_OPT1)" + StrCpy $R3 "$(TEXT_ADDREMOVE_REPAIR_OPT2)" + !insertmacro MUI_HEADER_TEXT "$(TEXT_ADDREMOVE_HEADER)" "$(TEXT_ADDREMOVE_HEADER2_REPAIR)" + StrCpy $R0 "2" + ${ElseIf} $R0 == 1 + StrCpy $R1 "$(TEXT_ADDREMOVE_INFO_UPGRADE)" + StrCpy $R2 "$(TEXT_ADDREMOVE_UPDOWN_OPT1)" + StrCpy $R3 "$(TEXT_ADDREMOVE_UPDOWN_OPT2)" + !insertmacro MUI_HEADER_TEXT "$(TEXT_ADDREMOVE_HEADER)" "$(TEXT_ADDREMOVE_HEADER2_UPDOWN)" + StrCpy $R0 "1" + ${ElseIf} $R0 == 2 + StrCpy $R1 "$(TEXT_ADDREMOVE_INFO_DOWNGRADE)" + StrCpy $R2 "$(TEXT_ADDREMOVE_UPDOWN_OPT1)" + StrCpy $R3 "$(TEXT_ADDREMOVE_UPDOWN_OPT2)" + !insertmacro MUI_HEADER_TEXT "$(TEXT_ADDREMOVE_HEADER)" "$(TEXT_ADDREMOVE_HEADER2_UPDOWN)" + StrCpy $R0 "1" + ${Else} + Abort + ${EndIf} + + nsDialogs::Create /NOUNLOAD 1018 + + ${NSD_CreateLabel} 0 0 100% 24u $R1 + Pop $R1 + + ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2 + Pop $R2 + ${NSD_OnClick} $R2 PageReinstallUpdateSelection + + ${NSD_CreateRadioButton} 30u 70u -30u 8u $R3 + Pop $R3 + ${NSD_OnClick} $R3 PageReinstallUpdateSelection + + ${If} $ReinstallPageCheck != 2 + SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0 + ${Else} + SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0 + ${EndIf} + + nsDialogs::Show +FunctionEnd + +Function PageReinstallUpdateSelection + Pop $R1 + + ${NSD_GetState} $R2 $R1 + + ${If} $R1 == ${BST_CHECKED} + StrCpy $ReinstallPageCheck 1 + ${Else} + StrCpy $ReinstallPageCheck 2 + ${EndIf} + +FunctionEnd + +Function PageLeaveReinstall + ${NSD_GetState} $R2 $R1 + + StrCmp $R0 "1" 0 +2 + StrCmp $R1 "1" doUninstall finish + StrCmp $R0 "2" 0 +3 + StrCmp $R1 "1" finish doUninstall + + doUninstall: + ; check if MP is already installed + ReadRegStr $R0 HKLM "${REG_UNINSTALL}" UninstallString + ${If} ${FileExists} "$R0" + ; get parent folder of uninstallation EXE (RO) and save it to R1 + ${GetParent} $R0 $R1 + ; start uninstallation of installed MP, from tmp folder, so it will delete itself + HideWindow + ClearErrors + CopyFiles $R0 "$TEMP\uninstall-temp.exe" + ExecWait '"$TEMP\uninstall-temp.exe" _?=$R1' + BringToFront + + ; if an error occured, ask to cancel installation + ${If} ${Errors} + MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_MSGBOX_ERROR_ON_UNINSTALL)" IDYES +2 + Quit + ${EndIf} + ${EndIf} + + ; if reboot flag is set, abort the installation, and continue the installer on next startup + ${If} ${FileExists} "$INSTDIR\rebootflag" + MessageBox MB_OK|MB_ICONEXCLAMATION "$(TEXT_MSGBOX_ERROR_REBOOT_REQUIRED)" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "$(^Name)" $EXEPATH + Quit + ${EndIf} + + finish: +FunctionEnd + + + +LangString TEXT_ADDREMOVE_HEADER ${LANG_ENGLISH} "Already Installed" +LangString TEXT_ADDREMOVE_HEADER2_REPAIR ${LANG_ENGLISH} "Choose the maintenance option to perform." +LangString TEXT_ADDREMOVE_HEADER2_UPDOWN ${LANG_ENGLISH} "Choose how you want to install $(^Name)." +LangString TEXT_ADDREMOVE_INFO_REPAIR ${LANG_ENGLISH} "$(^Name) ${VERSION} is already installed. Select the operation you want to perform and click Next to continue." +LangString TEXT_ADDREMOVE_INFO_UPGRADE ${LANG_ENGLISH} "An older version of $(^Name) is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue." +LangString TEXT_ADDREMOVE_INFO_DOWNGRADE ${LANG_ENGLISH} "A newer version of $(^Name) is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue." +LangString TEXT_ADDREMOVE_REPAIR_OPT1 ${LANG_ENGLISH} "Add/Remove/Reinstall components" +LangString TEXT_ADDREMOVE_REPAIR_OPT2 ${LANG_ENGLISH} "Uninstall $(^Name)" +LangString TEXT_ADDREMOVE_UPDOWN_OPT1 ${LANG_ENGLISH} "Uninstall before installing" +LangString TEXT_ADDREMOVE_UPDOWN_OPT2 ${LANG_ENGLISH} "Do not uninstall" \ No newline at end of file Copied: trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh (from rev 1585, trunk/plugins/IR Server Suite/setup/setup-CommonMPMacros.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh 2008-04-03 01:18:53 UTC (rev 1586) @@ -0,0 +1,575 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + + +!include FileFunc.nsh +!include "XML.nsh" + +!include FileFunc.nsh +!insertmacro GetRoot +!insertmacro un.GetRoot + +!include WordFunc.nsh +!insertmacro WordReplace +!insertmacro un.WordReplace + +#**********************************************************************************************************# +# +# different useful macros +# +#**********************************************************************************************************# + +#Var AR_SecFlags +#Var AR_RegFlags + +# registry +# ${MEMENTO_REGISTRY_ROOT} +# ${MEMENTO_REGISTRY_KEY} +# ${MEMENTO_REGISTRY_KEY} +#ReadRegDWORD $AR_RegFlags ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}` + + /* not needed anymore ----- done by MementoSectionRestore +!macro InitSection SecName + ;This macro reads component installed flag from the registry and + ;changes checked state of the section on the components page. + ;Input: section index constant name specified in Section command. + + ClearErrors + ;Reading component status from registry + ReadRegDWORD $AR_RegFlags "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "${SecName}" + IfErrors "default_${SecName}" + + ;Status will stay default if registry value not found + ;(component was never installed) + IntOp $AR_RegFlags $AR_RegFlags & 0x0001 ;Turn off all other bits + SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags + IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off + IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit + + ;Writing modified flags + SectionSetFlags ${${SecName}} $AR_SecFlags + + "default_${SecName}:" +!macroend +*/ + +!macro FinishSection SecName + ;This macro reads section flag set by user and removes the section + ;if it is not selected. + ;Then it writes component installed flag to registry + ;Input: section index constant name specified in Section command. + + ${IfNot} ${SectionIsSelected} "${${SecName}}" + ClearErrors + ReadRegDWORD $R0 ${MEMENTO_REGISTRY_ROOT} '${MEMENTO_REGISTRY_KEY}' 'MementoSection_${SecName}' + + ${If} $R0 = 1 + !insertmacro "Remove_${${SecName}}" + ${EndIf} + ${EndIf} +!macroend + +!macro RemoveSection SecName + ;This macro is used to call section's Remove_... macro + ;from the uninstaller. + ;Input: section index constant name specified in Section command. + + !insertmacro "Remove_${${SecName}}" +!macroend + +!macro DisableComponent SectionName AddText + !insertmacro UnselectSection "${SectionName}" + ; Make the unselected section read only + !insertmacro SetSectionFlag "${SectionName}" 16 + SectionGetText ${SectionName} $R0 + SectionSetText ${SectionName} "$R0${AddText}" +!macroend + + + +#**********************************************************************************************************# +# +# Useful macros for MediaPortal and addtional Software which can be used like other LogicLib expressions. +# +#**********************************************************************************************************# + +!ifndef MP_REG_UNINSTALL + !define MP_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal" +!endif +!ifndef TV3_REG_UNINSTALL + !define TV3_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal TV Server" +!endif + +#**********************************************************************************************************# +# LOGICLIB EXPRESSIONS + +;====================================== OLD MP INSTALLATION TESTs + +!macro _MP022IsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{87819CFA-1786-484D-B0DE-10B5FBF2625D}" "UninstallString" + IfErrors `${_f}` `${_t}` +!macroend +!define MP022IsInstalled `"" MP022IsInstalled ""` + +!macro _MP023IsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal 0.2.3.0" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP `${_t}` `${_f}` +!macroend +!define MP023IsInstalled `"" MP023IsInstalled ""` + +;====================================== OLD TVServer/TVClient INSTALLATION TESTs + +!macro _MSI_TVServerIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4B738773-EE07-413D-AFB7-BB0AB04A5488}" "UninstallString" + IfErrors `${_f}` `${_t}` +!macroend +!define MSI_TVServerIsInstalled `"" MSI_TVServerIsInstalled ""` + +!macro _MSI_TVClientIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F7444E89-5BC0-497E-9650-E50539860DE0}" "UninstallString" + IfErrors 0 `${_t}` + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FD9FD453-1C0C-4EDA-AEE6-D7CF0E9951CA}" "UninstallString" + IfErrors `${_f}` `${_t}` +!macroend +!define MSI_TVClientIsInstalled `"" MSI_TVClientIsInstalled ""` + +;====================================== + +!macro _MPIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "${MP_REG_UNINSTALL}" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP `${_t}` `${_f}` +!macroend +!define MPIsInstalled `"" MPIsInstalled ""` + +!macro _TVServerIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP 0 `${_f}` + + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "MementoSection_SecServer" + StrCmp $_LOGICLIB_TEMP 1 `${_t}` `${_f}` +!macroend +!define TVServerIsInstalled `"" TVServerIsInstalled ""` + +!macro _TVClientIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP 0 `${_f}` + + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "MementoSection_SecClient" + StrCmp $_LOGICLIB_TEMP 1 `${_t}` `${_f}` +!macroend +!define TVClientIsInstalled `"" TVClientIsInstalled ""` + +;====================================== 3rd PARTY APPLICATION TESTs + +!macro _VCRedistIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "DisplayVersion" + IfErrors `${_f}` 0 + StrCmp $_LOGICLIB_TEMP "8.0.56336" `${_t}` `${_f}` +!macroend +!define VCRedistIsInstalled `"" VCRedistIsInstalled ""` + +!macro _dotNetIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + + ReadRegStr $4 HKLM "Software\Microsoft\.NETFramework" "InstallRoot" + # remove trailing back slash + Push $4 + Exch $EXEDIR + Exch $EXEDIR + Pop $4 + # if the root directory doesn't exist .NET is not installed + IfFileExists $4 0 `${_f}` + + StrCpy $0 0 + + EnumStart: + + EnumRegKey $2 HKLM "Software\Microsoft\.NETFramework\Policy" $0 + IntOp $0 $0 + 1 + StrCmp $2 "" `${_f}` + + StrCpy $1 0 + + EnumPolicy: + + EnumRegValue $3 HKLM "Software\Microsoft\.NETFramework\Policy\$2" $1 + IntOp $1 $1 + 1 + StrCmp $3 "" EnumStart + IfFileExists "$4\$2.$3" `${_t}` EnumPolicy +!macroend +!define dotNetIsInstalled `"" dotNetIsInstalled ""` + +#**********************************************************************************************************# +# Get MP infos +!macro MP_GET_INSTALL_DIR _var + + ${If} ${MP023IsInstalled} + ReadRegStr ${_var} HKLM "SOFTWARE\Team MediaPortal\MediaPortal" "ApplicationDir" + ${ElseIf} ${MPIsInstalled} + ReadRegStr ${_var} HKLM "${MP_REG_UNINSTALL}" "InstallPath" + ${Else} + StrCpy ${_var} "" + ${EndIf} + +!macroend + +!macro TVSERVER_GET_INSTALL_DIR _var + + ${If} ${TVServerIsInstalled} + ReadRegStr ${_var} HKLM "${TV3_REG_UNINSTALL}" "InstallPath" + ${Else} + StrCpy ${_var} "" + ${EndIf} + +!macroend + +!insertmacro GetTime +!macro GET_BACKUP_POSTFIX _var + + ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + ; $0="01" day + ; $1="04" month + ; $2="2005" year + ; $3="Friday" day of week name + ; $4="16" hour + ; $5="05" minute + ; $6="50" seconds + + StrCpy ${_var} "BACKUP_$1-$0_$4-$5" + +!macroend + + + +#**********************************************************************************************************# +# +# common language strings +# +#**********************************************************************************************************# +LangString TEXT_MP_NOT_INSTALLED ${LANG_ENGLISH} "MediaPortal not installed" +LangString TEXT_TVSERVER_NOT_INSTALLED ${LANG_ENGLISH} "TVServer not installed" + + +LangString TEXT_MSGBOX_INSTALLATION_CANCELD ${LANG_ENGLISH} "Installation will be canceled." +LangString TEXT_MSGBOX_MORE_INFO ${LANG_ENGLISH} "Do you want to get more information about it?" + +LangString TEXT_MSGBOX_ERROR_WIN ${LANG_ENGLISH} "Your operating system is not supported by $(^Name).$\r$\n$\r$\n$(TEXT_MSGBOX_INSTALLATION_CANCELD)$\r$\n$\r$\n$(TEXT_MSGBOX_MORE_INFO)" +LangString TEXT_MSGBOX_ERROR_VCREDIST ${LANG_ENGLISH} "Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) is not installed.$\r$\nIt is a requirement for $(^Name).$\r$\n$\r$\n$(TEXT_MSGBOX_INSTALLATION_CANCELD)$\r$\n$\r$\n$(TEXT_MSGBOX_MORE_INFO)" +LangString TEXT_MSGBOX_ERROR_DOTNET ${LANG_ENGLISH} "Microsoft .Net Framework 2 is not installed.$\r$\nIt is a requirement for $(^Name).$\r$\n$\r$\n$(TEXT_MSGBOX_INSTALLATION_CANCELD)$\r$\n$\r$\n$(TEXT_MSGBOX_MORE_INFO)" + +LangString TEXT_MSGBOX_ERROR_IS_INSTALLED ${LANG_ENGLISH} "$(^Name) is already installed. You need to uninstall it, before you continue with the installation.$\r$\nUninstall will be lunched when pressing OK." +LangString TEXT_MSGBOX_ERROR_ON_UNINSTALL ${LANG_ENGLISH} "An error occured while trying to uninstall old version!$\r$\nDo you still want to continue the installation?" +LangString TEXT_MSGBOX_ERROR_REBOOT_REQUIRED ${LANG_ENGLISH} "A reboot is required after a previous action. Reboot you system and try it again." + + /* +; Section flag test +!macro _MPIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + + ReadRegStr $MPBaseDir HKLM "${MP_REG_UNINSTALL}" "UninstallString" + ${If} $MPBaseDir == "" + # this fallback should only be enabled until MediaPortal 1.0 is out + ReadRegStr $MPBaseDir HKLM "SOFTWARE\Team MediaPortal\MediaPortal" "ApplicationDir" + +#!define MP_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal" +#!define TV3_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal TV Server" + + ${If} $MPBaseDir == "" + !insertmacro UnselectSection "${SecClient}" + ; Make the unselected section read only + !insertmacro SetSectionFlag "${SecClient}" 16 + SectionGetText ${SecClient} $R0 + SectionSetText ${SecClient} "$R0 ($(TEXT_MP_NOT_INSTALLED))" + ${EndIf} + ${EndIf} + SectionGetFlags `${_b}` $_LOGICLIB_TEMP + IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & `${_a}` + + !insertmacro _= $_LOGICLIB_TEMP `${_a}` `${_t}` `${_f}` + !macroend + + #!define MPIsInstalled `${SF_SELECTED} SectionFlagIsSet` +!define MPIsInstalled "!insertmacro _MPIsInstalled" + */ + + + +#*************************** +#*************************** + +Var MyDocs +Var UserAppData +Var CommonAppData + +Var MPdir.Base + +Var MPdir.Config +Var MPdir.Plugins +Var MPdir.Log +Var MPdir.CustomInputDevice +Var MPdir.CustomInputDefault +Var MPdir.Skin +Var MPdir.Language +Var MPdir.Database +Var MPdir.Thumbs +Var MPdir.Weather +Var MPdir.Cache +Var MPdir.BurnerSupport + +#*************************** +#*************************** + +!macro GET_PATH_TEXT + + Pop $R0 + + ${xml::GotoPath} "/Config" $0 + ${If} $0 != 0 + # MessageBox MB_OK "error: xml::GotoPath /Config" + Goto error + ${EndIf} + + loop: + + ${xml::FindNextElement} "Dir" $0 $1 + ${If} $1 != 0 + # MessageBox MB_OK "error: xml::FindNextElement >/Dir< >$0<" + Goto error + ${EndIf} + ;MessageBox MB_OK "xml::FindNextElement$\n$$0=$0$\n$$1=$1" + + ${xml::ElementPath} $0 + ${xml::GetAttribute} "id" $0 $1 + ${If} $1 != 0 + # MessageBox MB_OK "error: xml::GetAttribute >id< >$0<" + Goto error + ${EndIf} + ${IfThen} $0 == $R0 ${|} Goto foundDir ${|} + + Goto loop + + + foundDir: + ${xml::ElementPath} $0 + ${xml::GotoPath} "$0/Path" $1 + ${If} $1 != 0 + # MessageBox MB_OK "error: xml::GotoPath >$0/Path<" + Goto error + ${EndIf} + + ${xml::GetText} $0 $1 + ${If} $1 != 0 + ; maybe the path is only empty, which means MPdir.Base + #MessageBox MB_OK "error: xml::GetText" + #Goto error + StrCpy $0 "" + ${EndIf} + + Push $0 + Goto end + + error: + Push "-1" + + end: + +!macroend +Function GET_PATH_TEXT + !insertmacro GET_PATH_TEXT +FunctionEnd +Function un.GET_PATH_TEXT + !insertmacro GET_PATH_TEXT +FunctionEnd + +#*************************** +#*************************** + +!macro ReadMPdir UNINSTALL_PREFIX DIR + + Push "${DIR}" + Call ${UNINSTALL_PREFIX}GET_PATH_TEXT + Pop $0 + ${IfThen} $0 == -1 ${|} Goto error ${|} + + ${${UNINSTALL_PREFIX}WordReplace} "$0" "%APPDATA%" "$UserAppData" "+" $0 + ${${UNINSTALL_PREFIX}WordReplace} "$0" "%PROGRAMDATA%" "$CommonAppData" "+" $0 + + ${${UNINSTALL_PREFIX}GetRoot} "$0" $1 + + ${IfThen} $1 == "" ${|} StrCpy $0 "$MPdir.Base\$0" ${|} + + ; TRIM \ AT THE END + StrLen $1 "$0" + #MessageBox MB_OK "1 $1$\r$\n2 $2$\r$\n3 $3" + IntOp $2 $1 - 1 + #MessageBox MB_OK "1 $1$\r$\n2 $2$\r$\n3 $3" + StrCpy $3 $0 1 $2 + #MessageBox MB_OK "1 $1$\r$\n2 $2$\r$\n3 $3" + + ${If} $3 == "\" + StrCpy $MPdir.${DIR} $0 $2 + ${Else} + StrCpy $MPdir.${DIR} $0 + ${EndIf} + +!macroend + +#*************************** +#*************************** + +!macro ReadConfig UNINSTALL_PREFIX + + #MessageBox MB_OK "${UNINSTALL_PREFIX}" + + Pop $0 + IfFileExists "$0\MediaPortalDirs.xml" 0 error + + + #${xml::LoadFile} "$EXEDIR\MediaPortalDirsXP.xml" $0 + ${xml::LoadFile} "$0\MediaPortalDirs.xml" $0 + ${IfThen} $0 != 0 ${|} Goto error ${|} + + #</Dir> Log CustomInputDevice CustomInputDefault Skin Language Database Thumbs Weather Cache BurnerSupport + + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Config + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Plugins + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Log + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" CustomInputDevice + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" CustomInputDefault + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Skin + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Language + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Database + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Thumbs + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" We... [truncated message content] |