Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 8]
pollipen
23-08-2017, 13:02
парни как убрать страницу установить , что бы продолжалась автоматом установка
убрать страницу установить »
Если я правильно понял, то речь идет о странице ReadyPage.
[Setup]
DisableReadyPage=yes
pollipen
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Files]
Source: "compiler:\*"; DestDir: "{app}"; Flags: ignoreversion
[Code_]
procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpSelectDir:
WizardForm.NextButton.Caption:= 'Установить'
end;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID = 8) or(PageID = 10) then
Result:= True;
end;
pollipen
25-08-2017, 16:16
что то не получается вот скрипт надо чтобы тихо продолжалась установка без пользователя (может кто поправит или подскажет)
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[Setup]
AppId={{820F943F-D4F5-47B0-A3E3-B4568C5A07EC}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
DisableWelcomePage=yes
DisableReadyPage=True
DisableReadyMemo=True
DisableFinishedPage=True
[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
Source: "C:\Users\ww\Desktop\Soft\DirectX.exe"; DestDir: "{tmp}"; 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]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
begin
if not FileExists(ExpandConstant('{tmp}\DirectX.exe')) then ExtractTemporaryFile('DirectX.exe');
Exec(ExpandConstant('{tmp}\DirectX.exe'), '', '', SW_Hide, ewWaitUntilTerminated , ErrorCode);
result:=True;
end;
#define A = (Defined UNICODE) ? "W" : "A"
const
WM_USER = $0400;
PBM_SETPOS = (WM_USER + 2);
GWL_WNDPROC = (-4);
GWL_USERDATA = (-21);
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall';
function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam: Longint; lParam: Longint): Longint; external 'CallWindowProc{#A}@user32.dll stdcall';
function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; external 'MulDiv@kernel32.dll stdcall';
var
InstPercentLabel: TLabel;
///////////////////////////////
procedure CreateInstallingPage;
begin
{ InstPercentLabel }
InstPercentLabel := TLabel.Create(WizardForm);
with InstPercentLabel do
begin
Parent := WizardForm.ProgressGauge;
Align := alClient;
Alignment := taCenter;
Layout := tlCenter;
Transparent := True;
end;
end;
///////////////////////////////////////////////////////////////////////////////////////
function ProgressGaugeWndProc(hWnd: HWND; Msg: UINT; wParam, lParam: Longint): Longint;
begin
case Msg of
PBM_SETPOS:
begin
Result := CallWindowProc(GetWindowLong(hWnd, GWL_USERDATA), hWnd, Msg, wParam, lParam);
with WizardForm.ProgressGauge do
InstPercentLabel.Caption := Format('%d %%', [MulDiv(Position, 100, Max)]);
end;
else
Result := CallWindowProc(GetWindowLong(hWnd, GWL_USERDATA), hWnd, Msg, wParam, lParam);
end;
end;
///////////////////////////
procedure SubclassControls;
begin
{ ProgressGauge }
with WizardForm.ProgressGauge do
begin
if GetWindowLong(Handle, GWL_USERDATA) = 0 then
SetWindowLong(Handle, GWL_USERDATA, SetWindowLong(Handle, GWL_WNDPROC, CallbackAddr('ProgressGaugeWndProc')));
end;
end;
///////////////////////////
procedure InitializeWizard3;
begin
CreateInstallingPage;
SubclassControls;
end;
/////////////////////////////
procedure UnSubclassControls;
begin
{ ProgressGauge }
with WizardForm.ProgressGauge do
begin
if GetWindowLong(Handle, GWL_USERDATA) > 0 then
SetWindowLong(Handle, GWL_WNDPROC, GetWindowLong(Handle, GWL_USERDATA));
end;
end;
procedure InitializeWizard1();
begin
WizardForm.DirBrowseButton.Hide;
with WizardForm.DirEdit do
begin
Width := ScaleX(417);
AutoSelect := False;
Enabled := False;
end;
end;
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';
procedure InitializeWizard2();
begin
//Выносим кнопку "Отмена" на передний план
WizardForm.CancelButton.BringToFront;
WizardForm.Bevel1.Hide;
end;
procedure CurPageChanged2(CurPageID: Integer);
begin
if CurPageID=wpInstalling then
begin
WizardForm.BorderStyle:=bsDialog;
WizardForm.MainPanel.Visible:=False;
WizardForm.Width:=ScaleX(320);
WizardForm.Height:=ScaleY(91);
WizardForm.InnerNotebook.Left:=ScaleX(7);
WizardForm.InnerNotebook.Top:=ScaleY(7);
WizardForm.InnerNotebook.Width:=ScaleX(300);
WizardForm.StatusLabel.Left:=ScaleX(0);
WizardForm.StatusLabel.Top:=ScaleY(0);
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.FileNameLabel.Left:=ScaleX(0);
WizardForm.FileNameLabel.Top:=ScaleY(17);
WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.ProgressGauge.Top:=ScaleY(15);
WizardForm.ProgressGauge.Left:=ScaleX(0);
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
WizardForm.CancelButton.Left:=ScaleX(122);
WizardForm.CancelButton.Top:=ScaleY(70);
WizardForm.Left:=GetSystemMetrics(16)-ScaleX(325);
WizardForm.Top:=GetSystemMetrics(17)-ScaleX(68);
end;
if CurPageID=wpFinished
then
begin
WizardForm.Width:=502;{Размер окна по горизонтали}
WizardForm.Height:=392;{Размер окна по вертикали}
WizardForm.Position:=poScreenCenter; {Возврат в исходное состояние}
end;
end;
////////////////////////
var
Label1: TLabel;
procedure btnOnClick(Sender: TObject);
var
rcode: integer;
begin
ShellExec('open','http://forum.oszone.net','', '', SW_SHOW, ewNoWait, rCode);
end;
procedure btnOnClick2(Sender: TObject);
begin
Label1.Font.Color := clred;
end;
procedure btnOnClick3(Sender: TObject);
begin
Label1.Font.Color := clBlue;
end;
procedure InitializeWizard4();
begin
Label1 := TLabel.Create(WizardForm);
with Label1 do
begin
Parent := WizardForm;
Cursor := crHand;
Caption := 'Дополнительный софт';
Font.Color := clBlue;
Font.Height := -16;
Font.Name := 'Tahoma';
Font.Style := [fsUnderline];
ParentFont := False;
Transparent := True;
OnClick := @btnOnClick;
OnMouseEnter := @btnOnClick2;
OnMouseLeave := @btnOnClick3;
Left := ScaleX(8);
Top := ScaleY(327);
Width := ScaleX(153);
Height := ScaleY(19);
end;
end;
/////////////////
procedure CurPageChanged1(CurPageID: Integer);
begin
case CurPageID of
wpSelectDir:
WizardForm.NextButton.Caption:= 'Установить'
end;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID = 8) or(PageID = 10) then
Result:= True;
end;
procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
InitializeWizard3;
InitializeWizard4();
end;
////////////////////////////
procedure DeinitializeSetup;
begin
if ExpandConstant('{wizardhwnd}') = '0' then
Exit;
UnSubclassControls;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
CurPageChanged1(CurPageID)
CurPageChanged2(CurPageID)
end
pollipen
26-08-2017, 10:35
парни как запустить .msi файл из установщика, а то пишет что не является приложением win 32
http://i89.fastpic.ru/big/2017/0826/98/d938495002a12cd461a43359bb60df98.jpg
R.i.m.s.k.y.
26-08-2017, 11:35
pollipen, http://www.jrsoftware.org/iskb.php?msi
[Files]
Source: "Your-MSI-File.msi"; DestDir: "{tmp}"
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\Your-MSI-File.msi"""
надо чтобы тихо продолжалась установка без пользователя »
Судя по поведению, Вам необходимо чтоб следовало скрытое выполнение DirectX.
Exec(ExpandConstant('{tmp}\DirectX.exe'), '/q', '', SW_Hide, ewWaitUntilTerminated , ErrorCode);
поправит »
Поправил:
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[Setup]
AppId={{820F943F-D4F5-47B0-A3E3-B4568C5A07EC}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
DisableWelcomePage=yes
DisableReadyPage=True
DisableReadyMemo=True
DisableFinishedPage=True
[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
Source: "C:\Users\ww\Desktop\Soft\DirectX.exe"; DestDir: "{tmp}"; Flags: ignoreversion
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
[Co[I]de]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
begin
if not FileExists(ExpandConstant('{tmp}\DirectX.exe')) then ExtractTemporaryFile('DirectX.exe');
Exec(ExpandConstant('{tmp}\DirectX.exe'), '/q', '', SW_Hide, ewWaitUntilTerminated , ErrorCode);
result:=True;
end;
#define A = (Defined UNICODE) ? "W" : "A"
const
WM_USER = $0400;
PBM_SETPOS = (WM_USER + 2);
GWL_WNDPROC = (-4);
GWL_USERDATA = (-21);
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall';
function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam: Longint; lParam: Longint): Longint; external 'CallWindowProc{#A}@user32.dll stdcall';
function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; external 'MulDiv@kernel32.dll stdcall';
var
InstPercentLabel: TLabel;
///////////////////////////////
procedure CreateInstallingPage;
begin
{ InstPercentLabel }
InstPercentLabel := TLabel.Create(WizardForm);
with InstPercentLabel do
begin
Parent := WizardForm.ProgressGauge;
Align := alClient;
Alignment := taCenter;
Layout := tlCenter;
Transparent := True;
end;
end;
///////////////////////////////////////////////////////////////////////////////////////
function ProgressGaugeWndProc(hWnd: HWND; Msg: UINT; wParam, lParam: Longint): Longint;
begin
case Msg of
PBM_SETPOS:
begin
Result := CallWindowProc(GetWindowLong(hWnd, GWL_USERDATA), hWnd, Msg, wParam, lParam);
with WizardForm.ProgressGauge do
InstPercentLabel.Caption := Format('%d %%', [MulDiv(Position, 100, Max)]);
end;
else
Result := CallWindowProc(GetWindowLong(hWnd, GWL_USERDATA), hWnd, Msg, wParam, lParam);
end;
end;
///////////////////////////
procedure SubclassControls;
begin
{ ProgressGauge }
with WizardForm.ProgressGauge do
begin
if GetWindowLong(Handle, GWL_USERDATA) = 0 then
SetWindowLong(Handle, GWL_USERDATA, SetWindowLong(Handle, GWL_WNDPROC, CallbackAddr('ProgressGaugeWndProc')));
end;
end;
/////////////////////////////
procedure UnSubclassControls;
begin
{ ProgressGauge }
with WizardForm.ProgressGauge do
begin
if GetWindowLong(Handle, GWL_USERDATA) > 0 then
SetWindowLong(Handle, GWL_WNDPROC, GetWindowLong(Handle, GWL_USERDATA));
end;
end;
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpInstalling then
begin
WizardForm.BorderStyle:=bsDialog;
WizardForm.MainPanel.Visible:=False;
WizardForm.Width:=ScaleX(320);
WizardForm.Height:=ScaleY(91);
WizardForm.InnerNotebook.Left:=ScaleX(7);
WizardForm.InnerNotebook.Top:=ScaleY(7);
WizardForm.InnerNotebook.Width:=ScaleX(300);
WizardForm.StatusLabel.Left:=ScaleX(0);
WizardForm.StatusLabel.Top:=ScaleY(0);
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.FileNameLabel.Left:=ScaleX(0);
WizardForm.FileNameLabel.Top:=ScaleY(17);
WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.ProgressGauge.Top:=ScaleY(15);
WizardForm.ProgressGauge.Left:=ScaleX(0);
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
WizardForm.CancelButton.Left:=ScaleX(122);
WizardForm.CancelButton.Top:=ScaleY(70);
WizardForm.Left:=GetSystemMetrics(16)-ScaleX(325);
WizardForm.Top:=GetSystemMetrics(17)-ScaleX(68);
end;
case CurPageID of
wpSelectDir:
WizardForm.NextButton.Caption:= 'Установить'
end;
if CurPageID=wpFinished
then
begin
WizardForm.Width:=502;{Размер окна по горизонтали}
WizardForm.Height:=392;{Размер окна по вертикали}
WizardForm.Position:=poScreenCenter; {Возврат в исходное состояние}
end;
end;
////////////////////////
var
Label1: TLabel;
procedure btnOnClick(Sender: TObject);
var
rcode: integer;
begin
ShellExec('open','http://forum.oszone.net','', '', SW_SHOW, ewNoWait, rCode);
end;
procedure btnOnClick2(Sender: TObject);
begin
Label1.Font.Color := clred;
end;
procedure btnOnClick3(Sender: TObject);
begin
Label1.Font.Color := clBlue;
end;
/////////////////
procedure InitializeWizard();
begin
//Выносим кнопку "Отмена" на передний план
WizardForm.CancelButton.BringToFront;
// *****
WizardForm.Bevel1.Hide;
// *****
WizardForm.DirBrowseButton.Hide;
// *****
with WizardForm.DirEdit do
begin
Width := ScaleX(417);
AutoSelect := False;
Enabled := False;
end;
// *****
Label1 := TLabel.Create(WizardForm);
with Label1 do
begin
Parent := WizardForm;
Cursor := crHand;
Caption := 'Дополнительный софт';
Font.Color := clBlue;
Font.Height := -16;
Font.Name := 'Tahoma';
Font.Style := [fsUnderline];
ParentFont := False;
Transparent := True;
OnClick := @btnOnClick;
OnMouseEnter := @btnOnClick2;
OnMouseLeave := @btnOnClick3;
SetBounds(ScaleX(8), ScaleY(327), Width, ScaleY(19));
end;
/////////////////
///////////////////////////
CreateInstallingPage;
SubclassControls;
/////////////////////////////
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID = 8) or(PageID = 10) then
Result:= True;
end;
////////////////////////////
procedure DeinitializeSetup;
begin
if ExpandConstant('{wizardhwnd}') = '0' then
Exit;
UnSubclassControls;
end;
pollipen
чтобы тихо продолжалась установка без пользователя
Если имелось ввиду что бы не показывалась страница SelectTasksPage (следующая страница за той на которой кнопка далее переименована на установить)
тогда так
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID = 8) or(PageID = 9) or(PageID = 10) then
Result:= True;
end;
pollipen
26-08-2017, 16:28
Спасибо ZVSRus выручил.
pollipen
27-08-2017, 20:52
Вопрос такой на Splash можно как то поставить анимацию (.gif)
pollipen
; Время проявления картинки Splash (1500мс = 1,5 сек)
#define SplS "2000"
; Время показа картинки Splash (3000мс = 3 сек)
#define SplR "5000"
; Время затухания картинки Splash (1500мс = 1,5 сек)
#define SplE "2000"
[Setup]
AppName=Splash
AppVerName=Splash
DefaultDirName={pf}\Splash
OutputDir=.
UsePreviousAppDir=no
UsePreviousGroup=no
[Files]
Source: "Include\gifctrl.dll"; Flags: dontcopy solidbreak
Source: "splash.gif"; Flags: dontcopy solidbreak
Source: "Include\isgsg.dll"; Flags: dontcopy solidbreak
// Source: "splash.png"; Flags: dontcopy solidbreak
[Code]
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
procedure RunSplash();
begin
ExtractTemporaryFile('splash.gif');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\splash.gif',{#SplS},{#SplR},{#SplE},0,2 55,False,$FFFFFF,10);
end;
procedure InitializeWizard;
begin
RunSplash();
end;
pollipen
28-08-2017, 11:25
не получилось ни чего не показывает
pollipen
не получилось ни чего не показывает
Смотри внимательней, в примере DLL лежат в папке Include, сотри это.
https://www.upload.ee/files/7397789/splash.rar.html
pollipen
28-08-2017, 14:58
да, у меня всё так и было, но почему то тишина
https://youtu.be/bGzZmjz6BOU
да, у меня всё так и было, но почему то тишина »Потому, что у Вас юникодная версия Inno.
Поправил пример:
; Время проявления картинки Splash (1500мс = 1,5 сек)
#define SplS "2000"
; Время показа картинки Splash (3000мс = 3 сек)
#define SplR "5000"
; Время затухания картинки Splash (1500мс = 1,5 сек)
#define SplE "2000"
[Setup]
AppName=Splash
AppVerName=Splash
DefaultDirName={pf}\Splash
OutputDir=.
UsePreviousAppDir=no
UsePreviousGroup=no
[Files]
Source: "Include\gifctrl.dll"; Flags: dontcopy solidbreak
Source: "splash.gif"; Flags: dontcopy solidbreak
Source: "Include\isgsg.dll"; Flags: dontcopy solidbreak
// Source: "splash.png"; Flags: dontcopy solidbreak
[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 RunSplash();
begin
ExtractTemporaryFile('splash.gif');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\splash.gif',{#SplS},{#SplR},{#SplE},0,2 55,False,$FFFFFF,10);
end;
procedure InitializeWizard;
begin
RunSplash();
end;
pollipen
28-08-2017, 16:11
:up спасибо!!!
Всё работает!!! :clapping:
R.i.m.s.k.y.
29-08-2017, 10:32
Не могу понять как сделать так чтобы при запуске под UAC от имени администратора иконки создавались в папке пользователя а не администратора или в общей папке
Т.е логинится пользователь User, установщик запускается от Admin, и иконки создаются в папке
c:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\
[Icons]
Components: www; Name: "{group}\w w w ...
vadim.koltsov@vk
30-08-2017, 11:21
Всем привет. Прикручиваю в расширенной версии фон на компонентлист, но при скролле картинка "ползает". Как это можно исправить?
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
DisableFinishedPage=yes
OutputDir=.
Compression=lzma/ultra
InternalCompressLevel=ultra
SolidCompression=yes
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
[CustomMessages]
rus.Text=Язык интерфейса:
rus.Voice=Язык озвучки:
rus.Russian=Русский
rus.English=Английский
[Types]
Name: full; Description: Полная установка; Flags: iscustom
[Components]
Name: Text; Description: {cm:Text}; Flags: fixed; Types: Full;
Name: Text\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000;
Name: Text\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000;
Name: Voice; Description: {cm:Voice}; Flags: fixed; Types: Full;
Name: Voice\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000;
Name: Voice\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000;
Name: Text1; Description: {cm:Text}; Flags: fixed; Types: Full;
Name: Text1\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000;
Name: Text1\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000;
Name: Voice1; Description: {cm:Voice}; Flags: fixed; Types: Full;
Name: Voice1\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000;
Name: Voice1\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000;
Name: Text2; Description: {cm:Text}; Flags: fixed; Types: Full;
Name: Text2\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 50000000;
Name: Text2\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 60000000;
Name: Voice2; Description: {cm:Voice}; Flags: fixed; Types: Full;
Name: Voice2\Eng; Description: {cm:English}; Flags: exclusive; ExtraDiskSpaceRequired: 500000000;
Name: Voice2\Rus; Description: {cm:Russian}; Flags: exclusive; ExtraDiskSpaceRequired: 600000000;
[Files]
Source: Embedded\WizardImages\BMPImage.bmp; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
Source: Embedded\WizardImages\BTNImage.bmp; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
[---code---]var
BGBitmapImage,BTNImage: TBitmapImage;
BorderWidth: Integer;
BGImageStream,BTNImageStream: TMemoryStream;
procedure InitializeWizard();
begin
BGImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BMPImage.bmp', BGImageStream);
BGImageStream.Position := 0;
BTNImageStream := TMemoryStream.Create;
ExtractTemporaryFileToStream('BtnImage.bmp', BTNImageStream);
BTNImageStream.Position := 0;
BGBitmapImage := TBitmapImage.Create(WizardForm);
BGBitmapImage.Bitmap.LoadFromStream(BGImageStream);
BTNImage := TBitmapImage.Create(WizardForm);
BTNImage.Bitmap.LoadFromStream(BTNImageStream);
with WizardForm.ComponentsList do begin
Font.Color:= $FFF8F8;
Font.Name:='Tahoma';
Font.Size:= 8;
BorderWidth := (WizardForm.ComponentsList.Width-WizardForm.ComponentsList.ClientWidth) div 2;
LoadBGBmpFromBitmap(BGBitmapImage.Bitmap, WizardForm.ComponentsList.Left+BorderWidth, WizardForm.ComponentsList.Top+BorderWidth);
LoadBtnBmpFromBitmap(BTNImage.Bitmap);
end;
end;
postal1703
01-09-2017, 15:48
нужна ваша помощь. как сделать так чтобы установщик запустил выбранный мной файл а после удачного запуска удалил его?
как сделать так чтобы установщик запустил выбранный мной файл »
Так:
[Files]
Source: C:\Program Files\Inno Setup 5\Examples\MyProg.exe; DestDir: {tmp}
[Run]
Filename: {tmp}\MyProg.exe; Description: {cm:LaunchProgram,My Program}; Flags: nowait postinstall skipifsilent
или так:
[Tasks]
Name: file; Description: Run My File
[Files]
Source: C:\Program Files\Inno Setup 5\Examples\MyProg.exe; DestDir: {tmp}
[Run]
Filename: {tmp}\MyProg.exe; Tasks: file
или так:
[Tasks]
Name: file; Description: Run My File
[Files]
Source: C:\Program Files\Inno Setup 5\Examples\MyProg.exe; DestDir: {app}; Flags: deleteafterinstall
[Run]
Filename: {app}\MyProg.exe; Tasks: file
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.