Автор: chelobey
Дата сообщения: 12.04.2008 00:38
всем доброго времени суток.
вот какая проблема от собственного незнания
есть скрипт (ниже секция procedure CurPageChanged), где при процессе инсталляции страница с индикатором выполнения установки с измененными размерами перемещается в левую правую часть экрана.
следует сказать, что на кнопки накладывается текстура.
дак вот, при восстановлении окна инсталлятора в исходное положение и возвращении размера появляется, помимо "завершить", кнопка "отмена", да еще и не активная
как это дело исправить, не отказываясь от cancel button, и сохранив наложение тектур
это самое насущное)
а вот второстепенное - знаю, как сделать проверку реестра на наличие установленного приложения, и при положительном результате запросить "удалить" и т.д., но...
так как инсталлер включает два языка, как организовать адекватное (ru/eng) отображение сообщений
заранее спасибо и простите за флуд
[more=Читать дальше...]
[size=2]
[_ISTool]
EnableISX=True
[Setup]
OutputBaseFilename=Setup
AppName=Game
AppId=Game
AppVerName=1.0
DefaultDirName=C:\Games\{cm:MyAppName}
DefaultGroupName=Games\{cm:MyAppName}
AllowNoIcons=true
Compression=lzma/ultra
SolidCompression=true
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
BackColor=0
SetupIconFile=E:\Games\Files\game.ico
OutputDir=E:\Output
ShowLanguageDialog=no
LanguageDetectionMethod=uilanguage
DiskSpanning=true
DiskSliceSize=728760320
SlicesPerDisk=1
MergeDuplicateFiles=false
[Languages]
Name: ru; MessagesFile: E:\Games\Files\Russian.isl
Name: en; MessagesFile: E:\Games\Files\Default.isl
[LangOptions]
DialogFontName=Tahoma
DialogFontSize=10
[Messages]
BeveledLabel=Copyright © 2007 Epic Games
[CustomMessages]
en.MyDescription=Setup
en.MyAppName=Game
en.MyAppVerName=Game
ru.MyDescription=Установка
ru.MyAppName=Game
ru.MyAppVerName=Game
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Registry]
Root: HKLM; SubKey: SOFTWARE\Games\Game; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Games\Game; ValueType: string; ValueName: SetupPath; ValueData: {app}
Root: HKLM; SubKey: SOFTWARE\Games\Game; ValueType: expandsz; ValueName: EXEPath; ValueData: {app}\\Binaries\game.exe
Root: HKLM; SubKey: SOFTWARE\Games\Game; ValueType: string; ValueName: PID; ValueData: 92335-887-2515267-70170
Root: HKLM; SubKey: SOFTWARE\Games\Game; ValueType: binary; ValueName: DigitalProductID; ValueData: 6c 93 48 93 31 c3 4a c3 7f 3b c1 a2 6f 88 03 00
Root: HKLM; SubKey: SOFTWARE\Games\Game; ValueType: string; ValueName: PID 2.0 Ex; ValueData: 92335-00140-887-251526-00-1049-3790.0000-3112007
Root: HKLM; SubKey: SOFTWARE\Games\Game; ValueType: string; ValueName: InstallDir; ValueData: {app}
[Files]
Source: E:\Games\Files\isxbb.dll; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\splash.bmp; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\bass.dll; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\innocallback.dll; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\files\callnsis.dll; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\files\AdvSplash.dll; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\files\Button.bmp; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\files\WizardImage.bmp; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\BackImage.jpg; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\1.jpg; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\2.jpg; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\3.jpg; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\4.jpg; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\5.jpg; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Files\music.mp3; DestDir: {tmp}; Flags: dontcopy nocompression
Source: E:\Games\Game\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs confirmoverwrite
[Icons]
Name: {group}\Game; IconFilename: {app}\game.ico; Filename: {app}\Binaries\game.exe; WorkingDir: {app}
Name: {group}\Редактор Game; IconFilename: {app}\ged.ico; Filename: {app}\Binaries\game.exe; Parameters: editor -cookededitor -installed; WorkingDir: {app}; Languages: ru
Name: {group}\Документация\Руководство пользователя (eng); Filename: {app}\English.pdf; WorkingDir: {app}; Languages: ru
Name: {group}\Документация\Readme (eng); Filename: {app}\English_Readme.rtf; WorkingDir: {app}; Languages: ru
Name: {group}\Сайт Game; Filename: {app}\website.url; WorkingDir: {app}; Languages: ru
Name: {group}\Удалить Game; Filename: {uninstallexe}; IconFilename: {app}\game.ico; WorkingDir: {app}; Languages: ru
Name: {group}\Unreal Editor Game; IconFilename: {app}\ged.ico; Filename: {app}\Binaries\game.exe; Parameters: editor -cookededitor -installed; WorkingDir: {app}; Languages: en
Name: {group}\Documentation\User Manual; Filename: {app}\English.pdf; WorkingDir: {app}; Languages: en
Name: {group}\Documentation\Readme; Filename: {app}\English_Readme.rtf; WorkingDir: {app}; Languages: en
Name: {group}\Uninstall Game; Filename: {uninstallexe}; IconFilename: {app}\game.ico; WorkingDir: {app}; Languages: en
Name: {group}\Game Homepage; Filename: {app}\website.url; WorkingDir: {app}; Languages: en
Name: {commondesktop}\Game; IconFilename: {app}\game.ico; Filename: {app}\Binaries\game.exe; WorkingDir: {app}; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\Game; IconFilename: {app}\game.ico; Filename: {app}\Binaries\game.exe; WorkingDir: {app}; Tasks: quicklaunchicon
[UninstallDelete]
Name: {app}; Type: filesandordirs
[Code]
procedure callplug(parentwnd: Integer; pluginname,funcname,param1,param2,param3,param4,param5,param6,param7,param8,param9,param10: PChar)
external 'callplug@files:callnsis.dll stdcall'
type
HSTREAM=DWORD
TTimerProc=procedure(uTimerID,uMessage:UINT;dwUser,dw1,dw2:DWORD)
const
BackGround=6
Timer=16
Indent=25
var
MP3List:TStringList
CurrentMP3:integer
hMP3:HWND
TimerID:LongWord
function isxbb_AddImage(Image: PChar; Flags: Cardinal): integer; external 'isxbb_AddImage@files:isxbb.dll stdcall delayload'
function isxbb_Init(hWnd: Integer): integer; external 'isxbb_Init@files:isxbb.dll stdcall delayload'
function isxbb_StartTimer(Seconds: Integer; Flags: Cardinal): integer; external 'isxbb_StartTimer@files:isxbb.dll stdcall'
function isxbb_KillTimer(Flags: Cardinal): integer; external 'isxbb_KillTimer@files:isxbb.dll stdcall'
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal); external 'ShowSplashScreen@files:isxbb.dll stdcall delayload'
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload'
function SetTimer(hWnd:HWND;nIDEvent,uElapse:UINT;lpTimerFunc:LongWord{TFNTimerProc}):UINT; external 'SetTimer@user32.dll stdcall delayload'
function KillTimer(hWnd:HWND;uIDEvent:UINT):BOOL; external 'KillTimer@user32.dll stdcall delayload'
function BASS_ChannelIsActive(Handle:HWND):DWORD; external 'BASS_ChannelIsActive@files:bass.dll stdcall'
function BASS_SetConfig(Option,Value:DWORD):DWORD; external 'BASS_SetConfig@files:bass.dll stdcall'
function BASS_Init(Device:integer;Freq,Flags:DWORD;Win:HWND;CLSID:integer):boolean; external 'BASS_Init@files:bass.dll stdcall delayload'
function BASS_StreamCreateFile(Mem:BOOL;f:PChar;Offset:DWORD;Length:DWORD;Flags:DWORD):HSTREAM; external 'BASS_StreamCreateFile@files:bass.dll stdcall'
function BASS_StreamFree(Handle:HWND):boolean; external 'BASS_StreamFree@files:bass.dll stdcall'
function BASS_ChannelPlay(Handle:HWND;Restart:boolean):boolean; external 'BASS_ChannelPlay@files:bass.dll stdcall'
function BASS_Start: Boolean; external 'BASS_Start@files:bass.dll stdcall'
function BASS_Stop: Boolean; external 'BASS_Stop@files:bass.dll stdcall'
function BASS_Free: Boolean; external 'BASS_Free@files:bass.dll stdcall delayload'
function WrapTimerProc(CallBack:TTimerProc;ParamCount:integer):LongWord; external 'wrapcallback@files:innocallback.dll stdcall'
const
ButtonWidth = 80
ButtonHeight = 23
bidBack = 0
bidNext = 1
bidCancel = 2
bidDirBrowse = 3
bidGroupBrowse = 4
Var
ButtonPanel: array [0..4] of TPanel
ButtonImage: array [0..4] of TBitmapImage
ButtonLabel: array [0..4] of TLabel
WizardImage: TBitmapImage
YesRadio,NoRadio: TRadioButton
WelcomeLabel1,WelcomeLabel2,LicenseLabel1,LicenseAcceptedLabel,LicenseNotAcceptedLabel,PasswordLabel,PasswordEditLabel,
InfoBeforeClickLabel,UserInfoNameLabel,UserInfoOrgLabel,UserInfoSerialLabel,SelectDirLabel,SelectDirBrowseLabel,DiskSpaceLabel,
SelectComponentsLabel,ComponentsDiskSpaceLabel,SelectStartMenuFolderLabel,SelectStartMenuFolderBrowseLabel,NoIconsLabel,
SelectTasksLabel,ReadyLabel,StatusLabel,InfoAfterClickLabel,FinishedHeadingLabel,FinishedLabel,YesRadioLabel,NoRadioLabel,
BeveledLabel: TLabel
procedure ButtonLabelClick(Sender: TObject)
var
Button: TButton
begin
ButtonImage[TLabel(Sender).Tag].Left:=0
case TLabel(Sender).Tag of
bidBack: Button:=WizardForm.BackButton
bidNext: Button:=WizardForm.NextButton
bidCancel: Button:=WizardForm.CancelButton
bidDirBrowse: Button:=WizardForm.DirBrowseButton
bidGroupBrowse: Button:=WizardForm.GroupBrowseButton
else
Exit
end
Button.OnClick(Button)
end
procedure ButtonLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer)
begin
if ButtonLabel[TLabel(Sender).Tag].Enabled then
ButtonImage[TLabel(Sender).Tag].Left:=-ButtonWidth
end
procedure ButtonLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer)
begin
ButtonImage[TLabel(Sender).Tag].Left:=0
end
procedure LoadButtonImage(AButton: TButton; AButtonIndex: integer)
var
Image: TBitmapImage
Panel: TPanel
Labl: TLabel
begin
Panel:=TPanel.Create(WizardForm)
Panel.Left:=AButton.Left
Panel.Top:=AButton.Top
Panel.Width:=AButton.Width
Panel.Height:=AButton.Height
Panel.Tag:=AButtonIndex
Panel.Parent:=AButton.Parent
ButtonPanel[AButtonIndex]:=Panel
Image:=TBitmapImage.Create(WizardForm)
Image.Width:=160
Image.Height:=23
Image.Enabled:=False
Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\button.bmp'))
Image.Parent:=Panel
ButtonImage[AButtonIndex]:=Image
with TLabel.Create(WizardForm) do begin
Tag:=AButtonIndex
Parent:=Panel
Width:=Panel.Width
Height:=Panel.Height
Transparent:=True
OnClick:=@ButtonLabelClick
OnDblClick:=@ButtonLabelClick
OnMouseDown:=@ButtonLabelMouseDown
OnMouseUp:=@ButtonLabelMouseUp
end
Labl:=TLabel.Create(WizardForm)
Labl.Left:=7
Labl.Top:=2
Labl.Autosize:=True
Labl.Alignment:=taCenter
Labl.Tag:=AButtonIndex
Labl.Transparent:=True
Labl.Font.Color:=$111111
Labl.Font.Name:='Tahoma'
Labl.Font.Size:=10
Labl.Caption:=AButton.Caption
Labl.OnClick:=@ButtonLabelClick
Labl.OnDblClick:=@ButtonLabelClick
Labl.OnMouseDown:=@ButtonLabelMouseDown
Labl.OnMouseUp:=@ButtonLabelMouseUp
Labl.Parent:=Panel
ButtonLabel[AButtonIndex]:=Labl
end
procedure UpdateButton(AButton: TButton;AButtonIndex: integer)
begin
ButtonLabel[AButtonIndex].Caption:=AButton.Caption
ButtonPanel[AButtonIndex].Visible:=AButton.Visible
ButtonLabel[AButtonIndex].Enabled:=Abutton.Enabled
end
procedure LicenceAcceptedRadioOnClick(Sender: TObject)
begin
ButtonLabel[bidNext].Enabled:=True
end
procedure LicenceNotAcceptedRadioOnClick(Sender: TObject)
begin
ButtonLabel[bidNext].Enabled:=False
end
Procedure NoIconsLabelOnClick (Sender: TObject)
begin
WizardForm.NoIconsCheck.Checked:=Not(WizardForm.NoIconsCheck.Checked)
end
Procedure YesRadioOnClick (Sender: TObject)
begin
WizardForm.YesRadio.Checked:=True
end
Procedure NoRadioOnClick (Sender: TObject)
begin
WizardForm.NoRadio.Checked:=True
end
Procedure HideAll()
begin
WizardForm.Bevel.Hide
WizardForm.Bevel1.Hide
WizardForm.MainPanel.Hide
WizardForm.BeveledLabel.Hide
WizardForm.OuterNotebook.Hide
WizardForm.InnerNotebook.Hide
WelcomeLabel1.Hide
WelcomeLabel2.Hide
LicenseLabel1.Hide
WizardForm.LicenseMemo.Hide
WizardForm.LicenseAcceptedRadio.Hide
LicenseAcceptedLabel.Hide
WizardForm.LicenseNotAcceptedRadio.Hide
LicenseNotAcceptedLabel.Hide
PasswordLabel.Hide
PasswordEditLabel.Hide
WizardForm.PasswordEdit.Hide
InfoBeforeClickLabel.Hide
WizardForm.InfoBeforeMemo.Hide
UserInfoNameLabel.Hide
WizardForm.UserInfoNameEdit.Hide
UserInfoOrgLabel.Hide
WizardForm.UserInfoOrgEdit.Hide
UserInfoSerialLabel.Hide
WizardForm.UserInfoSerialEdit.Hide
SelectDirLabel.Hide
SelectDirBrowseLabel.Hide
WizardForm.DirEdit.Hide
WizardForm.DirBrowseButton.Hide
DiskSpaceLabel.Hide
WizardForm.TypesCombo.Hide
WizardForm.ComponentsList.Hide
ComponentsDiskSpaceLabel.Hide
SelectStartMenuFolderLabel.Hide
SelectStartMenuFolderBrowseLabel.Hide
WizardForm.GroupEdit.Hide
WizardForm.GroupBrowseButton.Hide
WizardForm.NoIconsCheck.Hide
NoIconsLabel.Hide
SelectTasksLabel.Hide
WizardForm.TasksList.Hide
ReadyLabel.Hide
WizardForm.ReadyMemo.Hide
StatusLabel.Hide
WizardForm.ProgressGauge.Hide
InfoAfterClickLabel.Hide
WizardForm.InfoAfterMemo.Hide
FinishedHeadingLabel.Hide
FinishedLabel.Hide
SelectComponentsLabel.Hide
WizardForm.RunList.Hide
YesRadio.Hide
YesRadioLabel.Hide
NoRadio.Hide
NoRadioLabel.Hide
end
Procedure InitializeSkin()
begin
ExtractTemporaryFile('WizardImage.bmp')
WizardImage:=TBitmapImage.Create(WizardForm)
WizardImage.AutoSize:=True
WizardImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardImage.bmp'))
WizardImage.Parent:=WizardForm
WizardForm.ClientWidth:=690
WizardForm.ClientHeight:=496
WizardForm.Font.Color:=$111111
WizardForm.Center
WizardForm.BackButton.Left:=293
WizardForm.BackButton.Top:=462
WizardForm.BackButton.Width:=80
WizardForm.BackButton.Height:=23
WizardForm.NextButton.Left:=375
WizardForm.NextButton.Top:=462
WizardForm.NextButton.Width:=80
WizardForm.NextButton.Height:=23
WizardForm.CancelButton.Left:=600
WizardForm.CancelButton.Top:=462
WizardForm.CancelButton.Width:=80
WizardForm.CancelButton.Height:=23
BeveledLabel:=TLabel.Create(WizardForm)
BeveledLabel.Left:=10
BeveledLabel.Top:=465
BeveledLabel.Font.Color:=$111111
BeveledLabel.Font.Name:='Tahoma'
BeveledLabel.Font.Size:=9
BeveledLabel.Transparent:=True
BeveledLabel.Caption:=WizardForm.BeveledLabel.Caption
BeveledLabel.Parent:=WizardForm
WizardForm.BeveledLabel.Left:=700
// wpWelcome
WelcomeLabel1:=TLabel.Create(WizardForm)
WelcomeLabel1.Left:=205
WelcomeLabel1.Top:=75
WelcomeLabel1.Width:=465
WelcomeLabel1.Height:=40
WelcomeLabel1.AutoSize:=False
WelcomeLabel1.WordWrap:=True
WelcomeLabel1.Transparent:=True
WelcomeLabel1.Font.Name:='Tahoma'
WelcomeLabel1.Font.Size:=12
WelcomeLabel1.Font.Color:=clBlack
WelcomeLabel1.Font.Style:=[fsBold]
WelcomeLabel1.Caption:=WizardForm.WelcomeLabel1.Caption
WelcomeLabel1.Parent:=WizardForm
WelcomeLabel2:=TLabel.Create(WizardForm)
WelcomeLabel2.Left:=205
WelcomeLabel2.Top:=130
WelcomeLabel2.Width:=465
WelcomeLabel2.Height:=200
WelcomeLabel2.AutoSize:=False
WelcomeLabel2.WordWrap:=True
WelcomeLabel2.Transparent:=True
WelcomeLabel2.Caption:=WizardForm.WelcomeLabel2.Caption
WelcomeLabel2.Parent:=WizardForm
// wpLicense
LicenseLabel1:=TLabel.Create(WizardForm)
LicenseLabel1.Left:=205
LicenseLabel1.Top:=90
LicenseLabel1.Width:=465
LicenseLabel1.Height:=28
LicenseLabel1.AutoSize:=False
LicenseLabel1.WordWrap:=True
LicenseLabel1.Transparent:=True
LicenseLabel1.Caption:=WizardForm.LicenseLabel1.Caption
LicenseLabel1.Parent:=WizardForm
WizardForm.LicenseMemo.Left:=205
WizardForm.LicenseMemo.Top:=128
WizardForm.LicenseMemo.Width:=465
WizardForm.LicenseMemo.Height:=266
WizardForm.LicenseMemo.Parent:=WizardForm
WizardForm.LicenseAcceptedRadio.Left:=205
WizardForm.LicenseAcceptedRadio.Top:=405
WizardForm.LicenseAcceptedRadio.Width:=14
WizardForm.LicenseAcceptedRadio.Height:=14
WizardForm.LicenseAcceptedRadio.Color:=clBlack
WizardForm.LicenseAcceptedRadio.Parent:=WizardForm
LicenseAcceptedLabel:=TLabel.Create(WizardForm)
LicenseAcceptedLabel.Left:=221
LicenseAcceptedLabel.Top:=405
LicenseAcceptedLabel.Transparent:=True
LicenseAcceptedLabel.Caption:=WizardForm.LicenseAcceptedRadio.Caption
LicenseAcceptedLabel.Parent:=WizardForm
WizardForm.LicenseNotAcceptedRadio.Left:=205
WizardForm.LicenseNotAcceptedRadio.Top:=425
WizardForm.LicenseNotAcceptedRadio.Width:=14
WizardForm.LicenseNotAcceptedRadio.Height:=14
WizardForm.LicenseNotAcceptedRadio.Color:=clBlack
WizardForm.LicenseNotAcceptedRadio.Parent:=WizardForm
LicenseNotAcceptedLabel:=TLabel.Create(WizardForm)
LicenseNotAcceptedLabel.Left:=221
LicenseNotAcceptedLabel.Top:=425
LicenseNotAcceptedLabel.Transparent:=True
LicenseNotAcceptedLabel.Caption:=WizardForm.LicenseNotAcceptedRadio.Caption
LicenseNotAcceptedLabel.Parent:=WizardForm
// wpPassword
PasswordLabel:=TLabel.Create(WizardForm)
PasswordLabel.Left:=205
PasswordLabel.Top:=90
PasswordLabel.Width:=465
PasswordLabel.Height:=28
PasswordLabel.AutoSize:=False
PasswordLabel.WordWrap:=True
PasswordLabel.Transparent:=True
PasswordLabel.Caption:=WizardForm.PasswordLabel.Caption
PasswordLabel.Parent:=WizardForm
PasswordEditLabel:=TLabel.Create(WizardForm)
PasswordEditLabel.Left:=205
PasswordEditLabel.Top:=124
PasswordEditLabel.Transparent:=True
PasswordEditLabel.Caption:=WizardForm.PasswordEditLabel.Caption
PasswordEditLabel.Parent:=WizardForm
WizardForm.PasswordEdit.Left:=205
WizardForm.PasswordEdit.Top:=140
WizardForm.PasswordEdit.Width:=465
WizardForm.PasswordEdit.Height:=21
WizardForm.PasswordEdit.Color:=$111111
WizardForm.PasswordEdit.Font.Color:=$111111
WizardForm.PasswordEdit.Parent:= WizardForm
// wpInfoBefore
InfoBeforeClickLabel:=TLabel.Create(WizardForm)
InfoBeforeClickLabel.Left:=205
InfoBeforeClickLabel.Top:=90
InfoBeforeClickLabel.Transparent:=True
InfoBeforeClickLabel.Caption:=WizardForm.InfoBeforeClickLabel.Caption
InfoBeforeClickLabel.Parent:=WizardForm
WizardForm.InfoBeforeMemo.Left:=205
WizardForm.InfoBeforeMemo.Top:=114
WizardForm.InfoBeforeMemo.Width:=465
WizardForm.InfoBeforeMemo.Height:=300
WizardForm.InfoBeforeMemo.Parent:= WizardForm
// wpUserInfo
UserInfoNameLabel:=TLabel.Create(WizardForm)
UserInfoNameLabel.Left:=205
UserInfoNameLabel.Top:=90
UserInfoNameLabel.Transparent:=True
UserInfoNameLabel.Caption:=WizardForm.UserInfoNameLabel.Caption
UserInfoNameLabel.Parent:=WizardForm
WizardForm.UserInfoNameEdit.Left:=205
WizardForm.UserInfoNameEdit.Top:=106
WizardForm.UserInfoNameEdit.Width:=465
WizardForm.UserInfoNameEdit.Height:=21
WizardForm.UserInfoNameEdit.Parent:= WizardForm
UserInfoOrgLabel:=TLabel.Create(WizardForm)
UserInfoOrgLabel.Left:=205
UserInfoOrgLabel.Top:=142
UserInfoOrgLabel.Transparent:=True
UserInfoOrgLabel.Caption:=WizardForm.UserInfoOrgLabel.Caption
UserInfoOrgLabel.Parent:=WizardForm
WizardForm.UserInfoOrgEdit.Left:=205
WizardForm.UserInfoOrgEdit.Top:=158
WizardForm.UserInfoOrgEdit.Width:=465
WizardForm.UserInfoOrgEdit.Height:=21
WizardForm.UserInfoOrgEdit.Color:=$000000
WizardForm.UserInfoOrgEdit.Font.Color:=$111111
WizardForm.UserInfoOrgEdit.Parent:= WizardForm
UserInfoSerialLabel:=TLabel.Create(WizardForm)
UserInfoSerialLabel.Left:=205
UserInfoSerialLabel.Top:=194
UserInfoSerialLabel.Transparent:=True
UserInfoSerialLabel.Caption:=WizardForm.UserInfoSerialLabel.Caption
UserInfoSerialLabel.Parent:=WizardForm
WizardForm.UserInfoSerialEdit.Left:=205
WizardForm.UserInfoSerialEdit.Top:=210
WizardForm.UserInfoSerialEdit.Width:=465
WizardForm.UserInfoSerialEdit.Height:=21
WizardForm.UserInfoSerialEdit.Color:=$111111
WizardForm.UserInfoSerialEdit.Font.Color:=$111111
WizardForm.UserInfoSerialEdit.Parent:= WizardForm
// wpSelectDir
SelectDirLabel:=TLabel.Create(WizardForm)
SelectDirLabel.Left:=205
SelectDirLabel.Top:=85
SelectDirLabel.Width:=465
SelectDirLabel.Height:=28
SelectDirLabel.AutoSize:=False
SelectDirLabel.WordWrap:=True
SelectDirLabel.Transparent:=True
SelectDirLabel.Caption:=WizardForm.SelectDirLabel.Caption
SelectDirLabel.Parent:=WizardForm
SelectDirBrowseLabel:=TLabel.Create(WizardForm)
SelectDirBrowseLabel.Left:=205
SelectDirBrowseLabel.Top:=115
SelectDirBrowseLabel.Width:=465
SelectDirBrowseLabel.Height:=40
SelectDirBrowseLabel.AutoSize:=False
SelectDirBrowseLabel.WordWrap:=True
SelectDirBrowseLabel.Transparent:=True
SelectDirBrowseLabel.Caption:=WizardForm.SelectDirBrowseLabel.Caption
SelectDirBrowseLabel.Parent:=WizardForm
WizardForm.DirEdit.Left:=205
WizardForm.DirEdit.Top:=379
WizardForm.DirEdit.Width:=370
WizardForm.DirEdit.Height:=21
WizardForm.DirEdit.Color:=$D6D3CF
WizardForm.DirEdit.Font.Color:=$111111
WizardForm.DirEdit.Parent:= WizardForm
WizardForm.DirBrowseButton.Width:=80
WizardForm.DirBrowseButton.Height:=23
WizardForm.DirBrowseButton.Parent:= WizardForm
DiskSpaceLabel:=TLabel.Create(WizardForm)
DiskSpaceLabel.Left:=205
DiskSpaceLabel.Top:=415
DiskSpaceLabel.Transparent:=True
DiskSpaceLabel.Caption:=WizardForm.DiskSpaceLabel.Caption
DiskSpaceLabel.Parent:=WizardForm
// wpSelectComponents
SelectComponentsLabel:=TLabel.Create(WizardForm)
SelectComponentsLabel.Left:=205
SelectComponentsLabel.Top:=90
SelectComponentsLabel.Width:=465
SelectComponentsLabel.Height:=50
SelectComponentsLabel.AutoSize:=False
SelectComponentsLabel.WordWrap:=True
SelectComponentsLabel.Transparent:=True
SelectComponentsLabel.Caption:=WizardForm.SelectComponentsLabel.Caption
SelectComponentsLabel.Parent:=WizardForm
WizardForm.TypesCombo.Left:=205
WizardForm.TypesCombo.Top:=145
WizardForm.TypesCombo.Width:=465
WizardForm.TypesCombo.Height:=21
WizardForm.TypesCombo.Color:=$D6D3CF
WizardForm.TypesCombo.Font.Color:=$111111
WizardForm.TypesCombo.Parent:= WizardForm
ComponentsDiskSpaceLabel:=TLabel.Create(WizardForm)
ComponentsDiskSpaceLabel.Left:=205
ComponentsDiskSpaceLabel.Top:=415
ComponentsDiskSpaceLabel.Transparent:=True
ComponentsDiskSpaceLabel.Caption:=WizardForm.ComponentsDiskSpaceLabel.Caption
ComponentsDiskSpaceLabel.Parent:=WizardForm
// wpSelectProgramGroup
SelectStartMenuFolderLabel:=TLabel.Create(WizardForm)
SelectStartMenuFolderLabel.Left:=205
SelectStartMenuFolderLabel.Top:=85
SelectStartMenuFolderLabel.Width:=465
SelectStartMenuFolderLabel.Height:=40
SelectStartMenuFolderLabel.AutoSize:=False
SelectStartMenuFolderLabel.WordWrap:=True
SelectStartMenuFolderLabel.Transparent:=True
SelectStartMenuFolderLabel.Caption:=WizardForm.SelectStartMenuFolderLabel.Caption
SelectStartMenuFolderLabel.Parent:=WizardForm
SelectStartMenuFolderBrowseLabel:=TLabel.Create(WizardForm)
SelectStartMenuFolderBrowseLabel.Left:=205
SelectStartMenuFolderBrowseLabel.Top:=115
SelectStartMenuFolderBrowseLabel.Width:=465
SelectStartMenuFolderBrowseLabel.Height:=40
SelectStartMenuFolderBrowseLabel.AutoSize:=False
SelectStartMenuFolderBrowseLabel.WordWrap:=True
SelectStartMenuFolderBrowseLabel.Transparent:=True
SelectStartMenuFolderBrowseLabel.Caption:=WizardForm.SelectStartMenuFolderBrowseLabel.Caption
SelectStartMenuFolderBrowseLabel.Parent:=WizardForm
WizardForm.GroupEdit.Left:=205
WizardForm.GroupEdit.Top:=379
WizardForm.GroupEdit.Width:=370
WizardForm.GroupEdit.Height:=21
WizardForm.GroupEdit.Color:=$D6D3CF
WizardForm.GroupEdit.Font.Color:=$111111
WizardForm.GroupEdit.Parent:= WizardForm
WizardForm.GroupBrowseButton.Left:=378
WizardForm.GroupBrowseButton.Top:=288
WizardForm.GroupBrowseButton.Width:=80
WizardForm.GroupBrowseButton.Height:=23
WizardForm.GroupBrowseButton.Parent:= WizardForm
WizardForm.NoIconsCheck.Left:=205
WizardForm.NoIconsCheck.Top:=415
WizardForm.NoIconsCheck.Width:=13
WizardForm.NoIconsCheck.Height:=13
WizardForm.NoIconsCheck.Visible:=True
WizardForm.NoIconsCheck.Parent:= WizardForm
NoIconsLabel:=TLabel.Create(WizardForm)
NoIconsLabel.Left:=221
NoIconsLabel.Top:=415
NoIconsLabel.Transparent:=True
NoIconsLabel.OnClick:= @NoIconsLabelOnClick
NoIconsLabel.Caption:=WizardForm.NoIconsCheck.Caption
NoIconsLabel.Parent:=WizardForm
// wpSelectTasks
SelectTasksLabel:=TLabel.Create(WizardForm)
SelectTasksLabel.Left:=205
SelectTasksLabel.Top:=85
SelectTasksLabel.Width:=465
SelectTasksLabel.Height:=40
SelectTasksLabel.AutoSize:=False
SelectTasksLabel.WordWrap:=True
SelectTasksLabel.Transparent:=True
SelectTasksLabel.Caption:=WizardForm.SelectTasksLabel.Caption
SelectTasksLabel.Parent:=WizardForm
WizardForm.TasksList.Left:=205
WizardForm.TasksList.Top:=124
WizardForm.TasksList.Width:=465
WizardForm.TasksList.Height:=300
WizardForm.TasksList.Color:=$D6D3CF
WizardForm.TasksList.Font.Color:=$111111
WizardForm.TasksList.Parent:= WizardForm
// wpReady
ReadyLabel:=TLabel.Create(WizardForm)
ReadyLabel.Left:=205
ReadyLabel.Top:=85
ReadyLabel.Width:=465
ReadyLabel.Height:=40
ReadyLabel.AutoSize:=False
ReadyLabel.WordWrap:=True
ReadyLabel.Transparent:=True
ReadyLabel.Parent:=WizardForm
WizardForm.ReadyMemo.Left:=205
WizardForm.ReadyMemo.Top:=124
WizardForm.ReadyMemo.Width:=465
WizardForm.ReadyMemo.Height:=300
WizardForm.ReadyMemo.Color:=$D6D3CF
WizardForm.ReadyMemo.Font.Color:=$11111
WizardForm.ReadyMemo.Parent:= WizardForm
// wpInstalling
StatusLabel:=TLabel.Create(WizardForm)
WizardForm.ProgressGauge.Parent:= WizardForm
// wpInfoAfter
InfoAfterClickLabel:=TLabel.Create(WizardForm)
InfoAfterClickLabel.Left:=205
InfoAfterClickLabel.Top:=90
InfoAfterClickLabel.Transparent:=True
InfoAfterClickLabel.Caption:=WizardForm.InfoAfterClickLabel.Caption
InfoAfterClickLabel.Parent:=WizardForm
WizardForm.InfoAfterMemo.Left:=205
WizardForm.InfoAfterMemo.Top:=124
WizardForm.InfoAfterMemo.Width:=465
WizardForm.InfoAfterMemo.Height:=300
WizardForm.InfoAfterMemo.Parent:= WizardForm
// wpFinished
FinishedHeadingLabel:=TLabel.Create(WizardForm)
FinishedHeadingLabel.Left:=205
FinishedHeadingLabel.Top:=75
FinishedHeadingLabel.Width:=465
FinishedHeadingLabel.Height:=40
FinishedHeadingLabel.AutoSize:=False
FinishedHeadingLabel.WordWrap:=True
FinishedHeadingLabel.Transparent:=True
FinishedHeadingLabel.Font.Name:='Tahoma'
FinishedHeadingLabel.Font.Size:=12
FinishedHeadingLabel.Font.Color:=$111111
FinishedHeadingLabel.Font.Style:=[fsBold]
FinishedHeadingLabel.Caption:=WizardForm.FinishedHeadingLabel.Caption
FinishedHeadingLabel.Parent:=WizardForm
FinishedLabel:=TLabel.Create(WizardForm)
FinishedLabel.Left:=205
FinishedLabel.Top:=130
FinishedLabel.Width:=465
FinishedLabel.Height:=70
FinishedLabel.AutoSize:=False
FinishedLabel.WordWrap:=True
FinishedLabel.Transparent:=True
FinishedLabel.Caption:=WizardForm.FinishedLabel.Caption
FinishedLabel.Parent:=WizardForm
WizardForm.RunList.Left:=0
WizardForm.RunList.Top:=200
WizardForm.RunList.Width:=465
WizardForm.RunList.Height:=120
WizardForm.RunList.Color:=$000000
WizardForm.RunList.Font.Color:=$111111
YesRadio:=TRadioButton.Create(WizardForm)
YesRadio.Left:=205
YesRadio.Top:=290
YesRadio.Width:=13
YesRadio.Height:=13
YesRadio.Color:=$b58434
YesRadio.OnClick:=@YesRadioOnClick
YesRadio.Parent:=WizardForm
YesRadioLabel:=TLabel.Create(WizardForm)
YesRadioLabel.Left:=221
YesRadioLabel.Top:=290
YesRadioLabel.Transparent:=True
YesRadioLabel.Caption:=WizardForm.YesRadio.Caption
YesRadioLabel.Parent:=WizardForm
NoRadio:=TRadioButton.Create(WizardForm)
NoRadio.Left:=205
NoRadio.Top:=310
NoRadio.Width:=13
NoRadio.Height:=13
NoRadio.Color:=$111111
NoRadio.OnClick:=@NoRadioOnClick
NoRadio.Parent:=WizardForm
NoRadioLabel:=TLabel.Create(WizardForm)
NoRadioLabel.Left:=221
NoRadioLabel.Top:=310
NoRadioLabel.Transparent:=True
NoRadioLabel.Caption:=WizardForm.NoRadio.Caption
NoRadioLabel.Parent:=WizardForm
end
Procedure ShowPageComponents(CurPageID: Integer)
begin
Case CurPageID of
wpWelcome:
begin
WelcomeLabel1.Show
WelcomeLabel2.Show
end
wpLicense:
begin
LicenseLabel1.Show
WizardForm.LicenseMemo.Show
WizardForm.LicenseAcceptedRadio.Show
LicenseAcceptedLabel.Show
WizardForm.LicenseNotAcceptedRadio.Show
LicenseNotAcceptedLabel.Show
end
wpPassword:
begin
PasswordLabel.Show
PasswordEditLabel.Show
WizardForm.PasswordEdit.Show
end
wpInfoBefore:
begin
InfoBeforeClickLabel.Show
WizardForm.InfoBeforeMemo.Show
end
wpUserInfo:
begin
UserInfoNameLabel.Show
WizardForm.UserInfoNameEdit.Show
UserInfoOrgLabel.Show
WizardForm.UserInfoOrgEdit.Show
UserInfoSerialLabel.Show
WizardForm.UserInfoSerialEdit.Show
end
wpSelectDir:
begin
SelectDirLabel.Show
SelectDirBrowseLabel.Show
WizardForm.DirEdit.Show
WizardForm.DirBrowseButton.Show
DiskSpaceLabel.Show
end
wpSelectComponents:
begin
SelectComponentsLabel.Show
WizardForm.TypesCombo.Show
WizardForm.ComponentsList.Hide
ComponentsDiskSpaceLabel.Show
end
wpSelectProgramGroup:
begin
SelectStartMenuFolderLabel.Show
SelectStartMenuFolderBrowseLabel.Show
WizardForm.GroupEdit.Show
WizardForm.GroupBrowseButton.Show
end
wpSelectTasks:
begin
SelectTasksLabel.Show
WizardForm.TasksList.Show
end
wpReady:
begin
ReadyLabel.Show
ReadyLabel.Caption:=WizardForm.ReadyLabel.Caption
WizardForm.ReadyMemo.Show
end
wpInstalling:
begin
StatusLabel.Show
WizardForm.ProgressGauge.Show
end
wpInfoAfter:
begin
InfoAfterClickLabel.Show
WizardForm.InfoAfterMemo.Show
end
wpFinished:
begin
FinishedHeadingLabel.Show
FinishedLabel.Show
FinishedLabel.Caption:=WizardForm.FinishedLabel.Caption
WizardForm.RunList.hide
end
end
end
procedure TimerTick(uTimerID,uMessage:UINT;dwUser,dw1,dw2:DWORD)
begin
if BASS_ChannelIsActive(hMP3)=0 then begin
BASS_Stop
BASS_StreamFree(hMP3)
hMP3:=BASS_StreamCreateFile(False,PChar(MP3List.Strings[CurrentMP3]),0,0,0)
BASS_Start
if hMP3<>0 then
if BASS_ChannelPlay(hMP3,True) then begin
CurrentMP3:=CurrentMP3+1
if CurrentMP3>MP3List.Count-1 then CurrentMP3:=0
end
end
end
function InitializeSetup:boolean
var
ResultCode: Integer
ResultStr:string
begin
ExtractTemporaryFile('music.mp3')
MP3List:=TStringList.Create
MP3List.Add(ExpandConstant('{tmp}')+'\music.mp3')
CurrentMP3:=0
Result:=True
end
procedure InitializeWizard
begin
WizardForm.Position:=poScreenCenter
MainForm.BorderStyle:=bsNone
MainForm.Width:=GetSystemMetrics(0)
MainForm.Height:=GetSystemMetrics(1)+1
MainForm.Top:=-1
MainForm.Left:=0
ExtractTemporaryFile('splash.bmp')
ExtractTemporaryFile('AdvSplash.dll')
callplug(0,ExpandConstant('{tmp}\AdvSplash.dll'),'show','3000','2000','1500','0xFFF500',ExpandConstant('{tmp}\splash'),'','','','','')
TimerID:=SetTimer(0,0,500,WrapTimerProc(@TimerTick,5))
BASS_Init(-1,44100,0,0,0)
BASS_SetConfig(5,100)
BASS_SetConfig(6,100)
ExtractTemporaryFile('BackImage.jpg')
isxbb_AddImage(ExpandConstant('{tmp}')+'\BackImage.jpg',BackGround)
isxbb_Init(StrToInt(ExpandConstant('{hwnd}')))
MainForm.Visible:=True
ExtractTemporaryFile('WizardImage.bmp')
ExtractTemporaryFile('button.bmp')
InitializeSkin
WizardForm.BackButton.Left:=293
WizardForm.BackButton.Width:=ButtonWidth
WizardForm.BackButton.Height:=ButtonHeight
WizardForm.NextButton.Left:=375
WizardForm.NextButton.Width:=ButtonWidth
WizardForm.NextButton.Height:=ButtonHeight
WizardForm.CancelButton.Left:=600
WizardForm.CancelButton.Width:=ButtonWidth
WizardForm.CancelButton.Height:=ButtonHeight
WizardForm.DirBrowseButton.Top:=379
WizardForm.DirBrowseButton.Left:=580
WizardForm.DirBrowseButton.Width:=ButtonWidth
WizardForm.DirBrowseButton.Height:=ButtonHeight
WizardForm.GroupBrowseButton.Top:=379
WizardForm.GroupBrowseButton.Left:=580
WizardForm.GroupBrowseButton.Width:=ButtonWidth
WizardForm.GroupBrowseButton.Height:=ButtonHeight
LoadButtonImage(WizardForm.BackButton,bidBack)
LoadButtonImage(WizardForm.NextButton,bidNext)
LoadButtonImage(WizardForm.CancelButton,bidCancel)
LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse)
LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse)
end
procedure CurStepChanged(CurStep: TSetupStep)
begin
if CurStep=ssInstall then begin
ExtractTemporaryFile('1.jpg')
isxbb_AddImage(ExpandConstant('{tmp}')+'\1.jpg',BackGround or Timer)
ExtractTemporaryFile('2.jpg')
isxbb_AddImage(ExpandConstant('{tmp}')+'\2.jpg',BackGround or Timer)
ExtractTemporaryFile('3.jpg')
isxbb_AddImage(ExpandConstant('{tmp}')+'\3.jpg',BackGround or Timer)
ExtractTemporaryFile('4.jpg')
isxbb_AddImage(ExpandConstant('{tmp}')+'\4.jpg',BackGround or Timer)
ExtractTemporaryFile('5.jpg')
isxbb_AddImage(ExpandConstant('{tmp}')+'\5.jpg',BackGround or Timer)
isxbb_Init(StrToInt(ExpandConstant('{hwnd}')))
isxbb_StartTimer(20,BackGround)
end
if CurStep=ssPostInstall then begin
isxbb_KillTimer(BackGround)
end
end
procedure CurPageChanged(CurPageID: Integer)
begin
HideAll
ShowPageComponents(CurPageID)
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
UpdateButton(WizardForm.DirBrowseButton,bidDirBrowse)
UpdateButton(WizardForm.GroupBrowseButton,bidGroupBrowse)
end
if CurPageID=wpInstalling then begin
WizardForm.MainPanel.Visible:=False
WizardForm.Bevel1.Visible:=False
WizardForm.Width:=395
WizardForm.Height:=95
WizardForm.Left:=10
WizardForm.Top:=10
WizardForm.InnerNotebook.Width:=360
WizardForm.StatusLabel.Left:=0
WizardForm.StatusLabel.Top:=0
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width
WizardForm.ProgressGauge.Top:=10
WizardForm.ProgressGauge.Left:=5
WizardForm.ProgressGauge.Height:=20
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width
WizardForm.CancelButton.Left:=ScaleY(154)
WizardForm.CancelButton.Top:=ScaleY(40)
LoadButtonImage(WizardForm.CancelButton,bidCancel)
end
if CurPageID=wpFinished then begin
WizardForm.ClientWidth:=690
WizardForm.ClientHeight:=496
WizardForm.Position:=poScreenCenter
end
end
procedure DeinitializeSetup
begin
KillTimer(0,TimerID)
BASS_Stop
BASS_Free
MP3List.Free
end
[/more]