How to add web url for promotion in innosetup?

jeet

Новичок
hello i am using istool to making setup.But i do not know how to add my web url at bottom left corner of my setup.Please help me.See image:
 

Nemko

Дилетант
Модератор
jeet, this is from the manual (это из руководства):

Код:
[Setup]
AppName=AppName
AppVerName=AppVerName
CreateAppDir=False

[Code]
var
  MouseLabel, SiteLabel: TLabel;

procedure SiteLabelOnClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://krinkels.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;

procedure SiteLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  SiteLabel.Font.Color:=clRed
end;

procedure SiteLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  SiteLabel.Font.Color:=clBlue
end;

procedure SiteLabelMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  SiteLabel.Font.Color:=clGreen
end;

procedure SiteLabelMouseMove2(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  SiteLabel.Font.Color:=clBlue
end;

procedure InitializeWizard;
begin
MouseLabel:=TLabel.Create(WizardForm);
with MouseLabel do begin
  Width:=WizardForm.Width;
  Height:=WizardForm.Height;
  Autosize:=False;
  Transparent:=True;
  OnMouseMove:=@SiteLabelMouseMove2;
  Parent:=WizardForm;
end;

SiteLabel:=TLabel.Create(WizardForm);
with SiteLabel do begin
  Left:=ScaleX(10);
  Top:=ScaleY(330);
  Cursor:=crHand;
  Font.Color:=clBlue;
  Font.Style:=[fsUnderline];
  Caption:='Krinkels.org';
  OnClick:=@SiteLabelOnClick;
  OnMouseDown:=@SiteLabelMouseDown;
  OnMouseUp:=@SiteLabelMouseUp;
  OnMouseMove:=@SiteLabelMouseMove;
  Parent:=WizardForm;
 end;
end;
 

jeet

Новичок
haha lol! ok i am able to run splash now but stuck in one problem.I have a splash code and audio code but if i add both of them together then compiler throw me an error 'duplicate identifier initialwizard'.
Any help on this
Код:
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[ISSI]
;; Name of the bitmap image:
#define ISSI_SplashScreen "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"

;; Time in seconds:
#define ISSI_SplashScreen_T 10

;; Image Width:
#define ISSI_SplashScreen_X 700

;; Image Heigth:
#define ISSI_SplashScreen_Y 169

;; Rounded corners (Optional):
#define ISSI_Splash_Corner

;; Include ISSI (required)
#define ISSI_IncludePath "C: \ ISSI"
#include ISSI_IncludePath+"\_issi.isi"

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "reshacker_setup.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={{59051325-BBD0-42B6-84E6-B42885943A19}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=C:\Users\JS\Documents
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:\Users\JS\Downloads\Programs\reshacker_setup.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\IsUtilsHb.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\isgsg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Audio\bass.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Audio\AudioFile.mp3"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{group}\{#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

[Code]
where
  URLText: TNewStaticText;

procedure URLTextClick(Sender: TObject);
where
  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;

[code]
const 
  BASS_SAMPLE_LOOP = 4;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif
type
  HSTREAM = DWORD;

function BASS_Init(device: LongInt; freq, flags: DWORD;
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';

procedure InitializeWizard;
where
  StreamHandle: HSTREAM;
begin
  ExtractTemporaryFile('AudioFile.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
    StreamHandle := BASS_StreamCreateFile(False,
      ExpandConstant('{tmp}\AudioFile.mp3'), 0, 0, 0, 0,
      EncodingFlag or BASS_SAMPLE_LOOP);
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
    BASS_ChannelPlay(StreamHandle, False);
  end;
end;

procedure DeinitializeSetup;
begin
  BASS_Free;
end;
 
Последнее редактирование:

SBalykov

Старожил
haha lol! ok i am able to run splash now but stuck in one problem.I have a splash code and audio code but if i add both of them together then compiler throw me an error 'duplicate identifier initialwizard'.
Any help on this
Код:
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[ISSI]
;; Name of the bitmap image:
#define ISSI_SplashScreen "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"

;; Time in seconds:
#define ISSI_SplashScreen_T 10

;; Image Width:
#define ISSI_SplashScreen_X 700

;; Image Heigth:
#define ISSI_SplashScreen_Y 169

;; Rounded corners (Optional):
#define ISSI_Splash_Corner

;; Include ISSI (required)
#define ISSI_IncludePath "C: \ ISSI"
#include ISSI_IncludePath+"\_issi.isi"

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "reshacker_setup.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={{59051325-BBD0-42B6-84E6-B42885943A19}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=C:\Users\JS\Documents
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:\Users\JS\Downloads\Programs\reshacker_setup.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\IsUtilsHb.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\isgsg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Audio\bass.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Audio\AudioFile.mp3"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{group}\{#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

[Code]
where
  URLText: TNewStaticText;

procedure URLTextClick(Sender: TObject);
where
  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;

[code]
const
  BASS_SAMPLE_LOOP = 4;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif
type
  HSTREAM = DWORD;

function BASS_Init(device: LongInt; freq, flags: DWORD;
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';

procedure InitializeWizard;
where
  StreamHandle: HSTREAM;
begin
  ExtractTemporaryFile('AudioFile.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
    StreamHandle := BASS_StreamCreateFile(False,
      ExpandConstant('{tmp}\AudioFile.mp3'), 0, 0, 0, 0,
      EncodingFlag or BASS_SAMPLE_LOOP);
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
    BASS_ChannelPlay(StreamHandle, False);
  end;
end;

procedure DeinitializeSetup;
begin
  BASS_Free;
end;
Код:
    ; Script generated by the Inno Script Studio Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

    [ISSI]
    ;; Name of the bitmap image:
    #define ISSI_SplashScreen "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"

    ;; Time in seconds:
    #define ISSI_SplashScreen_T 10

    ;; Image Width:
    #define ISSI_SplashScreen_X 700

    ;; Image Heigth:
    #define ISSI_SplashScreen_Y 169

    ;; Rounded corners (Optional):
    #define ISSI_Splash_Corner

    ;; Include ISSI (required)
    #define ISSI_IncludePath "C: \ ISSI"
    #include ISSI_IncludePath+"\_issi.isi"

    #define MyAppName "My Program"
    #define MyAppVersion "1.5"
    #define MyAppPublisher "My Company, Inc."
    #define MyAppURL "http://www.example.com/"
    #define MyAppExeName "reshacker_setup.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={{59051325-BBD0-42B6-84E6-B42885943A19}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={pf}\{#MyAppName}
    DefaultGroupName={#MyAppName}
    OutputDir=C:\Users\JS\Documents
    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:\Users\JS\Downloads\Programs\reshacker_setup.exe"; DestDir: "{app}"; Flags: ignoreversion
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\IsUtilsHb.dll"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\isgsg.dll"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Audio\bass.dll"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Audio\AudioFile.mp3"; DestDir: "{app}"; Flags: ignoreversion

    [Icons]
    Name: "{group}\{#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

_[Code]
  const
    BASS_SAMPLE_LOOP = 4;
    BASS_UNICODE = $80000000;
    BASS_CONFIG_GVOL_STREAM = 5;

  #ifndef UNICODE
  EncodingFlag = 0;
  #else
  EncodingFlag = BASS_UNICODE;
  #endif

  type
    HSTREAM = DWORD;  

   var
     URLText: TNewStaticText;

function BASS_Init(device: LongInt; freq, flags: DWORD; win: HWND; clsid: Cardinal): BOOL; external 'BASS_Init@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM; external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL; external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_Free: BOOL; external 'BASS_Free@files:bass.dll stdcall';


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

procedure InitializeWizard();
var
  StreamHandle: HSTREAM;
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;

  ExtractTemporaryFile('AudioFile.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
    begin
    StreamHandle := BASS_StreamCreateFile(False,
    ExpandConstant('{tmp}\AudioFile.mp3'), 0, 0, 0, 0,
    EncodingFlag or BASS_SAMPLE_LOOP);
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
    BASS_ChannelPlay(StreamHandle, False);
   end;
end;

procedure DeinitializeSetup;
begin
  BASS_Free;
end;
I have not tested the script, and gave direction in what direction to move ..
Я не проверял скрипт, а дал направление в какую сторону двигаться ...
 
  • Like
Реакции: jeet

vint56

Ветеран
Проверенный
jeet,
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[ISSI]
;; Name of the bitmap image:
#define ISSI_SplashScreen "C:\Users\JS\Downloads\GAME REPACKING-20180225T074743Z-001\GAME REPACKING\Splash\SPLASH.bmp"

;; Time in seconds:
#define ISSI_SplashScreen_T 10

;; Image Width:
#define ISSI_SplashScreen_X 700

;; Image Heigth:
#define ISSI_SplashScreen_Y 169

;; Rounded corners (Optional):
#define ISSI_Splash_Corner

;; Include ISSI (required)
#define ISSI_IncludePath "C: \ ISSI"
#include ISSI_IncludePath+"\_issi.isi"

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "reshacker_setup.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={{59051325-BBD0-42B6-84E6-B42885943A19}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=.
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:\Users\JS\Downloads\Programs\reshacker_setup.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
;Source: "Splash\IsUtilsHb.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "Splash\SPLASH.bmp"; DestDir: "{app}"; Flags: ignoreversion
;Source: "Splash\isgsg.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "Audio\bass.dll"; DestDir: "{tmp}"; Flags: ignoreversion
;Source: "Audio\AudioFile.mp3"; DestDir: "{tmp}"; Flags: ignoreversion

Source: Audio\*; DestDir: {tmp}; Flags: dontcopy

[Icons]
Name: "{group}\{#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;

const
  BASS_SAMPLE_LOOP = 4;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif
type
  HSTREAM = DWORD;

function BASS_Init(device: LongInt; freq, flags: DWORD;
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';

procedure InitializeWizard;
var
  StreamHandle: HSTREAM;
begin
  ExtractTemporaryFile('AudioFile.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
    StreamHandle := BASS_StreamCreateFile(False,
      ExpandConstant('{tmp}\AudioFile.mp3'), 0, 0, 0, 0,
      EncodingFlag or BASS_SAMPLE_LOOP);
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
    BASS_ChannelPlay(StreamHandle, False);
  end;
  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;

procedure DeinitializeSetup;
begin
  BASS_Free;
end;

[/SPOILER]
 

jeet

Новичок
[QUOTE = "Mickey1s, post: 33019, member: 1466"] jeet , use inno setup ultra! [/ QUOTE]

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?
 

Вложения

  • 29.6 KB Просмотры: 45

jeet

Новичок
thanks now all fine.Only one thing left is how to create these two files from an installer:
1. unpacking portable.cmd
2. silent install.cmd
 

Вложения

  • 11.3 KB Просмотры: 14
Сверху