Старожил
Сообщения: 440
Благодарности: 251
|
Профиль
|
Сайт
|
Отправить PM
| Цитировать
habib2302,
читать дальше »
Код: 
; Скрипт создан через Мастер Inno Setup Script.
; ИСПОЛЬЗУЙТЕ ДОКУМЕНТАЦИЮ ДЛЯ ПОДРОБНОСТЕЙ ИСПОЛЬЗОВАНИЯ INNO SETUP!
#define MyAppName "AIDA64"
#define MyAppVersion "2.85.2400"
#define MyAppPublisher "Copyright (c) 1995-2013 FinalWire Ltd."
#define MyAppURL "http://www.aida64.com/"
#define AIDA641 "AIDA64 Extreme Edition"
#define AIDA642 "AIDA64 Business Edition"
#define AIDA64EXE1 "aida64.exe"
#define AIDA64EXE2 "aida64.exe"
#define AuthRep "Xabib"
#include "WinTB.iss"
#include "botva2.iss"
[Setup]
; Примечание: Значение AppId идентифицирует это приложение.
; Не используйте одно и тоже значение в разных установках.
; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.)
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\FinalWire
DefaultGroupName=FinalWire
AllowNoIcons=true
OutputBaseFilename={#MyAppName} {#MyAppVersion}
SetupIconFile=ico.ico
Compression=lzma/Ultra64
SolidCompression=true
InternalCompressLevel=Ultra64
DiskSpanning=false
DiskSliceSize=736000000
ShowLanguageDialog=auto
SlicesPerDisk=4
UninstallDisplayIcon={app}\ico.ico
InfoBeforeFile=info.rtf
;Авторские права.
VersionInfoCopyright={#AuthRep}
;Производитель.
AppPublisher={#AuthRep}
RawDataResource=Botva:botva2.dll|b2p:b2p.dll|Logo:logo.png|bPic:bPic.png|LiPic:LiPic.png|aPic:aPic.png
AppCopyright={#AuthRep}
AppVerName={#MyAppVersion}
UninstallDisplayName={#MyAppName}
AppModifyPath={app}
VersionInfoVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
DirExistsWarning=no
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Components]
Name: AIDA641; Description: {#AIDA641}; Flags: exclusive;
Name: AIDA642; Description: {#AIDA642}; Flags: exclusive;
[Tasks]
Name: icons; Description: Создать Ярлыки:;
Name: icons\desktop; Description: На Рабочем Столе;
Name: icons\quicklaunchicon; Description: В Панели Задач; OnlyBelowVersion: 0,6.1;
[Files]
;Файлы распаковываемые в папку с игрой. Необходимы для деинсталлятора;
Source: WinTB.dll; Flags: dontcopy;
Source: info.rtf; DestDir: {app}; Flags: ignoreversion
Source: ico.ico; DestDir: {app}; Flags: ignoreversion
Source: 1.ico; DestDir: {app}; Flags: ignoreversion
Source: 2.ico; DestDir: {app}; Flags: ignoreversion
Source: {app}\{#AIDA641}\*; DestDir: {app}\{#AIDA641}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: AIDA641;
Source: {app}\{#AIDA642}\*; DestDir: {app}\{#AIDA642}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: AIDA642;
; Примечание: Не используйте "Flags: ignoreversion" для системных файлов
[Icons]
Name: {group}\{#AIDA641}\{#AIDA641}; Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Components: AIDA641;
Name: {group}\{#AIDA642}\{#AIDA642}; Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Components: AIDA642;
Name: {group}\{#AIDA641}\{cm:UninstallProgram,{#AIDA641}}; Filename: {uninstallexe}; Components: AIDA641; IconFilename: {app}\1.ico;
Name: {group}\{#AIDA642}\{cm:UninstallProgram,{#AIDA642}}; Filename: {uninstallexe}; Components: AIDA642; IconFilename: {app}\2.ico;
Name: {group}\{#AIDA641}\Сайт {#MyAppName}; Filename: {#MyAppURL}; Components: AIDA641;
Name: {group}\{#AIDA642}\Сайт {#MyAppName}; Filename: {#MyAppURL}; Components: AIDA642;
Name: {group}\{#AIDA641}\Справка {#AIDA641}; Filename: {app}\{#AIDA641}\aida64.chm; Components: AIDA641;
Name: {group}\{#AIDA642}\Справка {#AIDA642}; Filename: {app}\{#AIDA642}\aida64.chm; Components: AIDA642;
Name: {commondesktop}\{#AIDA641}; Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Tasks: icons\desktop; Components: AIDA641;
Name: {commondesktop}\{#AIDA642}; Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Tasks: icons\desktop; Components: AIDA642;
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AIDA641}; Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Tasks: icons\quicklaunchicon; Components: AIDA641;
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AIDA642}; Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Tasks: icons\quicklaunchicon; Components: AIDA642;
[Run]
Filename: {app}\{#AIDA641}\{#AIDA64EXE1}; Description: "{cm:LaunchProgram,{#StringChange(AIDA641, '&', '&&')}}"; Flags: nowait postinstall skipifsilent Unchecked; Components: AIDA641;
Filename: {app}\{#AIDA642}\{#AIDA64EXE2}; Description: "{cm:LaunchProgram,{#StringChange(AIDA642, '&', '&&')}}"; Flags: nowait postinstall skipifsilent Unchecked; Components: AIDA642;
[Messages]
BeveledLabel=RePack by {#AuthRep}
[Code]
{ RedesignWizardFormBegin } // Не удалять эту строку!
// Не изменять эту секцию. Она создана автоматически.
function OnShouldSkipPage(Sender: TWizardPage): Boolean;
begin
if WizardForm.ComponentsList.Items.Count > 0 then WizardForm.Tag:= 1; // отображаются страницы выбора папки и компонентов
end;
procedure RedesignWizardForm;
begin
with WizardForm.ComponentsList do
begin
Top := ScaleY(50);
Height := ScaleY(155);
end;
{ ReservationBegin }
// Вы можете добавить ваш код здесь.
{ ReservationEnd }
end;
// Не изменять эту секцию. Она создана автоматически.
{ RedesignWizardFormEnd } // Не удалять эту строку!
const
RT_RCDATA = 10;
var
TDV: TFolderTreeView;
TFV: TStartMenuFolderTreeView;
ResultCode: Integer;
lPLogo, bPicHandle, bPicHandle2, lPicHandle: THandle;
BtnImage: TBitmapImage;
function GetFromRes(const ResName, SaveFileName: String): Boolean;
var
lResStream: TResourceStream;
begin
lResStream := TResourceStream.Create(HInstance, ResName, RT_RCDATA);
try
lResStream.SaveToFile(ExpandConstant('{tmp}\') + SaveFileName);
finally
lResStream.Free;
Result := FileExists(ExpandConstant('{tmp}\') + SaveFileName);
end;
end;
procedure TDVOnChange(Sender: TObject);
begin
WizardForm.DirEdit.Text:= AddBackslash(TDV.Directory)+'{#MyAppName}';
end;
procedure TFVOnChange(Sender: TObject);
begin
WizardForm.GroupEdit.Text:= AddBackslash(TFV.Directory)+'{#MyAppName}';
end;
function InitializeSetup:boolean;
begin
if not FileExists(ExpandConstant('{tmp}\WinTB.dll')) then ExtractTemporaryFile('WinTB.dll');
Result:=True;
end;
procedure InitializeWizard;
begin
RedesignWizardForm;
WizardForm.TypesCombo.hide;
PageFromID(wpSelectDir).OnShouldSkipPage:= @OnShouldSkipPage;
with WizardForm do
begin
if GetFromRes('_IS_BOTVA', 'botva2.dll') and GetFromRes('_IS_B2P', 'b2p.dll') and GetFromRes('_IS_LOGO', 'logo.png') and GetFromRes('_IS_BPIC', 'bPic.png') and GetFromRes('_IS_LIPIC', 'LiPic.png') and GetFromRes('_IS_APIC', 'aPic.png') then
begin
bPicHandle := ImgLoad(WelcomePage.Handle, ExpandConstant('{tmp}\aPic.png'), WizardBitmapImage.Left, WizardBitmapImage.Top, WizardBitmapImage.Width, WizardBitmapImage.Height, True, True);
WizardBitmapImage.Hide;
ImgSetVisibility(bPicHandle, True);
ImgApplyChanges(WelcomePage.Handle);
bPicHandle := ImgLoad(FinishedPage.Handle, ExpandConstant('{tmp}\bPic.png'), WizardBitmapImage2.Left, WizardBitmapImage2.Top, WizardBitmapImage2.Width, WizardBitmapImage2.Height, True, True);
WizardBitmapImage2.Hide;
ImgSetVisibility(bPicHandle, True);
ImgApplyChanges(FinishedPage.Handle);
lPicHandle := ImgLoad(MainPanel.Handle, ExpandConstant('{tmp}\LiPic.png'), WizardSmallBitmapImage.Left, WizardSmallBitmapImage.Top, WizardSmallBitmapImage.Width, WizardSmallBitmapImage.Height, True, True);
WizardSmallBitmapImage.Hide;
ImgSetVisibility(lPicHandle, True);
ImgApplyChanges(MainPanel.Handle);
lPLogo:= ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\logo.png'), ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38), True, True);
ImgApplyChanges(WizardForm.Handle);
end;
SetTaskBarProgressValue(0, 60);
SetTaskBarProgressState(0, TBPF_ERROR);
TaskBarV10(MainForm.Handle, WizardForm.Handle, false, false, 0, 0, _m_);
TDV:= TFolderTreeView.Create(WizardForm);
TDV.Top:= WizardForm.DirEdit.Top+28;
TDV.Width:= 417;
TDV.Height:= 100;
TDV.OnChange:= @TDVOnChange;
TDV.Parent:= WizardForm.SelectDirPage;
TFV:= TStartMenuFolderTreeView.Create(nil);
TFV.Top:= WizardForm.GroupEdit.Top+28;
TFV.Width:= 417;
TFV.Height:= 100;
TFV.SetPaths(ExpandConstant('{userprograms}'),ExpandConstant('{commonprograms}'),ExpandConstant('{userstartup}'),ExpandConstant('{commonstartup}'));
TFV.OnChange:= @TFVOnChange;
TFV.Parent:= WizardForm.SelectProgramGroupPage;
with TLabel.Create(WizardForm) do
begin
Parent:=WizardForm;
AutoSize:=False;
Transparent:= true;
SetBounds(ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38));
end;
end;
end;
Procedure CurPageChanged(CurPageID: Integer);
Begin
Case CurPageID of
wpSelectDir: if WizardForm.Tag = 1 then
begin
WizardForm.SelectDirPage.Notebook.ActivePage:= WizardForm.SelectComponentsPage;
WizardForm.PageNameLabel.Caption:= SetupMessage(msgWizardSelectComponents);
WizardForm.Hint:= WizardForm.PageDescriptionLabel.Caption; // запомнить SetupMessage(msgSelectDirDesc)
WizardForm.PageDescriptionLabel.Caption:= SetupMessage(msgSelectComponentsDesc);
end;
wpSelectComponents: if WizardForm.Tag = 1 then
begin
WizardForm.SelectComponentsPage.Notebook.ActivePage:= WizardForm.SelectDirPage;
WizardForm.DiskSpaceLabel.Caption:= WizardForm.ComponentsDiskSpaceLabel.Caption;
WizardForm.PageNameLabel.Caption:= SetupMessage(msgWizardSelectDir);
WizardForm.PageDescriptionLabel.Caption:= WizardForm.Hint; // иначе вместо названия программы [name]
if IsComponentSelected('AIDA641') then
begin
WizardForm.DirEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultDirName")}')) + '{#AIDA641}';
WizardForm.GroupEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultGroupName")}')) + '{#AIDA641}';
end else
if IsComponentSelected('AIDA642') then
begin
WizardForm.DirEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultDirName")}')) + '{#AIDA642}'
WizardForm.GroupEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultGroupName")}')) + '{#AIDA642}'
end;
end;
end;
end;
procedure DeinitializeSetup();
begin
gdipShutdown;
TaskBarDestroy;
end;
procedure InitializeUninstallProgressForm;
begin
with UninstallProgressForm do
begin
if GetFromRes('_IS_BOTVA', 'botva2.dll') and GetFromRes('_IS_B2P', 'b2p.dll') and GetFromRes('_IS_LOGO', 'logo.png') and GetFromRes('_IS_LIPIC', 'LIPic.png') then
begin
lPicHandle := ImgLoad(MainPanel.Handle, ExpandConstant('{tmp}\LiPic.png'), WizardSmallBitmapImage.Left, WizardSmallBitmapImage.Top, WizardSmallBitmapImage.Width, WizardSmallBitmapImage.Height, True, True);
WizardSmallBitmapImage.Hide;
ImgSetVisibility(lPicHandle, True);
ImgApplyChanges(MainPanel.Handle);
lPLogo:= ImgLoad(UninstallProgressForm.Handle, ExpandConstant('{tmp}\logo.png'), ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38), True, True);
ImgApplyChanges(UninstallProgressForm.Handle);
end;
with TLabel.Create(nil) do
begin
Parent:=UninstallProgressForm;
AutoSize:=False;
Transparent:= true;
SetBounds(ScaleX(20), ScaleY(320), ScaleX(126), ScaleY(38));
end;
end;
end;
procedure DeinitializeUninstall();
begin
gdipShutdown;
end;
[ISFormDesigner]
WizardForm=FF0A005457495A415244464F524D0030106402000054504630F10B5457697A617264466F726D0A57697A617264466F726D0C436C69656E744865696768740368010B436C69656E74576964746803F1010C4578706C696369744C65667402000B4578706C69636974546F7002000D4578706C6963697457696474680301020E4578706C69636974486569676874038E010D506978656C73506572496E636802600A54657874486569676874020D00F10C544E65774E6F7465626F6F6B0D4F757465724E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650B57656C636F6D65506167650D4578706C69636974576964746803F1010E4578706C696369744865696768740339010000F110544E65774E6F7465626F6F6B5061676509496E6E6572506167650D4578706C69636974576964746803F1010E4578706C6963697448656967687403390100F10C544E65774E6F7465626F6F6B0D496E6E65724E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650B4C6963656E7365506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED000000F110544E65774E6F7465626F6F6B506167651453656C656374436F6D706F6E656E7473506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED0000F110544E6577436865636B4C697374426F780E436F6D706F6E656E74734C69737403546F70023206486569676874039B000B4578706C69636974546F7002320E4578706C69636974486569676874039B000000F10C544E6577436F6D626F426F780A5479706573436F6D626F0A4974656D486569676874020D00000000000000
|