Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 6]
На кой ляд такую хренотень замутили в Windows - не понятно. »Ну-ну.
[Registry]
Root: HKCR; SubKey: .323; ValueType: string; ValueData: """C:\Program Files\MyTeam\MyProg\MyProg.exe"",0"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKCR; SubKey: .323; ValueType: string; ValueData: """C:\Program Files\MyTeam\MyProg\MyProg.exe"" --started-from-file ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty
но даже и в этом случае будет не правильно.
Правильней будет так:
[Registry]
Root: HKCR; SubKey: .323; ValueType: string; ValueData: """{app}\MyTeam\MyProg\MyProg.exe"",0"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKCR; SubKey: .323; ValueType: string; ValueData: """{app}\MyTeam\MyProg\MyProg.exe"" --started-from-file ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty
А если учитывать то, что если в секции [Setup] будет прописан путь в DefaultDirName т.е
[Setup]
DefaultDirName={pf}\MyTeam\MyProg
то в секции [Registry] можно удалить лишние значения:
[Registry]
Root: HKCR; SubKey: .323; ValueType: string; ValueData: """{app}\MyProg.exe"",0"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKCR; SubKey: .323; ValueType: string; ValueData: """{app}\MyProg.exe"" --started-from-file ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty
И ChVL, чего первое сообщение не читаем, особое приглашение нужно?
Converter (http://forum.oszone.net/post-1216149-86.html) - Программа конвертирует reg-файлы в формат *.iss (формат скриптов Inno Setup).
Последняя версия: 0.1.4 [13.03.2010] - Скачать (http://forum.oszone.net/attachment.php?attachmentid=41380&d=1268419710);
[hr] »
Увидел?
Nordek,
Какой должна быть правильная запись, я знаю. Всё, что Вы здесь расписали - так и сделано. Ещё раз внимательно прочтите мой пост.
Вопрос в другом: как автоматически пройти тот путь, который указан в моём посте, т.е. исключить необходимость ручной правки скрипта.
P.S. И с какой целью Вы мне сделали особое приглашение, я так и не понял.
Всё, что Вы здесь расписали - так и сделано. »Что именно сделано?
Экспортированно через ISTool »а затем правка? Про Converter ни слова не написал.
ISTool и InnoIDE не умеют правильно обрабатывать ключи.
Для этого используй Converter или Inno Script Studio - вставляют правильно, без слеша..
Вопрос в другом: как автоматически пройти тот путь, который указан в моём посте, т.е. исключить необходимость ручной правки скрипта. »Совсем не получится.
Например если в файле reg присутствует путь "C:\\Program Files\\MyTeam\\MyProg\\MyProg.exe" то в ValueData так и запишется "C:\Program Files\MyTeam\MyProg\MyProg.exe" и речи, ни о каких "{app}\MyProg.exe" не может быть идти т.к в программах за ранее не заложена вставка-(автоматическая замена) переменных Inno для реестра.
И ещё один момент: На кой в секции [Registry] прописаны эти:
Root: "HKCR"; Subkey: ".323"; ValueType: string; ValueData: """C:\Program Files\MyTeam\MyProg\MyProg.exe"",0"
Root: "HKCR"; Subkey: ".323"; ValueType: string; ValueData: """C:\Program Files\MyTeam\MyProg\MyProg.exe"" --started-from-file ""%1""" две строки?
Одна для значка а другая исполняемая?
При инсталляции запишется только одна, т.е при инсталляции запишется первая - а затем первую, заменит вторая - либо наоборот. По этому всё равно запишется только одно значение.
Правильнее будет так (покажу на примере ассоциации расширения *.text к AkelPad-у):
[Registry]
Root: HKLM; Subkey: Software\Classes\.text; ValueType: string; ValueName: ; ValueData: AkelPad.Note; Flags: uninsdeletevalue
Root: HKLM; Subkey: Software\Classes\AkelPad.Note\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\AkelPad.exe,1; Flags: uninsdeletevalue
Root: HKLM; Subkey: Software\Classes\AkelPad.Note\shell\open\command; ValueType: string; ValueName: ; ValueData: "{app}\AkelPad.exe ""%1"""; Flags: uninsdeletevalue
Полагаясь на возможности одних только программ для обработки - этого мало, в первую очередь нужно самому реестр понимать.
Цитата Nordek:
ISTool и InnoIDE не умеют правильно обрабатывать ключи.
Для этого используй Converter или Inno Script Studio - вставляют правильно, без слеша.. »
Вот так и надо было ответить сразу.
Спасибо.
Добавлено.
Строки были приведены для примера и взяты они были из разных ключей, просто реальные имена заменены на MyProg.
Что Вы никак не успокоитесь. В каждом посте: то высокомерно делаете особое приглашение, то прямое указание, что я должен понимать в первую очередь.
Вы точно знаете уровень моих знаний? И что надо в первую, а что во вторую очередь, а? С каких щей Вы присвоили себе право поучать?
Ivan_009
15-02-2014, 21:50
Правильно ли я убираю рамку с едитов... Зарание спасибо...
Вот:
var
DirEditLabel, GroupEditLabel: TLabel;
procedure InitializeWizard;
begin
DirEditLabel := TLabel.Create(WizardForm);
with DirEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(5), ScaleY(85), ScaleX(446), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Name:= 'Arial'
Font.Size:= 9;
Font.Color:=$000000;
Font.Style:=[fsBold];
Caption := MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Parent := WizardForm.SelectDirPage;
end;
GroupEditLabel := TLabel.Create(WizardForm);
with GroupEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(5), ScaleY(85), ScaleX(446), ScaleY(15));
WordWrap:= True;
ShowAccelChar := False;
Transparent:=True;
Font.Name:= 'Arial'
Font.Size:= 9;
Font.Color:=$000000;
Font.Style:=[fsBold];
Caption := MinimizePathName(WizardForm.GroupEdit.Text, GroupEditLabel.Font, GroupEditLabel.Width);
Parent := WizardForm.SelectProgramGroupPage;
end;
WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text;
end;
procedure HideComponents;
begin
WizardForm.DirEdit.Hide;
WizardForm.GroupEdit.Hide;
DirEditLabel.Hide;
GroupEditLabel.Hide;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
HideComponents;
case CurPageID of
wpSelectDir:
begin
DirEditLabel.Show;
end;
wpSelectProgramGroup:
GroupEditLabel.Show;
end;
end;
Farser21
15-02-2014, 23:33
Проблема такая стоит автопределение установки по реестру, но если в реестре не находит то строка с путем пустая. Далее выбираем куда установить и оно приписывает конечным путем \Новая папка.
В оригинале хотелось бы, что если в реестре не находит игру, то самому выбрать папку куда ты хочешь установить, и чтобы не было конечным путем \Новая папка.
Заранее спасибо за ответ!
В оригинале хотелось бы, что если в реестре не находит игру, то самому выбрать папку куда ты хочешь установить, и чтобы не было конечным путем \Новая папка. »
[Setup]
AppName=My Program
AppVerName=My Program v.1.2
AppId=MyApp
DefaultDirName={code:SetInstDir}
[Code]
function SetInstDir(const lpResult: String): String;
begin
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1', 'InstallLocation', lpResult);
if lpResult <> '' then Result := RemoveBackslash(lpResult) else Result := ExpandConstant('{pf}\My Program');
end;
Или:
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1, InstallLocation|{pf}\My Program}
Farser21
16-02-2014, 13:35
saurn, Смотри этим способом мы в альтернативном пути ставим нужный путь место \Новая папка. А мне нужно чтобы альтернативного пути как бы не было. Т.е. если в реестре игру не нашло, то можно было просто указать папку куда устанавливать самому вручную.
Farser21
16-02-2014, 15:18
saurn, Задается не Новая папка а MyProgram, а мне нужно чтобы ничего вообще не задавалось. Чтобы абсолютно можно было самому в ручную выбрать нужную папку в установщике.
Farser21, только щас дошло о чем вы :)
[Setup]
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1, InstallLocation}
AppendDefaultDirName=no
Farser21
16-02-2014, 17:40
saurn, Спасибо, все работает!
Ivan_009
16-02-2014, 23:14
У кого имеется скрипт для создания авторуна. Зарание спасибо...
Ivan_009,
autorun
http://rghost.ru/52478541
У кого имеется скрипт для создания авторуна. »
В справке есть пример:
// Где Image - Название изображения
#define Img "Image"
[Setup]
AppName=AutoRUN
VersionInfoDescription=AutoRUN
VersionInfoProductName=AutoRUN
AppVerName=AutoRUN
VersionInfoProductVersion=1.0.0.0
VersionInfoVersion=1.0.0.0
VersionInfoCompany=john
VersionInfoCopyright=Copyright © John
CreateAppDir=no
OutputDir=.
OutputBaseFilename=Autorun
SetupIconFile=Icon.ico
[Languages]
Name: Russian; MessagesFile: compiler:Default.isl
[Files]
Source: {#Img}.bmp; Flags: dontcopy
[Messages]
SetupAppTitle=AutoRUN
[Code]
const
BM_CLICK = $00F5;
var
AutoRun: TSetupForm;
img1: TBitmapImage;
PlayButton, InstallButton, SupportButton, ReadmeButton, WebButton, ExitButton, UninstallButton: TButton;
AppPath,UninsPath: string;
ResultCode: Integer;
procedure CurPageChanged(CurPageID: Integer);
begin
If CurPageID=wpWelcome then
SendMessage(WizardForm.NextButton.Handle, BM_CLICK, 0, 0);
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False
Cancel:=True
end;
procedure PlayButtonClick(Sender: TObject);
var
exe: string;
begin
exe:='shift.exe';
if RegQueryStringValue(HKLM, 'SOFTWARE\Electronic Arts\Game','Install Dir', AppPath) then
begin
Exec(AddBackslash(AppPath) + Exe, '', ExtractFilePath(AddBackslash(AppPath) + Exe), SW_SHOWNORMAL,ewNoWait,ResultCode)
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end
end;
procedure InstallButtonClick(Sender: TObject);
var
CurPageID: Integer;
begin
Exec(ExpandConstant('{src}\Setup.exe'),'','',SW_SHOW,ewNoWait,ResultCode)
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure SupportButtonClick(Sender: TObject);
begin
shellexec('open', ExpandConstant('{src}\Game.exe'), '', '',SW_SHOWNORMAL, ewnowait, ResultCode)
end;
procedure ReadmeButtonClick(Sender: TObject);
begin
ShellExec('open', ExpandConstant('{src}\readme.txt'),'','', SW_SHOW, ewNoWait, ResultCode)
end;
procedure WebButtonClick(Sender: TObject);
begin
shellexec('open', 'http://localhost', '', '',SW_SHOWNORMAL, ewnowait, ResultCode)
end;
procedure ExitButtonClick(Sender: TObject);
var
CurPageID: Integer;
begin
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure UninstallButtonClick(Sender: TObject);
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Game','UninstallString', UninsPath) then
begin
UninsPath:=RemoveQuotes(UninsPath)
Exec(UninsPath,'','',SW_SHOWNORMAL,ewNoWait,ResultCode)
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end
end;
procedure CreateAutoRun;
begin
//AutoRun
AutoRun := CreateCustomForm;
with AutoRun do begin
Left := 498;
Top := 75;
Width := 495;
Height := 340;
BorderIcons := [];
BorderStyle:=bsToolWindow //(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
Position := poScreenCenter;
Caption:='AutoRUN'
end;
//img1
img1 := TBitmapImage.Create(AutoRun);
ExtractTemporaryFile('{#Img}.bmp');
with img1 do begin
Parent := AutoRun;
Left := 0;
Stretch:= true;
Top := 0;
Width := Autorun.Width;
Height := Autorun.Height;
Bitmap.LoadFromFile(ExpandConstant('{tmp}\{#Img}.bmp'));
end;
//PlayButton
PlayButton:= TButton.Create(AutoRun);
with PlayButton do begin
Parent := AutoRun;
Left := 300;
Top := 110;
Width := 150;
Height := 22;
Caption:= 'Начать игру';
Cursor:= crHand;
// ModalResult:= mrOk;
OnClick := @PlayButtonClick;
if not RegQueryStringValue(HKLM, 'SOFTWARE\Game','Install Dir', AppPath) then
begin
PlayButton.Enabled := False;
end
end;
//InstallButton
InstallButton:= TButton.Create(AutoRun);
with InstallButton do begin
Parent:= AutoRun;
Left := 300;
Top := 80;
Width := 150;
Height := 22;
Caption:= 'Install Game';
Cursor:= crHand;
OnClick := @InstallButtonClick;
end;
//SupportButton
SupportButton:= TButton.Create(AutoRun);
with SupportButton do begin
Parent:= AutoRun;
Left := 300;
Top := 140;
Width := 150;
Height := 22;
Caption:= 'Инфо';
Cursor:= crHand;
OnClick := @SupportButtonClick;
end;
//ReadmeButton
ReadmeButton:= TButton.Create(AutoRun);
with ReadmeButton do begin
Parent:= AutoRun;
Left := 300;
Top := 170;
Width := 150;
Height := 22;
Caption:= 'Readme';
Cursor:= crHand;
OnClick := @ReadmeButtonClick;
end;
//WebButton
WebButton:= TButton.Create(AutoRun);
with WebButton do begin
Parent:= AutoRun;
Left := 300;
Top := 200;
Width := 150;
Height := 22;
Caption:= 'Веб-сайт';
Cursor:= crHand;
OnClick := @WebButtonClick;
end;
//ExitButton
ExitButton:= TButton.Create(AutoRun);
with ExitButton do begin
Parent:= AutoRun;
Left := 300;
Top := 260;
Width := 150;
Height := 22;
Caption:= 'Выход';
Cursor:= crHand;
OnClick := @ExitButtonClick;
// ModalResult:= mrCancel;
end;
//UninstallButton
UninstallButton:= TButton.Create(AutoRun);
with UninstallButton do begin
Parent:= AutoRun;
Left := 300;
Top := 230;
Width := 150;
Height := 22;
Caption:= 'Удалить игру';
Cursor:= crHand;
OnClick := @UninstallButtonClick;
end;
if not RegQueryStringValue(HKLM, 'SOFTWARE\Game','UninstallString', UninsPath) then
begin
InstallButton.Enabled:=true;
UninstallButton.Enabled:=false;
end;
if RegQueryStringValue(HKLM, 'SOFTWARE\Game','UninstallString', UninsPath) then
begin
InstallButton.Enabled:=false;
UninstallButton.Enabled:=true;
end;
AutoRun.ShowModal;
end;
procedure InitializeWizard;
begin
CreateAutoRun;
end;
[Setup]
AppName=AutoRUN
VersionInfoDescription=AutoRUN
VersionInfoProductName=AutoRUN
AppVerName=AutoRUN
VersionInfoProductVersion=1.0.0.0
VersionInfoVersion=1.0.0.0
VersionInfoCompany=john
VersionInfoCopyright=Copyright © John
CreateAppDir=no
OutputDir=.
OutputBaseFilename=Autorun
[Languages]
Name: Russian; MessagesFile: compiler:Default.isl
[Messages]
SetupAppTitle=AutoRUN
[Code]
const
BM_CLICK = $00F5;
var
AutoRun: TSetupForm;
PlayButton, InstallButton, SupportButton, ReadmeButton, WebButton, ExitButton, UninstallButton: TButton;
AppPath,UninsPath: string;
ResultCode: Integer;
procedure CurPageChanged(CurPageID: Integer);
begin
If CurPageID=wpWelcome then
SendMessage(WizardForm.NextButton.Handle, BM_CLICK, 0, 0);
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False
Cancel:=True
end;
procedure PlayButtonClick(Sender: TObject);
var
exe: string;
begin
exe:='shift.exe';
if RegQueryStringValue(HKLM, 'SOFTWARE\Electronic Arts\Game','Install Dir', AppPath) then
begin
Exec(AddBackslash(AppPath) + Exe, '', ExtractFilePath(AddBackslash(AppPath) + Exe), SW_SHOWNORMAL,ewNoWait,ResultCode)
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end
end;
procedure InstallButtonClick(Sender: TObject);
var
CurPageID: Integer;
begin
Exec(ExpandConstant('{src}\Setup.exe'),'','',SW_SHOW,ewNoWait,ResultCode)
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure SupportButtonClick(Sender: TObject);
begin
shellexec('open', ExpandConstant('{src}\Game.exe'), '', '',SW_SHOWNORMAL, ewnowait, ResultCode)
end;
procedure ReadmeButtonClick(Sender: TObject);
begin
ShellExec('open', ExpandConstant('{src}\readme.txt'),'','', SW_SHOW, ewNoWait, ResultCode)
end;
procedure WebButtonClick(Sender: TObject);
begin
shellexec('open', 'http://localhost', '', '',SW_SHOWNORMAL, ewnowait, ResultCode)
end;
procedure ExitButtonClick(Sender: TObject);
var
CurPageID: Integer;
begin
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure UninstallButtonClick(Sender: TObject);
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Game','UninstallString', UninsPath) then
begin
UninsPath:=RemoveQuotes(UninsPath)
Exec(UninsPath,'','',SW_SHOWNORMAL,ewNoWait,ResultCode)
AutoRun.Close;
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end
end;
procedure CreateAutoRun;
begin
//AutoRun
AutoRun := CreateCustomForm;
with AutoRun do begin
Left := 498;
Top := 75;
Width := 495;
Height := 340;
BorderIcons := [];
BorderStyle:=bsToolWindow //(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
Position := poScreenCenter;
Caption:='AutoRUN'
end;
//PlayButton
PlayButton:= TButton.Create(AutoRun);
with PlayButton do begin
Parent := AutoRun;
Left := 300;
Top := 110;
Width := 150;
Height := 22;
Caption:= 'Начать игру';
Cursor:= crHand;
// ModalResult:= mrOk;
OnClick := @PlayButtonClick;
if not RegQueryStringValue(HKLM, 'SOFTWARE\Game','Install Dir', AppPath) then
begin
PlayButton.Enabled := False;
end
end;
//InstallButton
InstallButton:= TButton.Create(AutoRun);
with InstallButton do begin
Parent:= AutoRun;
Left := 300;
Top := 80;
Width := 150;
Height := 22;
Caption:= 'Install Game';
Cursor:= crHand;
OnClick := @InstallButtonClick;
end;
//SupportButton
SupportButton:= TButton.Create(AutoRun);
with SupportButton do begin
Parent:= AutoRun;
Left := 300;
Top := 140;
Width := 150;
Height := 22;
Caption:= 'Инфо';
Cursor:= crHand;
OnClick := @SupportButtonClick;
end;
//ReadmeButton
ReadmeButton:= TButton.Create(AutoRun);
with ReadmeButton do begin
Parent:= AutoRun;
Left := 300;
Top := 170;
Width := 150;
Height := 22;
Caption:= 'Readme';
Cursor:= crHand;
OnClick := @ReadmeButtonClick;
end;
//WebButton
WebButton:= TButton.Create(AutoRun);
with WebButton do begin
Parent:= AutoRun;
Left := 300;
Top := 200;
Width := 150;
Height := 22;
Caption:= 'Веб-сайт';
Cursor:= crHand;
OnClick := @WebButtonClick;
end;
//ExitButton
ExitButton:= TButton.Create(AutoRun);
with ExitButton do begin
Parent:= AutoRun;
Left := 300;
Top := 260;
Width := 150;
Height := 22;
Caption:= 'Выход';
Cursor:= crHand;
OnClick := @ExitButtonClick;
// ModalResult:= mrCancel;
end;
//UninstallButton
UninstallButton:= TButton.Create(AutoRun);
with UninstallButton do begin
Parent:= AutoRun;
Left := 300;
Top := 230;
Width := 150;
Height := 22;
Caption:= 'Удалить игру';
Cursor:= crHand;
OnClick := @UninstallButtonClick;
end;
if not RegQueryStringValue(HKLM, 'SOFTWARE\Game','UninstallString', UninsPath) then
begin
InstallButton.Enabled:=true;
UninstallButton.Enabled:=false;
end;
if RegQueryStringValue(HKLM, 'SOFTWARE\Game','UninstallString', UninsPath) then
begin
InstallButton.Enabled:=false;
UninstallButton.Enabled:=true;
end;
AutoRun.ShowModal;
end;
procedure InitializeWizard;
begin
CreateAutoRun;
end;
Доброго времени суток!
Подскажите плиз, какой компонент отвечает за дропбокс с типами установки?
Shkutu,
TWizardForm = class(TSetupForm)
property TypesCombo: TNewComboBox; read;
saurn, да, спасибо.
И еще такая проблема. Повесила обработку выбора компонентов (на ComponentsList.OnClickCheck) - сломалось автоопределение типа. Подскажите плиз, куда можно повесить определение типа в зависимости от выбранных компонентов? Вешать на тот же OnClickCheck не получается, потому что тогда ломается выбор компонентов( Думала использовать что-то вроде на ComponentsList.OnChange, но ничего похожего пока не нашла
Shkutu, да вроде не ломается.
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
[Languages]
Name: Russian; MessagesFile: compiler:Languages\Russian.isl
[Components]
Name: a; Description: Моя программа; ExtraDiskSpaceRequired: 15000000; Types: full custom;
Name: aa; Description: Руководство пользователя; ExtraDiskSpaceRequired: 2655285235; Types: custom
Name: aaa; Description: Русский; ExtraDiskSpaceRequired: 5587282385; Types: custom
[Code]
var
OldCompListOnClickCheckProc: TNotifyEvent;
SpaceComponentsLabel: TLabel;
procedure ComponentsListOnClickCheck(Sender: TObject);
begin
OldCompListOnClickCheckProc(TNewCheckListBox(Sender));
SpaceComponentsLabel.Caption := WizardForm.ComponentsDiskSpaceLabel.Caption;
end;
procedure InitializeWizard();
begin
WizardForm.ComponentsDiskSpaceLabel.Hide;
OldCompListOnClickCheckProc := WizardForm.ComponentsList.OnClickCheck;
WizardForm.ComponentsList.OnClickCheck := @ComponentsListOnClickCheck;
SpaceComponentsLabel:= TLabel.Create(nil);
with SpaceComponentsLabel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(WizardForm.ComponentsDiskSpaceLabel.Left), ScaleY(WizardForm.ComponentsDiskSpaceLabel.Top), ScaleX(WizardForm.ComponentsDiskSpaceLabel.Width), ScaleY(WizardForm.ComponentsDiskSpaceLabel.Height));
AutoSize := False;
Font.Style := [fsBold];
Font.Color := $0000FF;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpSelectComponents: ComponentsListOnClickCheck(WizardForm.ComponentsList);
end;
end;
У компонент листа, насколько мне известно, нет свойства OnChange
saurn, обработчик был кривоватый :)
Спасибо, поправила как в Вашем примере, теперь ничего не ломается:)
Ivan_009
17-02-2014, 17:24
Как прицепить дополнительную форму к инсталлятору и чтобы она была вверху инсталлятора.
Зарание спасибо...
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.