From 8243a3606a4694d8eb415d914aa5961d4b818291 Mon Sep 17 00:00:00 2001 From: niksedk Date: Wed, 27 Oct 2010 12:55:59 +0000 Subject: [PATCH] Moved "Tesseract" and "Icons" out of roaming profile git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@101 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Forms/VobSubOcr.cs | 4 ++-- src/Logic/Configuration.cs | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Forms/VobSubOcr.cs b/src/Forms/VobSubOcr.cs index 009218242..ab499c1b9 100644 --- a/src/Forms/VobSubOcr.cs +++ b/src/Forms/VobSubOcr.cs @@ -956,9 +956,9 @@ namespace Nikse.SubtitleEdit.Forms string tempTextFileName = Path.GetTempPath() + Guid.NewGuid().ToString(); Process process = new Process(); - process.StartInfo = new ProcessStartInfo(Configuration.DataDirectory + "Tesseract" + Path.DirectorySeparatorChar + "tesseract.exe"); + process.StartInfo = new ProcessStartInfo(Configuration.TesseractFolder + "tesseract.exe"); process.StartInfo.Arguments = "\"" + tempTiffFileName + "\" \"" + tempTextFileName + "\" -l " + language; - process.StartInfo.WorkingDirectory = (Configuration.DataDirectory + "Tesseract"); + process.StartInfo.WorkingDirectory = (Configuration.TesseractFolder); process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; process.Start(); process.WaitForExit(2000); diff --git a/src/Logic/Configuration.cs b/src/Logic/Configuration.cs index bc22521b5..7cc91a6ab 100644 --- a/src/Logic/Configuration.cs +++ b/src/Logic/Configuration.cs @@ -30,7 +30,15 @@ namespace Nikse.SubtitleEdit.Logic { get { - return DataDirectory + "Icons" + Path.DirectorySeparatorChar; + return BaseDirectory + "Icons" + Path.DirectorySeparatorChar; + } + } + + public static string TesseractFolder + { + get + { + return BaseDirectory + "Tesseract" + Path.DirectorySeparatorChar; } }