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)

altef_4 11-03-2013 12:39

Quote:

Originally Posted by danswano (Post 415252)
Thank you, what about the Ready to Install dialog please? :)

disablereadypage=yes

danswano 11-03-2013 12:43

I've tried this one but after clicking Next on the previous dialog it goes directly to installation.
The Next button should turn into Install button before starting installation

Is it possible? :)

altef_4 11-03-2013 12:53

Quote:

Originally Posted by danswano (Post 415254)
I've tried this one but after clicking Next on the previous dialog it goes directly to installation.
The Next button should turn into Install button before starting installation

Is it possible? :)

yes, it's possible. To change button text use curpagechanged and remame button manually.
Code:

if (curpageid=wpselectdir) then wizardform.nextbutton.caption:='Install';

danswano 11-03-2013 12:59

The page that i want to change it's button name is the tasks page, what is the id of that page?

altef_4 11-03-2013 21:31

Quote:

Originally Posted by danswano (Post 415256)
The page that i want to change it's button name is the tasks page, what is the id of that page?

i'm not sure, maybe "wpSelectTasks" :D

danswano 13-03-2013 06:01

It's wpSelectTasks

Quote:

Constants

Here's the list of constants used by these functions:

TSetupStep values
ssInstall, ssPostInstall, ssDone

TUninstallStep values
usAppMutexCheck, usUninstall, usPostUninstall, usDone

PageID values for predefined wizard pages
wpWelcome, wpLicense, wpPassword, wpInfoBefore, wpUserInfo, wpSelectDir, wpSelectComponents, wpSelectProgramGroup, wpSelectTasks, wpReady, wpPreparing, wpInstalling, wpInfoAfter, wpFinished
http://www.jrsoftware.org/ishelp/ind...c=scriptevents

Hello again,
i'm using this parameter to compress my files
Quote:

-msrep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
But i don't seem to be able to get a compatible precomp compression method to work with ISDone and i get unpacking errors, can you please add a precomp parameter to the above command with best compression and if you can improve my srep parameters for a better compression would be appreciated.

Thank you :)

Hello razor,
When using unarc.dll you gave me i get invalid password error, how can i unpack passworded arc's using it?

Noob is back again.
I have a question, i was an installshield user before innosetup, installshield used to skip the already installed files and only install the new ones if there is any, is it possible to do that in innosetup?

Cesar82 15-03-2013 20:45

Question
 
Need help.
The code pat below is for Inno Ansi Version.
I wanted modify to work on inno unicode version.

Code:

function GetDC(HWND: DWord): DWord; external '[email protected] stdcall';
function GetDeviceCaps(DC: DWord; Index: Integer): Integer; external '[email protected] stdcall';
function ReleaseDC(HWND: DWord;DC: DWord): Integer; external '[email protected] stdcall';
function GetDriveType(lpDisk: String): Integer; external '[email protected] stdcall setuponly';
function GetVolumeInformation (lpRootPathName,lpVolumeNameBuffer: PAnsiChar; nVolumeNameSize: longint; lpVolumeSerialNumber,lpMaximumComponentLength: Cardinal; lpFileSystemFlags: Cardinal; lpFileSystemNameBuffer: PAnsiChar; nFileSystemNameSize: dword): longword;
external '[email protected] stdcall setuponly';

function GetScreenHeight(): integer;
var dc: DWord;
begin
 dc:=GetDC(MainForm.Handle);
 Result:=GetDeviceCaps(dc,10);
 ReleaseDC(MainForm.Handle,dc);
end;

function GetScreenWidth(): integer;
 var dc: DWord;
begin
 dc:=GetDC(MainForm.Handle);
 Result:=GetDeviceCaps(dc,8);
 ReleaseDC(MainForm.Handle,dc);
end;

Function GetFixedDrivesInfo(): Array of Tdrive;
Var l:string;
  s,c,n: integer;
  FreeMB, TotalMB: Cardinal;
  Vl: array of AnsiString;
  Fsn: PAnsiChar;
      //
Begin
l:='ABCDEFGHIJKLMNOPQRSTUWXYZ';
for c:=1 to length(l) do begin
if GetDriveType(l[c]+':')=DRIVE_FIXED then
begin
n:=GetArrayLength(Result);
s:=GetArrayLength(Vl);
SetArrayLength(Result,n+1);
SetArrayLength(Vl,s+1);
Vl[s]:=StringOfChar(' ',256);
GetVolumeInformation (l[c]+':\',Vl[s],MAX_PATH,0,0,0,PAnsiChar(Fsn),MAX_PATH);
GetSpaceOnDisk(l[c]+':\', True, FreeMB, TotalMB)
Result[n].Letter:=l[c]+':';
Result[n].VolumeName:=Trim(Vl[s]);
Result[n].FreeSpace:=FreeMB;
Result[n].PSize:=TotalMB;
end;
end;
//MsgBox(Result[n].fileSystemname, mbInformation, mb_Ok);
End;

In inno unicode he does not perform this part.

Code:

if GetDriveType(l[c]+':')=DRIVE_FIXED then
begin
n:=GetArrayLength(Result);
s:=GetArrayLength(Vl);
SetArrayLength(Result,n+1);
SetArrayLength(Vl,s+1);
Vl[s]:=StringOfChar(' ',256);
GetVolumeInformation (l[c]+':\',Vl[s],MAX_PATH,0,0,0,PAnsiChar(Fsn),MAX_PATH);
GetSpaceOnDisk(l[c]+':\', True, FreeMB, TotalMB)
Result[n].Letter:=l[c]+':';
Result[n].VolumeName:=Trim(Vl[s]);
Result[n].FreeSpace:=FreeMB;
Result[n].PSize:=TotalMB;
end;

Can help me?

pakrat2k2 16-03-2013 06:57

change PansiChar to PChar

ansi = pansichar
unicode = pchar

IF I remember it correctly, make backup of script, before making changes. test to see if it worked.

Cesar82 16-03-2013 13:53

Quote:

Originally Posted by pakrat2k2 (Post 415454)
change PansiChar to PChar

ansi = pansichar
unicode = pchar

IF I remember it correctly, make backup of script, before making changes. test to see if it worked.

I tested it and Error: Unknown type PChar
Has at the beginning of the code.
Code:

#ifdef UNICODE
    #define A "W"
#else
    #define A "A"  ;// точка входа в SetWindowText, {#A} меняется на A или W в зависимости от версии
#if Ver < 84084736
    PAnsiChar = PChar;  // Required for Inno Setup 5.3.0 and lower. (требуется для Inno Setup версии 5.3.0 и ниже)
#endif
#endif
#if Ver < 84018176
    AnsiString = String; // There is no need for this line in Inno Setup 5.2.4 and above (для Inno Setup версий 5.2.4 и выше эта строка не нужна)
#endif

This is not enough?
Does not pass this line.
Code:

if GetDriveType(l[c]+':')=DRIVE_FIXED then
In image (Depuration Mode Inno) not load driver information. In Inno Setup Ansi Version work.
http://i.imgur.com/NnkKUWm.jpg
Note:This script is part of the script of the game The Witcher 2 by peterf1999.

pakrat2k2 16-03-2013 14:09

because that script needs ANSI not Unicode.

If your just changing images etc, using peterf's original script modified for your game, then it will compile just fine no errors.

Cesar82 16-03-2013 14:33

Quote:

Originally Posted by pakrat2k2 (Post 415471)
because that script needs ANSI not Unicode.

If your just changing images etc, using peterf's original script modified for your game, then it will compile just fine no errors.

The rest is working fine.
I need a script basic that meets the that need.
Does not have to replace only some details of that part.
Thank You pakrat2k2.

altef_4 18-03-2013 05:56

@LuisCйsar82, to display drive info on unicode version change this to

Joe Forster/STA 19-03-2013 01:32

Quote:

Originally Posted by altef_4 (Post 415550)
to display drive info on unicode version change this to

Isn't there an automatism to select between the ANSI and Unicode versions of functions?! In a C compiler, you simply use GetDriveType - or whatever function, without a suffix in its name - and it gets automatically expanded to ...A in an ANSI and ...W in a Unicode program (in the system headers, according to whether or not the "UNICODE" symbol is defined). I see something like this at the beginning of one of the scripts above (#define A "A"/"W").

I'm actually experimenting at this moment with some dangerous C macro automatism to be able to turn an ANSI program into a Unicode program by just defining "UNICODE". :)

altef_4 19-03-2013 07:43

Quote:

Originally Posted by Joe Forster/STA (Post 415564)
Isn't there an automatism to select between the ANSI and Unicode versions of functions?! In a C compiler, you simply use GetDriveType - or whatever function, without a suffix in its name - and it gets automatically expanded to ...A in an ANSI and ...W in a Unicode program (in the system headers, according to whether or not the "UNICODE" symbol is defined). I see something like this at the beginning of one of the scripts above (#define A "A"/"W").

I'm actually experimenting at this moment with some dangerous C macro automatism to be able to turn an ANSI program into a Unicode program by just defining "UNICODE". :)

maybe i don't correctly understood you, but to auto change u/a functions you can use this code
Code:

#ifdef UNICODE
  #define A "W"
#else
  #define A "A"
#endif

[_code]
function GetDriveType(lpDisk: String): Integer; external 'GetDriveType{#A}@kernel32.dll stdcall setuponly';


Joe Forster/STA 19-03-2013 22:39

Yup, that's what I'm talking about. People should get used to such automatisms as they help porting (ANSI <-> Unicode, 32-bit <-> 64-bit, Windows <-> Unix) without major headaches!


All times are GMT -7. The time now is 00:51.

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