update to 0.7.3

This commit is contained in:
Razor12911
2023-06-30 05:02:05 +02:00
parent 7e8bbfcd86
commit 30ce6f00fc
94 changed files with 43027 additions and 858 deletions

View File

@@ -97,7 +97,7 @@ begin
if FileExists(Input[I]) then
BaseDir := ExtractFilePath(TPath.GetFullPath(Input[I]))
else if DirectoryExists(Input[I]) then
BaseDir := IncludeTrailingBackSlash(TPath.GetFullPath(Input[I]))
BaseDir := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input[I]))
else
BaseDir := ExtractFilePath(TPath.GetFullPath(Input[I]));
LList := GetFileList([Input[I]], True);
@@ -136,7 +136,7 @@ var
LBytes: TBytes;
FStream: TFileStream;
begin
BaseDir := IncludeTrailingBackSlash(Output);
BaseDir := IncludeTrailingPathDelimiter(Output);
Input.ReadBuffer(I, I.Size);
while I >= 0 do
begin

View File

@@ -93,13 +93,13 @@ begin
if FileExists(Input2) then
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input2))
else if DirectoryExists(Input2) then
BaseDir1 := IncludeTrailingBackSlash(TPath.GetFullPath(Input2))
BaseDir1 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input2))
else
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input2));
if FileExists(Output) then
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Output))
else if DirectoryExists(Output) then
BaseDir2 := IncludeTrailingBackSlash(TPath.GetFullPath(Output))
BaseDir2 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Output))
else
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Output));
while true do
@@ -154,13 +154,13 @@ begin
if FileExists(Input2) then
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input2))
else if DirectoryExists(Input2) then
BaseDir1 := IncludeTrailingBackSlash(TPath.GetFullPath(Input2))
BaseDir1 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input2))
else
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input2));
if FileExists(Output) then
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Output))
else if DirectoryExists(Output) then
BaseDir2 := IncludeTrailingBackSlash(TPath.GetFullPath(Output))
BaseDir2 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Output))
else
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Output));
while true do

View File

@@ -123,7 +123,7 @@ begin
if FileExists(Input1) then
BaseDir := ExtractFilePath(TPath.GetFullPath(Input1))
else if DirectoryExists(Input1) then
BaseDir := IncludeTrailingBackSlash(TPath.GetFullPath(Input1))
BaseDir := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input1))
else
BaseDir := ExtractFilePath(TPath.GetFullPath(Input1));
LList := GetFileList([Input1], True);
@@ -235,7 +235,7 @@ begin
if FileExists(Input2) then
BaseDir := ExtractFilePath(TPath.GetFullPath(Input2))
else if DirectoryExists(Input2) then
BaseDir := IncludeTrailingBackSlash(TPath.GetFullPath(Input2))
BaseDir := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input2))
else
BaseDir := ExtractFilePath(TPath.GetFullPath(Input2));
LList := GetFileList([Input2], True);

View File

@@ -215,7 +215,7 @@ begin
SS := TSharedMemoryStream.Create
(LowerCase(ChangeFileExt(ExtractFileName(Utils.GetModuleName),
'_' + Random($7FFFFFFF).ToHexString + XTOOL_MAPSUF2)),
IncludeTrailingBackSlash(PString(WorkDir)^) + InFile);
IncludeTrailingPathDelimiter(PString(WorkDir)^) + InFile);
try
Res := ExecStdin(Exec, Param, PString(WorkDir)^,
SS.Memory, SS.Size);
@@ -226,7 +226,7 @@ begin
STDOUT_MODE:
begin
TFS := TFileStream.Create
(IncludeTrailingBackSlash(PString(WorkDir)^) + OutFile,
(IncludeTrailingPathDelimiter(PString(WorkDir)^) + OutFile,
fmCreate);
try
Res := ExecStdout(Exec, Param, PString(WorkDir)^, Callback);
@@ -239,9 +239,9 @@ begin
SS := TSharedMemoryStream.Create
(LowerCase(ChangeFileExt(ExtractFileName(Utils.GetModuleName),
'_' + Random($7FFFFFFF).ToHexString + XTOOL_MAPSUF2)),
IncludeTrailingBackSlash(PString(WorkDir)^) + InFile);
IncludeTrailingPathDelimiter(PString(WorkDir)^) + InFile);
TFS := TFileStream.Create
(IncludeTrailingBackSlash(PString(WorkDir)^) + OutFile,
(IncludeTrailingPathDelimiter(PString(WorkDir)^) + OutFile,
fmCreate);
try
Res := ExecStdio(Exec, Param, PString(WorkDir)^, SS.Memory,
@@ -278,11 +278,11 @@ var
procedure Load(X: Integer);
begin
DeleteFile(IncludeTrailingBackSlash(WorkDir[X]) + LCtx.InFile);
DeleteFile(IncludeTrailingBackSlash(WorkDir[X]) + LCtx.OutFile);
DeleteFile(IncludeTrailingPathDelimiter(WorkDir[X]) + LCtx.InFile);
DeleteFile(IncludeTrailingPathDelimiter(WorkDir[X]) + LCtx.OutFile);
if not Done then
begin
FStream := TFileStream.Create(IncludeTrailingBackSlash(WorkDir[X]) +
FStream := TFileStream.Create(IncludeTrailingPathDelimiter(WorkDir[X]) +
LCtx.InFile, fmCreate);
try
Done := CopyStream(Input, FStream, Options.ChunkSize) = 0;
@@ -307,7 +307,7 @@ begin
SetLength(State, Options.Threads);
for I := Low(Tasks) to High(Tasks) do
begin
WorkDir[I] := IncludeTrailingBackSlash(GetCurrentDir) +
WorkDir[I] := IncludeTrailingPathDelimiter(GetCurrentDir) +
LowerCase(ChangeFileExt(ExtractFileName(Utils.GetModuleName),
'_' + Random($7FFFFFFF).ToHexString + XTOOL_MAPSUF1));
CreateDir(WorkDir[I]);
@@ -333,10 +333,10 @@ begin
continue;
B := 0;
if State[I] = STATE_EXECUTED then
S := IncludeTrailingBackSlash(WorkDir[I]) + LCtx.OutFile
S := IncludeTrailingPathDelimiter(WorkDir[I]) + LCtx.OutFile
else
begin
S := IncludeTrailingBackSlash(WorkDir[I]) + LCtx.InFile;
S := IncludeTrailingPathDelimiter(WorkDir[I]) + LCtx.InFile;
B := 1;
end;
SStream := TSharedMemoryStream.Create
@@ -386,8 +386,8 @@ var
B: Byte;
I64: Int64;
begin
DeleteFile(IncludeTrailingBackSlash(WorkDir[X]) + LCtx.InFile);
DeleteFile(IncludeTrailingBackSlash(WorkDir[X]) + LCtx.OutFile);
DeleteFile(IncludeTrailingPathDelimiter(WorkDir[X]) + LCtx.InFile);
DeleteFile(IncludeTrailingPathDelimiter(WorkDir[X]) + LCtx.OutFile);
if not Done then
begin
repeat
@@ -395,7 +395,7 @@ var
Input.ReadBuffer(I64, I64.Size);
if I64 >= 0 then
begin
FStream := TFileStream.Create(IncludeTrailingBackSlash(WorkDir[X]) +
FStream := TFileStream.Create(IncludeTrailingPathDelimiter(WorkDir[X]) +
LCtx.InFile, fmCreate);
try
if B = 0 then
@@ -425,7 +425,7 @@ begin
SetLength(State, Options.Threads);
for I := Low(Tasks) to High(Tasks) do
begin
WorkDir[I] := IncludeTrailingBackSlash(GetCurrentDir) +
WorkDir[I] := IncludeTrailingPathDelimiter(GetCurrentDir) +
LowerCase(ChangeFileExt(ExtractFileName(Utils.GetModuleName),
'_' + Random($7FFFFFFF).ToHexString + XTOOL_MAPSUF1));
CreateDir(WorkDir[I]);
@@ -450,7 +450,7 @@ begin
if State[I] = STATE_DONE then
continue;
if State[I] = STATE_EXECUTED then
S := IncludeTrailingBackSlash(WorkDir[I]) + LCtx.OutFile
S := IncludeTrailingPathDelimiter(WorkDir[I]) + LCtx.OutFile
else
raise Exception.CreateRes(@SWriteError);
SStream := TSharedMemoryStream.Create

View File

@@ -123,7 +123,7 @@ begin
if FileExists(Input1) then
BaseDir := ExtractFilePath(TPath.GetFullPath(Input1))
else if DirectoryExists(Input1) then
BaseDir := IncludeTrailingBackSlash(TPath.GetFullPath(Input1))
BaseDir := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input1))
else
BaseDir := ExtractFilePath(TPath.GetFullPath(Input1));
LList := GetFileList([Input1], True);
@@ -235,7 +235,7 @@ begin
if FileExists(Input2) then
BaseDir := ExtractFilePath(TPath.GetFullPath(Input2))
else if DirectoryExists(Input2) then
BaseDir := IncludeTrailingBackSlash(TPath.GetFullPath(Input2))
BaseDir := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input2))
else
BaseDir := ExtractFilePath(TPath.GetFullPath(Input2));
LList := GetFileList([Input2], True);

View File

@@ -131,7 +131,7 @@ begin
if FileExists(Input1) then
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input1))
else if DirectoryExists(Input1) then
BaseDir1 := IncludeTrailingBackSlash(TPath.GetFullPath(Input1))
BaseDir1 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input1))
else
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input1));
LList1 := GetFileList([Input1], True);
@@ -140,7 +140,7 @@ begin
if FileExists(Input2) then
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Input2))
else if DirectoryExists(Input2) then
BaseDir2 := IncludeTrailingBackSlash(TPath.GetFullPath(Input2))
BaseDir2 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input2))
else
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Input2));
LList2 := GetFileList([Input2], True);
@@ -223,7 +223,7 @@ begin
end;
Delete(LList2, I, 1);
end;
TempDir := IncludeTrailingBackSlash(GetCurrentDir) +
TempDir := IncludeTrailingPathDelimiter(GetCurrentDir) +
LowerCase(ChangeFileExt(ExtractFileName(Utils.GetModuleName),
'_' + Random($7FFFFFFF).ToHexString + XTOOL_MAPSUF1));
if not DirectoryExists(TempDir) then
@@ -250,7 +250,7 @@ begin
Y := AtomicIncrement(J);
while Y < Z do
begin
S1 := IncludeTrailingBackSlash(TempDir) + Y.ToHexString +
S1 := IncludeTrailingPathDelimiter(TempDir) + Y.ToHexString +
XTOOL_MAPSUF3;
if C then
S2 := Input1
@@ -296,7 +296,7 @@ begin
begin
while I >= K do
Sleep(10);
LFilename := IncludeTrailingBackSlash(TempDir) + I.ToHexString +
LFilename := IncludeTrailingPathDelimiter(TempDir) + I.ToHexString +
XTOOL_MAPSUF3;
if FileExists(LFilename) then
begin
@@ -357,10 +357,10 @@ begin
if FileExists(Output) then
BaseDir := ExtractFilePath(TPath.GetFullPath(Output))
else if DirectoryExists(Output) then
BaseDir := IncludeTrailingBackSlash(TPath.GetFullPath(Output))
BaseDir := IncludeTrailingPathDelimiter(TPath.GetFullPath(Output))
else
BaseDir := ExtractFilePath(TPath.GetFullPath(Output));
S1 := IncludeTrailingBackSlash(GetCurrentDir) +
S1 := IncludeTrailingPathDelimiter(GetCurrentDir) +
LowerCase(ChangeFileExt(ExtractFileName(Utils.GetModuleName),
'_' + Random($7FFFFFFF).ToHexString + XTOOL_MAPSUF3));
SStream0 := TSharedMemoryStream.Create

View File

@@ -126,7 +126,7 @@ begin
if FileExists(Input1) then
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input1))
else if DirectoryExists(Input1) then
BaseDir1 := IncludeTrailingBackSlash(TPath.GetFullPath(Input1))
BaseDir1 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input1))
else
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input1));
LList := GetFileList([Input1], True);
@@ -238,13 +238,13 @@ begin
if FileExists(Input2) then
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input2))
else if DirectoryExists(Input2) then
BaseDir1 := IncludeTrailingBackSlash(TPath.GetFullPath(Input2))
BaseDir1 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input2))
else
BaseDir1 := ExtractFilePath(TPath.GetFullPath(Input2));
if FileExists(Input3) then
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Input3))
else if DirectoryExists(Input3) then
BaseDir2 := IncludeTrailingBackSlash(TPath.GetFullPath(Input3))
BaseDir2 := IncludeTrailingPathDelimiter(TPath.GetFullPath(Input3))
else
BaseDir2 := ExtractFilePath(TPath.GetFullPath(Input3));
LList := GetFileList([Input3], True);