FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   INNO TROUBLESHOOT - Questions Here (https://fileforums.com/showthread.php?t=93193)

:( Sad8669 17-06-2021 11:18

Damn, any idea where should i start to learn basic inno setup functions and stuff?

Cesar82 17-06-2021 14:48

1 Attachment(s)
Quote:

Originally Posted by Masquerade (Post 492919)
There was a plugin for Inno Setup that allowed for bat file / console application output to be redirected to the inno Setup memo window instead of producing a cmd window.

The name seems to have slipped my mind - can anyone help?

I know and have public versions there is "ISUtils.dll" (by Peterf1999) and also "Memo Console for Inno Setup" (Console.dll) (by BLACKFIRE69).
It has other libraries like cmdout.dll (by Ele) but I don't know if it's public.
I've also attached here an example using version without libraries.

GaMEr_2077 17-06-2021 20:26

Quote:

Originally Posted by Cesar82 (Post 492928)
I know and have public versions there is "ISUtils.dll" (by Peterf1999) and also "Memo Console for Inno Setup" (Console.dll) (by BLACKFIRE69).
It has other libraries like cmdout.dll (by Ele) but I don't know if it's public.
I've also attached here an example using version without libraries.

okay so this will run cmd commands in inno console
RIGHT??

Ele 17-06-2021 22:47

4 Attachment(s)
Quote:

Originally Posted by Cesar82
It has other libraries like cmdout.dll (by Ele) but I don't know if it's public.

Yes, it wasn't a public Lib. I only use it on my personal projects. If anyone finds it useful, here it is. :)
Tested with: Inno 5.5.1.ee2(unicode) Enhanced and Inno 6.2.0(unicode).

Note: There're two separate libraries here. One is for Inno and the other is for Delphi.


Preview:

Masquerade 02-07-2021 09:29

@Ele, thanks your plugin works great in my tests. I tried the dll by BLACKFIRE69 however I could not get it to work.

Is there a way to stop my memo from echoing the same thing twice?

Currently I have it set to echo the file currently being extracted however this means it echoes the same file over and over again until it moves onto the next file.

Here's the current code:

Code:

function ProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
var
  CurTick: DWORD;
begin
    Memo.Lines.Add('Unpacking: ' + CurrentFile);

I thought maybe I could make a temporary string variable and comparing it with the current file and if so, skip echoing the current file, I am interested if anyone has any thoughts on this.

KaktoR 02-07-2021 11:00

Yes it it possible the way you thought on it. I remember this was the case in all your repacks and I wondered why you made it this way :)

However, I think there is a more easier way to do this. I guess one of our experts will answer you on this :D

DiCaPrIo 02-07-2021 11:28

Quote:

Originally Posted by Masquerade (Post 493088)
@Ele, thanks your plugin works great in my tests. I tried the dll by BLACKFIRE69 however I could not get it to work.

Is there a way to stop my memo from echoing the same thing twice?

Currently I have it set to echo the file currently being extracted however this means it echoes the same file over and over again until it moves onto the next file.

Here's the current code:

Code:

function ProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
var
  CurTick: DWORD;
begin
    Memo.Lines.Add('Unpacking: ' + CurrentFile);

I thought maybe I could make a temporary string variable and comparing it with the current file and if so, skip echoing the current file, I am interested if anyone has any thoughts on this.

if not Memo.Lines.IndexOf('Unpacking: ' + CurrentFile) > -1 then
Memo.Lines.Add('Unpacking: ' + CurrentFile);

Cesar82 02-07-2021 15:15

Quote:

Originally Posted by Masquerade (Post 493088)
Code:

function ProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
var
  CurTick: DWORD;
begin
    Memo.Lines.Add('Unpacking: ' + CurrentFile);

I thought maybe I could make a temporary string variable and comparing it with the current file and if so, skip echoing the current file, I am interested if anyone has any thoughts on this.

Another option is to use it this way.
I don't know if the filenames are partially cut off or not.
Let's say you have 2 files with same names in somewhat similar paths then the second file will also be displayed.

Example:
1) Data1.bin destination {app}\bin
FileName = Bin32\File1.txt
FileName = Bin32\File2.txt
2) Data2.bin destination {app}\
FileName = Bin\Bin32\File1.txt
FileName = Bin\File3.txt

In this case there are similar names as long as it is not the same name as the previous line, it will be added.
Code:

if (Memo.Lines.Count = 0) or (CompareText(Memo.Lines.Strings[Memo.Lines.Count - 1], 'Unpacking: ' + CurrentFile) <> 0) then
  Memo.Lines.Add('Unpacking: ' + CurrentFile);


Carldric Clement 26-07-2021 04:51

Quote:

Originally Posted by Ele (Post 492931)
Yes, it wasn't a public Lib. I only use it on my personal projects. If anyone finds it useful, here it is. :)
Tested with: Inno 5.5.1.ee2(unicode) Enhanced and Inno 6.2.0(unicode).

Note: There're two separate libraries here. One is for Inno and the other is for Delphi.


Preview:

Idk if it works with Delphi XE 10 I guess. But my problem is the ISCmdInit doesn't support the latest version of Delphi XE because I'm using FMX. :p

Masquerade 30-07-2021 13:15

Is there an inno library that support blake3 hashings? ISHash does MD5 but not Blake3.

KaktoR 30-07-2021 14:45

Something like this?
https://github.com/namazso/OpenHashTab

Edit: Scratch it, it's just a shellext installer...

Maybe ask peterf if he got some spare time to add it into ishash

no.safe 02-08-2021 06:15

Can Help Me ?
 
http://www41.zippyshare.com/v/i3eMQfbO/file.html

Carldric Clement 12-08-2021 08:34

I didn't expect it before. the newest version of Inno Setup 6 was no longer code of Application.ProcessMessanges; Is there any similar this code?

DiCaPrIo 12-08-2021 09:01

Quote:

Originally Posted by Carldric Clement (Post 493634)
I didn't expect it before. the newest version of Inno Setup 6 was no longer code of Application.ProcessMessanges; Is there any similar this code?

function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external '[email protected] stdcall';
function TranslateMessage(const lpMsg: TMsg): BOOL; external '[email protected] stdcall';
function DispatchMessage(const lpMsg: TMsg): Longint; external '[email protected] stdcall';

procedure AppProcessMessages;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, 0, 0, 1) do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;

Carldric Clement 12-08-2021 09:12

Quote:

Originally Posted by DiCaPrIo (Post 493635)
function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external '[email protected] stdcall';
function TranslateMessage(const lpMsg: TMsg): BOOL; external '[email protected] stdcall';
function DispatchMessage(const lpMsg: TMsg): Longint; external '[email protected] stdcall';

procedure AppProcessMessages;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, 0, 0, 1) do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;

almost but there is one thing was unknown type: TMsg; :)


All times are GMT -7. The time now is 08:27.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com