mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
fix: update not working
This commit is contained in:
parent
d8a426f63b
commit
1c0ff4e75a
12
main.pas
12
main.pas
@ -7587,13 +7587,13 @@ resourcestring
|
|||||||
const
|
const
|
||||||
UPDATE_BATCH_FILE = 'hfs.update.bat';
|
UPDATE_BATCH_FILE = 'hfs.update.bat';
|
||||||
UPDATE_BATCH = 'START %0:s /WAIT "%1:s" -q'+CRLF
|
UPDATE_BATCH = 'START %0:s /WAIT "%1:s" -q'+CRLF
|
||||||
+'ping 127.0.0.1 -n 3 -w 1000> nul'+CRLF
|
+'ping 127.0.0.1 -n 3 -w 1000> nul'+CRLF // wait
|
||||||
+'DEL "%3:s'+PREVIOUS_VERSION+'"'+CRLF
|
+'DEL "%3:s'+PREVIOUS_VERSION+'"'+CRLF // previous backup
|
||||||
+'%2:sMOVE "%1:s" "%3:s'+PREVIOUS_VERSION+'"'+CRLF
|
+'%2:sMOVE "%1:s" "%3:s'+PREVIOUS_VERSION+'"'+CRLF // new backup
|
||||||
+'DEL "%1:s"'+CRLF
|
+'DEL "%1:s"'+CRLF // too zealous?
|
||||||
+'MOVE "%4:s" "%1:s"'+CRLF
|
+'MOVE "%4:s" "%1:s"'+CRLF // new becomes current
|
||||||
+'START %0:s "%1:s"'+CRLF
|
+'START %0:s "%1:s"'+CRLF
|
||||||
+'DEL %%0'+CRLF;
|
+'DEL %%0'+CRLF; // remove self
|
||||||
var
|
var
|
||||||
size: integer;
|
size: integer;
|
||||||
fn: string;
|
fn: string;
|
||||||
|
|||||||
1
todo.txt
1
todo.txt
@ -1,3 +1,4 @@
|
|||||||
|
- update doesn't work without 'only 1 instance' (it's the -q)
|
||||||
+ replace shellExtDlg.gif with transparent png (english system)
|
+ replace shellExtDlg.gif with transparent png (english system)
|
||||||
+ expiring links
|
+ expiring links
|
||||||
* dismiss regexp lib http://docwiki.embarcadero.com/Libraries/Rio/en/System.RegularExpressions.TRegEx
|
* dismiss regexp lib http://docwiki.embarcadero.com/Libraries/Rio/en/System.RegularExpressions.TRegEx
|
||||||
|
|||||||
@ -1212,14 +1212,8 @@ end;
|
|||||||
|
|
||||||
// exec but does not wait for the process to end
|
// exec but does not wait for the process to end
|
||||||
function execNew(cmd:string):boolean;
|
function execNew(cmd:string):boolean;
|
||||||
var
|
|
||||||
si: TStartupInfo;
|
|
||||||
pi: TProcessInformation;
|
|
||||||
begin
|
begin
|
||||||
fillchar(si, sizeOf(si), 0);
|
result:=32 < ShellExecute(0, nil, 'cmd.exe', pchar('/C '+cmd), nil, SW_SHOW);
|
||||||
fillchar(pi, sizeOf(pi), 0);
|
|
||||||
si.cb:=sizeOf(si);
|
|
||||||
result:=createProcess(NIL,pchar(cmd),NIL,NIL,FALSE,0,NIL,NIL,si,pi)
|
|
||||||
end; // execNew
|
end; // execNew
|
||||||
|
|
||||||
function addArray(var dst:TstringDynArray; src:array of string; where:integer=-1; srcOfs:integer=0; srcLn:integer=-1):integer;
|
function addArray(var dst:TstringDynArray; src:array of string; where:integer=-1; srcOfs:integer=0; srcLn:integer=-1):integer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user