PDA

Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 8]


Страниц : 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126

diman_21Ru
17-02-2015, 13:47
Всем привет может кто нибудь скинуть скрипт пикник с отображением картинок при наведение на компонент.

Dodakaedr
17-02-2015, 16:34
Как можно выгрузить dll (разблокировать путь) не закрывая процесс? http://i68.fastpic.ru/big/2015/0216/d9/ed9051d27d1408c12eed75428853c4d9.jpg

Dodakaedr
17-02-2015, 20:34
Всем привет может кто нибудь скинуть скрипт пикник с отображением картинок при наведение на компонент. »
[Setup]
AppName=Моя программа
AppVersion=1.5
AppPublisher=YURSHAT
AppPublisherURL=http://krinkels.org/
DefaultDirName={pf}\Моя программа

[Languages]
Name: "RU"; MessagesFile: "compiler:Languages\Russian.isl"

[CustomMessages]
RU.CompName1=Компонент 1
RU.CompName2=Компонент 2
RU.ComponentsInfo=Наведите курсор мыши на компонент, чтобы прочитать его описание.
RU.ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью.
RU.CompDesc1=Описание первого компонента
RU.CompDesc2=Описание второго компонента

[Files]
Source: "compiler:WizModernImage.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy
Source: "compiler:WizModernImage-IS.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
Name: comp1; Description: "{cm:CompName1}"; Types: full
Name: comp2; Description: "{cm:CompName2}"; Types: full

[Code]
type
TComponentDesc = record
Description: String;
ImageName: String;
Index: Integer;
end;

var
CompDescs: array of TComponentDesc;
CompDescPanel, CompDescImgPanel: TPanel;
CompDescText: array[1..2] of TLabel;
CompIndex, LastIndex: Integer;
CompDescImg: TBitmapImage;

procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var
i: Integer;
begin
if Index = LastIndex then Exit;
CompIndex := -1;
for i := 0 to GetArrayLength(CompDescs) -1 do
begin
if (CompDescs[i].Index = Index) then
begin
CompIndex := i;
Break;
end;
end;
if (CompIndex >= 0) and (Area = iaItem) then
begin
if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then
ExtractTemporaryFile(CompDescs[CompIndex].ImageName);
CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);
CompDescImg.Show;

CompDescText[2].Caption := CompDescs[CompIndex].Description;
CompDescText[2].Enabled := True;
end else
begin
CompDescText[2].Caption := CustomMessage('ComponentsInfo');
CompDescText[2].Enabled := False;
CompDescImg.Hide;
end;
LastIndex := Index;
end;

procedure CompListMouseLeave(Sender: TObject);
begin
CompDescImg.Hide;
CompDescText[2].Caption := CustomMessage('ComponentsInfo');
CompDescText[2].Enabled := False;
LastIndex := -1;
end;

procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);
var
i: Integer;
begin
i := GetArrayLength(CompDescs);
SetArrayLength(CompDescs, i + 1);
CompDescs[i].Description := ADescription;
CompDescs[i].ImageName := AImageName;
CompDescs[i].Index := AIndex - 1
end;

procedure InitializeWizard();
begin
WizardForm.SelectComponentsLabel.Hide;
WizardForm.TypesCombo.Hide;
WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));
WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

CompDescImgPanel := TPanel.Create(WizardForm);
with CompDescImgPanel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));
BevelInner := bvLowered;
end;

CompDescText[1] := TLabel.Create(WizardForm);
with CompDescText[1] do
begin
Parent := CompDescImgPanel;
SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
AutoSize := False;
WordWrap := True;
Enabled := False;
Caption := CustomMessage('ComponentsImgInfo');
end;

CompDescImg := TBitmapImage.Create(WizardForm);
with CompDescImg do
begin
Parent := CompDescImgPanel;
SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
Stretch := True;
Hide;
end;

CompDescPanel := TPanel.Create(WizardForm);
with CompDescPanel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));
BevelInner := bvLowered;
end;

CompDescText[2] := TLabel.Create(WizardForm);
with CompDescText[2] do
begin
Parent := CompDescPanel;
SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));
AutoSize := False;
WordWrap := True;
Enabled := False;
Caption := CustomMessage('ComponentsInfo');
end;

AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');
AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');
end;

diman_21Ru
18-02-2015, 12:16
Dodakaedr, А код на без описаний компонентов не найдется?

diman_21Ru
18-02-2015, 13:21
По умолчанию стоят галочки на Бекап и удаление , как можно снять галочки? что бы по умолчанию они были сняты

Dodakaedr
18-02-2015, 14:44
А код на без описаний компонентов не найдется? »
Удалите что касается описания и получим это:[Setup]
AppName=Моя программа
AppVersion=1.5
AppPublisher=YURSHAT
AppPublisherURL=http://krinkels.org/
DefaultDirName={pf}\Моя программа

[Languages]
Name: "RU"; MessagesFile: "compiler:Languages\Russian.isl"

[CustomMessages]
RU.CompName1=Компонент 1
RU.CompName2=Компонент 2
RU.ComponentsInfo=Наведите курсор мыши на компонент, чтобы прочитать его описание.
RU.ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью.
RU.CompDesc1=Описание первого компонента
RU.CompDesc2=Описание второго компонента

[Files]
Source: "compiler:WizModernImage.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy
Source: "compiler:WizModernImage-IS.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
Name: comp1; Description: "{cm:CompName1}"; Types: full
Name: comp2; Description: "{cm:CompName2}"; Types: full

[Code]
type
TComponentDesc = record
Description: String;
ImageName: String;
Index: Integer;
end;

var
CompDescs: array of TComponentDesc;
CompDescImgPanel: TPanel;
CompDescText: array[1..2] of TLabel;
CompIndex, LastIndex: Integer;
CompDescImg: TBitmapImage;

procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var
i: Integer;
begin
if Index = LastIndex then Exit;
CompIndex := -1;
for i := 0 to GetArrayLength(CompDescs) -1 do
begin
if (CompDescs[i].Index = Index) then
begin
CompIndex := i;
Break;
end;
end;
if (CompIndex >= 0) and (Area = iaItem) then
begin
if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then
ExtractTemporaryFile(CompDescs[CompIndex].ImageName);
CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);
CompDescImg.Show;

end else
begin
CompDescImg.Hide;
end;
LastIndex := Index;
end;

procedure CompListMouseLeave(Sender: TObject);
begin
CompDescImg.Hide;
LastIndex := -1;
end;

procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);
var
i: Integer;
begin
i := GetArrayLength(CompDescs);
SetArrayLength(CompDescs, i + 1);
CompDescs[i].Description := ADescription;
CompDescs[i].ImageName := AImageName;
CompDescs[i].Index := AIndex - 1
end;

procedure InitializeWizard();
begin
WizardForm.SelectComponentsLabel.Hide;
WizardForm.TypesCombo.Hide;
WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));
WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

CompDescImgPanel := TPanel.Create(WizardForm);
with CompDescImgPanel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));
BevelInner := bvLowered;
end;

CompDescText[1] := TLabel.Create(WizardForm);
with CompDescText[1] do
begin
Parent := CompDescImgPanel;
SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
AutoSize := False;
WordWrap := True;
Enabled := False;
Caption := CustomMessage('ComponentsImgInfo');
end;

CompDescImg := TBitmapImage.Create(WizardForm);
with CompDescImg do
begin
Parent := CompDescImgPanel;
SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
Stretch := True;
Hide;
end;

AddCompDescription(1, '', 'CompDescImg1.bmp');
AddCompDescription(2, '', 'CompDescImg2.bmp');
end;

По умолчанию стоят галочки на Бекап и удаление , как можно снять галочки? что бы по умолчанию они были сняты »
Присвоить чекбоксам Checked := False;

diman_21Ru
18-02-2015, 15:09
Как можно не нажимая на галочку или флажок а просто на строчку компонента чтобы он выбирался.

ShadeUa
18-02-2015, 21:58
Здраствуйте , не подскажете как можна сделать кнопки , при нажатии что б менялся язык инстолятора

Dodakaedr
18-02-2015, 22:46
Здраствуйте , не подскажете как можна сделать кнопки , при нажатии что б менялся язык инстолятора »
[setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}
ShowLanguageDialog=auto

[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
Name: eng; MessagesFile: compiler:Default.isl

[CustomMessages]
; Русский
rusButtonBack=< &Назад
rusButtonNext=&Далее >
rusButtonCancel=Отмена
rusSetupWindowTitle=Установка — %1
rusWelcomeLabel1=Вас приветствует Мастер установки %1
rusWelcomeLabel2=Программа установит %1, версия %2 на Ваш компьютер.%n%nРекомендуется закрыть все прочие приложения перед тем, как продолжить.%n%nНажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти из программы установки.

; English
engButtonBack=< &Back
engButtonNext=&Next >
engButtonCancel=Cancel
engSetupWindowTitle=Setup — %1
engWelcomeLabel1=Welcome to the %1 Setup Wizard
engWelcomeLabel2=This will install %1 version %2 on your computer.%n%nIt is recommended that you close all other applications before continuing.%n%nClick Next to continue, or Cancel to exit Setup.

[Code]
var
lang: String;
langBtn: TButton;

procedure ChangeLang();
begin
WizardForm.BackButton.Caption:= CustomMessage(lang+'ButtonBack');
WizardForm.NextButton.Caption:= CustomMessage(lang+'ButtonNext');
WizardForm.CancelButton.Caption:= CustomMessage(lang+'ButtonCancel');
WizardForm.Caption:= FmtMessage(CustomMessage(lang+'SetupWindowTitle'), ['{#SetupSetting('AppName')}']);
WizardForm.WelcomeLabel1.Caption:= FmtMessage(CustomMessage(lang+'WelcomeLabel1'), ['{#SetupSetting('AppName')}']);
WizardForm.WelcomeLabel2.Caption:= FmtMessage(CustomMessage(lang+'WelcomeLabel2'), ['{#SetupSetting('AppName')}', '{#SetupSetting('AppVersion')}']);
end;

procedure LangBtnClick(Sender: TObject);
begin
if lang='rus' then begin
lang:= 'eng';
langBtn.Caption:= 'рус';
end else begin
lang:= 'rus';
langBtn.Caption:= 'eng';
end;
ChangeLang();
end;

procedure InitializeWizard;
begin
langBtn:= TButton.Create(WizardForm);
with langBtn do begin
SetBounds(10,WizardForm.CancelButton.Top,30,WizardForm.CancelButton.Height)
OnClick:= @LangBtnClick;
Parent:= WizardForm;
end;

if ActiveLanguage='rus' then begin
lang:= 'rus';
langBtn.Caption:= 'eng';
end else begin
lang:= 'eng';
langBtn.Caption:= 'рус';
end;
end;

svs23
19-02-2015, 11:18
by_gangster, там точно есть библиотека InnoTools Downloader к каковой идет множество невероятно понятных примеров и просто великолепная справка. »
кто подскажет как реализовать:
файл 123.zip загружался в temp там же распаковывался в папку 123 только если в выборе компонентов выбран компонент d
при этом чтобы эта процедура проходила до начала копирования других компонентов инстолятора
а после установки файл 123 и папка 123 удалялись

с InnoTools Downloader думаю разберусь...

roman_kudin@vk
19-02-2015, 15:41
Ребят, подскажите в таких вопросах.
1. Как можно сделать красивое оформление инсталлятора?
2. Что бы при выборе компонентов, справа появлялось превью компонента, именно справа, в отдельно области. Делал при наведении на компонент появляеться, но не удобно, загораживает другие компоненты.

saneksanek
19-02-2015, 19:30
roman_kudin@vk, Собственно в чем проблема? берешь закрываешь стандартную форум рисуешь свою новую.Примеров в интернете куча,что касается по второму вопросу имеется ввиду это? http://prntscr.com/675qc0

roman_kudin@vk
19-02-2015, 23:13
roman_kudin@vk, Собственно в чем проблема? берешь закрываешь стандартную форум рисуешь свою новую.Примеров в интернете куча,что касается по второму вопросу имеется ввиду это? http://prntscr.com/675qc0

Да, такое.
А насчет первого,то я со скинами пробовал, а как их к проекту "прикрутить"?

diman_21Ru
20-02-2015, 00:42
Как убрать страницу по созданию папки и ярлыка удаление программы .

kotyarko@fb
20-02-2015, 00:43
Как убрать страницу по созданию папки и ярлыка удаление программы »
[Setup]
DisableProgramGroupPage=yes

saneksanek
20-02-2015, 01:25
roman_kudin@vk,Забирай https://yadi.sk/d/HorUBofNenkGB
Тут WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(205), ScaleY(155));
И тут SetBounds(ScaleX(215), ScaleY(0), ScaleX(200), ScaleY(200));
Играешь с цифрами,описания к компонентам не вырезал просто скрыл,надо будет восстановишь.

ROMKA-1977
20-02-2015, 09:55
Что бы при выборе компонентов, справа появлялось превью компонента, именно справа, в отдельно области. »

[Setup]
SourceDir=.
OutputDir=Setup
AppName=Test
AppVerName=Test
DefaultDirName={pf}\Test
DefaultGroupName=Test
OutputBaseFilename=Setup
AllowNoIcons=true

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

[Types]
Name: custom; Description: Полная установка Test
Name: rusinstall; Description: Установка русской версии
Name: enginstall; Description: Установка английской версии

[Components]
Name: program; Description: Язык локализации Test:; Types: custom; Flags: fixed
Name: program\rusinstall; Description: Русская локализация; Types: rusinstall; Flags: exclusive
Name: program\enginstall; Description: Английская локализация; Types: enginstall; Flags: exclusive

[Files]
Source: Img/Rus.bmp; DestDir: {tmp}; Flags: dontcopy
Source: Img/Eng.bmp; DestDir: {tmp}; Flags: dontcopy

[Code]
var
ImagePanel: TPanel;
ComponentsInfoImage: TBitmapImage;

procedure ComponentsListClickCheck(Sender: TObject);
begin
If IsComponentSelected('program\rusinstall') then
ComponentsInfoImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Rus.bmp')) else
If IsComponentSelected('program\enginstall') then
ComponentsInfoImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Eng.bmp'));
end;

procedure InitializeWizard();
begin
WizardForm.TYPESCOMBO.Visible:= false;
WizardForm.ComponentsList.Visible := True;
WizardForm.ComponentsList.Height := ScaleX(100);
WizardForm.ComponentsList.Top := ScaleX(47);
WizardForm.ComponentsList.Width := ScaleX(232);
WizardForm.ComponentsDiskSpaceLabel.Visible := False;

ImagePanel := TPanel.Create(WizardForm);
ImagePanel.Parent := WizardForm.SelectComponentsPage;
ImagePanel.Caption := '';
ImagePanel.Top := ScaleX(47);
ImagePanel.Left := ScaleX(240);
ImagePanel.Width := ScaleX(177);
ImagePanel.Height := ScaleX(101);
ImagePanel.BevelInner := bvRaised;
ImagePanel.BevelOuter := bvLowered;

ExtractTemporaryFile('Rus.bmp');
ExtractTemporaryFile('Eng.bmp');
WizardForm.ComponentsList.OnClickCheck:= @ComponentsListClickCheck;
ComponentsInfoImage:= TBitmapImage.Create(WizardForm);
ComponentsInfoImage.Parent:= ImagePanel;
ComponentsInfoImage.Top:= ScaleY(4);
ComponentsInfoImage.Left:= ScaleX(4);
ComponentsInfoImage.Width:= ScaleX(168);
ComponentsInfoImage.Height:= ScaleY(92);
ComponentsInfoImage.Stretch:= True;
ComponentsInfoImage.BringToFront;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpSelectComponents: ComponentsListClickCheck(nil);
end;
end;

diman_21Ru
20-02-2015, 13:05
Как сделать выбор компонента нажимая на любое место этой строчки а не только на галочку или флажок, заранее благодарю !

El Sanchez
20-02-2015, 13:40
Как сделать выбор компонента нажимая на любое место этой строчки а не только на галочку или флажок »
diman_21Ru, WantTabs в True.

diman_21Ru
20-02-2015, 14:06
El Sanchez, А У меня нет такого название в установщике не подскажите куда вставить, буду очень благодарен




© OSzone.net 2001-2012