Use variable for make appx path

This commit is contained in:
Jaex 2018-03-23 09:27:21 +03:00
parent 4ce50bf707
commit a796eba0fc
2 changed files with 3 additions and 2 deletions

View file

@ -1543,7 +1543,6 @@ public static string SaveImageFileDialog(Image img, string filePath = "")
return null; return null;
} }
// http://stackoverflow.com/questions/788335/why-does-image-fromfile-keep-a-file-handle-open-sometimes
public static Image LoadImage(string filePath) public static Image LoadImage(string filePath)
{ {
try try
@ -1554,6 +1553,7 @@ public static Image LoadImage(string filePath)
if (!string.IsNullOrEmpty(filePath) && Helpers.IsImageFile(filePath) && File.Exists(filePath)) if (!string.IsNullOrEmpty(filePath) && Helpers.IsImageFile(filePath) && File.Exists(filePath))
{ {
// http://stackoverflow.com/questions/788335/why-does-image-fromfile-keep-a-file-handle-open-sometimes
Image img = Image.FromStream(new MemoryStream(File.ReadAllBytes(filePath))); Image img = Image.FromStream(new MemoryStream(File.ReadAllBytes(filePath)));
if (HelpersOptions.RotateImageByExifOrientationData) if (HelpersOptions.RotateImageByExifOrientationData)

View file

@ -96,6 +96,7 @@ private enum SetupJobs
public static string InnoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe"; public static string InnoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe";
public static string FFmpeg32bit => Path.Combine(ParentDir, "Lib", "ffmpeg.exe"); public static string FFmpeg32bit => Path.Combine(ParentDir, "Lib", "ffmpeg.exe");
public static string FFmpeg64bit => Path.Combine(ParentDir, "Lib", "ffmpeg-x64.exe"); public static string FFmpeg64bit => Path.Combine(ParentDir, "Lib", "ffmpeg-x64.exe");
public static string MakeAppxPath = @"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe";
private static void Main(string[] args) private static void Main(string[] args)
{ {
@ -177,7 +178,7 @@ private static void Main(string[] args)
{ {
StartInfo = new ProcessStartInfo StartInfo = new ProcessStartInfo
{ {
FileName = @"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe", FileName = MakeAppxPath,
Arguments = $"pack /d \"{WindowsStoreOutputDir}\" /p \"{WindowsStoreAppxPath}\" /l /o", Arguments = $"pack /d \"{WindowsStoreOutputDir}\" /p \"{WindowsStoreAppxPath}\" /l /o",
UseShellExecute = false, UseShellExecute = false,
RedirectStandardOutput = true RedirectStandardOutput = true