|
|
|
#1
|
||||
|
||||
|
Thank you, I had already set up the system that copies the external compressors used, I have to revise it to integrate the management of CLS if it is used for compression.
Maybe I'll add a zone where you fill in the weight of the setup.exe, so you only have one value for the split, and add some presets: dvd5, dvd9... I have a little change the diskspan.dll of razor so what kind all the files in the same output directory, I will see to use the format "Setup-1.bin, Setup-2.bin", there are about fifteen changes to make, it should be functional in the evening or tomorrow. A big thank you to Razor12911 for his work!
__________________
Practice makes perfect. |
| The Following User Says Thank You to JRD! For This Useful Post: | ||
Simorq (30-12-2017) | ||
| Sponsored Links |
|
#2
|
||||
|
||||
|
Finally I will leave the original format, I just change the way to recovered the output path in order to be compatible with ArcGUI.
for those interested here are the changes: Code:
function IsRelativePath(const sPath: string): Boolean;
begin
Result:=True;
if Length(sPath) >= 2 then
Result:=sPath[2] <> ':';
end;
function ClsMain(operation: Integer; Callback: CLS_CALLBACK; Instance: Pointer): Integer; cdecl;
const
BuffSize = 64 * 1024;
var
CLS: TCLSStream;
SS: TSplitStream;
Bytes: TBytes;
X: Integer;
X8: Byte;
X64: Int64;
s: String;
FirstVolume, OtherVolume: Int64;
i: integer;
begin
Result := CLS_ERROR_GENERAL;
case (operation) of
CLS_COMPRESS:
begin
for i := 1 to ParamCount do
begin
if (ExtractFileExt(ParamStr(i)) = '.001') then
begin
Archive := ParamStr(i);
Break;
end;
end;
if IsRelativePath(Archive) then
Archive := ExtractFilePath(GetModuleName) + Archive;
Archive := ChangeFileExt(Archive, '');
SetLength(Bytes, 256);
FillChar(Bytes[0], Length(Bytes), #0);
X := Callback(Instance, CLS_GET_PARAMSTR, @Bytes[0], Length(Bytes));
s := StringOf(Bytes);
s := ReplaceStr(s, #0, '');
FirstVolume := ConvertToBytes(LeftStr(s, Pos(':', s) - 1));
OtherVolume := ConvertToBytes(ReplaceStr(s, LeftStr(s, Pos(':', s)), ''));
CLS := TCLSStream.Create(Callback, Instance);
CLS.WriteBuffer(FirstVolume, sizeof(FirstVolume));
Bytes := BytesOf(ExtractFileName(Archive));
X := Length(Bytes);
CLS.WriteBuffer(X, sizeof(X));
CLS.WriteBuffer(Bytes, Length(Bytes));
X64 := StreamToStream(CLS, CLS, BuffSize, FirstVolume);
if X64 = FirstVolume then
begin
X := CLS.Read(Bytes, Length(Bytes));
if X > 0 then
begin
X8 := 1;
CLS.WriteBuffer(X8, sizeof(X8));
SS := TSplitStream.Create(Archive, False, OtherVolume, OtherVolume);
SS.WriteBuffer(Bytes, X);
StreamToStream(CLS, SS, BuffSize);
SS.Free;
end else
begin
X8 := 0;
CLS.WriteBuffer(X8, sizeof(X8));
end;
end;
CLS.Free;
SetLength(Bytes, 0);
Result := CLS_OK;
end;
CLS_DECOMPRESS:
begin
try
if SrcPath = '' then
SrcPath := GetCurrentDir;
CLS := TCLSStream.Create(Callback, Instance);
CLS.ReadBuffer(FirstVolume, sizeof(FirstVolume));
CLS.ReadBuffer(X, sizeof(X));
SetLength(Bytes, X);
CLS.ReadBuffer(Bytes, Length(Bytes));
Archive := IncludeTrailingBackSlash(SrcPath) + StringOf(Bytes);
X64 := StreamToStream(CLS, CLS, BuffSize, FirstVolume);
if FirstVolume = X64 then
begin
CLS.ReadBuffer(X8, sizeof(X8));
if X8 = 1 then
begin
SS := TSplitStream.Create(Archive, True, OtherVolume, OtherVolume, MyDiskRequest);
StreamToStream(SS, CLS, BuffSize);
SS.Free;
end;
end;
CLS.Free;
SetLength(Bytes, 0);
Result := CLS_OK;
except
Result := CLS_ERROR_GENERAL;
end;
end;
else
Result := CLS_ERROR_NOT_IMPLEMENTED;
end;
end;
__________________
Practice makes perfect. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vista beta 2 blocking Starforce | ronandex | CD/DVD Copy Protections & Utilities | 4 | 31-05-2006 02:37 |
| Neverwinter Nights v1.66.8071 (Beta) | doomerdgr8 | PC Games | 1 | 28-05-2005 10:18 |
| Copying Socom2 Beta Is It Possible | dblue | PS2 Games | 6 | 14-10-2003 19:14 |
| OT: Opinion and BETA testers neded for my upcomming products! | krondike | PC Games | 3 | 06-10-2003 08:29 |
| PAL Patcher 0.93 Beta | Megalexxx | DC Games | 18 | 03-01-2003 09:23 |