{\r
string query = string.Empty;\r
\r
- if (!string.IsNullOrEmpty(mainWindow.sourcePath) &&\r
- mainWindow.sourcePath.Trim() != "Select \"Source\" to continue")\r
- query = " -i " + '"' + mainWindow.sourcePath + '"';\r
+ if (!string.IsNullOrEmpty(mainWindow.sourcePath) && mainWindow.sourcePath.Trim() != "Select \"Source\" to continue")\r
+ {\r
+ if (mainWindow.sourcePath.EndsWith("\\"))\r
+ {\r
+ query = " -i " + mainWindow.sourcePath;\r
+ }\r
+ else\r
+ {\r
+ query = " -i " + '"' + mainWindow.sourcePath + '"';\r
+ }\r
+ }\r
\r
if (mainWindow.drp_dvdtitle.Text != string.Empty)\r
{\r
public class Job\r
{\r
/// <summary>\r
- /// the CLI Query.\r
- /// </summary>\r
- private string query;\r
-\r
- /// <summary>\r
/// Gets or sets the job ID.\r
/// </summary>\r
public int Id { get; set; }\r
/// <summary>\r
/// Gets or sets the query string.\r
/// </summary>\r
- public string Query\r
- {\r
- get\r
- {\r
- return this.query.Replace("\\\"", "\"").Replace("\\\\", "\\");\r
- }\r
- set\r
- {\r
- this.query = value;\r
- }\r
- }\r
+ public string Query { get; set; }\r
\r
/// <summary>\r
/// Gets or sets a value indicating whether if this is a user or GUI generated query\r
if (logBuffer == null)\r
{\r
ResetLogReader(false);\r
- ReadLastScanFile(); \r
+ ReadLastScanFile();\r
}\r
\r
return logBuffer != null ? logBuffer.ToString() : string.Empty;\r
catch (Exception ex)\r
{\r
errorService.ShowError("Unable to kill HandBrakeCLI.exe \n" +\r
- "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" + \r
+ "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +\r
" within the next few minutes. ", ex.ToString());\r
}\r
}\r
\r
// Quick fix for "F:\\" style paths. Just get rid of the \\ so the CLI doesn't fall over.\r
// Sould probably clean up the escaping of the strings later.\r
+ string source;\r
if (sourcePath.ToString().EndsWith("\\"))\r
{\r
- sourcePath = sourcePath.ToString().Replace("\\", string.Empty);\r
+ source = sourcePath.ToString();\r
+ }\r
+ else\r
+ {\r
+ source = "\"" + sourcePath + "\"";\r
}\r
\r
- string source = "\"" + sourcePath + "\"";\r
string command = String.Format(@" -i {0} -t{1} {2} -v ", source, title, extraArguments);\r
\r
this.hbProc = new Process\r
IsScanning = false;\r
\r
if (this.ScanCompleted != null)\r
- this.ScanCompleted(this, new EventArgs()); \r
+ this.ScanCompleted(this, new EventArgs());\r
}\r
catch (Exception exc)\r
{\r
errorService.ShowError("An error has occured during the scan process.", exc.ToString());\r
\r
if (this.ScanCompleted != null)\r
- this.ScanCompleted(this, new EventArgs()); \r
+ this.ScanCompleted(this, new EventArgs());\r
}\r
}\r
\r
<Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />\r
<PropertyGroup Condition=" '$(Configuration)' == 'Install' ">\r
<PostBuildEvent>\r
- cd ../../\r
- copy Installer\Installer.nsi bin\Install /Y\r
- copy handbrakepineapple.ico bin\Install /Y\r
- xcopy doc bin\Install\doc /I /Y\r
- cd bin\Install\r
makensis Installer.nsi\r
</PostBuildEvent>\r
</PropertyGroup>\r
!define MUI_UNICON "handbrakepineapple.ico"\r
\r
; Welcome page\r
-!insertmacro MUI_PAGE_WELCOME \r
+!insertmacro MUI_PAGE_WELCOME\r
; License page\r
!insertmacro MUI_PAGE_LICENSE "doc\COPYING"\r
; Directory page\r
done:\r
FunctionEnd\r
\r
-\r
Section "Handbrake" SEC01\r
SetOutPath "$INSTDIR"\r
SetOverwrite ifnewer\r
- \r
+\r
; Begin Check .NET version\r
StrCpy $InstallDotNET "No"\r
Call CheckFramework\r
\r
SetDetailsView show\r
${EndIf}\r
-\r
+ \r
; Install Files\r
File "Handbrake.exe"\r
+ File "HandBrakeCLI.exe"\r
CreateDirectory "$SMPROGRAMS\Handbrake"\r
CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"\r
CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"\r
File "AxInterop.QTOControlLib.dll"\r
File "Growl.Connector.dll"\r
File "Growl.CoreLibrary.dll"\r
- File "HandBrakeCLI.exe"\r
File "Handbrake.exe.config"\r
- File "handbrakepineapple.ico"\r
File "HandBrake.ApplicationServices.dll"\r
File "HandBrake.Framework.dll"\r
File "Microsoft.WindowsAPICodePack.Shell.dll"\r
;File "Castle.MicroKernel.dll"\r
;File "Castle.Windsor.dll"\r
;File "Microsoft.Practices.ServiceLocation.dll"\r
- \r
+\r
+ ; Copy the standard doc set into the doc folder\r
SetOutPath "$INSTDIR\doc"\r
SetOverwrite ifnewer\r
File "doc\AUTHORS"\r
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"\r
SectionEnd\r
\r
+\r
Function un.onUninstSuccess\r
HideWindow\r
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r