]> granicus.if.org Git - handbrake/commitdiff
WinGui: Change the CLI Helper to use the application startup path rather than the...
authorsr55 <sr55.hb@outlook.com>
Sun, 19 May 2013 21:03:09 +0000 (21:03 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 19 May 2013 21:03:09 +0000 (21:03 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5487 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs

index 2e69eacecc6dacd5761ff61c7c47fc8ea1f876ef..0060b1d157a132d17e35faca694648f9c1805131 100644 (file)
@@ -14,6 +14,7 @@ namespace HandBrakeWPF.Helpers
     using System.IO;\r
     using System.Security.Cryptography;\r
     using System.Text.RegularExpressions;\r
+    using System.Windows.Forms;\r
 \r
     using Caliburn.Micro;\r
 \r
@@ -43,7 +44,7 @@ namespace HandBrakeWPF.Helpers
 \r
             // Get the SHA1 Hash of HandBrakeCLI\r
             byte[] hash;\r
-            using (Stream stream = File.OpenRead("HandBrakeCLI.exe"))\r
+            using (Stream stream = File.OpenRead(Path.Combine(Application.StartupPath, "HandBrakeCLI.exe")))\r
             {\r
                 hash = SHA1.Create().ComputeHash(stream);\r
             }\r
@@ -58,7 +59,7 @@ namespace HandBrakeWPF.Helpers
 \r
             // It's not the same, so start the CLI to get it's version data.\r
             Process cliProcess = new Process();\r
-            ProcessStartInfo handBrakeCli = new ProcessStartInfo("HandBrakeCLI.exe", " -u -v0")\r
+            ProcessStartInfo handBrakeCli = new ProcessStartInfo(Path.Combine(Application.StartupPath, "HandBrakeCLI.exe"), " -u -v0")\r
                 {\r
                     UseShellExecute = false,\r
                     RedirectStandardError = true,\r