From: <che...@us...> - 2008-03-25 10:05:09
|
Revision: 1519 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1519&view=rev Author: chef_koch Date: 2008-03-25 03:05:07 -0700 (Tue, 25 Mar 2008) Log Message: ----------- components page: disable the plugins if mp or tvserver is not installed Modified Paths: -------------- trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh trunk/plugins/IR Server Suite/setup.nsi Modified: trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh 2008-03-25 09:15:11 UTC (rev 1518) +++ trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh 2008-03-25 10:05:07 UTC (rev 1519) @@ -23,10 +23,11 @@ #endregion + + #**********************************************************************************************************# # -# This original header file is taken from: http://nsis.sourceforge.net/Add/Remove_Functionality -# and modified for our needs. +# different useful macros # #**********************************************************************************************************# @@ -88,8 +89,16 @@ !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. @@ -190,6 +199,14 @@ +#**********************************************************************************************************# +# +# common language strings +# +#**********************************************************************************************************# +LangString TEXT_MP_NOT_INSTALLED ${LANG_ENGLISH} "MediaPortal not installed" +LangString TEXT_TVSERVER_NOT_INSTALLED ${LANG_ENGLISH} "TVServer not installed" + /* ; Section flag test !macro _MPIsInstalled _a _b _t _f Modified: trunk/plugins/IR Server Suite/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup.nsi 2008-03-25 09:15:11 UTC (rev 1518) +++ trunk/plugins/IR Server Suite/setup.nsi 2008-03-25 10:05:07 UTC (rev 1519) @@ -109,6 +109,7 @@ !insertmacro MUI_PAGE_WELCOME Page custom PageReinstall PageLeaveReinstall !insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" +!define MUI_PAGE_CUSTOMFUNCTION_PRE ComponentsPre !insertmacro MUI_PAGE_COMPONENTS ; Main app install path @@ -1119,6 +1120,25 @@ ;====================================== +Function ComponentsPre + ${IfNot} ${MP023IsInstalled} + ${AndIfNot} ${MPIsInstalled} + !insertmacro DisableComponent "${SectionGroupMP}" " ($(TEXT_MP_NOT_INSTALLED))" + !insertmacro DisableComponent "${SectionMPCommon}" "" + !insertmacro DisableComponent "${SectionMPControlPlugin}" "" + !insertmacro DisableComponent "${SectionMPBlastZonePlugin}" "" + !insertmacro DisableComponent "${SectionTV2BlasterPlugin}" "" + ${EndIf} + + ${IfNot} ${TVServerIsInstalled} + !insertmacro DisableComponent "${SectionGroupTV3}" " ($(TEXT_TVSERVER_NOT_INSTALLED))" + !insertmacro DisableComponent "${SectionTV3Common}" "" + !insertmacro DisableComponent "${SectionTV3BlasterPlugin}" "" + ${EndIf} +FunctionEnd + +;====================================== + Function DirectoryPreMP SectionGetFlags 3 $R0 IntOp $R0 $R0 & ${SF_SELECTED} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |