summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-01-03 20:15:10 +0000
committersr55 <[email protected]>2011-01-03 20:15:10 +0000
commitee94883ba1b2e3d0dc432c84a2c05db5812fe1c6 (patch)
treea279256432b524c06048a8b7e4aa6b90e913c3c0
parentb1ab0c5b00eef003cb737414e77e4f12ad25b854 (diff)
WinGui:
- Second attempt at fixing file path problems. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3736 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Functions/QueryGenerator.cs14
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Job.cs17
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Scan.cs16
-rw-r--r--win/C#/HandBrakeCS.csproj5
-rw-r--r--win/C#/Installer/Installer.nsi14
5 files changed, 29 insertions, 37 deletions
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index bb1c61ff2..4c65ca183 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -94,9 +94,17 @@ namespace Handbrake.Functions
{
string query = string.Empty;
- if (!string.IsNullOrEmpty(mainWindow.sourcePath) &&
- mainWindow.sourcePath.Trim() != "Select \"Source\" to continue")
- query = " -i " + '"' + mainWindow.sourcePath + '"';
+ if (!string.IsNullOrEmpty(mainWindow.sourcePath) && mainWindow.sourcePath.Trim() != "Select \"Source\" to continue")
+ {
+ if (mainWindow.sourcePath.EndsWith("\\"))
+ {
+ query = " -i " + mainWindow.sourcePath;
+ }
+ else
+ {
+ query = " -i " + '"' + mainWindow.sourcePath + '"';
+ }
+ }
if (mainWindow.drp_dvdtitle.Text != string.Empty)
{
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Job.cs b/win/C#/HandBrake.ApplicationServices/Model/Job.cs
index a18a6117c..536069153 100644
--- a/win/C#/HandBrake.ApplicationServices/Model/Job.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/Job.cs
@@ -11,11 +11,6 @@ namespace HandBrake.ApplicationServices.Model
public class Job
{
/// <summary>
- /// the CLI Query.
- /// </summary>
- private string query;
-
- /// <summary>
/// Gets or sets the job ID.
/// </summary>
public int Id { get; set; }
@@ -28,17 +23,7 @@ namespace HandBrake.ApplicationServices.Model
/// <summary>
/// Gets or sets the query string.
/// </summary>
- public string Query
- {
- get
- {
- return this.query.Replace("\\\"", "\"").Replace("\\\\", "\\");
- }
- set
- {
- this.query = value;
- }
- }
+ public string Query { get; set; }
/// <summary>
/// Gets or sets a value indicating whether if this is a user or GUI generated query
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs
index 2a5188ab6..7bc74bc5c 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs
@@ -110,7 +110,7 @@ namespace HandBrake.ApplicationServices.Services
if (logBuffer == null)
{
ResetLogReader(false);
- ReadLastScanFile();
+ ReadLastScanFile();
}
return logBuffer != null ? logBuffer.ToString() : string.Empty;
@@ -146,7 +146,7 @@ namespace HandBrake.ApplicationServices.Services
catch (Exception ex)
{
errorService.ShowError("Unable to kill HandBrakeCLI.exe \n" +
- "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +
+ "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +
" within the next few minutes. ", ex.ToString());
}
}
@@ -186,12 +186,16 @@ namespace HandBrake.ApplicationServices.Services
// Quick fix for "F:\\" style paths. Just get rid of the \\ so the CLI doesn't fall over.
// Sould probably clean up the escaping of the strings later.
+ string source;
if (sourcePath.ToString().EndsWith("\\"))
{
- sourcePath = sourcePath.ToString().Replace("\\", string.Empty);
+ source = sourcePath.ToString();
+ }
+ else
+ {
+ source = "\"" + sourcePath + "\"";
}
- string source = "\"" + sourcePath + "\"";
string command = String.Format(@" -i {0} -t{1} {2} -v ", source, title, extraArguments);
this.hbProc = new Process
@@ -237,7 +241,7 @@ namespace HandBrake.ApplicationServices.Services
IsScanning = false;
if (this.ScanCompleted != null)
- this.ScanCompleted(this, new EventArgs());
+ this.ScanCompleted(this, new EventArgs());
}
catch (Exception exc)
{
@@ -246,7 +250,7 @@ namespace HandBrake.ApplicationServices.Services
errorService.ShowError("An error has occured during the scan process.", exc.ToString());
if (this.ScanCompleted != null)
- this.ScanCompleted(this, new EventArgs());
+ this.ScanCompleted(this, new EventArgs());
}
}
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 46323ada4..dafd6d3d5 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -485,11 +485,6 @@
<Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />
<PropertyGroup Condition=" '$(Configuration)' == 'Install' ">
<PostBuildEvent>
- cd ../../
- copy Installer\Installer.nsi bin\Install /Y
- copy handbrakepineapple.ico bin\Install /Y
- xcopy doc bin\Install\doc /I /Y
- cd bin\Install
makensis Installer.nsi
</PostBuildEvent>
</PropertyGroup>
diff --git a/win/C#/Installer/Installer.nsi b/win/C#/Installer/Installer.nsi
index 0ea0cb9d0..2951bcaad 100644
--- a/win/C#/Installer/Installer.nsi
+++ b/win/C#/Installer/Installer.nsi
@@ -30,7 +30,7 @@ SetCompressor lzma
!define MUI_UNICON "handbrakepineapple.ico"
; Welcome page
-!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "doc\COPYING"
; Directory page
@@ -91,11 +91,10 @@ Function .onInit
done:
FunctionEnd
-
Section "Handbrake" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
-
+
; Begin Check .NET version
StrCpy $InstallDotNET "No"
Call CheckFramework
@@ -120,9 +119,10 @@ Section "Handbrake" SEC01
SetDetailsView show
${EndIf}
-
+
; Install Files
File "Handbrake.exe"
+ File "HandBrakeCLI.exe"
CreateDirectory "$SMPROGRAMS\Handbrake"
CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
@@ -131,9 +131,7 @@ Section "Handbrake" SEC01
File "AxInterop.QTOControlLib.dll"
File "Growl.Connector.dll"
File "Growl.CoreLibrary.dll"
- File "HandBrakeCLI.exe"
File "Handbrake.exe.config"
- File "handbrakepineapple.ico"
File "HandBrake.ApplicationServices.dll"
File "HandBrake.Framework.dll"
File "Microsoft.WindowsAPICodePack.Shell.dll"
@@ -146,7 +144,8 @@ Section "Handbrake" SEC01
;File "Castle.MicroKernel.dll"
;File "Castle.Windsor.dll"
;File "Microsoft.Practices.ServiceLocation.dll"
-
+
+ ; Copy the standard doc set into the doc folder
SetOutPath "$INSTDIR\doc"
SetOverwrite ifnewer
File "doc\AUTHORS"
@@ -170,6 +169,7 @@ Section -Post
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
SectionEnd
+
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."