FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   How to add web url in innosetup? (https://fileforums.com/showthread.php?t=101502)

jitender 24-02-2018 09:13

How to add web url in innosetup?
 
hello i am using istool to making setup.But i don't know how to add my web url at bottom left corner of my setup.Please help me.See image: https://s9.postimg.org/4y8doelnj/image.png

KaktoR 24-02-2018 09:23

Code:

var
  URLText: TNewStaticText;

procedure URLTextClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure InitializeWizard();
begin
  URLText := TNewStaticText.Create(WizardForm);
  with URLText do begin
    Parent := WizardForm;
    Left := ScaleX(5);
    Top := ScaleY(327);
    Width := ScaleX(156);
    Height := ScaleY(23);
    Caption := 'URL Text';
    OnClick := @URLTextClick;
  end;
end;


jitender 24-02-2018 09:30

Quote:

Originally Posted by KaktoR (Post 468350)
Code:

var
  URLText: TNewStaticText;

procedure URLTextClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure InitializeWizard();
begin
  URLText := TNewStaticText.Create(WizardForm);
  with URLText do begin
    Parent := WizardForm;
    Left := ScaleX(5);
    Top := ScaleY(327);
    Width := ScaleX(156);
    Height := ScaleY(23);
    Caption := 'URL Text';
    OnClick := @URLTextClick;
  end;
end;


thanks for reply really appericiate.But i don't know even a single line of coding.I have this script so please tell me where to insert this above code:
Code:

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0A3E478F-1CFB-4841-BAEE-90B5E62CF3D8}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputDir=C:\Users\JS\Downloads
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe; DestDir: {app}; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {commonprograms}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon

[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}; Flags: nowait postinstall skipifsilent


pakrat2k2 24-02-2018 09:51

after the [Run] section add [Code] then paste the lines KaktoR posted.

dont forget to change http://fileforums.com to what you want it to be.

jitender 24-02-2018 09:53

Ok done thanks.And

-> what about that blue color how to add that?(at bottom in above image)

-> And how to add welcome splash screen?

jitender 24-02-2018 10:24

how to insert the splash at the time of install?
 
Code:


#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{AEB246C4-0FD6-4C59-8EEF-03944CDFDDA5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputDir=C:\Users\JS\Downloads
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe; DestDir: {app}; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {commonprograms}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon

[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}; Flags: nowait postinstall skipifsilent

var
  URLText: TNewStaticText;

procedure URLTextClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure InitializeWizard();
begin
  URLText := TNewStaticText.Create(WizardForm);
  with URLText do begin
    Parent := WizardForm;
    Left := ScaleX(5);
    Top := ScaleY(327);
    Width := ScaleX(156);
    Height := ScaleY(23);
    Caption := 'URL Text';
    OnClick := @URLTextClick;
  end;
end;

I have above script now please tell me the code and where to insert the code.And what to edit in it if necessary.

KaktoR 24-02-2018 11:56

1 Attachment(s)
I guess it's the background color for WizardForm.

Try to change it using this
http://www.jrsoftware.org/ishelp/ind...etup_backcolor

For splash screen you can use isgsg.dll library (attachment)

How to use:
Add isgsg.dll to script (in [Files] section)
Add Splash.png to script (in [Files] section)

Code:

procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer);
    external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';

procedure InitializeWizard();
  ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'), 1000, 1000, 1000, 0, 255, True, $FFFFFF, 10);


jitender 24-02-2018 13:04

Quote:

Originally Posted by KaktoR (Post 468361)
I guess it's the background color for WizardForm.

Try to change it using this
http://www.jrsoftware.org/ishelp/ind...etup_backcolor

For splash screen you can use isgsg.dll library (attachment)

How to use:
Add isgsg.dll to script (in [Files] section)
Add Splash.png to script (in [Files] section)

Code:

procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer);
    external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';

procedure InitializeWizard();
  ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'), 1000, 1000, 1000, 0, 255, True, $FFFFFF, 10);


Thanks again but as i told i don't know coding so please provide me full working script.
I tried adding splash script but it throwing me error.See this image:
https://s9.postimg.org/r802zwavz/image.png

And background color i checked but don't know where to and how to add in script please provide me full script with features(splash,and wizard background color) thank you!

jitender 25-02-2018 01:00

I am able to run all things now but separately.How to add all these code together.When i try to add it throw me error 'duplicate identifier initialwizard'.

KaktoR 25-02-2018 02:48

Like error says "duplicate", you have to merge InitializeWizard proceure

And make only one [Code] section, not two. You have to merge them too.

Code:

var
  URLText: TNewStaticText;


procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer);
    external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';


procedure URLTextClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;


procedure InitializeWizard();

ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'), 1000, 1000, 1000, 0, 255, True, $FFFFFF, 10);

begin
  URLText := TNewStaticText.Create(WizardForm);
  with URLText do begin
    Parent := WizardForm;
    Left := ScaleX(5);
    Top := ScaleY(327);
    Width := ScaleX(156);
    Height := ScaleY(23);
    Caption := 'URL Text';
    OnClick := @URLTextClick;
  end;
end;


jitender 25-02-2018 07:25

Quote:

Originally Posted by KaktoR (Post 468400)
Like error says "duplicate", you have to merge InitializeWizard proceure

And make only one [Code] section, not two. You have to merge them too.

Code:

var
  URLText: TNewStaticText;


procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer);
    external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';


procedure URLTextClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://fileforums.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;


procedure InitializeWizard();

ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'), 1000, 1000, 1000, 0, 255, True, $FFFFFF, 10);

begin
  URLText := TNewStaticText.Create(WizardForm);
  with URLText do begin
    Parent := WizardForm;
    Left := ScaleX(5);
    Top := ScaleY(327);
    Width := ScaleX(156);
    Height := ScaleY(23);
    Caption := 'URL Text';
    OnClick := @URLTextClick;
  end;
end;


Something you missed: https://s17.postimg.org/sqjbj97pb/aaa.png

Please give me a tested script which contain that background color for WizardForm(i asked above).Thanks it will save your and mine time please give me a tested one.

STB13 26-02-2018 07:18

Quote:

Originally Posted by jitender (Post 468355)
Ok done thanks.And

-> what about that blue color how to add that?(at bottom in above image)

-> And how to add welcome splash screen?

For background Color,
procedure initializewizard();
begin
with wizardform do
begin
Color := clBlue;
end;
end;

jitender 26-02-2018 09:34

1 Attachment(s)
I used "wizard forum desginer ' but i am not able to change text in text field.
See below image and tell me how to change field text?

pakrat2k2 26-02-2018 11:55

1 Attachment(s)
Here's the script that partially works, splash shows properly, but the part STB13 mentioned is in the script, but doesnt seem to display it.

KaktoR 26-02-2018 12:44

1 Attachment(s)
Fixed


All times are GMT -7. The time now is 04:39.

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