mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: Support environment variables in WinRAR path
This commit is contained in:
parent
7f1bb8ded3
commit
625e3be5da
2 changed files with 5 additions and 5 deletions
|
|
@ -13,11 +13,11 @@ procedure CreateRarConfDlg;
|
|||
|
||||
var
|
||||
Args: String;
|
||||
WinRar: String;
|
||||
Method: Integer;
|
||||
Recovery: Boolean;
|
||||
Encrypt: Boolean;
|
||||
Solid: Boolean;
|
||||
WinRar: String = '%ProgramFiles%\WinRAR\WinRAR.exe';
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ begin
|
|||
gIni:= TIniFile.Create(IniFileName);
|
||||
try
|
||||
Args:= gIni.ReadString('unrar', 'Args', EmptyStr);
|
||||
WinRar:= gIni.ReadString('unrar', 'Path', EmptyStr);
|
||||
WinRar:= gIni.ReadString('unrar', 'Path', WinRar);
|
||||
Method:= gIni.ReadInteger('unrar', 'Method', 3);
|
||||
Recovery:= gIni.ReadBool('unrar', 'Recovery', False);
|
||||
Encrypt:= gIni.ReadBool('unrar', 'Encrypt', False);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
Process, DCProcessUtf8, UnRARFunc, RarConfDlg;
|
||||
Process, DCProcessUtf8, DCOSUtils, UnRARFunc, RarConfDlg;
|
||||
|
||||
const
|
||||
UTF16LEBOM: WideChar = #$FEFF;
|
||||
|
|
@ -110,7 +110,7 @@ var
|
|||
begin
|
||||
Process := TProcessUtf8.Create(nil);
|
||||
try
|
||||
Process.Executable:= WinRar;
|
||||
Process.Executable:= mbExpandEnvironmentStrings(WinRar);
|
||||
Process.Parameters.Add('d');
|
||||
Process.Parameters.Add('-c-');
|
||||
Process.Parameters.Add('-r-');
|
||||
|
|
@ -156,7 +156,7 @@ var
|
|||
begin
|
||||
Process := TProcessUtf8.Create(nil);
|
||||
try
|
||||
Process.Executable:= WinRar;
|
||||
Process.Executable:= mbExpandEnvironmentStrings(WinRar);
|
||||
if (Flags and PK_PACK_MOVE_FILES <> 0) then
|
||||
Process.Parameters.Add('m')
|
||||
else begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue