From: <an...@us...> - 2008-01-08 13:40:38
|
Revision: 1225 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1225&view=rev Author: and-81 Date: 2008-01-08 05:40:21 -0800 (Tue, 08 Jan 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Documentation/introduction.html trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Program.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapping/MPControlPlugin.xml trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs Added Paths: ----------- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Direct Input.xml Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-01-07 17:05:15 UTC (rev 1224) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-01-08 13:40:21 UTC (rev 1225) @@ -1038,6 +1038,11 @@ string[] commands = Common.SplitBlastCommand(command.Substring(Common.CmdPrefixBlast.Length)); BlastIR(Common.FolderIRCommands + commands[0] + Common.FileExtensionIR, commands[1]); } + else if (command.StartsWith(Common.CmdPrefixPause, StringComparison.OrdinalIgnoreCase)) + { + int pauseTime = int.Parse(command.Substring(Common.CmdPrefixPause.Length)); + Thread.Sleep(pauseTime); + } else if (command.StartsWith(Common.CmdPrefixRun, StringComparison.OrdinalIgnoreCase)) { string[] commands = Common.SplitRunCommand(command.Substring(Common.CmdPrefixRun.Length)); @@ -1183,7 +1188,7 @@ } catch (Exception ex) { - if (Thread.CurrentThread.Name.Equals(ProcessCommandThreadName, StringComparison.OrdinalIgnoreCase)) + if (!String.IsNullOrEmpty(Thread.CurrentThread.Name) && Thread.CurrentThread.Name.Equals(ProcessCommandThreadName, StringComparison.OrdinalIgnoreCase)) IrssLog.Error(ex); else throw; Modified: trunk/plugins/IR Server Suite/Documentation/introduction.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/introduction.html 2008-01-07 17:05:15 UTC (rev 1224) +++ trunk/plugins/IR Server Suite/Documentation/introduction.html 2008-01-08 13:40:21 UTC (rev 1225) @@ -3,9 +3,13 @@ <BODY> <H2>Introduction<BR><HR COLOR="RED"></H2> -<P>This package was designed as a highly flexible IR remote control suite of plugins and applications specifically for (but not limited to) controlling a MediaPortal Client and Server setup.</P> -<P>The original reason for developing this system was to extend the capabilities of the MCE Replacement Plugin for MediaPortal. The project was started only a few short weeks after the MCE Replacement Plugin was started when limitations of that implementation became obvious.</P> +<P><I>Congratulations!<BR> +You are the privileged owner of IR Server Suite, a PC remote control suite of applications and plugins designed for MediaPortal.<BR> +If used and maintained in accordance with normal operating practices, IR Server Suite will provide many months of trouble-free operation.</I></P> + +<P>The original reason for developing this system was to extend the capabilities of the MCE Replacement Plugin for MediaPortal. The project was started only a few short weeks after the MCE Replacement Plugin was started when limitations of that implementation became obvious. However, IR Server Suite is now a fully-featured PC remote control suite.</P> + <P><B>How does this work?</B><BR> <BR> You install Input Service on a computer that has an IR Device attached to it. Input Service then provides access to that IR Device for all the plugins and applications in the suite, no matter where those applications and plugins are running on your network.<BR> @@ -23,8 +27,17 @@ <A HREF="Input Service\index.html">Input Service</A><BR> Input Service is the centre-piece of the system. As the name suggests, it is a windows service that provides access to the IR device. Other applications and plugins communicate with the Input Service to receive button press notification and to blast (transmit) or learn IR commands.<BR> <BR> +<A HREF="Translator\index.html">Translator</A><BR> +This is a program in the same style as HIP and to a lesser extent Girder. It is designed to control your whole PC by Remote Control.<BR> +<BR> +<A HREF="Tray Launcher\index.html">Tray Launcher</A><BR> +This application loads into the system tray and waits for a user defined button to be pressed and then launches an application of your choosing. It's function is duplicated by Translator, but in some cases people just want a simple application to do this.<BR> +<BR> +<A HREF="Virtual Remote\index.html">Virtual Remote</A><BR> +Virtual Remote is a software remote control, styled as an Infrared remote control. It lets you simulate remote control commands either locally or over a network. It also includes Web Remote that hosts the Virtual Remote as a web page.<BR> +<BR> <A HREF="Plugins\MP Control Plugin\index.html">MP Control Plugin</A><BR> -This MediaPortal plugin is the equivalent of the MCE Replacement Plugin, it connects to the Input Service to control MediaPortal.<BR> +This MediaPortal plugin is the equivalent of the MediaPortal MCE Replacement Plugin, it is used to control MediaPortal.<BR> <BR> <A HREF="Plugins\MP Blast Zone Plugin\index.html">MP Blast Zone Plugin</A><BR> This MediaPortal plugin lets you control your IR devices from within the MediaPortal GUI. By organising a menu structure inside the plugin you can blast IR commands, execute macros, launch applications, send windows messages, and jump to other screens within MediaPortal.<BR> @@ -35,15 +48,6 @@ <A HREF="Plugins\TV3 Blaster Plugin\index.html">TV3 Blaster Plugin</A><BR> This MediaPortal TV Server plugin is for tuning external channels (on Set Top Boxes) for the TV Engine 3 (the MediaPortal TV Server).<BR> <BR> -<A HREF="Tray Launcher\index.html">Tray Launcher</A><BR> -This application loads into the system tray and waits for a user defined button to be pressed and then launches an application of your choosing.<BR> -<BR> -<A HREF="Translator\index.html">Translator</A><BR> -This is a program in the same style as HIP and to a lesser extent Girder. It is designed to control your whole PC via Infrared Remote.<BR> -<BR> -<A HREF="Virtual Remote\index.html">Virtual Remote</A><BR> -Virtual Remote is a software remote control, styled as an Infrared remote control. It lets you simulate remote control commands either locally or over a network.<BR> -<BR> </P> Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-01-07 17:05:15 UTC (rev 1224) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-01-08 13:40:21 UTC (rev 1225) @@ -4,6 +4,16 @@ <H2>What's new?<BR><HR COLOR="RED"></H2> +<P>Version 1.0.4.2 +<UL> +<LI>MP Control plugin: Fixed Macro command for Multi-Mapping.</LI> +<LI>MCE Transceiver: Fixed blasting bug that has existed since October.</LI> +<LI>AdsTech 335 Receiver: Fixed a bug that caused Input Service to crash roughly every 5 minutes.</LI> +<LI>Installer: New IR Server Suite installer. It looks more professional and you can now change the MediaPortal plugin install paths.</LI> +<LI>General: Fixed the "pause" macro command.</LI> +</UL></P> +<BR> + <P>Version 1.0.4.1 <UL> <LI>Minor bug fixes.</LI> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-01-07 17:05:15 UTC (rev 1224) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-01-08 13:40:21 UTC (rev 1225) @@ -731,53 +731,12 @@ DebugWriteLine("Received data:"); DebugDump(packetBytes); - int indexOf9F = Array.IndexOf(packetBytes, (byte)0x9F); - while (indexOf9F != -1) - { - - if (packetBytes.Length > indexOf9F + 3 && packetBytes[indexOf9F + 1] == 0x04) // 9F 04 XX XX - IR Sample Period - { - byte b1 = packetBytes[indexOf9F + 2]; - byte b2 = packetBytes[indexOf9F + 3]; - - int irPeriod = ((b1 * 256) + b2); - DebugWriteLine("IR Sample Period: {0}", irPeriod); - } - - if (packetBytes.Length > indexOf9F + 3 && packetBytes[indexOf9F + 1] == 0x0C) // 9F 0C XX XX - Timeout - { - byte b1 = packetBytes[indexOf9F + 2]; - byte b2 = packetBytes[indexOf9F + 3]; - - int timeout = ((b1 * 256) + b2); - DebugWriteLine("IR Timeout Period: {0}", TimingResolution * timeout / 1000); - } - - if (packetBytes.Length > indexOf9F + 2 && packetBytes[indexOf9F + 1] == 0x14) // 9F 14 XX - Port - { - byte b1 = packetBytes[indexOf9F + 2]; - - DebugWriteLine("IR Input Port: {0}", b1); - } - - - if (packetBytes.Length > indexOf9F + 1) - { - indexOf9F = Array.IndexOf(packetBytes, (byte)0x9F, indexOf9F + 1); - } - else - { - break; - } - } - double firmware = 0.0; int indexOfFF = Array.IndexOf(packetBytes, (byte)0xFF); while (indexOfFF != -1) { - - if (packetBytes.Length > indexOfFF + 2 && packetBytes[indexOfFF + 1] == 0x0B) // 9F 0B XX - Firmware x.x00 + if (packetBytes.Length > indexOfFF + 2 && packetBytes[indexOfFF + 1] == 0x0B) // FF 0B XY - Firmware X.Y00 { byte b1 = packetBytes[indexOfFF + 2]; @@ -785,7 +744,7 @@ DebugWriteLine("Firmware: {0}", firmware); } - if (packetBytes.Length > indexOfFF + 2 && packetBytes[indexOfFF + 1] == 0x1B) // 9F 1B XX - Firmware 0.0xx + if (packetBytes.Length > indexOfFF + 2 && packetBytes[indexOfFF + 1] == 0x1B) // FF 1B XY - Firmware 0.0XY { byte b1 = packetBytes[indexOfFF + 2]; @@ -793,18 +752,11 @@ DebugWriteLine("Firmware: {0}", firmware); } - if (packetBytes.Length > indexOfFF + 1) - { indexOfFF = Array.IndexOf(packetBytes, (byte)0xFF, indexOfFF + 1); - } else - { break; - } } - - } #endif Modified: trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi 2008-01-07 17:05:15 UTC (rev 1224) +++ trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi 2008-01-08 13:40:21 UTC (rev 1225) @@ -1,80 +1,218 @@ -; IR Server Suite.nsi +;====================================== +; IR Server Suite - Debug.nsi ; -; (C) Copyright Aaron Dinnage, 2007 -; -; Install script for IR Server Suite -; -;-------------------------------- +; (C) Copyright Aaron Dinnage, 2008 +;====================================== -; The name of the installer -Name "IR Server Suite" +!include "x64.nsh" +!include "MUI.nsh" -; The file to write -OutFile "IR Server Suite.exe" +!define PRODUCT_NAME "IR Server Suite" +!define PRODUCT_VERSION "1.0.4.1" +!define PRODUCT_PUBLISHER "and-81" +!define PRODUCT_WEB_SITE "http://forum.team-mediaportal.com/showthread.php?t=33512" -; The default installation directory -InstallDir "$PROGRAMFILES\IR Server Suite" - -; Registry key to check for directory (so if you install again, it will overwrite the old one automatically) -InstallDirRegKey HKLM "Software\IR Server Suite" "Install_Dir" - -; Show the installation/uninstallation steps to the user +Name "${PRODUCT_NAME}" +OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" +InstallDir "" ShowInstDetails show ShowUninstDetails show - -; Set the compression method +BrandingText " " SetCompressor /SOLID /FINAL lzma +CRCCheck On -!include "x64.nsh" +; Variables +var DIR_INSTALL +var DIR_MEDIAPORTAL +var DIR_TVSERVER -;-------------------------------- +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" -; Pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" +!insertmacro MUI_PAGE_COMPONENTS -Page components -Page directory -Page instfiles +; Main app install path +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp +!insertmacro MUI_PAGE_DIRECTORY -UninstPage uninstConfirm -UninstPage instfiles +; 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 -Function .onInit +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_INSTFILES + +!insertmacro MUI_LANGUAGE "English" + +;====================================== +;====================================== + +!macro initRegKeys ${If} ${RunningX64} - ${DisableX64FSRedirection} - StrCpy '$INSTDIR' '$PROGRAMFILES\IR Server Suite' - ${EnableX64FSRedirection} + SetRegView 64 - SetRegView 64 + ${DisableX64FSRedirection} + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + + ${EnableX64FSRedirection} + ${Else} - SetRegView 32 + SetRegView 32 + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + ${Endif} +!macroend + +;====================================== +;====================================== +Function .onInit + +!insertmacro initRegKeys + FunctionEnd +;====================================== + Function .onInstSuccess - IfFileExists "$INSTDIR\Input Service\Input Service.exe" StartInputService SkipStartInputService + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StartInputService SkipStartInputService StartInputService: - Exec '"$INSTDIR\Input Service\Input Service.exe" /start' + Exec '"$DIR_INSTALL\Input Service\Input Service.exe" /start' SkipStartInputService: FunctionEnd -;-------------------------------- +;====================================== -Section "-Core" +Function DirectoryPreMP + SectionGetFlags 3 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - DetailPrint "Installing Core files ..." + 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 + +;====================================== +;====================================== + +Section "-Prepare" + + DetailPrint "Preparing to install ..." + ; Use the all users context SetShellVarContext all @@ -87,54 +225,43 @@ ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' ExecWait '"taskkill" /F /IM DebugClient.exe' - IfFileExists "$INSTDIR\Input Service\Input Service.exe" StopInputService SkipStopInputService + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StopInputService SkipStopInputService StopInputService: - ExecWait '"$INSTDIR\Input Service\Input Service.exe" /stop' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /stop' SkipStopInputService: Sleep 100 - CreateDirectory "$APPDATA\IR Server Suite" - CreateDirectory "$APPDATA\IR Server Suite\Logs" - CreateDirectory "$APPDATA\IR Server Suite\IR Commands" +SectionEnd +;====================================== + +Section "-Core" + + DetailPrint "Setting up paths and installing core files ..." + + ; Use the all users context + SetShellVarContext all + + CreateDirectory "$APPDATA\${PRODUCT_NAME}" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Logs" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR Commands" + ; Copy known set top boxes - CreateDirectory "$APPDATA\IR Server Suite\Set Top Boxes" - SetOutPath "$APPDATA\IR Server Suite\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\*.*" - ; Set output path to install dir - SetOutPath "$INSTDIR" + ; Create a start menu shortcut folder + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" - ; Write documentation - SetOverwrite ifnewer - File "Documentation\IR Server Suite.chm" - - ; Write the uninstaller - WriteUninstaller "Uninstall IR Server Suite.exe" - - ; Create a shortcut to the uninstaller & documentation - CreateDirectory "$SMPROGRAMS\IR Server Suite" - CreateShortCut "$SMPROGRAMS\IR Server Suite\Log Files.lnk" "$APPDATA\IR Server Suite\Logs" "" "" 0 - CreateShortCut "$SMPROGRAMS\IR Server Suite\Uninstall.lnk" "$INSTDIR\Uninstall IR Server Suite.exe" "" "$INSTDIR\Uninstall IR Server Suite.exe" 0 - CreateShortCut "$SMPROGRAMS\IR Server Suite\Documentation.lnk" "$INSTDIR\IR Server Suite.chm" "" "" 0 - - ; Write the installation path into the registry - WriteRegStr HKLM "Software\IR Server Suite" "Install_Dir" "$INSTDIR" - - ; Write the uninstall keys for Windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "DisplayName" "IR Server Suite" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "UninstallString" '"$INSTDIR\Uninstall IR Server Suite.exe"' - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "NoRepair" 1 - SectionEnd -;-------------------------------- +;====================================== -Section "Input Service" +Section "Input Service" SectionInputService DetailPrint "Installing Input Service ..." @@ -142,25 +269,25 @@ SetShellVarContext all ; Uninstall current Input Service ... - ExecWait '"$INSTDIR\Input Service\Input Service.exe" /uninstall' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' Sleep 100 ; Installing Input Service - CreateDirectory "$INSTDIR\Input Service" - SetOutPath "$INSTDIR\Input Service" + CreateDirectory "$DIR_INSTALL\Input Service" + SetOutPath "$DIR_INSTALL\Input Service" SetOverwrite ifnewer File "Input Service\Input Service\bin\Debug\*.*" ; Installing Input Service Configuration - CreateDirectory "$INSTDIR\Input Service Configuration" - SetOutPath "$INSTDIR\Input Service Configuration" + CreateDirectory "$DIR_INSTALL\Input Service Configuration" + SetOutPath "$DIR_INSTALL\Input Service Configuration" SetOverwrite ifnewer File "Input Service\Input Service Configuration\bin\Debug\*.*" ; Install IR Server Plugins ... DetailPrint "Installing IR Server Plugins ..." - CreateDirectory "$INSTDIR\IR Server Plugins" - SetOutPath "$INSTDIR\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\Debug\*.*" @@ -184,20 +311,20 @@ File "IR Server Plugins\XBCDRC Receiver\bin\Debug\*.*" ; Create App Data Folder for IR Server configuration files. - CreateDirectory "$APPDATA\IR Server Suite\Input Service" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Input Service Configuration.lnk" "$INSTDIR\Input Service Configuration\Input Service Configuration.exe" "" "$INSTDIR\Input Service Configuration\Input Service Configuration.exe" 0 + 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 '"$INSTDIR\Input Service\Input Service.exe" /install' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /install' SectionEnd -;-------------------------------- +;====================================== -Section "MP Control Plugin" +Section "MP Control Plugin" SectionMPControlPlugin DetailPrint "Installing MP Control Plugin ..." @@ -205,7 +332,7 @@ SetShellVarContext all ; Write plugin dll - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process" + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" SetOverwrite ifnewer File "MediaPortal Plugins\MP Control Plugin\bin\Debug\MPUtils.dll" File "MediaPortal Plugins\MP Control Plugin\bin\Debug\IrssComms.dll" @@ -213,24 +340,24 @@ File "MediaPortal Plugins\MP Control Plugin\bin\Debug\MPControlPlugin.dll" ; Write input mapping - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\InputDeviceMappings\defaults" + SetOutPath "$DIR_MEDIAPORTAL\InputDeviceMappings\defaults" SetOverwrite ifnewer File "MediaPortal Plugins\MP Control Plugin\InputMapping\MPControlPlugin.xml" ; Write app data - CreateDirectory "$APPDATA\IR Server Suite\MP Control Plugin" - SetOutPath "$APPDATA\IR Server Suite\MP Control Plugin" + 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\IR Server Suite\MP Control Plugin\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin\Macro" SectionEnd -;-------------------------------- +;====================================== -Section "MP Blast Zone Plugin" +Section "MP Blast Zone Plugin" SectionMPBlastZonePlugin DetailPrint "Installing MP Blast Zone Plugin ..." @@ -238,7 +365,7 @@ SetShellVarContext all ; Write plugin dll - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Windows" + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Windows" SetOverwrite ifnewer File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\MPUtils.dll" File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\IrssComms.dll" @@ -246,28 +373,28 @@ File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\MPBlastZonePlugin.dll" ; Write app data - CreateDirectory "$APPDATA\IR Server Suite\MP Blast Zone Plugin" - SetOutPath "$APPDATA\IR Server Suite\MP Blast Zone Plugin" + 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 "$PROGRAMFILES\Team MediaPortal\MediaPortal\Skin\BlueTwo" + SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo" SetOverwrite on File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\Skin\BlueTwo wide" + SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo wide" SetOverwrite on File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" ; Create Macro folder - CreateDirectory "$APPDATA\IR Server Suite\MP Blast Zone Plugin\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin\Macro" SectionEnd -;-------------------------------- +;====================================== -Section /o "TV2 Blaster Plugin" +Section /o "TV2 Blaster Plugin" SectionTV2BlasterPlugin DetailPrint "Installing TV2 Blaster Plugin ..." @@ -275,7 +402,7 @@ SetShellVarContext all ; Write plugin dll - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process" + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" SetOverwrite ifnewer File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\MPUtils.dll" File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\IrssComms.dll" @@ -283,14 +410,14 @@ File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\TV2BlasterPlugin.dll" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\TV2 Blaster Plugin" - CreateDirectory "$APPDATA\IR Server Suite\TV2 Blaster Plugin\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin\Macro" SectionEnd -;-------------------------------- +;====================================== -Section /o "TV3 Blaster Plugin" +Section /o "TV3 Blaster Plugin" SectionTV3BlasterPlugin DetailPrint "Installing TV3 Blaster Plugin ..." @@ -298,7 +425,7 @@ SetShellVarContext all ; Write plugin dll - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server\Plugins" + SetOutPath "$DIR_TVSERVER\Plugins" SetOverwrite ifnewer File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\MPUtils.dll" File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\IrssComms.dll" @@ -306,137 +433,236 @@ File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\TV3BlasterPlugin.dll" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\TV3 Blaster Plugin" - CreateDirectory "$APPDATA\IR Server Suite\TV3 Blaster Plugin\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin\Macro" SectionEnd -;-------------------------------- +;====================================== -Section "Translator" +Section "Translator" SectionTranslator DetailPrint "Installing Translator ..." + ; Use the all users context + SetShellVarContext all + ; Installing Translator - CreateDirectory "$INSTDIR\Translator" - SetOutPath "$INSTDIR\Translator" + CreateDirectory "$DIR_INSTALL\Translator" + SetOutPath "$DIR_INSTALL\Translator" SetOverwrite ifnewer File "Applications\Translator\bin\Debug\*.*" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\Translator" - CreateDirectory "$APPDATA\IR Server Suite\Translator\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Macro" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Translator.lnk" "$INSTDIR\Translator\Translator.exe" "" "$INSTDIR\Translator\Translator.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Translator.lnk" "$DIR_INSTALL\Translator\Translator.exe" "" "$DIR_INSTALL\Translator\Translator.exe" 0 SectionEnd -;-------------------------------- +;====================================== -Section /o "Tray Launcher" +Section /o "Tray Launcher" SectionTrayLauncher DetailPrint "Installing Tray Launcher ..." + ; Use the all users context + SetShellVarContext all + ; Installing Translator - CreateDirectory "$INSTDIR\Tray Launcher" - SetOutPath "$INSTDIR\Tray Launcher" + CreateDirectory "$DIR_INSTALL\Tray Launcher" + SetOutPath "$DIR_INSTALL\Tray Launcher" SetOverwrite ifnewer File "Applications\Tray Launcher\bin\Debug\*.*" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\Tray Launcher" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Tray Launcher" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Tray Launcher.lnk" "$INSTDIR\Tray Launcher\TrayLauncher.exe" "" "$INSTDIR\Tray Launcher\TrayLauncher.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Tray Launcher.lnk" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" "" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" 0 SectionEnd -;-------------------------------- +;====================================== -Section "Virtual Remote and Web Remote" +Section "Virtual Remote and Web Remote" SectionVirtualRemote DetailPrint "Installing Virtual Remote and Web Remote..." + ; Use the all users context + SetShellVarContext all + ; Installing Virtual Remote and Web Remote - CreateDirectory "$INSTDIR\Virtual Remote" - SetOutPath "$INSTDIR\Virtual Remote" + CreateDirectory "$DIR_INSTALL\Virtual Remote" + SetOutPath "$DIR_INSTALL\Virtual Remote" SetOverwrite ifnewer File "Applications\Virtual Remote\bin\Debug\*.*" File "Applications\Web Remote\bin\Debug\WebRemote.exe" - CreateDirectory "$INSTDIR\Virtual Remote\Skins" - SetOutPath "$INSTDIR\Virtual Remote\Skins" + CreateDirectory "$DIR_INSTALL\Virtual Remote\Skins" + SetOutPath "$DIR_INSTALL\Virtual Remote\Skins" SetOverwrite ifnewer File "Applications\Virtual Remote\Skins\*.*" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\Virtual Remote" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Virtual Remote.lnk" "$INSTDIR\Virtual Remote\VirtualRemote.exe" "" "$INSTDIR\Virtual Remote\VirtualRemote.exe" 0 - CreateShortCut "$SMPROGRAMS\IR Server Suite\Web Remote.lnk" "$INSTDIR\Virtual Remote\WebRemote.exe" "" "$INSTDIR\Virtual Remote\WebRemote.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Web Remote.lnk" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" "" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" 0 SectionEnd -;-------------------------------- +;====================================== -Section /o "Virtual Remote Skin Editor" +Section /o "Virtual Remote Skin Editor" SectionVirtualRemoteSkinEditor DetailPrint "Installing Virtual Remote Skin Editor ..." + ; Use the all users context + SetShellVarContext all + ; Installing Virtual Remote - CreateDirectory "$INSTDIR\Virtual Remote Skin Editor" - SetOutPath "$INSTDIR\Virtual Remote Skin Editor" + CreateDirectory "$DIR_INSTALL\Virtual Remote Skin Editor" + SetOutPath "$DIR_INSTALL\Virtual Remote Skin Editor" SetOverwrite ifnewer File "Applications\Virtual Remote Skin Editor\bin\Debug\*.*" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\Virtual Remote Skin Editor" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote Skin Editor" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Virtual Remote Skin Editor.lnk" "$INSTDIR\Virtual Remote Skin Editor\VirtualRemoteSkinEditor.exe" "" "$INSTDIR\Virtual Remote Skin Editor\VirtualRemoteSkinEditor.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote Skin Editor.lnk" "$DIR_INSTALL\Virtual Remote Skin Editor\VirtualRemoteSkinEditor.exe" "" "$DIR_INSTALL\Virtual Remote Skin Editor\VirtualRemoteSkinEditor.exe" 0 SectionEnd -;-------------------------------- +;====================================== -Section "IR Blast (Command line tool)" +Section "IR Blast (Command line tool)" SectionIRBlast DetailPrint "Installing IR Blast ..." + ; Use the all users context + SetShellVarContext all + ; Installing IR Server - CreateDirectory "$INSTDIR\IR Blast" - SetOutPath "$INSTDIR\IR Blast" + CreateDirectory "$DIR_INSTALL\IR Blast" + SetOutPath "$DIR_INSTALL\IR Blast" SetOverwrite ifnewer + File "Applications\IR Blast (No Window)\bin\Debug\*.*" File "Applications\IR Blast\bin\Debug\IRBlast.exe" - File "Applications\IR Blast (No Window)\bin\Debug\*.*" SectionEnd -;-------------------------------- +;====================================== -Section /o "Debug Client" +Section /o "Debug Client" SectionDebugClient DetailPrint "Installing Debug Client ..." + ; Use the all users context + SetShellVarContext all + ; Installing Debug Client - CreateDirectory "$INSTDIR\Debug Client" - SetOutPath "$INSTDIR\Debug Client" + CreateDirectory "$DIR_INSTALL\Debug Client" + SetOutPath "$DIR_INSTALL\Debug Client" SetOverwrite ifnewer File "Applications\Debug Client\bin\Debug\*.*" ; Create folders - CreateDirectory "$APPDATA\IR Server Suite\Debug Client" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Debug Client" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Debug Client.lnk" "$INSTDIR\Debug Client\DebugClient.exe" "" "$INSTDIR\Debug Client\DebugClient.exe" 0 + 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 + + ; Write documentation + SetOutPath "$DIR_INSTALL" + SetOverwrite ifnewer + File "Documentation\${PRODUCT_NAME}.chm" + + ; 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 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 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 + + SetAutoClose false + +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 via Infrared Remote." + !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)." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemoteSkinEditor} "Create or Modify skins for the Virtual Remote." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRBlast} "Command line tools for blasting IR codes." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionDebugClient} "Very simple testing tool for troubleshooting problems." +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;====================================== +;====================================== + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd + +;====================================== + +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 @@ -453,52 +679,55 @@ Sleep 100 ; Uninstall current Input Service ... - ExecWait '"$INSTDIR\Input Service\Input Service.exe" /uninstall' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' Sleep 100 ; Remove files and uninstaller DetailPrint "Attempting to remove MediaPortal Blast Zone Plugin ..." - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Windows\MPUtils.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Windows\IrssComms.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Windows\IrssUtils.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Windows\MPBlastZonePlugin.dll" + 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 "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process\MPUtils.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process\IrssComms.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process\IrssUtils.dll" + 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 "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process\MPControlPlugin.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\MPControlPlugin.dll" DetailPrint "Attempting to remove MediaPortal TV2 Plugin ..." - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process\TV2BlasterPlugin.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\TV2BlasterPlugin.dll" DetailPrint "Attempting to remove MediaPortal TV3 Plugin ..." - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server\Plugins\MPUtils.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server\Plugins\IrssComms.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server\Plugins\IrssUtils.dll" - Delete /REBOOTOK "$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server\Plugins\TV3BlasterPlugin.dll" + 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\IR Server Suite\Set Top Boxes" + RMDir /R "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" DetailPrint "Removing program files ..." - RMDir /R /REBOOTOK "$INSTDIR" - + RMDir /R /REBOOTOK "$DIR_INSTALL" + DetailPrint "Removing start menu shortcuts ..." - RMDir /R "$SMPROGRAMS\IR Server Suite" + RMDir /R "$SMPROGRAMS\${PRODUCT_NAME}" ; Remove registry keys DetailPrint "Removing registry keys ..." - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" - DeleteRegKey HKLM "SOFTWARE\IR Server Suite" + 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" + SetAutoClose false + SectionEnd -;-------------------------------- +;====================================== +;====================================== \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi 2008-01-07 17:05:15 UTC (rev 1224) +++ trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi 2008-01-08 13:40:21 UTC (rev 1225) @@ -1,80 +1,218 @@ -; IR Server Suite.nsi +;====================================== +; IR Server Suite - Release.nsi ; -; (C) Copyright Aaron Dinnage, 2007 -; -; Install script for IR Server Suite -; -;-------------------------------- +; (C) Copyright Aaron Dinnage, 2008 +;====================================== -; The name of the installer -Name "IR Server Suite" +!include "x64.nsh" +!include "MUI.nsh" -; The file to write -OutFile "IR Server Suite.exe" +!define PRODUCT_NAME "IR Server Suite" +!define PRODUCT_VERSION "1.0.4.1" +!define PRODUCT_PUBLISHER "and-81" +!define PRODUCT_WEB_SITE "http://forum.team-mediaportal.com/showthread.php?t=33512" -; The default installation directory -InstallDir "$PROGRAMFILES\IR Server Suite" - -; Registry key to check for directory (so if you install again, it will overwrite the old one automatically) -InstallDirRegKey HKLM "Software\IR Server Suite" "Install_Dir" - -; Show the installation/uninstallation steps to the user +Name "${PRODUCT_NAME}" +OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" +InstallDir "" ShowInstDetails show ShowUninstDetails show - -; Set the compression method +BrandingText " " SetCompressor /SOLID /FINAL lzma +CRCCheck On -!include "x64.nsh" +; Variables +var DIR_INSTALL +var DIR_MEDIAPORTAL +var DIR_TVSERVER -;-------------------------------- +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" -; Pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" +!insertmacro MUI_PAGE_COMPONENTS -Page components -Page directory -Page instfiles +; Main app install path +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp +!insertmacro MUI_PAGE_DIRECTORY -UninstPage uninstConfirm -UninstPage instfiles +; 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 -Function .onInit +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_INSTFILES + +!insertmacro MUI_LANGUAGE "English" + +;====================================== +;====================================== + +!macro initRegKeys ${If} ${RunningX64} - ${DisableX64FSRedirection} - StrCpy '$INSTDIR' '$PROGRAMFILES\IR Server Suite' - ${EnableX64FSRedirection} + SetRegView 64 - SetRegView 64 + ${DisableX64FSRedirection} + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + + ${EnableX64FSRedirection} + ${Else} - SetRegView 32 + SetRegView 32 + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + ${Endif} +!macroend + +;====================================== +;====================================== +Function .onInit + +!insertmacro initRegKeys + FunctionEnd +;====================================== + Function .onInstSuccess - IfFileExists "$INSTDIR\Input Service\Input Service.exe" StartInputService SkipStartInputService + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StartInputService SkipStartInputService StartInputService: - Exec '"$INSTDIR\Input Service\Input Service.exe" /start' + Exec '"$DIR_INSTALL\Input Service\Input Service.exe" /start' SkipStartInputService: FunctionEnd -;-------------------------------- +;====================================== -Section "-Core" +Function DirectoryPreMP + SectionGetFlags 3 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - DetailPrint "Installing Core files ..." + 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 + +;====================================== +;====================================== + +Section "-Prepare" + + DetailPrint "Preparing to install ..." + ; Use the all users context SetShellVarContext all @@ -87,54 +225,43 @@ ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' ExecWait '"taskkill" /F /IM DebugClient.exe' - IfFileExists "$INSTDIR\Input Service\Input Service.exe" StopInputService SkipStopInputService + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StopInputService SkipStopInputService StopInputService: - ExecWait '"$INSTDIR\Input Service\Input Service.exe" /stop' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /stop' SkipStopInputService: Sleep 100 - CreateDirectory "$APPDATA\IR Server Suite" - CreateDirectory "$APPDATA\IR Server Suite\Logs" - CreateDirectory "$APPDATA\IR Server Suite\IR Commands" +SectionEnd +;====================================== + +Section "-Core" + + DetailPrint "Setting up paths and installing core files ..." + + ; Use the all users context + SetShellVarContext all + + CreateDirectory "$APPDATA\${PRODUCT_NAME}" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Logs" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR Commands" + ; Copy known set top boxes - CreateDirectory "$APPDATA\IR Server Suite\Set Top Boxes" - SetOutPath "$APPDATA\IR Server Suite\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\*.*" - ; Set output path to install dir - SetOutPath "$INSTDIR" + ; Create a start menu shortcut folder + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" - ; Write documentation - SetOverwrite ifnewer - File "Documentation\IR Server Suite.chm" - - ; Write the uninstaller - WriteUninstaller "Uninstall IR Server Suite.exe" - - ; Create a shortcut to the uninstaller & documentation - CreateDirectory "$SMPROGRAMS\IR Server Suite" - CreateShortCut "$SMPROGRAMS\IR Server Suite\Log Files.lnk" "$APPDATA\IR Server Suite\Logs" "" "" 0 - CreateShortCut "$SMPROGRAMS\IR Server Suite\Uninstall.lnk" "$INSTDIR\Uninstall IR Server Suite.exe" "" "$INSTDIR\Uninstall IR Server Suite.exe" 0 - CreateShortCut "$SMPROGRAMS\IR Server Suite\Documentation.lnk" "$INSTDIR\IR Server Suite.chm" "" "" 0 - - ; Write the installation path into the registry - WriteRegStr HKLM "Software\IR Server Suite" "Install_Dir" "$INSTDIR" - - ; Write the uninstall keys for Windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "DisplayName" "IR Server Suite" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "UninstallString" '"$INSTDIR\Uninstall IR Server Suite.exe"' - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\IR Server Suite" "NoRepair" 1 - SectionEnd -;-------------------------------- +;====================================== -Section "Input Service" +Section "Input Service" SectionInputService DetailPrint "Installing Input Service ..." @@ -142,25 +269,25 @@ SetShellVarContext all ; Uninstall current Input Service ... - ExecWait '"$INSTDIR\Input Service\Input Service.exe" /uninstall' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' Sleep 100 ; Installing Input Service - CreateDirectory "$INSTDIR\Input Service" - SetOutPath "$INSTDIR\Input Service" + CreateDirectory "$DIR_INSTALL\Input Service" + SetOutPath "$DIR_INSTALL\Input Service" SetOverwrite ifnewer File "Input Service\Input Service\bin\Release\*.*" ; Installing Input Service Configuration - CreateDirectory "$INSTDIR\Input Service Configuration" - SetOutPath "$INSTDIR\Input Service Configuration" + CreateDirectory "$DIR_INSTALL\Input Service Configuration" + SetOutPath "$DIR_INSTALL\Input Service Configuration" SetOverwrite ifnewer File "Input Service\Input Service Configuration\bin\Release\*.*" ; Install IR Server Plugins ... DetailPrint "Installing IR Server Plugins ..." - CreateDirectory "$INSTDIR\IR Server Plugins" - SetOutPath "$INSTDIR\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\Release\*.*" @@ -184,20 +311,20 @@ File "IR Server Plugins\XBCDRC Receiver\bin\Release\*.*" ; Create App Data Folder for IR Server configuration files. - CreateDirectory "$APPDATA\IR Server Suite\Input Service" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service" ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\IR Server Suite\Input Service Configuration.lnk" "$INSTDIR\Input Service Configuration\Input Service Configuration.exe" "" "$INSTDIR\Input Service Configuration\Input Service Configuration.exe" 0 + 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 '"$INSTDIR\Input Service\Input Service.exe" /install' + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /install' SectionEnd -;-------------------------------- +;====================================== -Section "MP Control Plugin" +Section "MP Control Plugin" SectionMPControlPlugin DetailPrint "Installing MP Control Plugin ..." @@ -205,7 +332,7 @@ SetShellVarContext all ; Write plugin dll - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\Plugins\Process" + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" SetOverwrite ifnewer File "MediaPortal Plugins\MP Control Plugin\bin\Release\MPUtils.dll" File "MediaPortal Plugins\MP Control Plugin\bin\Release\IrssComms.dll" @@ -213,24 +340,24 @@ File "MediaPortal Plugins\MP Control Plugin\bin\Release\MPControlPlugin.dll" ; Write input mapping - SetOutPath "$PROGRAMFILES\Team MediaPortal\MediaPortal\InputDeviceMappings\defaults" + SetOutPath "$DIR_MEDIAPORTAL\InputDeviceMappings\defaults" SetOverwrite ifnewer File "MediaPortal Plugins\MP Control Plugin\InputMapping\MPControlPlugin.xml" ; Write app data - CreateDirectory "$APPDATA\IR Server Suite\MP Control Plugin" - SetOutPath "$APPDATA\IR Server Suite\MP Control Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" + SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" SetOverwrite ifnewer File /r /x .s... [truncated message content] |