Skip to content

Commit

Permalink
Add command line to stop TVService from setuptv.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastiii committed Dec 24, 2012
1 parent bf8ced0 commit 39814f7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
10 changes: 8 additions & 2 deletions TvEngine3/TVLibrary/Setup/setup.nsi
Expand Up @@ -360,8 +360,11 @@ ${MementoSection} "MediaPortal TV Server" SecServer


; Kill running Programs ; Kill running Programs
${LOG_TEXT} "INFO" "Terminating processes ..." ${LOG_TEXT} "INFO" "Terminating processes ..."
${StopService} "TVservice"
${KillProcess} "SetupTv.exe" ${KillProcess} "SetupTv.exe"
${LOG_TEXT} "INFO" "Stop TVService from setuptv ..."
ExecWait '"$INSTDIR\SetupTv.exe" /tvservicestop'
${KillProcess} "SetupTv.exe"
${StopService} "TVservice"


SetOverwrite on SetOverwrite on


Expand Down Expand Up @@ -492,8 +495,11 @@ ${MementoSectionEnd}


; Kill running Programs ; Kill running Programs
${LOG_TEXT} "INFO" "Terminating processes ..." ${LOG_TEXT} "INFO" "Terminating processes ..."
${StopService} "TVservice"
${KillProcess} "SetupTv.exe" ${KillProcess} "SetupTv.exe"
${LOG_TEXT} "INFO" "Stop TVService from setuptv ..."
ExecWait '"$INSTDIR\SetupTv.exe" /tvservicestop'
${KillProcess} "SetupTv.exe"
${StopService} "TVservice"


#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# CLEARING DATABASE if RemoveAll was selected # CLEARING DATABASE if RemoveAll was selected
Expand Down
14 changes: 13 additions & 1 deletion TvEngine3/TVLibrary/SetupTv/Startup.cs
Expand Up @@ -41,7 +41,8 @@ public enum StartupMode
Wizard, Wizard,
DbCleanup, DbCleanup,
DbConfig, DbConfig,
DeployMode DeployMode,
TvserviceStop
} }


/// <summary> /// <summary>
Expand Down Expand Up @@ -126,6 +127,11 @@ public static void Main(string[] arguments)
case "/debugoptions": case "/debugoptions":
debugOptions = true; debugOptions = true;
break; break;

case "/tvservicestop":
ServiceHelper.Stop();
startupMode = StartupMode.TvserviceStop;
break;
} }


if (param.StartsWith("--Deploy")) if (param.StartsWith("--Deploy"))
Expand All @@ -148,6 +154,12 @@ public static void Main(string[] arguments)
} }
} }


// Avoid the visual and close part of SetupTv on Tvservice stop
if (startupMode == StartupMode.TvserviceStop)
{
return;
}

Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);


// set working dir from application.exe // set working dir from application.exe
Expand Down

0 comments on commit 39814f7

Please sign in to comment.