From: <che...@us...> - 2009-06-14 11:30:49
|
Revision: 2917 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2917&view=rev Author: chef_koch Date: 2009-06-14 11:30:47 +0000 (Sun, 14 Jun 2009) Log Message: ----------- updated additional files from mpsvn Modified Paths: -------------- trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh trunk/plugins/IR Server Suite/setup/setup.nsi Modified: trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh 2009-06-11 13:20:11 UTC (rev 2916) +++ trunk/plugins/IR Server Suite/setup/include/FileAssociation.nsh 2009-06-14 11:30:47 UTC (rev 2917) @@ -32,7 +32,7 @@ Based on code taken from http://nsis.sourceforge.net/File_Association Usage in script: - 1. !include "FileFunc.nsh" + 1. !include "FileAssociation.nsh" 2. [Section|Function] ${FileAssociationFunction} "Param1" "Param2" "..." $var [SectionEnd|FunctionEnd] @@ -82,39 +82,39 @@ !verbose push !verbose 3 !ifndef _FileAssociation_VERBOSE - !define _FileAssociation_VERBOSE 3 + !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 + !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 + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_DESCRIPTION}` + Push `${_EXTENSION}` + Push `${_EXECUTABLE}` + ${CallArtificialFunction} RegisterExtension_ + !verbose pop !macroend !macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION - !verbose push - !verbose ${_FileAssociation_VERBOSE} - Push `${_EXTENSION}` - Push `${_DESCRIPTION}` - ${CallArtificialFunction} UnRegisterExtension_ - !verbose pop + !verbose push + !verbose ${_FileAssociation_VERBOSE} + Push `${_EXTENSION}` + Push `${_DESCRIPTION}` + ${CallArtificialFunction} UnRegisterExtension_ + !verbose pop !macroend @@ -132,35 +132,30 @@ !verbose push !verbose ${_FileAssociation_VERBOSE} - Exch $R2 ;desc + Exch $R2 ;exe Exch Exch $R1 ;ext Exch Exch 2 - Exch $R0 ;exe + Exch $R0 ;desc Exch 2 Push $0 Push $1 -!define Index "Line${__LINE__}" - ReadRegStr $1 HKCR $R1 "" - StrCmp $1 "" "${Index}-NoBackup" - StrCmp $1 "OptionsFile" "${Index}-NoBackup" - WriteRegStr HKCR $R1 "backup_val" $1 + ReadRegStr $1 HKCR $R1 "" ; read current file association + StrCmp "$1" "" NoBackup ; is it empty + StrCmp "$1" "$R0" NoBackup ; is it our own + WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value +NoBackup: + WriteRegStr HKCR $R1 "" "$R0" ; set our file association -"${Index}-NoBackup:" - WriteRegStr HKCR $R1 "" $R0 - ReadRegStr $0 HKCR $R0 "" - StrCmp $0 "" 0 "${Index}-Skip" - WriteRegStr HKCR $R0 "" $R0 + 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\open\command" "" '"$R2" "%1"' WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" - WriteRegStr HKCR "$R0\shell\edit\command" "" '$R2 "%1"' -!undef Index + WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"' Pop $1 Pop $0 @@ -193,21 +188,19 @@ 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 + StrCmp $1 $R1 0 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 + StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key DeleteRegKey HKCR $R0 - Goto "${Index}-NoOwn" + Goto NoOwn -"${Index}-Restore:" +Restore: WriteRegStr HKCR $R0 "" $1 DeleteRegValue HKCR $R0 "backup_val" DeleteRegKey HKCR $R1 ;Delete key with association name settings -"${Index}-NoOwn:" -!undef Index +NoOwn: Pop $1 Pop $0 Modified: trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh 2009-06-11 13:20:11 UTC (rev 2916) +++ trunk/plugins/IR Server Suite/setup/include/MediaPortalMacros.nsh 2009-06-14 11:30:47 UTC (rev 2917) @@ -23,6 +23,9 @@ #endregion +!if "${NSIS_VERSION}" != "v2.45" + !error "$\r$\n$\r$\nPlease update your NSIS installation to latest version. http://nsis.sourceforge.net$\r$\n$\r$\n" +!endif !ifndef ___COMMON_MP_MACROS__NSH___ !define ___COMMON_MP_MACROS__NSH___ @@ -755,7 +758,7 @@ !insertmacro GetServicePack $R1 $R2 ${If} $R2 > 0 StrCpy $0 "OSwarnBetaSP" - ${ElseIf} $R1 < 2 + ${ElseIf} $R1 < 3 StrCpy $0 "OSabort" ${Else} StrCpy $0 "OSok" @@ -786,6 +789,14 @@ ${LOG_TEXT} "INFO" "OSTest::IsWin2008" StrCpy $0 "OSwarn" + ${ElseIf} ${IsWin7} + ${LOG_TEXT} "INFO" "OSTest::IsWin7" + StrCpy $0 "OSok" + + ${ElseIf} ${IsWin2008R2} + ${LOG_TEXT} "INFO" "OSTest::IsWin2008R2" + StrCpy $0 "OSwarn" + ${Else} ${LOG_TEXT} "INFO" "OSTest::unknown OS" StrCpy $0 "OSabort" Modified: trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh 2009-06-11 13:20:11 UTC (rev 2916) +++ trunk/plugins/IR Server Suite/setup/include/ProcessMacros.nsh 2009-06-14 11:30:47 UTC (rev 2917) @@ -99,8 +99,13 @@ ${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 remove if empty." + RMDir "${DirPath}" + ${If} ${FileExists} "${DirPath}\*.*" - ${LOG_TEXT} "INFO" "RenameDirectory: Directory exists. Trying to rename." + ${LOG_TEXT} "INFO" "RenameDirectory: Directory still exists, means it is not empty. Trying to rename." StrCpy $R1 1 ; set counter to 1 ${Do} @@ -122,8 +127,14 @@ ${Loop} ${Else} + ${LOG_TEXT} "INFO" "RenameDirectory: Directory does not exist anymore. No need to rename: ${DirPath}" + ${EndIf} + +${Else} + ${LOG_TEXT} "INFO" "RenameDirectory: Directory does not exist. No need to rename: ${DirPath}" - ${EndIf} + +${EndIf} !macroend Modified: trunk/plugins/IR Server Suite/setup/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup/setup.nsi 2009-06-11 13:20:11 UTC (rev 2916) +++ trunk/plugins/IR Server Suite/setup/setup.nsi 2009-06-14 11:30:47 UTC (rev 2917) @@ -113,8 +113,9 @@ !include "include\ProcessMacros.nsh" !include "include\WinVerEx.nsh" -!include pages\AddRemovePage.nsh -!include pages\ServerServiceMode.nsh +!include "pages\AddRemovePage.nsh" +!include "pages\ServerServiceMode.nsh" +;!include "pages\UninstallModePage.nsh" #--------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |