|
|
|
#1
|
|||
|
|||
|
Hello everybody,
I'm using IsArcEx for FreeArc archive decompression and I am attempting to apply a hdiffz patch after install, here is how I'm doing so: Code:
procedure patching;
var
ResultCode: Integer;
begin
Exec(ExpandConstant('{tmp}\hpatchz.exe'), (ExpandConstant('{app}\...\file.one {app}\...\file.two {app}\...\file.three')), (ExpandConstant('{app}')), SW_SHOW, ewWaitUntilTerminated, ResultCode)
DeleteFile (ExpandConstant('{app}\...\file.one'));
DeleteFile (ExpandConstant('{app}\...\file.two'));
end;
Code:
if (ISArcDiskAddingSuccess) and ISArcExInit(MainForm.Handle, {#TimeFormat}, @ProgressCallback) then
begin
repeat
if ISArcExDiskCount = 0 then begin
MsgBox('There is no any archive found for unpacking.', mbError, MB_OK);
break;
end;
ChangeLanguage('English');
//ChangeLanguage('Russian');
for i := 1 to ISArcExDiskCount do begin
ISArcExError := not ISArcExExtract(i, ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'));
if ISArcExError then break;
end;
until true;
patching();
ISArcExStop;
if ISArcExError then
MsgBox('Installation is corrupted.', mbError, MB_OK)
end;
HideControls;
WizardForm.CancelButton.Visible := true;
WizardForm.CancelButton.Enabled := false;
end;
What I would like to happen is the timer continuing and after the patch is applied for it to end. Thanks in advance |
| Sponsored Links |
|
#2
|
|||
|
|||
|
Quick update.
What I was doing was using absolute paths instead of using relative ones, this lead the patch to attempt to execute but it would lead to an error. The way I fixed it, if anyone encounters this issue in the future was to copy the necessary files to {app} and run with relative paths there. |
|
#3
|
|||
|
|||
|
audiofeel, How would I achieve this without utilizing FMXInno.dll?
|
|
#4
|
||||
|
||||
|
Quote:
and i finally found the answer to this LMAO
|
|
#5
|
||||
|
||||
|
Hello everyone, I am trying to implement the function (SelectDisk) that is available in (InnoSetup) 6, so I wrote the code that is in the (zip) file below, but after execution
1: If I click on the (OK) button and if the requested file is not there, it should give me an error, but it ignores this. 2: If I click on the (cancel) button, it should show me the exit message box, but it ignores it. I will be glad if someone can fix the problems of this code
__________________
¤ Life good be a Dream ¤ Last edited by Lord.Freddy; 22-07-2023 at 13:14. |
|
#6
|
||||
|
||||
|
Quote:
I recommend putting OnClick procedures for the "OK" and "Cancel" buttons and putting your functions there, then you can set the values of the global variable "ModalResult". |
| The Following 2 Users Say Thank You to Cesar82 For This Useful Post: | ||
audiofeel (23-07-2023), Lord.Freddy (22-07-2023) | ||
|
#7
|
|||
|
|||
|
Hey, I'm a new member and joined yesterday. I am a complete noob but have learned a lot reading through this forum in just one day. I am currently using ASIS: Advanced Simple Installer Script and want to change the background JPG slideshow to a GIF image. I have found GifLib.dll but do not know how to adjust the script code and wondered if someone with know-how can do this for me or show me what needs changing. I have no coding experience, but I learn pretty quick, I'm a visual learner.
I have put the GifLib.dll in ASIS.v7.4.4\Resources\Modules\InstallBG folder i have found the following lines in the script that I'm assuming need changing: #if UseInstallBackground Source: "Resources\Modules\InstallBG\InnoCallback.dll" ; DestDir: "{tmp}"; Flags: dontcopy Source: "Resources\Modules\InstallBG\IsSlideShow.dll"; DestDir: "{tmp}"; Flags: dontcopy #sub AddFile2 Source: "Setup\Background\{#i}.jpg"; DestDir: "{tmp}"; Flags: dontcopy #endsub #for {i = 1; FileExists("Setup\Background" + Str(i) + ".jpg" ) != 0; i++} AddFile2 #endif Any help appreciated. |
|
#8
|
|||
|
|||
|
function GetVolumeFreeSpace(const RootDir: PAnsichar; const OutSizeType: Byte): Double; external 'GetVolumeFreeSpace@files:Isab.dll stdcall delayload';
Good morning, how to extract the value from the function above? I've tried: value.Caption:=StrToInt(GetVolumeFreeSpace); value.Caption:=FloatToStr(GetVolumeFreeSpace); value.Caption:=StrToFloat(GetVolumeFreeSpace); I have "invalid parameters" issue. How can i fix the problem? Thanks in advance! Last edited by Dragonis40; 17-09-2023 at 04:22. |
|
#9
|
||||
|
||||
|
Quote:
Use this function instead.
__________________
¤ Life good be a Dream ¤ Last edited by Lord.Freddy; 17-09-2023 at 06:06. |
|
#10
|
|||
|
|||
|
hi !
Need a little help here... I tried many combinations ,googled for it ,but no solution. (Standard ISDone) I want to include/extract some files (XTool-BIK compressor) in my installer and extract them to a sub-folder in {tmp} but the subfolder is not created. Simply all files extracted to the same place ( {tmp} ) ,and it is not good.... Here comes a snippet : #ifdef xBIK Source: Include\XToolbpk\_libraries\bik.ini; DestDir: "{tmp}\xBIK\_libraries"; Flags: dontcopy recursesubdirs createallsubdirs Source: Include\XToolbpk\_libraries\bk2.ini; DestDir: "{tmp}\xBIK\_libraries"; Flags: dontcopy recursesubdirs createallsubdirs ....... #ifdef xBIK ExtractTemporaryFile('bik.ini'); ExtractTemporaryFile('bk2.ini'); Whats wrong with my script ? |
|
#11
|
|||
|
|||
|
Thanks,but it only creates folders.
How to implement it in my script? (Above) (Atm im away from my comp,btw tomorrow will try something with it) |
|
#12
|
|||
|
|||
|
tried. i still cant extract the files there.. ( {tmp}\xBIK )
Any solution ? Anyone ? |
|
#13
|
||||
|
||||
|
Hello, yesterday I attempted to create a function in Inno Setup to gather file names and their respective sizes, but only a few files were returned. I am currently at a standstill and unsure of how to proceed. Does anyone know where i went wrong?
Code:
[Setup]
AppName=FindFiles
AppVerName=FindFiles
CreateAppDir=no
OutputDir=.\OutPut
OutputBaseFilename=FindFiles
[_Code]
type
TAutoString = {#defined(UNICODE) ? "Wide" : ""}String;
TFileList = array of record
FileName, FileSize: TAutoString;
end;
var
FileList: TFileList;
function Size64(const Hi, Lo: Integer): Extended;
begin
Result := Lo;
if (Lo < 0) then
Result := (Result + $7FFFFFFF + $7FFFFFFF + 2);
for Hi := (Hi - 1) downto 0 do
Result := (Result + $7FFFFFFF + $7FFFFFFF + 2);
end;
function FloatToStrEx(const value: Extended): TAutoString;
begin
Result := FloatToStr(value);
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, (Length(Result) - 1));
end;
function FindFilesEx(FolderPath: TAutoString; var FilesList, FileSize: array of TAutoString): Integer;
var
FindRec: TFindRec;
begin
Result := 0;
if FindFirst(ExpandConstant(AddBackslash(FolderPath)) + '*', FindRec) then
begin
repeat
if (FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0) or
(FindRec.Attributes and FILE_ATTRIBUTE_HIDDEN <> 0) then
begin
SetArrayLength(FilesList, Result + 1);
SetArrayLength(FileSize, Result + 1);
FilesList[GetArrayLength(FilesList) - 1] := ExpandConstant(AddBackslash(FolderPath)) + FindRec.Name;
FileSize[GetArrayLength(FileSize) - 1] := FloatToStrEx(Size64(FindRec.SizeHigh, FindRec.SizeLow));
Result := Result + 1;
end;
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY <> 0 then
begin
if (FindRec.Name <> '.') and (FindRec.Name <> '..') then
Result := Result + FindFilesEx(AddBackslash(FolderPath) + FindRec.Name, FilesList, FileSize);
end;
until not FindNext(FindRec);
FindClose(FindRec);
end;
end;
procedure FindFiles(Dir: TAutoString; var FilesFound: Integer);
var
TotalFilesFound, Y, S: Integer;
FilesNameList, FileNameSize: array of TAutoString;
begin
TotalFilesFound := FindFilesEx(ExpandConstant(Dir), FilesNameList, FileNameSize);
FilesFound := TotalFilesFound;
for Y := 0 to totalFilesFound - 1 do
begin
SetArrayLength(FileList, GetArrayLength(FileList) + 1);
S := GetArrayLength(FileList) - 1;
with FileList[S] do
begin
FileList[S].FileName := FilesNameList[Y];
Delete(FileList[S].FileName, Pos(AddBackslash(Dir), FileList[S].FileName), Length(AddBackslash(Dir)));
FileList[S].FileSize := FileNameSize[Y];
end;
end;
end;
function InitializeSetup: Boolean;
var
TotalFilesFound, I: Integer;
Dir: TAutoString;
begin
Dir := ExpandConstant('{src}\..');
FindFiles(Dir, TotalFilesFound);
for I := 0 to GetArrayLength(FileList) - 1 do
begin
msgbox('FileName: ' + FileList[I].FileName + #13#10 + 'FileSize: ' + FileList[I].FileSize + ' bytes', mbInformation, MB_OK);
end;
Result := False;
end;
I found a solution for the above code, which is as follows. Code:
[Setup]
AppName=FindFiles
AppVerName=FindFiles
CreateAppDir=no
OutputDir=.\OutPut
OutputBaseFilename=FindFiles
[_Code]
type
TAutoString = {#defined(UNICODE) ? "Wide" : ""}String;
TFileList = array of record
FileName, FileExt, FileSize, FilePath: TAutoString;
end;
function Size64(const Hi, Lo: Integer): Extended;
begin
Result := Lo;
if (Lo < 0) then
Result := (Result + $7FFFFFFF + $7FFFFFFF + 2);
for Hi := (Hi - 1) downto 0 do
Result := (Result + $7FFFFFFF + $7FFFFFFF + 2);
end;
function FloatToStrEx(const value: Extended): TAutoString;
begin
Result := FloatToStr(value);
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, (Length(Result) - 1));
end;
function pFindFiles(const BaseDir, DestDir, FileMask: TAutoString; var OutFileList: TFileList): Integer;
var
FSR, DSR: TFindRec;
FindResult: Boolean;
APath: TAutoString;
nCount: Integer;
begin
APath := ExpandConstant(AddBackslash(DestDir));
FindResult := FindFirst(APath + '*.*', DSR);
try
while FindResult do
begin
if ((DSR.Attributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY) and not ((DSR.Name = '.') or (DSR.Name = '..')) then
begin
pFindFiles(BaseDir, APath + DSR.Name, FileMask, OutFileList);
end;
FindResult := FindNext(DSR);
end;
FindResult := FindFirst(APath + FileMask, FSR);
while FindResult do
begin
if (FSR.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0) then
begin
SetArrayLength(OutFileList, GetArrayLength(OutFileList) + 1);
OutFileList[GetArrayLength(OutFileList) - 1].FileName := FSR.Name;
OutFileList[GetArrayLength(OutFileList) - 1].FileExt := ExtractFileExt(FSR.Name);
OutFileList[GetArrayLength(OutFileList) - 1].FileSize := FloatToStrEx(Size64(FSR.SizeHigh, FSR.SizeLow));
OutFileList[GetArrayLength(OutFileList) - 1].FilePath := ExtractFilePath(ExtractRelativePath(AddBackslash(BaseDir), APath + FSR.Name));
nCount := nCount + 1;
end;
FindResult := FindNext(FSR);
end;
finally
FindClose(FSR);
FindClose(DSR);
end;
Result := nCount;
end;
function InitializeSetup: Boolean;
var
TotalFilesFound, I: Integer;
Dir: TAutoString;
FileList: TFileList;
OutList: TAutoString;
begin
Dir := ExpandConstant('{src}\..');
TotalFilesFound := pFindFiles(Dir, Dir, '*.*', FileList);
for I := 0 to GetArrayLength(FileList) - 1 do
begin
OutList := OutList + 'FileName: ' + FileList[I].FileName + #13#10 + 'FileSize: ' + FileList[I].FileSize + ' bytes' + #13#10 + 'FileExt: ' + FileList[I].FileExt + #13#10 + 'FilePath: ' + FileList[I].FilePath + #13#10 + #13#10;
end;
msgbox(OutList, mbInformation, MB_OK);
Result := False;
end;
__________________
¤ Life good be a Dream ¤ Last edited by Lord.Freddy; 27-06-2024 at 07:57. |
|
#14
|
|||
|
|||
|
Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\KONAMI\PES2013"; ValueType: string; ValueName: "installdir"; ValueData: "{app}{#MyAppExeName}"; Flags: uninsdeletekey
I added this code to my script, but it duplicates Wow6432Node the folder in regedit. It should be: SOFTWARE\Wow6432Node\KONAMI\PES2013 But it shows: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Wow6432Nod e\KONAMI\PES2013 |
|
#15
|
|||
|
|||
|
Hello, i have a problem. When i want to do some repacks it normaly works. But when i want to start the wizard the problem starts. It Normally installs, But not really... It just corrupts the file. Please help me with it
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 05:51 |
| INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |