From: <che...@us...> - 2009-04-15 20:17:23
|
Revision: 2801 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2801&view=rev Author: chef_koch Date: 2009-04-15 20:17:16 +0000 (Wed, 15 Apr 2009) Log Message: ----------- splitted common mp macros into separate files updated all import files from mp svn ServerServiceMode-Page is fully working now Modified Paths: -------------- 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/English.nsh trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh trunk/plugins/IR Server Suite/setup/setup.nsi Added Paths: ----------- trunk/plugins/IR Server Suite/setup/GetVersion-plugin/ trunk/plugins/IR Server Suite/setup/XML-plugin/ trunk/plugins/IR Server Suite/setup/include/IrssSystemRegistry.nsh trunk/plugins/IR Server Suite/setup/include/LoggingMacros.nsh trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh Removed Paths: ------------- trunk/plugins/IR Server Suite/setup/CommonNSIS/ Modified: trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh 2009-04-15 14:42:01 UTC (rev 2800) +++ trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -1,7 +1,7 @@ -#region Copyright (C) 2005-2008 Team MediaPortal +#region Copyright (C) 2005-2009 Team MediaPortal /* - * Copyright (C) 2005-2008 Team MediaPortal + * Copyright (C) 2005-2009 Team MediaPortal * http://www.team-mediaportal.com * * This Program is free software; you can redistribute it and/or modify @@ -23,65 +23,176 @@ #endregion -#**********************************************************************************************************# -# -# File Association -# -# code was taken from: -# http://nsis.sourceforge.net/File_Association -# -#**********************************************************************************************************# +/* +_____________________________________________________________________________ -# USAGE: + File Association +_____________________________________________________________________________ -;!include "registerExtension.nsh" -;... -# later, inside a section: -;${registerExtension} "c:\myplayer.exe" ".mkv" "MKV File" + Based on code taken from http://nsis.sourceforge.net/File_Association -;${unregisterExtension} ".mkv" "MKV File" + Usage in script: + 1. !include "FileFunc.nsh" + 2. [Section|Function] + ${FileAssociationFunction} "Param1" "Param2" "..." $var + [SectionEnd|FunctionEnd] -#**********************************************************************************************************# + FileAssociationFunction=[RegisterExtension|UnRegisterExtension] -!ifndef ___FILE_ASSOCIATION__NSH___ -!define ___FILE_ASSOCIATION__NSH___ +_____________________________________________________________________________ + ${RegisterExtension} "[executable]" "[extension]" "[description]" -!define RegisterExtension `!insertmacro RegisterExtension ""` -!define un.RegisterExtension `!insertmacro RegisterExtension "un."` -!define UnRegisterExtension `!insertmacro UnRegisterExtension ""` -!define un.UnRegisterExtension `!insertmacro UnRegisterExtension "un."` +"[executable]" ; executable which opens the file format + ; +"[extension]" ; extension, which represents the file format to open + ; +"[description]" ; description for the extension. This will be display in Windows Explorer. + ; -!macro ___RegisterExtension___ + + ${UnRegisterExtension} "[extension]" "[description]" + +"[extension]" ; extension, which represents the file format to open + ; +"[description]" ; description for the extension. This will be display in Windows Explorer. + ; + +_____________________________________________________________________________ + + Macros +_____________________________________________________________________________ + + Change log window verbosity (default: 3=no script) + + Example: + !include "FileAssociation.nsh" + !insertmacro RegisterExtension + ${FileAssociation_VERBOSE} 4 # all verbosity + !insertmacro UnRegisterExtension + ${FileAssociation_VERBOSE} 3 # no script +*/ + + +!ifndef FileAssociation_INCLUDED +!define FileAssociation_INCLUDED + +!include Util.nsh + +!verbose push +!verbose 3 +!ifndef _FileAssociation_VERBOSE + !define _FileAssociation_VERBOSE 3 +!endif +!verbose ${_FileAssociation_VERBOSE} +!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE` +!verbose pop + +!macro FileAssociation_VERBOSE _VERBOSE + !verbose push + !verbose 3 + !undef _FileAssociation_VERBOSE + !define _FileAssociation_VERBOSE ${_VERBOSE} + !verbose pop +!macroend + + + +!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_EXECUTABLE}` + Push `${_EXTENSION}` + Push `${_DESCRIPTION}` + ${CallArtificialFunction} RegisterExtension_ + !verbose pop +!macroend + +!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_EXTENSION}` + Push `${_DESCRIPTION}` + ${CallArtificialFunction} UnRegisterExtension_ + !verbose pop +!macroend + + + +!define RegisterExtension `!insertmacro RegisterExtensionCall` +!define un.RegisterExtension `!insertmacro RegisterExtensionCall` + +!macro RegisterExtension +!macroend + +!macro un.RegisterExtension +!macroend + +!macro RegisterExtension_ + !verbose push + !verbose ${_FileAssociation_VERBOSE} + + Exch $R2 ;desc + Exch + Exch $R1 ;ext + Exch + Exch 2 + Exch $R0 ;exe + Exch 2 + Push $0 + Push $1 + !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" + 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 + + Pop $1 + Pop $0 + Pop $R2 + Pop $R1 + Pop $R0 + + !verbose pop !macroend -!macro ___UnRegisterExtension___ - pop $R1 ; description - pop $R0 ; extension + + +!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall` +!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall` + +!macro UnRegisterExtension +!macroend + +!macro un.UnRegisterExtension +!macroend + +!macro UnRegisterExtension_ + !verbose push + !verbose ${_FileAssociation_VERBOSE} + + Exch $R1 ;desc + Exch + Exch $R0 ;ext + Exch + Push $0 + Push $1 + !define Index "Line${__LINE__}" ReadRegStr $1 HKCR $R0 "" StrCmp $1 $R1 0 "${Index}-NoOwn" ; only do this if we own it @@ -89,42 +200,21 @@ 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 + Pop $1 + Pop $0 + Pop $R1 + Pop $R0 - -!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 + !verbose pop !macroend - -!macro UnRegisterExtension UNINSTALL_PREFIX extension description - Push "${extension}" ; ".mkv" - Push "${description}" ; "MKV File" - Call ${UNINSTALL_PREFIX}UnRegisterExtension -!macroend -!endif # !___FILE_ASSOCIATION__NSH___ - +!endif # !FileAssociation_INCLUDED Added: trunk/plugins/IR Server Suite/setup/include/IrssSystemRegistry.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/IrssSystemRegistry.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/IrssSystemRegistry.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -0,0 +1,40 @@ +#region Copyright (C) 2005-2009 Team MediaPortal + +/* + * Copyright (C) 2005-2009 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 IrssSystemRegistry_INCLUDED +!define IrssSystemRegistry_INCLUDED + +!define AutoRunPath 'HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"' + +!macro SetAutoRun name executablePath + WriteRegStr ${AutoRunPath} '${name}' '${executablePath}' +!macroend + +!macro RemoveAutoRun name + WriteRegStr ${AutoRunPath} '${name}' '' +!macroend + +!endif # !IrssSystemRegistry_INCLUDED Modified: trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh 2009-04-15 14:42:01 UTC (rev 2800) +++ trunk/plugins/IR Server Suite/setup/include/LanguageMacros.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -1,13 +1,54 @@ -# These macros are used to simplify the translation files -# so that translators have to deal with as little with the -# scripting language as possible. +#region Copyright (C) 2005-2009 Team MediaPortal +/* + * Copyright (C) 2005-2009 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 + +/* +_____________________________________________________________________________ + + LanguageMacros +_____________________________________________________________________________ + + These macros are used to simplify the translation files + so that translators have to deal with as little with the + scripting language as possible. +*/ + + +!ifndef ___LanguageMacros__NSH___ +!define ___LanguageMacros__NSH___ + + !macro LANG_LOAD LANGLOAD +!ifdef MUI_INCLUDED !insertmacro MUI_LANGUAGE "${LANGLOAD}" - !include "languages\${LANGLOAD}.nsh" +!endif + !include "${svn_InstallScripts}\languages\${LANGLOAD}.nsh" !undef LANG !macroend !macro LANG_STRING NAME VALUE LangString "${NAME}" "${LANG_${LANG}}" "${VALUE}" -!macroend \ No newline at end of file +!macroend + +!endif # !___LanguageMacros__NSH___ Copied: trunk/plugins/IR Server Suite/setup/include/LoggingMacros.nsh (from rev 2800, trunk/plugins/IR Server Suite/setup/CommonNSIS/include-CommonMPMacros.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup/include/LoggingMacros.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/LoggingMacros.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -0,0 +1,135 @@ +#region Copyright (C) 2005-2009 Team MediaPortal + +/* + * Copyright (C) 2005-2009 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 + +/* +_____________________________________________________________________________ + + NSIS logging system +_____________________________________________________________________________ + + These macros for writing a log file during the installation process, + which can be used for debugging the installation process. + + Disable Logging to file by defining NO_INSTALL_LOG in host script. + !define NO_INSTALL_LOG +*/ + + +!ifndef LoggingMacros_INCLUDED +!define LoggingMacros_INCLUDED + + +!define prefixERROR "[ERROR !!!] " +!define prefixDEBUG "[ DEBUG ] " +!define prefixINFO "[ INFO] " + +!ifndef NO_INSTALL_LOG + +!include FileFunc.nsh + +Var LogFile +Var TempInstallLog + + +!define LOG_OPEN `!insertmacro LOG_OPEN ""` +!define un.LOG_OPEN `!insertmacro LOG_OPEN "un."` +!macro LOG_OPEN UNINSTALL_PREFIX + GetTempFileName $TempInstallLog + FileOpen $LogFile "$TempInstallLog" w + + ${${UNINSTALL_PREFIX}GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + ${LOG_TEXT} "INFO" "$(^Name) ${UNINSTALL_PREFIX}installation" + ${LOG_TEXT} "INFO" "Logging started: $0.$1.$2 $4:$5:$6" + ${LOG_TEXT} "INFO" "${UNINSTALL_PREFIX}installer version: ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}" + ${LOG_TEXT} "INFO" "============================================================================================" +!macroend + + +!define LOG_CLOSE `!insertmacro LOG_CLOSE ""` +!define un.LOG_CLOSE `!insertmacro LOG_CLOSE "un."` +!macro LOG_CLOSE UNINSTALL_PREFIX + SetShellVarContext all + + ${${UNINSTALL_PREFIX}GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + ${LOG_TEXT} "INFO" "============================================================================================" + ${LOG_TEXT} "INFO" "Logging stopped: $0.$1.$2 $4:$5:$6" + ${LOG_TEXT} "INFO" "${UNINSTALL_PREFIX}installer version: ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}" + ${LOG_TEXT} "INFO" "$(^Name) ${UNINSTALL_PREFIX}installation" + + FileClose $LogFile + +!ifdef INSTALL_LOG_FILE + CopyFiles "$TempInstallLog" "${INSTALL_LOG_FILE}" +!else + !ifndef COMMON_APPDATA + !error "$\r$\n$\r$\nCOMMON_APPDATA is not defined!$\r$\n$\r$\n" + !endif + + ${${UNINSTALL_PREFIX}GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + CopyFiles "$TempInstallLog" "${COMMON_APPDATA}\logs\${UNINSTALL_PREFIX}install_${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}_$2-$1-$0_$4-$5-$6.log" + + Delete "$TempInstallLog" + +!endif +!macroend + + +!define LOG_TEXT `!insertmacro LOG_TEXT` +!macro LOG_TEXT LEVEL TEXT + +!if "${LEVEL}" != "DEBUG" + !if "${LEVEL}" != "ERROR" + !if "${LEVEL}" != "INFO" + !error "$\r$\n$\r$\nYou call macro LOG_TEXT with wrong LogLevel. Only 'DEBUG', 'ERROR' and 'INFO' are valid!$\r$\n$\r$\n" + !else + DetailPrint "${prefix${LEVEL}}${TEXT}" + !endif + !else + DetailPrint "${prefix${LEVEL}}${TEXT}" + !endif +!endif + + FileWrite $LogFile "${prefix${LEVEL}}${TEXT}$\r$\n" + +!macroend + +!else #NO_INSTALL_LOG + +!define LOG_OPEN `!insertmacro LOG_OPEN` +!macro LOG_OPEN +!macroend + +!define LOG_CLOSE `!insertmacro LOG_CLOSE` +!macro LOG_CLOSE +!macroend + +!define LOG_TEXT `!insertmacro LOG_TEXT` +!macro LOG_TEXT LEVEL TEXT + DetailPrint "${prefix${LEVEL}}${TEXT}" +!macroend + +!endif #NO_INSTALL_LOG + +!endif # !LoggingMacros_INCLUDED Copied: trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh (from rev 2800, trunk/plugins/IR Server Suite/setup/CommonNSIS/include-CommonMPMacros.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -0,0 +1,292 @@ +#region Copyright (C) 2005-2009 Team MediaPortal + +/* + * Copyright (C) 2005-2009 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 ___MediaPortalDirectories__NSH___ +!define ___MediaPortalDirectories__NSH___ + +!include LogicLib.nsh +!include "${svn_InstallScripts}\include\LoggingMacros.nsh" + + +!AddPluginDir "${svn_InstallScripts}\XML-plugin\Plugin" +!include "${svn_InstallScripts}\XML-plugin\Include\XML.nsh" + +#--------------------------------------------------------------------------- +# Read Special MediaPortal directories from xml +# +# enable it by defining USE_READ_MP_DIRS in parent script +#--------------------------------------------------------------------------- + +Var MyDocs +Var UserAppData +Var CommonAppData + +Var MPdir.Base + +Var MPdir.Config +Var MPdir.Plugins +Var MPdir.Log +Var MPdir.CustomInputDevice +Var MPdir.CustomInputDefault +Var MPdir.Skin +Var MPdir.Language +Var MPdir.Database +Var MPdir.Thumbs +Var MPdir.Weather +Var MPdir.Cache +Var MPdir.BurnerSupport + +#*************************** +#*************************** + +!macro GET_PATH_TEXT + + Pop $R0 + + ${xml::GotoPath} "/Config" $0 + ${If} $0 != 0 + ${LOG_TEXT} "ERROR" "xml::GotoPath /Config" + Goto error + ${EndIf} + + loop: + + ${xml::FindNextElement} "Dir" $0 $1 + ${If} $1 != 0 + ${LOG_TEXT} "ERROR" "xml::FindNextElement >/Dir< >$0<" + Goto error + ${EndIf} + + ${xml::ElementPath} $0 + ${xml::GetAttribute} "id" $0 $1 + ${If} $1 != 0 + ${LOG_TEXT} "ERROR" "xml::GetAttribute >id< >$0<" + Goto error + ${EndIf} + ${IfThen} $0 == $R0 ${|} Goto foundDir ${|} + + Goto loop + + + foundDir: + ${xml::ElementPath} $0 + ${xml::GotoPath} "$0/Path" $1 + ${If} $1 != 0 + ${LOG_TEXT} "ERROR" "xml::GotoPath >$0/Path<" + Goto error + ${EndIf} + + ${xml::GetText} $0 $1 + ${If} $1 != 0 + ; maybe the path is only empty, which means MPdir.Base + #MessageBox MB_OK "error: xml::GetText" + #Goto error + StrCpy $0 "" + ${EndIf} + + Push $0 + Goto end + + error: + Push "-1" + + end: + +!macroend +Function GET_PATH_TEXT + !insertmacro GET_PATH_TEXT +FunctionEnd +Function un.GET_PATH_TEXT + !insertmacro GET_PATH_TEXT +FunctionEnd + +#*************************** +#*************************** + +!include FileFunc.nsh +!insertmacro GetRoot +!insertmacro un.GetRoot +!include WordFunc.nsh +!insertmacro WordReplace +!insertmacro un.WordReplace +!macro ReadMPdir UNINSTALL_PREFIX DIR + ;${LOG_TEXT} "DEBUG" "macro: ReadMPdir | DIR: ${DIR}" + + Push "${DIR}" + Call ${UNINSTALL_PREFIX}GET_PATH_TEXT + Pop $0 + ${IfThen} $0 == -1 ${|} Goto error ${|} + + ;${LOG_TEXT} "DEBUG" "macro: ReadMPdir | text found in xml: '$0'" + ${${UNINSTALL_PREFIX}WordReplace} "$0" "%APPDATA%" "$UserAppData" "+" $0 + ${${UNINSTALL_PREFIX}WordReplace} "$0" "%PROGRAMDATA%" "$CommonAppData" "+" $0 + + ${${UNINSTALL_PREFIX}GetRoot} "$0" $1 + + ${IfThen} $1 == "" ${|} StrCpy $0 "$MPdir.Base\$0" ${|} + + ; TRIM \ AT THE END + StrLen $1 "$0" + #${DEBUG_MSG} "1 $1$\r$\n2 $2$\r$\n3 $3" + IntOp $2 $1 - 1 + #${DEBUG_MSG} "1 $1$\r$\n2 $2$\r$\n3 $3" + StrCpy $3 $0 1 $2 + #${DEBUG_MSG} "1 $1$\r$\n2 $2$\r$\n3 $3" + + ${If} $3 == "\" + StrCpy $MPdir.${DIR} $0 $2 + ${Else} + StrCpy $MPdir.${DIR} $0 + ${EndIf} + +!macroend + +#*************************** +#*************************** + +!macro ReadConfig UNINSTALL_PREFIX PATH_TO_XML + ;${LOG_TEXT} "DEBUG" "macro: ReadConfig | UNINSTALL_PREFIX: ${UNINSTALL_PREFIX} | PATH_TO_XML: ${PATH_TO_XML}" + + IfFileExists "${PATH_TO_XML}\MediaPortalDirs.xml" 0 error + + + #${xml::LoadFile} "$EXEDIR\MediaPortalDirsXP.xml" $0 + ${xml::LoadFile} "$0\MediaPortalDirs.xml" $0 + ${IfThen} $0 != 0 ${|} Goto error ${|} + + #</Dir> Log CustomInputDevice CustomInputDefault Skin Language Database Thumbs Weather Cache BurnerSupport + + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Config + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Plugins + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Log + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" CustomInputDevice + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" CustomInputDefault + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Skin + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Language + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Database + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Thumbs + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Weather + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" Cache + !insertmacro ReadMPdir "${UNINSTALL_PREFIX}" BurnerSupport + + + Push "0" + Goto end + + error: + Push "-1" + + end: + +!macroend +Function ReadConfig + Pop $0 + + !insertmacro ReadConfig "" "$0" +FunctionEnd +Function un.ReadConfig + Pop $0 + + !insertmacro ReadConfig "un." "$0" +FunctionEnd + +#*************************** +#*************************** + +!macro LoadDefaultDirs + + StrCpy $MPdir.Config "$CommonAppData\Team MediaPortal\MediaPortal" + + StrCpy $MPdir.Plugins "$MPdir.Base\plugins" + StrCpy $MPdir.Log "$MPdir.Config\log" + StrCpy $MPdir.CustomInputDevice "$MPdir.Config\InputDeviceMappings" + StrCpy $MPdir.CustomInputDefault "$MPdir.Base\InputDeviceMappings\defaults" + StrCpy $MPdir.Skin "$MPdir.Base\skin" + StrCpy $MPdir.Language "$MPdir.Base\language" + StrCpy $MPdir.Database "$MPdir.Config\database" + StrCpy $MPdir.Thumbs "$MPdir.Config\thumbs" + StrCpy $MPdir.Weather "$MPdir.Base\weather" + StrCpy $MPdir.Cache "$MPdir.Config\cache" + StrCpy $MPdir.BurnerSupport "$MPdir.Base\Burner" + +!macroend + +!define ReadMediaPortalDirs `!insertmacro ReadMediaPortalDirs ""` +!define un.ReadMediaPortalDirs `!insertmacro ReadMediaPortalDirs "un."` +!macro ReadMediaPortalDirs UNINSTALL_PREFIX INSTDIR + ;${LOG_TEXT} "DEBUG" "macro ReadMediaPortalDirs" + + StrCpy $MPdir.Base "${INSTDIR}" + SetShellVarContext current + StrCpy $MyDocs "$DOCUMENTS" + StrCpy $UserAppData "$APPDATA" + SetShellVarContext all + StrCpy $CommonAppData "$APPDATA" + + + !insertmacro LoadDefaultDirs + + Push "$MyDocs\Team MediaPortal" + Call ${UNINSTALL_PREFIX}ReadConfig + Pop $0 + ${If} $0 != 0 ; an error occured + ${LOG_TEXT} "ERROR" "Loading MediaPortalDirectories from MyDocs failed. ('$MyDocs\Team MediaPortal\MediaPortalDirs.xml')" + ${LOG_TEXT} "INFO" "Trying to load from installation directory now." + + Push "$MPdir.Base" + Call ${UNINSTALL_PREFIX}ReadConfig + Pop $0 + ${If} $0 != 0 ; an error occured + ${LOG_TEXT} "ERROR" "Loading MediaPortalDirectories from InstallDir failed. ('$MPdir.Base\MediaPortalDirs.xml')" + ${LOG_TEXT} "INFO" "Using default paths for MediaPortalDirectories now." + !insertmacro LoadDefaultDirs + + ${Else} + ${LOG_TEXT} "INFO" "Loaded MediaPortalDirectories from InstallDir successfully. ('$MPdir.Base\MediaPortalDirs.xml')" + ${EndIf} + + ${Else} + ${LOG_TEXT} "INFO" "Loaded MediaPortalDirectories from MyDocs successfully. ('$MyDocs\Team MediaPortal\MediaPortalDirs.xml')" + ${EndIf} + + ${LOG_TEXT} "INFO" "Installer will use the following directories:" + ${LOG_TEXT} "INFO" " Base: $MPdir.Base" + ${LOG_TEXT} "INFO" " Config: $MPdir.Config" + ${LOG_TEXT} "INFO" " Plugins: $MPdir.Plugins" + ${LOG_TEXT} "INFO" " Log: $MPdir.Log" + ${LOG_TEXT} "INFO" " CustomInputDevice: $MPdir.CustomInputDevice" + ${LOG_TEXT} "INFO" " CustomInputDefault: $MPdir.CustomInputDefault" + ${LOG_TEXT} "INFO" " Skin: $MPdir.Skin" + ${LOG_TEXT} "INFO" " Language: $MPdir.Language" + ${LOG_TEXT} "INFO" " Database: $MPdir.Database" + ${LOG_TEXT} "INFO" " Thumbs: $MPdir.Thumbs" + ${LOG_TEXT} "INFO" " Weather: $MPdir.Weather" + ${LOG_TEXT} "INFO" " Cache: $MPdir.Cache" + ${LOG_TEXT} "INFO" " BurnerSupport: $MPdir.BurnerSupport" +!macroend + +!endif # !___MediaPortalDirectories__NSH___ + Copied: trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh (from rev 2800, trunk/plugins/IR Server Suite/setup/CommonNSIS/include-CommonMPMacros.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -0,0 +1,702 @@ +#region Copyright (C) 2005-2009 Team MediaPortal + +/* + * Copyright (C) 2005-2009 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 ___COMMON_MP_MACROS__NSH___ +!define ___COMMON_MP_MACROS__NSH___ + + +!include LogicLib.nsh +!include x64.nsh +!include "${svn_InstallScripts}\include\LanguageMacros.nsh" +!include "${svn_InstallScripts}\include\LoggingMacros.nsh" + + +!ifndef COMPANY + !define COMPANY "Team MediaPortal" +!endif +!ifndef URL + !define URL "www.team-mediaportal.com" +!endif +!ifndef WEB_REQUIREMENTS + !define WEB_REQUIREMENTS "http://wiki.team-mediaportal.com/GeneralRequirements" +!endif + + +!ifndef MP_REG_UNINSTALL + !define MP_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal" +!endif +!ifndef TV3_REG_UNINSTALL + !define TV3_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal TV Server" +!endif + + + + +# references to additional plugins, if not used, these won't be included +!AddPluginDir "${svn_InstallScripts}\GetVersion-plugin\Plugins" + + + +#Var AR_SecFlags +#Var AR_RegFlags + +# registry +# ${MEMENTO_REGISTRY_ROOT} +# ${MEMENTO_REGISTRY_KEY} +# ${MEMENTO_REGISTRY_KEY} +#ReadRegDWORD $AR_RegFlags ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}` + + /* not needed anymore ----- done by MementoSectionRestore +!macro InitSection SecName + ;This macro reads component installed flag from the registry and + ;changes checked state of the section on the components page. + ;Input: section index constant name specified in Section command. + + ClearErrors + ;Reading component status from registry + ReadRegDWORD $AR_RegFlags "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "${SecName}" + IfErrors "default_${SecName}" + + ;Status will stay default if registry value not found + ;(component was never installed) + IntOp $AR_RegFlags $AR_RegFlags & 0x0001 ;Turn off all other bits + SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags + IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off + IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit + + ;Writing modified flags + SectionSetFlags ${${SecName}} $AR_SecFlags + + "default_${SecName}:" +!macroend +*/ + +!macro FinishSection SecName + ;This macro reads section flag set by user and removes the section + ;if it is not selected. + ;Then it writes component installed flag to registry + ;Input: section index constant name specified in Section command. + + ${IfNot} ${SectionIsSelected} "${${SecName}}" + ClearErrors + ReadRegDWORD $R0 ${MEMENTO_REGISTRY_ROOT} '${MEMENTO_REGISTRY_KEY}' 'MementoSection_${SecName}' + + ${If} $R0 = 1 + !insertmacro "Remove_${${SecName}}" + ${EndIf} + ${EndIf} +!macroend + +!macro RemoveSection SecName + ;This macro is used to call section's Remove_... macro + ;from the uninstaller. + ;Input: section index constant name specified in Section command. + + !insertmacro "Remove_${${SecName}}" +!macroend + +!macro DisableComponent SectionName AddText + !insertmacro UnselectSection "${SectionName}" + ; Make the unselected section read only + !insertmacro SetSectionFlag "${SectionName}" 16 + SectionGetText ${SectionName} $R0 + SectionSetText ${SectionName} "$R0${AddText}" +!macroend + + + +#**********************************************************************************************************# +# +# Useful macros for MediaPortal and addtional Software which can be used like other LogicLib expressions. +# +#**********************************************************************************************************# + + +#**********************************************************************************************************# +# LOGICLIB EXPRESSIONS + +;====================================== OLD MP INSTALLATION TESTs + +# old installations < 0.2.3.0 RC 3 +!macro _MP022IsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{87819CFA-1786-484D-B0DE-10B5FBF2625D}" "UninstallString" + IfErrors `${_f}` `${_t}` +!macroend +!define MP022IsInstalled `"" MP022IsInstalled ""` + +!macro _MP023RC3IsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal 0.2.3.0 RC3" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP `${_t}` `${_f}` +!macroend +!define MP023RC3IsInstalled `"" MP023RC3IsInstalled ""` + +!macro _MP023IsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal 0.2.3.0" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP `${_t}` `${_f}` +!macroend +!define MP023IsInstalled `"" MP023IsInstalled ""` + +;====================================== OLD TVServer/TVClient INSTALLATION TESTs + +!macro _MSI_TVServerIsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4B738773-EE07-413D-AFB7-BB0AB04A5488}" "UninstallString" + IfErrors `${_f}` `${_t}` +!macroend +!define MSI_TVServerIsInstalled `"" MSI_TVServerIsInstalled ""` + +!macro _MSI_TVClientIsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ClearErrors + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F7444E89-5BC0-497E-9650-E50539860DE0}" "UninstallString" + IfErrors 0 `${_t}` + ReadRegStr $_LOGICLIB_TEMP HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FD9FD453-1C0C-4EDA-AEE6-D7CF0E9951CA}" "UninstallString" + IfErrors `${_f}` `${_t}` +!macroend +!define MSI_TVClientIsInstalled `"" MSI_TVClientIsInstalled ""` + +;====================================== + +!macro _MPIsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "${MP_REG_UNINSTALL}" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP `${_t}` `${_f}` +!macroend +!define MPIsInstalled `"" MPIsInstalled ""` + +!macro _TVServerIsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP 0 `${_f}` + + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "MementoSection_SecServer" + StrCmp $_LOGICLIB_TEMP 1 `${_t}` `${_f}` +!macroend +!define TVServerIsInstalled `"" TVServerIsInstalled ""` + +!macro _TVClientIsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "UninstallString" + + IfFileExists $_LOGICLIB_TEMP 0 `${_f}` + + ReadRegStr $_LOGICLIB_TEMP HKLM "${TV3_REG_UNINSTALL}" "MementoSection_SecClient" + StrCmp $_LOGICLIB_TEMP 1 `${_t}` `${_f}` +!macroend +!define TVClientIsInstalled `"" TVClientIsInstalled ""` + +;====================================== 3rd PARTY APPLICATION TESTs + +!macro _VCRedist2005IsInstalled _a _b _t _f + + ClearErrors + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + IfErrors `${_f}` + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 + StrCmp $R1 '6.0' lbl_winnt_vista `${_f}` + + + lbl_winnt_vista: + IfFileExists "$WINDIR\WinSxS\Manifests\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.762_none_0c178a139ee2a7ed.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.762_none_11ecb0ab9b2caf3c.manifest" 0 `${_f}` + Goto `${_t}` + + lbl_winnt_2003: + lbl_winnt_XP: + IfFileExists "$WINDIR\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_3bf8fa05.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_cbb27474.manifest" 0 `${_f}` + Goto `${_t}` +!macroend +!define VCRedist2005IsInstalled `"" VCRedist2005IsInstalled ""` + +!macro _VCRedist2008IsInstalled _a _b _t _f + + ClearErrors + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + IfErrors `${_f}` + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 + StrCmp $R1 '6.0' lbl_winnt_vista `${_f}` + + + lbl_winnt_vista: + IfFileExists "$WINDIR\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.1_none_dcc7eae99ad0d9cf.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.21022.8_none_bdf22a22ab9e15d5.manifest" 0 `${_f}` + Goto `${_t}` + + lbl_winnt_2003: + lbl_winnt_XP: + IfFileExists "$WINDIR\WinSxS\Manifests\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_405b0943.manifest" 0 `${_f}` + IfFileExists "$WINDIR\WinSxS\Manifests\x86_Microsoft.VC90.ATL_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_312cf0e9.manifest" 0 `${_f}` + Goto `${_t}` +!macroend +!define VCRedist2008IsInstalled `"" VCRedist2008IsInstalled ""` + +!macro _dotNetIsInstalled _a _b _t _f + SetRegView 32 + + !insertmacro _LOGICLIB_TEMP + + ReadRegStr $4 HKLM "Software\Microsoft\.NETFramework" "InstallRoot" + # remove trailing back slash + Push $4 + Exch $EXEDIR + Exch $EXEDIR + Pop $4 + # if the root directory doesn't exist .NET is not installed + IfFileExists $4 0 `${_f}` + + StrCpy $0 0 + + EnumStart: + + EnumRegKey $2 HKLM "Software\Microsoft\.NETFramework\Policy" $0 + IntOp $0 $0 + 1 + StrCmp $2 "" `${_f}` + + StrCpy $1 0 + + EnumPolicy: + + EnumRegValue $3 HKLM "Software\Microsoft\.NETFramework\Policy\$2" $1 + IntOp $1 $1 + 1 + StrCmp $3 "" EnumStart + IfFileExists "$4\$2.$3" `${_t}` EnumPolicy +!macroend +!define dotNetIsInstalled `"" dotNetIsInstalled ""` + +#**********************************************************************************************************# +# Get MP infos +!macro MP_GET_INSTALL_DIR _var + SetRegView 32 + ;${LOG_TEXT} "DEBUG" "MACRO:MP_GET_INSTALL_DIR" + + ${If} ${MP023IsInstalled} + ReadRegStr ${_var} HKLM "SOFTWARE\Team MediaPortal\MediaPortal" "ApplicationDir" + ${LOG_TEXT} "INFO" "MediaPortal v0.2.3 installation dir found: ${_var}" + ${ElseIf} ${MPIsInstalled} + ReadRegStr ${_var} HKLM "${MP_REG_UNINSTALL}" "InstallPath" + ${LOG_TEXT} "INFO" "MediaPortal installation dir found: ${_var}" + ${Else} + StrCpy ${_var} "" + ${LOG_TEXT} "INFO" "No MediaPortal installation found: _var will be empty" + ${EndIf} + +!macroend + +!macro TVSERVER_GET_INSTALL_DIR _var + SetRegView 32 + ;${LOG_TEXT} "DEBUG" "MACRO:TVSERVER_GET_INSTALL_DIR" + + ${If} ${TVServerIsInstalled} + ${OrIf} ${TVClientIsInstalled} + ReadRegStr ${_var} HKLM "${TV3_REG_UNINSTALL}" "InstallPath" + ${LOG_TEXT} "INFO" "TVServer/Client installation dir found: ${_var}" + ${Else} + StrCpy ${_var} "" + ${LOG_TEXT} "INFO" "No TVServer/Client installation found: _var will be empty" + ${EndIf} + +!macroend + +!macro MP_GET_VERSION _var + SetRegView 32 + ${LOG_TEXT} "DEBUG" "MACRO:MP_GET_VERSION" + + ${If} ${MPIsInstalled} + ReadRegDWORD $R0 HKLM "${MP_REG_UNINSTALL}" "VersionMajor" + ReadRegDWORD $R1 HKLM "${MP_REG_UNINSTALL}" "VersionMinor" + ReadRegDWORD $R2 HKLM "${MP_REG_UNINSTALL}" "VersionRevision" + ReadRegDWORD $R3 HKLM "${MP_REG_UNINSTALL}" "VersionBuild" + StrCpy ${_var} $R0.$R1.$R2.$R3 + ${Else} + StrCpy ${_var} "" + ${EndIf} + +!macroend + +!macro TVSERVER_GET_VERSION _var + SetRegView 32 + ${LOG_TEXT} "DEBUG" "MACRO:TVSERVER_GET_VERSION" + + ${If} ${TVServerIsInstalled} + ${OrIf} ${TVClientIsInstalled} + ReadRegDWORD $R0 HKLM "${TV3_REG_UNINSTALL}" "VersionMajor" + ReadRegDWORD $R1 HKLM "${TV3_REG_UNINSTALL}" "VersionMinor" + ReadRegDWORD $R2 HKLM "${TV3_REG_UNINSTALL}" "VersionRevision" + ReadRegDWORD $R3 HKLM "${TV3_REG_UNINSTALL}" "VersionBuild" + StrCpy ${_var} $R0.$R1.$R2.$R3 + ${Else} + StrCpy ${_var} "" + ${EndIf} + +!macroend + +!include FileFunc.nsh +!insertmacro GetTime +!macro GET_BACKUP_POSTFIX _var + + ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + ; $0="01" day + ; $1="04" month + ; $2="2005" year + ; $3="Friday" day of week name + ; $4="16" hour + ; $5="05" minute + ; $6="50" seconds + + StrCpy ${_var} "BACKUP_$1-$0_$4-$5" + +!macroend + + + /* +; Section flag test +!macro _MPIsInstalled _a _b _t _f + !insertmacro _LOGICLIB_TEMP + + ReadRegStr $MPBaseDir HKLM "${MP_REG_UNINSTALL}" "UninstallString" + ${If} $MPBaseDir == "" + # this fallback should only be enabled until MediaPortal 1.0 is out + ReadRegStr $MPBaseDir HKLM "SOFTWARE\Team MediaPortal\MediaPortal" "ApplicationDir" + +#!define MP_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal" +#!define TV3_REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MediaPortal TV Server" + + ${If} $MPBaseDir == "" + !insertmacro UnselectSection "${SecClient}" + ; Make the unselected section read only + !insertmacro SetSectionFlag "${SecClient}" 16 + SectionGetText ${SecClient} $R0 + SectionSetText ${SecClient} "$R0 ($(TEXT_MP_NOT_INSTALLED))" + ${EndIf} + ${EndIf} + SectionGetFlags `${_b}` $_LOGICLIB_TEMP + IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & `${_a}` + + !insertmacro _= $_LOGICLIB_TEMP `${_a}` `${_t}` `${_f}` + !macroend + + #!define MPIsInstalled `${SF_SELECTED} SectionFlagIsSet` +!define MPIsInstalled "!insertmacro _MPIsInstalled" + */ + +#--------------------------------------------------------------------------- +# COMPLETE MEDIAPORTAL CLEANUP +#--------------------------------------------------------------------------- +!macro CompleteMediaPortalCleanup + +# make and uninstallation of the other app, which may be still installed +!if "${NAME}" == "MediaPortal" + !insertmacro NSISuninstall "${TV3_REG_UNINSTALL}" +!else + !if "${NAME}" == "MediaPortal TV Server / Client" + !insertmacro NSISuninstall "${MP_REG_UNINSTALL}" + !endif +!endif + +SetShellVarContext all +# Delete new MediaPortal ( >= 0.2.3 RC3 ) and TVengine 3 directories +RMDir /r /REBOOTOK "$PROGRAMFILES\Team MediaPortal" +RMDir /r /REBOOTOK "$APPDATA\Team MediaPortal" +RMDir /r /REBOOTOK "$LOCALAPPDATA\VirtualStore\Program Files\Team MediaPortal" +RMDir /r /REBOOTOK "$LOCALAPPDATA\VirtualStore\ProgramData\Team MediaPortal" + +# Delete old MediaPortal ( <= 0.2.3 RC2 ) directories +RMDir /r /REBOOTOK "$PROGRAMFILES\MediaPortal" +RMDir /r /REBOOTOK "$APPDATA\MediaPortal" +RMDir /r /REBOOTOK "$LOCALAPPDATA\VirtualStore\Program Files\MediaPortal" +RMDir /r /REBOOTOK "$LOCALAPPDATA\VirtualStore\ProgramData\MediaPortal" + +# Delete old TV3 engine directories +RMDir /r /REBOOTOK "$PROGRAMFILES\MediaPortal TV Engine" +RMDir /r /REBOOTOK "$APPDATA\MediaPortal TV Engine" +RMDir /r /REBOOTOK "$LOCALAPPDATA\VirtualStore\Program Files\MediaPortal TV Engine" +RMDir /r /REBOOTOK "$LOCALAPPDATA\VirtualStore\ProgramData\MediaPortal TV Engine" + +# Delete menu shortcut icons +SetShellVarContext all +RMDir /r /REBOOTOK "$APPDATA\Microsoft\Windows\Start Menu\Programs\Team MediaPortal" +RMDir /r /REBOOTOK "$APPDATA\Microsoft\Windows\Start Menu\Programs\MediaPortal" +SetShellVarContext current +RMDir /r /REBOOTOK "$APPDATA\Microsoft\Windows\Start Menu\Programs\Team MediaPortal" +RMDir /r /REBOOTOK "$APPDATA\Microsoft\Windows\Start Menu\Programs\MediaPortal" +RMDir /r /REBOOTOK "$LOCALAPPDATA\Microsoft\Windows\Start Menu\Programs\Team MediaPortal" +RMDir /r /REBOOTOK "$LOCALAPPDATA\Microsoft\Windows\Start Menu\Programs\MediaPortal" + +# Remove registry keys +DeleteRegKey HKLM "Software\Team MediaPortal" +DeleteRegKey HKCU "Software\Team MediaPortal" + +DeleteRegKey HKLM "Software\MediaPortal" +DeleteRegKey HKCU "Software\MediaPortal" + +!macroend + +!include FileFunc.nsh +!insertmacro un.GetParent +!macro NSISuninstall REG_KEY + + ReadRegStr $R0 HKLM "${REG_KEY}" UninstallString + ${If} ${FileExists} "$R0" + ; get parent folder of uninstallation EXE (RO) and save it to R1 + ${un.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 /RemoveAll' + ;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} +!macroend +!macro NsisSilentUinstall REG_KEY +!if "${REG_KEY}" == "${TV3_REG_UNINSTALL}" + ${StopService} "TVservice" +!endif + + ReadRegStr $R0 HKLM "${REG_KEY}" UninstallString + ${If} ${FileExists} "$R0" + ; get parent folder of uninstallation EXE (RO) and save it to R1 + ${un.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" /S _?=$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} +!macroend + + +#--------------------------------------------------------------------------- +# MediaPortal specific OS SystemCheck +#--------------------------------------------------------------------------- +!macro MediaPortalOperatingSystemCheck HideWarnings +# HideWarnings is used to disable some Warning MessageBoxes if needed, for example: if $DeployMode = 1 + ${LOG_TEXT} "INFO" ".: Operating System Check :." + + GetVersion::WindowsName + Pop $R0 + ${LOG_TEXT} "INFO" "GetVersion::WindowsName: $R0" + !insertmacro GetServicePack $R1 $R2 + ${LOG_TEXT} "INFO" "GetServicePack major: $R1" + ${LOG_TEXT} "INFO" "GetServicePack minor: $R2" + + + ; show error that the OS is not supported and abort the installation + ${If} ${AtMostWin2000Srv} + StrCpy $0 "OSabort" + ${ElseIf} ${IsWinXP} + !insertmacro GetServicePack $R1 $R2 + ${If} $R2 > 0 + StrCpy $0 "OSwarnBetaSP" + ${ElseIf} $R1 < 2 + StrCpy $0 "OSabort" + ${Else} + StrCpy $0 "OSok" + ${EndIf} + + ${ElseIf} ${IsWinXP64} + StrCpy $0 "OSabort" + + ${ElseIf} ${IsWin2003} + StrCpy $0 "OSwarn" + + ${ElseIf} ${IsWinVISTA} + !insertmacro GetServicePack $R1 $R2 + ${If} $R2 > 0 + StrCpy $0 "OSwarnBetaSP" + ${ElseIf} $R1 < 1 + StrCpy $0 "OSwarn" + ${Else} + StrCpy $0 "OSok" + ${EndIf} + + ${ElseIf} ${IsWin2008} + StrCpy $0 "OSwarn" + + ${Else} + StrCpy $0 "OSabort" + ${EndIf} + + ; show warnings for some OS + ${If} $0 == "OSabort" + MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_WIN)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + Abort + ${ElseIf} $0 == "OSwarn" + ${If} ${HideWarnings} == 0 + MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_MSGBOX_ERROR_WIN_NOT_RECOMMENDED)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + ${EndIf} + ${ElseIf} $0 == "OSwarnBetaSP" + ${If} ${HideWarnings} == 0 + MessageBox MB_YESNO|MB_ICONEXCLAMATION "You are using a beta Service Pack! $(TEXT_MSGBOX_ERROR_WIN_NOT_RECOMMENDED)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + ${EndIf} + ${Else} + ; do nothing + ${EndIf} + + ${LOG_TEXT} "INFO" "============================" +!macroend + +!macro MediaPortalAdminCheck HideWarnings + ${LOG_TEXT} "INFO" ".: Administration Rights Check :." + + ; check if current user is admin + UserInfo::GetOriginalAccountType + Pop $0 + #StrCmp $0 "Admin" 0 +3 + ${IfNot} $0 == "Admin" + MessageBox MB_OK|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_ADMIN)" + Abort + ${EndIf} + + ${LOG_TEXT} "INFO" "============================" +!macroend + +!macro MediaPortalVCRedistCheck HideWarnings + ${LOG_TEXT} "INFO" ".: Microsoft Visual C++ Redistributable Check :." + + ; check if VC Redist 2005 SP1 is installed + #${IfNot} ${VCRedist2005IsInstalled} + # MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_VCREDIST_2005)" IDNO +2 + # ExecShell open "${WEB_REQUIREMENTS}" + # Abort + ; check if VC Redist 2008 SP1 is installed + ${IfNot} ${VCRedist2008IsInstalled} + MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_VCREDIST_2008)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + Abort + ${EndIf} + + ${LOG_TEXT} "INFO" "============================" +!macroend + +!macro MediaPortalNetFrameworkCheck HideWarnings + ${LOG_TEXT} "INFO" ".: Microsoft .Net Framework Check :." + + ; check if .Net Framework 2.0 is installed + ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" "Install" + ; check if .Net Framework 2.0 SP2 is installed + ReadRegDWORD $1 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" "SP" + + ; check if .Net Framework 3.5 is installed + ReadRegDWORD $2 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" "Install" + ; check if .Net Framework 3.5 SP1 is installed + ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" "SP" + + ${LOG_TEXT} "INFO" ".Net 2.0 installed? $0" + ${LOG_TEXT} "INFO" ".Net 2.0 ServicePack: $1" + ${LOG_TEXT} "INFO" ".Net 3.5 installed? $2" + ${LOG_TEXT} "INFO" ".Net 3.5 ServicePack: $3" + + ${If} ${IsWinVISTA} + ${AndIf} ${RunningX64} ; 3.5 is installed, check for sp1 + ${LOG_TEXT} "INFO" "OS is Vista64, .Net 3.5 is installed." + + ${If} $3 < 1 ; if 3.5, but no sp1 + MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_DOTNET35_SP)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + Abort + ${EndIf} + + ${ElseIf} $0 != 1 ; if no 2.0 + + ${If} $2 != 1 ; if no 3.5 + MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_DOTNET20)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + Abort + ${ElseIf} $3 < 1 ; if 3.5, but no sp1 + MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_DOTNET35_SP)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + Abort + ${EndIf} + + ${ElseIf} $1 < 2 ; if 2.0, but no sp2 + MessageBox MB_YESNO|MB_ICONSTOP "$(TEXT_MSGBOX_ERROR_DOTNET20_SP)" IDNO +2 + ExecShell open "${WEB_REQUIREMENTS}" + Abort + ${EndIf} + + ${LOG_TEXT} "INFO" "============================" +!macroend + +!endif # !___COMMON_MP_MACROS__NSH___ + Copied: trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh (from rev 2800, trunk/plugins/IR Server Suite/setup/CommonNSIS/include-CommonMPMacros.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -0,0 +1,131 @@ +#region Copyright (C) 2005-2009 Team MediaPortal + +/* + * Copyright (C) 2005-2009 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 ProcessMacros_INCLUDED +!define ProcessMacros_INCLUDED + +!include LogicLib.nsh +!include "${svn_InstallScripts}\include\LoggingMacros.nsh" + +!define KillProcess `!insertmacro KillProcess` +!macro KillProcess Process + ${LOG_TEXT} "INFO" "KillProcess: ${Process}" + + StrCpy $R1 1 ; set counter to 1 + ${Do} + + nsExec::Exec '"taskkill" /F /IM "${Process}"' + + Pop $0 + + ${Select} $0 + ${Case} "0" + ${LOG_TEXT} "INFO" "KillProcess: ${Process} was killed successfully." + ${ExitDo} + ${Case} "128" + ${LOG_TEXT} "INFO" "KillProcess: ${Process} is not running." + ${ExitDo} + ${CaseElse} + + ${LOG_TEXT} "ERROR" "KillProcess: Unknown result: $0" + IntOp $R1 $R1 + 1 ; increase retry-counter +1 + ${If} $R1 > 5 ; try max. 5 times + ${ExitDo} + ${Else} + ${LOG_TEXT} "INFO" "KillProcess: Trying again. $R1/5" + ${EndIf} + + ${EndSelect} + ${Loop} +!macroend + +!define StopService `!insertmacro StopService` +!macro StopService Service + ${LOG_TEXT} "INFO" "StopService: ${Service}" + + StrCpy $R1 1 ; set counter to 1 + ${Do} + + nsExec::Exec 'net stop "${Service}"' + + Pop $0 + + ${Select} $0 + ${Case} "0" + ${LOG_TEXT} "INFO" "StopService: ${Service} was stopped successfully." + ${ExitDo} + ${Case} "2" + ${LOG_TEXT} "INFO" "StopService: ${Service} is not started." + ${ExitDo} + ${CaseElse} + + ${LOG_TEXT} "ERROR" "StopService: Unknown result: $0" + IntOp $R1 $R1 + 1 ; increase retry-counter +1 + ${If} $R1 > 5 ; try max. 5 times + ${ExitDo} + ${Else} + ${LOG_TEXT} "INFO" "StopService: Trying again. $R1/5" + ${EndIf} + + ${EndSelect} + ${Loop} +!macroend + +!define RenameDirectory `!insertmacro RenameDirectory` +!macro RenameDirectory DirPath NewDirPath + ${LOG_TEXT} "INFO" "RenameDirectory: Old path: ${DirPath}" + ${LOG_TEXT} "INFO" "RenameDirectory: New path: ${NewDirPath}" + + ${If} ${FileExists} "${DirPath}\*.*" + ${LOG_TEXT} "INFO" "RenameDirectory: Directory exists. Trying to rename." + + StrCpy $R1 1 ; set counter to 1 + ${Do} + + ClearErrors + Rename "${DirPath}" "${NewDirPath}" + + IntOp $R1 $R1 + 1 ; increase retry-counter +1 + ${IfNot} ${Errors} + ${LOG_TEXT} "INFO" "RenameDirectory: Renamed directory successfully." + ${ExitDo} + ${ElseIf} $R1 > 5 ; try max. 5 times + ${LOG_TEXT} "ERROR" "RenameDirectory: Renaming directory failed for some reason." + ${ExitDo} + ${Else} + ${LOG_TEXT} "INFO" "RenameDirectory: Trying again. $R1/5" + ${EndIf} + + ${Loop} + + ${Else} + ${LOG_TEXT} "INFO" "RenameDirectory: Directory does not exist. No need to rename: ${DirPath}" + ${EndIf} +!macroend + + + +!endif # !ProcessMacros_INCLUDED Modified: trunk/plugins/IR Server Suite/setup/languages/English.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/languages/English.nsh 2009-04-15 14:42:01 UTC (rev 2800) +++ trunk/plugins/IR Server Suite/setup/languages/English.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -4,6 +4,8 @@ !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." +!insertmacro LANG_STRING TEXT_MSGBOX_ERROR_ON_UNINSTALL "An error occured while trying to uninstall old version!$\r$\nDo you still want to continue the installation?" +!insertmacro LANG_STRING TEXT_MSGBOX_ERROR_REBOOT_REQUIRED "A reboot is required after a previous action. Reboot you system and try it again." # Descriptions for components (sections) @@ -30,7 +32,7 @@ !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 +# Strings for AddRemove-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)." @@ -43,13 +45,13 @@ !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_HEADER "Choose the Server/Service Mode" +!insertmacro LANG_STRING ServerServiceModePage_HEADER2 "Choose whether you want to use InputService or IRServer" +!insertmacro LANG_STRING ServerServiceModePage_INFO "Some Plugins doesn't work together with a windows service. If you have such a remote listed below, choose IRServer." -!insertmacro LANG_STRING ServerServiceModePage_OPT0 "TEXT_ServerServiceMode_OPT0" -!insertmacro LANG_STRING ServerServiceModePage_OPT0_DESC "TEXT_ServerServiceMode_OPT0_DESC" +!insertmacro LANG_STRING ServerServiceModePage_OPT0 "InputService (recommended)" +!insertmacro LANG_STRING ServerServiceModePage_OPT0_DESC "The InputService is a windows service. If you don't know what to choose and you don't have a remote listed below, choose this option." -!insertmacro LANG_STRING ServerServiceModePage_OPT1 "TEXT_ServerServiceMode_OPT1" -!insertmacro LANG_STRING ServerServiceModePage_OPT1_DESC "TEXT_ServerServiceMode_OPT1_DESC" +!insertmacro LANG_STRING ServerServiceModePage_OPT1 "IRServer" +!insertmacro LANG_STRING ServerServiceModePage_OPT1_DESC "IRServer is a windows application. Choose this if you have one of the following remotes:$\r$\n Example remote" Modified: trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh 2009-04-15 14:42:01 UTC (rev 2800) +++ trunk/plugins/IR Server Suite/setup/pages/ServerServiceMode.nsh 2009-04-15 20:17:16 UTC (rev 2801) @@ -32,38 +32,51 @@ !insertmacro VersionCompare !insertmacro GetParent -##### Add/Remove/Reinstall page +##### Server/Service Mode page +; $ServerServiceMode 0 = InputService +; $ServerServiceMode 1 = IRServer Var ServerServiceMode Var ServerServiceModePage.optBtn0 Var ServerServiceModePage.optBtn0.state Var ServerServiceModePage.optBtn1 Var ServerServiceModePage.optBtn1.state + Function PageServerServiceMode + + ; if input service is unselected, skip page + ${IfNot} ${SectionIsSelected} ${SectionInputService} + Abort + ${EndIf} + !insertmacro MUI_HEADER_TEXT "$(ServerServiceModePage_HEADER)" "$(ServerServiceModePage_HEADER2)" nsDialogs::Create /NOUNLOAD 1018 - ${NSD_CreateLabel} 0 0 100% 24u "$(ServerServiceModePage_INFO)" + ${NSD_CreateLabel} 0 0 300u 24u "$(ServerServiceModePage_INFO)" Pop $R1 - ${NSD_CreateRadioButton} 20u 30u -30u 8u "$(ServerServiceModePage_OPT0)" + ${NSD_CreateRadioButton} 10u 30u -30u 8u "$(ServerServiceModePage_OPT0)" Pop $ServerServiceModePage.optBtn0 ${NSD_OnClick} $ServerServiceModePage.optBtn0 PageServerServiceModeUpdateSelection - ${NSD_CreateLabel} 30u 45u 100% 24u "$(ServerServiceModePage_OPT0_DESC)" + ${NSD_CreateLabel} 20u 45u -20u 24u "$(ServerServiceModePage_OPT0_DESC)" - ${NSD_CreateRadioButton} 20u 70u -30u 8u "$(ServerServiceModePage_OPT1)" + ${NSD_CreateRadioButton} 10u 70u -30u 8u "$(ServerServiceModePage_OPT... [truncated message content] |