Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add command line to stop TVService from setuptv.

  • Loading branch information...
commit 39814f7210e4e6cc98156d2dede5851a00bed9c1 1 parent bf8ced0
@Sebastiii Sebastiii authored
View
10 TvEngine3/TVLibrary/Setup/setup.nsi
@@ -360,8 +360,11 @@ ${MementoSection} "MediaPortal TV Server" SecServer
; Kill running Programs
${LOG_TEXT} "INFO" "Terminating processes ..."
- ${StopService} "TVservice"
${KillProcess} "SetupTv.exe"
+ ${LOG_TEXT} "INFO" "Stop TVService from setuptv ..."
+ ExecWait '"$INSTDIR\SetupTv.exe" /tvservicestop'
+ ${KillProcess} "SetupTv.exe"
+ ${StopService} "TVservice"
SetOverwrite on
@@ -492,8 +495,11 @@ ${MementoSectionEnd}
; Kill running Programs
${LOG_TEXT} "INFO" "Terminating processes ..."
- ${StopService} "TVservice"
${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
View
14 TvEngine3/TVLibrary/SetupTv/Startup.cs
@@ -41,7 +41,8 @@ public enum StartupMode
Wizard,
DbCleanup,
DbConfig,
- DeployMode
+ DeployMode,
+ TvserviceStop
}
/// <summary>
@@ -126,6 +127,11 @@ public static void Main(string[] arguments)
case "/debugoptions":
debugOptions = true;
break;
+
+ case "/tvservicestop":
+ ServiceHelper.Stop();
+ startupMode = StartupMode.TvserviceStop;
+ break;
}
if (param.StartsWith("--Deploy"))
@@ -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);
// set working dir from application.exe
Please sign in to comment.
Something went wrong with that request. Please try again.