check for ghostscript sub key; added more logging
This commit is contained in:
parent
0e6b3078c2
commit
bb9e2ef565
2 changed files with 13 additions and 1 deletions
|
|
@ -124,6 +124,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
||||||
|
|
||||||
if (!isJobValid)
|
if (!isJobValid)
|
||||||
{
|
{
|
||||||
|
LogDebug("Job is not valid.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,12 +132,14 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
||||||
}
|
}
|
||||||
if (status == PrintStatus.Canceled)
|
if (status == PrintStatus.Canceled)
|
||||||
{
|
{
|
||||||
|
LogDebug($"Deleting file on print status: {status}");
|
||||||
DeleteFiles(ini, dir, rawFile);
|
DeleteFiles(ini, dir, rawFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
var jobStatus = _jobService.ReadJobStatus(ini);
|
var jobStatus = _jobService.ReadJobStatus(ini);
|
||||||
if (jobStatus == JobStatus.Completed || jobStatus == JobStatus.Failed)
|
if (jobStatus == JobStatus.Completed || jobStatus == JobStatus.Failed)
|
||||||
{
|
{
|
||||||
|
LogDebug($"Deleting file on job status: {jobStatus}");
|
||||||
DeleteFiles(ini, dir, rawFile);
|
DeleteFiles(ini, dir, rawFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
||||||
|
|
||||||
var gsKey = RegistryKey
|
var gsKey = RegistryKey
|
||||||
.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, registryView)
|
.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, registryView)
|
||||||
.OpenSubKey(@"SOFTWARE\GPL Ghostscript\9.52");
|
.OpenSubKey(@"SOFTWARE\GPL Ghostscript");
|
||||||
|
|
||||||
if (gsKey == null)
|
if (gsKey == null)
|
||||||
{
|
{
|
||||||
|
|
@ -98,6 +98,15 @@ namespace AmagnoVirtualPrinter.WixSharpInstaller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var subKeyNames = gsKey.GetSubKeyNames();
|
||||||
|
gsKey = gsKey.OpenSubKey(subKeyNames[0]);
|
||||||
|
if (gsKey == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show(gsNotFound);
|
||||||
|
e.Result = ActionResult.Failure;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var gsAssembly = (string)gsKey.GetValue("GS_DLL");
|
var gsAssembly = (string)gsKey.GetValue("GS_DLL");
|
||||||
|
|
||||||
if (System.IO.File.Exists(gsAssembly))
|
if (System.IO.File.Exists(gsAssembly))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue