From: <che...@us...> - 2009-04-11 01:58:06
|
Revision: 2782 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2782&view=rev Author: chef_koch Date: 2009-04-11 01:47:41 +0000 (Sat, 11 Apr 2009) Log Message: ----------- reformatting, trying get a better structure added new page to choose between Server and Service Modified Paths: -------------- trunk/plugins/IR Server Suite/setup/setup.nsi Added Paths: ----------- trunk/plugins/IR Server Suite/setup/include/ trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh trunk/plugins/IR Server Suite/setup/languages/ trunk/plugins/IR Server Suite/setup/languages/English.nsh trunk/plugins/IR Server Suite/setup/pages/ trunk/plugins/IR Server Suite/setup/pages/AddRemovePage.nsh trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh Removed Paths: ------------- trunk/plugins/IR Server Suite/setup/CommonNSIS/include-AddRemovePage.nsh trunk/plugins/IR Server Suite/setup/CommonNSIS/include-FileAssociation.nsh trunk/plugins/IR Server Suite/setup/setup-languages.nsh Deleted: trunk/plugins/IR Server Suite/setup/CommonNSIS/include-AddRemovePage.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/CommonNSIS/include-AddRemovePage.nsh 2009-04-10 23:20:32 UTC (rev 2781) +++ trunk/plugins/IR Server Suite/setup/CommonNSIS/include-AddRemovePage.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -1,161 +0,0 @@ -#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 Deleted: trunk/plugins/IR Server Suite/setup/CommonNSIS/include-FileAssociation.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/CommonNSIS/include-FileAssociation.nsh 2009-04-10 23:20:32 UTC (rev 2781) +++ trunk/plugins/IR Server Suite/setup/CommonNSIS/include-FileAssociation.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -1,130 +0,0 @@ -#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 - -#**********************************************************************************************************# -# -# File Association -# -# code was taken from: -# http://nsis.sourceforge.net/File_Association -# -#**********************************************************************************************************# - -# USAGE: - -;!include "registerExtension.nsh" -;... -# later, inside a section: -;${registerExtension} "c:\myplayer.exe" ".mkv" "MKV File" - -;${unregisterExtension} ".mkv" "MKV File" - -#**********************************************************************************************************# - -!ifndef ___FILE_ASSOCIATION__NSH___ -!define ___FILE_ASSOCIATION__NSH___ - - -!define RegisterExtension `!insertmacro RegisterExtension ""` -!define un.RegisterExtension `!insertmacro RegisterExtension "un."` -!define UnRegisterExtension `!insertmacro UnRegisterExtension ""` -!define un.UnRegisterExtension `!insertmacro UnRegisterExtension "un."` - -!macro ___RegisterExtension___ -!define Index "Line${__LINE__}" - pop $R0 ; ext name - pop $R1 - pop $R2 - push $1 - push $0 - ReadRegStr $1 HKCR $R1 "" - StrCmp $1 "" "${Index}-NoBackup" - StrCmp $1 "OptionsFile" "${Index}-NoBackup" - WriteRegStr HKCR $R1 "backup_val" $1 -"${Index}-NoBackup:" - WriteRegStr HKCR $R1 "" $R0 - ReadRegStr $0 HKCR $R0 "" - StrCmp $0 "" 0 "${Index}-Skip" - WriteRegStr HKCR $R0 "" $R0 - WriteRegStr HKCR "$R0\shell" "" "open" - WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0" -"${Index}-Skip:" - WriteRegStr HKCR "$R0\shell\open\command" "" '$R2 "%1"' - WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" - WriteRegStr HKCR "$R0\shell\edit\command" "" '$R2 "%1"' - pop $0 - pop $1 -!undef Index -!macroend - -!macro ___UnRegisterExtension___ - pop $R1 ; description - pop $R0 ; extension -!define Index "Line${__LINE__}" - ReadRegStr $1 HKCR $R0 "" - StrCmp $1 $R1 0 "${Index}-NoOwn" ; only do this if we own it - ReadRegStr $1 HKCR $R0 "backup_val" - StrCmp $1 "" 0 "${Index}-Restore" ; if backup="" then delete the whole key - DeleteRegKey HKCR $R0 - Goto "${Index}-NoOwn" -"${Index}-Restore:" - WriteRegStr HKCR $R0 "" $1 - DeleteRegValue HKCR $R0 "backup_val" - DeleteRegKey HKCR $R1 ;Delete key with association name settings -"${Index}-NoOwn:" -!undef Index -!macroend - - -Function RegisterExtension - !insertmacro ___RegisterExtension___ -FunctionEnd -Function un.RegisterExtension - !insertmacro ___RegisterExtension___ -FunctionEnd - -Function UnRegisterExtension - !insertmacro ___UnRegisterExtension___ -FunctionEnd -Function un.UnRegisterExtension - !insertmacro ___UnRegisterExtension___ -FunctionEnd - - -!macro RegisterExtension UNINSTALL_PREFIX executable extension description - Push "${executable}" ; "full path to my.exe" - Push "${extension}" ; ".mkv" - Push "${description}" ; "MKV File" - Call ${UNINSTALL_PREFIX}RegisterExtension -!macroend - -!macro UnRegisterExtension UNINSTALL_PREFIX extension description - Push "${extension}" ; ".mkv" - Push "${description}" ; "MKV File" - Call ${UNINSTALL_PREFIX}UnRegisterExtension -!macroend - -!endif # !___FILE_ASSOCIATION__NSH___ - Copied: trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh (from rev 2778, trunk/plugins/IR Server Suite/setup/CommonNSIS/include-FileAssociation.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -0,0 +1,130 @@ +#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 + +#**********************************************************************************************************# +# +# File Association +# +# code was taken from: +# http://nsis.sourceforge.net/File_Association +# +#**********************************************************************************************************# + +# USAGE: + +;!include "registerExtension.nsh" +;... +# later, inside a section: +;${registerExtension} "c:\myplayer.exe" ".mkv" "MKV File" + +;${unregisterExtension} ".mkv" "MKV File" + +#**********************************************************************************************************# + +!ifndef ___FILE_ASSOCIATION__NSH___ +!define ___FILE_ASSOCIATION__NSH___ + + +!define RegisterExtension `!insertmacro RegisterExtension ""` +!define un.RegisterExtension `!insertmacro RegisterExtension "un."` +!define UnRegisterExtension `!insertmacro UnRegisterExtension ""` +!define un.UnRegisterExtension `!insertmacro UnRegisterExtension "un."` + +!macro ___RegisterExtension___ +!define Index "Line${__LINE__}" + pop $R0 ; ext name + pop $R1 + pop $R2 + push $1 + push $0 + ReadRegStr $1 HKCR $R1 "" + StrCmp $1 "" "${Index}-NoBackup" + StrCmp $1 "OptionsFile" "${Index}-NoBackup" + WriteRegStr HKCR $R1 "backup_val" $1 +"${Index}-NoBackup:" + WriteRegStr HKCR $R1 "" $R0 + ReadRegStr $0 HKCR $R0 "" + StrCmp $0 "" 0 "${Index}-Skip" + WriteRegStr HKCR $R0 "" $R0 + WriteRegStr HKCR "$R0\shell" "" "open" + WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0" +"${Index}-Skip:" + WriteRegStr HKCR "$R0\shell\open\command" "" '$R2 "%1"' + WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" + WriteRegStr HKCR "$R0\shell\edit\command" "" '$R2 "%1"' + pop $0 + pop $1 +!undef Index +!macroend + +!macro ___UnRegisterExtension___ + pop $R1 ; description + pop $R0 ; extension +!define Index "Line${__LINE__}" + ReadRegStr $1 HKCR $R0 "" + StrCmp $1 $R1 0 "${Index}-NoOwn" ; only do this if we own it + ReadRegStr $1 HKCR $R0 "backup_val" + StrCmp $1 "" 0 "${Index}-Restore" ; if backup="" then delete the whole key + DeleteRegKey HKCR $R0 + Goto "${Index}-NoOwn" +"${Index}-Restore:" + WriteRegStr HKCR $R0 "" $1 + DeleteRegValue HKCR $R0 "backup_val" + DeleteRegKey HKCR $R1 ;Delete key with association name settings +"${Index}-NoOwn:" +!undef Index +!macroend + + +Function RegisterExtension + !insertmacro ___RegisterExtension___ +FunctionEnd +Function un.RegisterExtension + !insertmacro ___RegisterExtension___ +FunctionEnd + +Function UnRegisterExtension + !insertmacro ___UnRegisterExtension___ +FunctionEnd +Function un.UnRegisterExtension + !insertmacro ___UnRegisterExtension___ +FunctionEnd + + +!macro RegisterExtension UNINSTALL_PREFIX executable extension description + Push "${executable}" ; "full path to my.exe" + Push "${extension}" ; ".mkv" + Push "${description}" ; "MKV File" + Call ${UNINSTALL_PREFIX}RegisterExtension +!macroend + +!macro UnRegisterExtension UNINSTALL_PREFIX extension description + Push "${extension}" ; ".mkv" + Push "${description}" ; "MKV File" + Call ${UNINSTALL_PREFIX}UnRegisterExtension +!macroend + +!endif # !___FILE_ASSOCIATION__NSH___ + Added: trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -0,0 +1,13 @@ +# These macros are used to simplify the translation files +# so that translators have to deal with as little with the +# scripting language as possible. + +!macro LANG_LOAD LANGLOAD + !insertmacro MUI_LANGUAGE "${LANGLOAD}" + !include "languages\${LANGLOAD}.nsh" + !undef LANG +!macroend + +!macro LANG_STRING NAME VALUE + LangString "${NAME}" "${LANG_${LANG}}" "${VALUE}" +!macroend \ No newline at end of file Added: trunk/plugins/IR Server Suite/setup/languages/English.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/languages/English.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/languages/English.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -0,0 +1,55 @@ +!define LANG "ENGLISH" ; Must be the lang name define my NSIS + +!insertmacro LANG_STRING ^UninstallLink "Uninstall $(^Name)" + +!insertmacro LANG_STRING TEXT_MSGBOX_REMOVE_ALL "Do you want to remove your User settings?$\r$\nAttention: This will remove all your customised settings including Skins and Databases." + + + +# Descriptions for components (sections) +!insertmacro LANG_STRING DESC_SectionInputService "A windows service that provides access to your IR devices." + +!insertmacro LANG_STRING DESC_SectionGroupMP "MediaPortal plugins." +!insertmacro LANG_STRING DESC_SectionMPControlPlugin "Connects to the Input Service to control MediaPortal." +!insertmacro LANG_STRING DESC_SectionMPBlastZonePlugin "Lets you control your IR devices from within the MediaPortal GUI." +!insertmacro LANG_STRING DESC_SectionTV2BlasterPlugin "For tuning external channels (on Set Top Boxes) with the default MediaPortal TV engine." + +!insertmacro LANG_STRING DESC_SectionGroupTV3 "MediaPortal TV Server plugins." +!insertmacro LANG_STRING DESC_SectionTV3BlasterPlugin "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." +!insertmacro LANG_STRING DESC_SectionGroupMCE "Windows Media Center add-ons." + +!insertmacro LANG_STRING DESC_SectionDebugClient "Simple testing tool for troubleshooting input and communications problems." +!insertmacro LANG_STRING DESC_SectionIRFileTool "Tool for learning, modifying, testing, correcting and converting IR command files." +!insertmacro LANG_STRING DESC_SectionKeyboardInputRelay "Relays keyboard input to the Input Service to act on keypresses like remote buttons." +!insertmacro LANG_STRING DESC_SectionTranslator "Control your whole PC." +!insertmacro LANG_STRING DESC_SectionTrayLauncher "Simple program to launch an application of your choosing when a particular button is pressed." +!insertmacro LANG_STRING DESC_SectionVirtualRemote "Simulated remote control. Includes PC application, web, and Smart Devices versions." + +!insertmacro LANG_STRING DESC_SectionIRBlast "Command line tools for blasting IR codes." +!insertmacro LANG_STRING DESC_SectionDboxTuner "Command line tuner for Dreambox devices." +!insertmacro LANG_STRING DESC_SectionHcwPvrTuner "Command line tuner for Hauppauge PVR devices." +!insertmacro LANG_STRING DESC_SectionMCEBlaster "For tuning external channels (on Set Top Boxes) with Windows Media Center." + +# Strings for \xC2ddRemove-Page +!insertmacro LANG_STRING TEXT_ADDREMOVE_HEADER "Already Installed" +!insertmacro LANG_STRING TEXT_ADDREMOVE_HEADER2_REPAIR "Choose the maintenance option to perform." +!insertmacro LANG_STRING TEXT_ADDREMOVE_HEADER2_UPDOWN "Choose how you want to install $(^Name)." +!insertmacro LANG_STRING TEXT_ADDREMOVE_INFO_REPAIR "$(^Name) ${VERSION} is already installed. Select the operation you want to perform and click Next to continue." +!insertmacro LANG_STRING TEXT_ADDREMOVE_INFO_UPGRADE "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." +!insertmacro LANG_STRING TEXT_ADDREMOVE_INFO_DOWNGRADE "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." +!insertmacro LANG_STRING TEXT_ADDREMOVE_REPAIR_OPT1 "Add/Remove/Reinstall components" +!insertmacro LANG_STRING TEXT_ADDREMOVE_REPAIR_OPT2 "Uninstall $(^Name)" +!insertmacro LANG_STRING TEXT_ADDREMOVE_UPDOWN_OPT1 "Uninstall before installing" +!insertmacro LANG_STRING TEXT_ADDREMOVE_UPDOWN_OPT2 "Do not uninstall" + +# Strings for ServerServiceMode-Page +!insertmacro LANG_STRING ServerServiceModePage_HEADER "TEXT_ServerServiceMode_HEADER" +!insertmacro LANG_STRING ServerServiceModePage_HEADER2 "TEXT_ServerServiceMode_HEADER2" +!insertmacro LANG_STRING ServerServiceModePage_INFO "TEXT_ServerServiceMode_INFO" + +!insertmacro LANG_STRING ServerServiceModePage_OPT0 "TEXT_ServerServiceMode_OPT0" +!insertmacro LANG_STRING ServerServiceModePage_OPT0_DESC "TEXT_ServerServiceMode_OPT0_DESC" + +!insertmacro LANG_STRING ServerServiceModePage_OPT1 "TEXT_ServerServiceMode_OPT1" +!insertmacro LANG_STRING ServerServiceModePage_OPT1_DESC "TEXT_ServerServiceMode_OPT1_DESC" + Copied: trunk/plugins/IR Server Suite/setup/pages/AddRemovePage.nsh (from rev 2778, trunk/plugins/IR Server Suite/setup/CommonNSIS/include-AddRemovePage.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup/pages/AddRemovePage.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/pages/AddRemovePage.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -0,0 +1,157 @@ +#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. +# +#**********************************************************************************************************# + +!ifndef ___ADD_REMOVE_PAGE__NSH___ +!define ___ADD_REMOVE_PAGE__NSH___ + +!macro AddRemovePage RegKey + +!include WordFunc.nsh +!include FileFunc.nsh + +!insertmacro VersionCompare +!insertmacro GetParent + +##### Add/Remove/Reinstall page +Var ReinstallPageCheck + +Function PageReinstall + ReadRegStr $R0 HKLM "${RegKey}" "InstallPath" + ${If} $R0 == "" + Abort + ${EndIf} + + ReadRegDWORD $R0 HKLM "${RegKey}" "VersionMajor" + ReadRegDWORD $R1 HKLM "${RegKey}" "VersionMinor" + ReadRegDWORD $R2 HKLM "${RegKey}" "VersionRevision" + ReadRegDWORD $R3 HKLM "${RegKey}" "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 "${RegKey}" 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 + +!macroend + +!endif # !___ADD_REMOVE_PAGE__NSH___ Added: trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -0,0 +1,83 @@ +#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 + +!ifndef ___SERVER_SERVICE_MODE_PAGE__NSH___ +!define ___SERVER_SERVICE_MODE_PAGE__NSH___ + +!include WordFunc.nsh +!include FileFunc.nsh + +!insertmacro VersionCompare +!insertmacro GetParent + +##### Add/Remove/Reinstall page +Var ServerServiceMode +Var ServerServiceModePage.optBtn0 +Var ServerServiceModePage.optBtn0.state +Var ServerServiceModePage.optBtn1 +Var ServerServiceModePage.optBtn1.state + +Function PageServerServiceMode + !insertmacro MUI_HEADER_TEXT "$(ServerServiceModePage_HEADER)" "$(ServerServiceModePage_HEADER2)" + + nsDialogs::Create /NOUNLOAD 1018 + + ${NSD_CreateLabel} 0 0 100% 24u "$(ServerServiceModePage_INFO)" + Pop $R1 + + + ${NSD_CreateRadioButton} 20u 30u -30u 8u "$(ServerServiceModePage_OPT0)" + Pop $ServerServiceModePage.optBtn0 + ${NSD_OnClick} $ServerServiceModePage.optBtn0 PageServerServiceModeUpdateSelection + + ${NSD_CreateLabel} 30u 45u 100% 24u "$(ServerServiceModePage_OPT0_DESC)" + + + ${NSD_CreateRadioButton} 20u 70u -30u 8u "$(ServerServiceModePage_OPT1)" + Pop $ServerServiceModePage.optBtn1 + ${NSD_OnClick} $ServerServiceModePage.optBtn1 PageServerServiceModeUpdateSelection + + ${NSD_CreateLabel} 30u 85u 100% 24u "$(ServerServiceModePage_OPT1_DESC)" + + + SendMessage $ServerServiceModePage.optBtn0 ${BM_SETCHECK} ${BST_CHECKED} 0 + + nsDialogs::Show +FunctionEnd + +Function PageServerServiceModeUpdateSelection + + ${NSD_GetState} $ServerServiceModePage.optBtn0 $ServerServiceModePage.optBtn0.state + ${NSD_GetState} $ServerServiceModePage.optBtn1 $ServerServiceModePage.optBtn1.state + + ${If} $ServerServiceModePage.optBtn1.state == ${BST_CHECKED} + StrCpy $ServerServiceMode 1 + ${Else} + StrCpy $ServerServiceMode 0 + ${EndIf} + +FunctionEnd + +!endif # !___SERVER_SERVICE_MODE_PAGE__NSH___ Deleted: trunk/plugins/IR Server Suite/setup/setup-languages.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/setup-languages.nsh 2009-04-10 23:20:32 UTC (rev 2781) +++ trunk/plugins/IR Server Suite/setup/setup-languages.nsh 2009-04-11 01:47:41 UTC (rev 2782) @@ -1,55 +0,0 @@ -#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 header contains multilanguage strings for the setup routine -# -#**********************************************************************************************************# - -# ENGLISH -LangString DESC_SectionInputService ${LANG_ENGLISH} "A windows service that provides access to your IR devices." -LangString DESC_SectionGroupMP ${LANG_ENGLISH} "MediaPortal plugins." -LangString DESC_SectionMPControlPlugin ${LANG_ENGLISH} "Connects to the Input Service to control MediaPortal." -LangString DESC_SectionMPBlastZonePlugin ${LANG_ENGLISH} "Lets you control your IR devices from within the MediaPortal GUI." -LangString DESC_SectionTV2BlasterPlugin ${LANG_ENGLISH} "For tuning external channels (on Set Top Boxes) with the default MediaPortal TV engine." -LangString DESC_SectionGroupTV3 ${LANG_ENGLISH} "MediaPortal TV Server plugins." -LangString DESC_SectionTV3BlasterPlugin ${LANG_ENGLISH} "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." -LangString DESC_SectionGroupMCE ${LANG_ENGLISH} "Windows Media Center add-ons." -LangString DESC_SectionMCEBlaster ${LANG_ENGLISH} "For tuning external channels (on Set Top Boxes) with Windows Media Center." -LangString DESC_SectionTranslator ${LANG_ENGLISH} "Control your whole PC." -LangString DESC_SectionTrayLauncher ${LANG_ENGLISH} "Simple program to launch an application of your choosing when a particular button is pressed." -LangString DESC_SectionVirtualRemote ${LANG_ENGLISH} "Simulated remote control. Includes PC application, web, and Smart Devices versions." -LangString DESC_SectionIRBlast ${LANG_ENGLISH} "Command line tools for blasting IR codes." -LangString DESC_SectionIRFileTool ${LANG_ENGLISH} "Tool for learning, modifying, testing, correcting and converting IR command files." -LangString DESC_SectionKeyboardInputRelay ${LANG_ENGLISH} "Relays keyboard input to the Input Service to act on keypresses like remote buttons." -LangString DESC_SectionDboxTuner ${LANG_ENGLISH} "Command line tuner for Dreambox devices." -LangString DESC_SectionHcwPvrTuner ${LANG_ENGLISH} "Command line tuner for Hauppauge PVR devices." -LangString DESC_SectionDebugClient ${LANG_ENGLISH} "Simple testing tool for troubleshooting input and communications problems." - - -LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)" - -LangString TEXT_MSGBOX_REMOVE_ALL ${LANG_ENGLISH} "Do you want to remove your User settings?$\r$\nAttention: This will remove all your customised settings including Skins and Databases." Modified: trunk/plugins/IR Server Suite/setup/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup/setup.nsi 2009-04-10 23:20:32 UTC (rev 2781) +++ trunk/plugins/IR Server Suite/setup/setup.nsi 2009-04-11 01:47:41 UTC (rev 2782) @@ -76,14 +76,17 @@ !include Memento.nsh !include WinVer.nsh +!include include\LanguageMacros.nsh !define USE_READ_MP_DIRS ; defines if MediaPortal's special directories needs to be read from config !define USE_INSTALL_LOG ; enables logging during installation and uninstallation !include "${svn_InstallScripts}\include-CommonMPMacros.nsh" -!include "${svn_InstallScripts}\include-AddRemovePage.nsh" -!include setup-languages.nsh +!include pages\AddRemovePage.nsh +!insertmacro AddRemovePage "${REG_UNINSTALL}" +!include pages\ServerServiceMode.nsh + ; FileFunc macros !insertmacro GetParent @@ -132,6 +135,7 @@ # INSTALLER INTERFACE #--------------------------------------------------------------------------- !insertmacro MUI_PAGE_WELCOME +;Page custom PageServerServiceMode Page custom PageReinstall PageLeaveReinstall !insertmacro MUI_PAGE_LICENSE "..\Documentation\LICENSE.GPL" !insertmacro MUI_PAGE_COMPONENTS @@ -173,7 +177,8 @@ !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH -!insertmacro MUI_LANGUAGE "English" +# Installer languages +!insertmacro LANG_LOAD "English" ;====================================== ;====================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |