mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 15:20:34 +02:00
Add pismo to installer and uninstaller
This commit is contained in:
parent
9fa31ff04b
commit
36e4e8f402
|
@ -249,6 +249,17 @@ namespace MediaBrowser.Installer
|
|||
return;
|
||||
}
|
||||
|
||||
// Install Pismo
|
||||
try
|
||||
{
|
||||
InstallPismo();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SystemClose("Error Installing Pismo - "+e.GetType().FullName+"\n\n"+e.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
// And run
|
||||
try
|
||||
{
|
||||
|
@ -264,6 +275,17 @@ namespace MediaBrowser.Installer
|
|||
|
||||
}
|
||||
|
||||
private void InstallPismo()
|
||||
{
|
||||
// Kick off the Pismo installer and wait for it to end
|
||||
var pismo = new Process();
|
||||
pismo.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
pismo.StartInfo.FileName = Path.Combine(RootPath, "Pismo", "pfminst.exe");
|
||||
pismo.StartInfo.Arguments = "install";
|
||||
pismo.Start();
|
||||
pismo.WaitForExit();
|
||||
}
|
||||
|
||||
protected async Task<PackageVersionInfo> GetPackageVersion()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -198,12 +198,33 @@ namespace MediaBrowser.Uninstaller.Execute
|
|||
// Remove reference to us
|
||||
RemoveUninstall();
|
||||
|
||||
// Remove pismo
|
||||
try
|
||||
{
|
||||
UnInstallPismo();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// No biggie - maybe they uninstalled it themselves
|
||||
}
|
||||
|
||||
// and done
|
||||
lblHeading.Content = string.Format("Media Browser {0} Uninstalled.", Product);
|
||||
btnUninstall.Visibility = Visibility.Hidden;
|
||||
btnFinished.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void UnInstallPismo()
|
||||
{
|
||||
// Kick off the Pismo uninstaller and wait for it to end
|
||||
var pismo = new Process();
|
||||
pismo.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
pismo.StartInfo.FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "pfm.exe");
|
||||
pismo.StartInfo.Arguments = "uninstall pfm-license-mediabrowser.txt";
|
||||
pismo.Start();
|
||||
pismo.WaitForExit();
|
||||
}
|
||||
|
||||
private void RemoveUninstall()
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in a new issue