|
Компьютерный форум OSzone.net » Автоматическая установка Windows » Автоматическая установка приложений » Скрипты Inno Setup. Помощь и советы [часть 8] |
|
Скрипты Inno Setup. Помощь и советы [часть 8]
|
Ветеран Сообщения: 1264 |
Профиль | Отправить PM | Цитировать
Внимание! Данная тема предназначена только для обсуждения написания скриптов !
Остальные вопросы, а также последние версии компилятора в теме Inno Setup. Прочие вопросы. Показать/скрыть: Справка, руководство, примеры:
Показать/скрыть: Ссылки на примеры скриптов:
Показать/скрыть: Дополнительные программы для Inno Setup:
Предыдущие ветки обсуждения по ссылкам ниже и в прикреплённых архивах: Скрипты Inno Setup. Помощь и советы (Archive Pack 1):
Скрипты Inno Setup. Помощь и советы [часть 6] Скрипты Inno Setup. Помощь и советы [часть 7] |
|
Отправлено: 08:52, 02-02-2015 |
SHVtYW4= Сообщения: 3451
|
Профиль | Отправить PM | Цитировать Цитата dimantv_wot@vk:
|
|
Отправлено: 17:16, 07-01-2016 | #1211 |
Для отключения данного рекламного блока вам необходимо зарегистрироваться или войти с учетной записью социальной сети. Если же вы забыли свой пароль на форуме, то воспользуйтесь данной ссылкой для восстановления пароля. |
Забанен Сообщения: 96
|
нужна помощь парни сделал побольше инсталлятор теперь ни как не могу растянуть картинку баковую на весь инсталлятор что бы она отображалась на всех страницах #define A = (Defined UNICODE) ? "W" : "A" const SPI_GETWORKAREA = $0030; // Large Integer Functions function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; external 'MulDiv@kernel32.dll stdcall'; // Configuration Reference function SystemParametersInfo(uiAction, uiParam: UINT; var pvParam: TRect; fWinIni: UINT): BOOL; external 'SystemParametersInfo{#A}@user32.dll stdcall'; //////////////////////////////////////////////////////////////////////////// procedure RecreateWizardForm(const cx, cy: Longint; const IsDelta: Boolean); // IsDelta : True - cx, cy is delta width/height, False - cx, cy is width/height // cx......: delta width / width // cy......: delta height / height var rt: TRect; dx, dy: Longint; begin { get deltas } if not IsDelta then begin cx := cx - WizardForm.Width; cy := cy - WizardForm.Height; end; { check deltas } if SystemParametersInfo(SPI_GETWORKAREA, 0, rt, 0) then begin { check delta width } if (cx < -WizardForm.Width) or (cx > rt.Right - WizardForm.Width) then begin if IsDelta then MsgBox(FmtMessage(CustomMessage('WizardDeltaWidthInvalid'), [IntToStr(-WizardForm.Width), IntToStr(rt.Right - WizardForm.Width)]), mbError, MB_OK) else MsgBox(FmtMessage(CustomMessage('WizardWidthInvalid'), [IntToStr(rt.Right)]), mbError, MB_OK); Exit; end; { check delta height } if (cy < -WizardForm.Height) or (cy > rt.Bottom - WizardForm.Height) then begin if IsDelta then MsgBox(FmtMessage(CustomMessage('WizardDeltaHeightInvalid'), [IntToStr(-WizardForm.Height), IntToStr(rt.Bottom - WizardForm.Height)]), mbError, MB_OK) else MsgBox(FmtMessage(CustomMessage('WizardHeightInvalid'), [IntToStr(rt.Bottom)]), mbError, MB_OK); Exit; end; end; { WizardForm } with WizardForm do begin { WizardForm } Width := Width + cx; Height := Height + cy; { buttons } CancelButton.Left := CancelButton.Left + cx; CancelButton.Top := CancelButton.Top + cy; NextButton.Left := NextButton.Left + cx; NextButton.Top := NextButton.Top + cy; BackButton.Left := BackButton.Left + cx; BackButton.Top := BackButton.Top + cy; { common } OuterNotebook.ClientWidth := ClientWidth; OuterNotebook.ClientHeight := OuterNotebook.ClientHeight + cy; InnerNotebook.Width := InnerNotebook.Width + cx; InnerNotebook.Height := InnerNotebook.Height + cy; MainPanel.ClientWidth := ClientWidth; WizardSmallBitmapImage.Left := WizardSmallBitmapImage.Left + cx; PageNameLabel.Width := PageNameLabel.Width + cx; PageDescriptionLabel.Width := PageDescriptionLabel.Width + cx; Bevel1.Width := Bevel1.Width + cx; Bevel.Width := Bevel.Width + cx; Bevel.Top := Bevel.Top + cy; BeveledLabel.Top := BeveledLabel.Top + cy; { wpWelcome } dx := MulDiv(cy, WizardBitmapImage.Width, WizardBitmapImage.Height); WizardBitmapImage.Width := WizardBitmapImage.Width + dx; WizardBitmapImage.Height := WizardBitmapImage.Height + cy; WelcomeLabel1.Left := WelcomeLabel1.Left + dx; WelcomeLabel1.Width := WelcomeLabel1.Width + cx - dx; dy := WelcomeLabel1.Height; WelcomeLabel1.AdjustHeight; dy := WelcomeLabel1.Height - dy; WelcomeLabel2.Top := WelcomeLabel2.Top + dy; WelcomeLabel2.Left := WelcomeLabel2.Left + dx; WelcomeLabel2.Width := WelcomeLabel2.Width + cx - dx; WelcomeLabel2.AdjustHeight; { wpLicense } LicenseLabel1.Width := LicenseLabel1.Width + cx; dy := LicenseLabel1.Height; LicenseLabel1.AdjustHeight; dy := LicenseLabel1.Height - dy; LicenseMemo.Top := LicenseMemo.Top + dy; LicenseMemo.Width := LicenseMemo.Width + cx; LicenseMemo.Height := LicenseMemo.Height + cy - dy; LicenseAcceptedRadio.Top := LicenseAcceptedRadio.Top + cy; LicenseAcceptedRadio.Width := LicenseAcceptedRadio.Width + cx; LicenseNotAcceptedRadio.Top := LicenseNotAcceptedRadio.Top + cy; LicenseNotAcceptedRadio.Width := LicenseNotAcceptedRadio.Width + cx; { wpPassword } PasswordLabel.Width := PasswordLabel.Width + cx; dy := PasswordLabel.Height; PasswordLabel.AdjustHeight; dy := PasswordLabel.Height - dy; PasswordEditLabel.Top := PasswordEditLabel.Top + dy; PasswordEditLabel.Width := PasswordEditLabel.Width + cx; PasswordEdit.Top := PasswordEdit.Top + dy; PasswordEdit.Width := PasswordEdit.Width + cx; { wpInfoBefore } InfoBeforeClickLabel.Width := InfoBeforeClickLabel.Width + cx; dy := InfoBeforeClickLabel.Height; InfoBeforeClickLabel.AdjustHeight; dy := InfoBeforeClickLabel.Height - dy; InfoBeforeMemo.Top := InfoBeforeMemo.Top + dy; InfoBeforeMemo.Width := InfoBeforeMemo.Width + cx; InfoBeforeMemo.Height := InfoBeforeMemo.Height + cy - dy; { wpUserInfo } UserInfoNameLabel.Width := UserInfoNameLabel.Width + cx; UserInfoNameEdit.Width := UserInfoNameEdit.Width + cx; UserInfoOrgLabel.Width := UserInfoOrgLabel.Width + cx; UserInfoOrgEdit.Width := UserInfoOrgEdit.Width + cx; UserInfoSerialLabel.Width := UserInfoSerialLabel.Width + cx; UserInfoSerialEdit.Width := UserInfoSerialEdit.Width + cx; { wpSelectDir } SelectDirLabel.Width := SelectDirLabel.Width + cx; SelectDirLabel.AdjustHeight; SelectDirBrowseLabel.Width := SelectDirBrowseLabel.Width + cx; dy := SelectDirBrowseLabel.Height; SelectDirBrowseLabel.AdjustHeight; dy := SelectDirBrowseLabel.Height - dy; DirEdit.Top := DirEdit.Top + dy; DirEdit.Width := DirEdit.Width + cx; DirBrowseButton.Top := DirBrowseButton.Top + dy; DirBrowseButton.Left := DirBrowseButton.Left + cx; DiskSpaceLabel.Width := DiskSpaceLabel.Width + cx; dy := DiskSpaceLabel.Height; DiskSpaceLabel.AdjustHeight; dy := DiskSpaceLabel.Height - dy; DiskSpaceLabel.Top := DiskSpaceLabel.Top + cy - dy; { wpSelectComponents } SelectComponentsLabel.Width := SelectComponentsLabel.Width + cx; dy := SelectComponentsLabel.Height; SelectComponentsLabel.AdjustHeight; dy := SelectComponentsLabel.Height - dy; TypesCombo.Top := TypesCombo.Top + dy; TypesCombo.Width := TypesCombo.Width + cx; ComponentsList.Top := ComponentsList.Top + dy; ComponentsList.Width := ComponentsList.Width + cx; ComponentsList.Height := ComponentsList.Height + cy - dy; ComponentsDiskSpaceLabel.Width := ComponentsDiskSpaceLabel.Width + cx; dy := ComponentsDiskSpaceLabel.Height; ComponentsDiskSpaceLabel.AdjustHeight; dy := ComponentsDiskSpaceLabel.Height - dy; ComponentsDiskSpaceLabel.Top := ComponentsDiskSpaceLabel.Top + cy - dy; { wpSelectProgramGroup } SelectStartMenuFolderLabel.Width := SelectStartMenuFolderLabel.Width + cx; SelectStartMenuFolderLabel.AdjustHeight; SelectStartMenuFolderBrowseLabel.Width := SelectStartMenuFolderBrowseLabel.Width + cx; dy := SelectStartMenuFolderBrowseLabel.Height; SelectStartMenuFolderBrowseLabel.AdjustHeight; dy := SelectStartMenuFolderBrowseLabel.Height - dy; GroupEdit.Top := GroupEdit.Top + dy; GroupEdit.Width := GroupEdit.Width + cx; GroupBrowseButton.Top := GroupBrowseButton.Top + dy; GroupBrowseButton.Left := GroupBrowseButton.Left + cx; NoIconsCheck.Top := NoIconsCheck.Top + cy; NoIconsCheck.Width := NoIconsCheck.Width + cx; { wpSelectTasks } SelectTasksLabel.Width := SelectTasksLabel.Width + cx; dy := SelectTasksLabel.Height; SelectTasksLabel.AdjustHeight; dy := SelectTasksLabel.Height - dy; TasksList.Top := TasksList.Top + dy; TasksList.Width := TasksList.Width + cx; TasksList.Height := TasksList.Height + cy - dy; { wpReady } ReadyLabel.Width := ReadyLabel.Width + cx; dy := ReadyLabel.Height; ReadyLabel.AdjustHeight; dy := ReadyLabel.Height - dy; ReadyMemo.Top := ReadyMemo.Top + dy; ReadyMemo.Width := ReadyMemo.Width + cx; ReadyMemo.Height := ReadyMemo.Height + cy - dy; { wpPreparing } PreparingLabel.Width := PreparingLabel.Width + cx; PreparingMemo.Width := PreparingMemo.Width + cx; PreparingMemo.Height := PreparingMemo.Height + cy; { wpInstalling } StatusLabel.Width := StatusLabel.Width + cx; FilenameLabel.Width := FilenameLabel.Width + cx; ProgressGauge.Width := ProgressGauge.Width + cx; { wpInfoAfter } InfoAfterClickLabel.Width := InfoAfterClickLabel.Width + cx; dy := InfoAfterClickLabel.Height; InfoAfterClickLabel.AdjustHeight; dy := InfoAfterClickLabel.Height - dy; InfoAfterMemo.Top := InfoAfterMemo.Top + dy; InfoAfterMemo.Width := InfoAfterMemo.Width + cx; InfoAfterMemo.Height := InfoAfterMemo.Height + cy - dy; { wpFinished } WizardBitmapImage2.Width := WizardBitmapImage2.Width + dx; WizardBitmapImage2.Height := WizardBitmapImage2.Height + cy; FinishedHeadingLabel.Left := FinishedHeadingLabel.Left + dx; FinishedHeadingLabel.Width := FinishedHeadingLabel.Width + cx - dx; dy := FinishedHeadingLabel.Height; FinishedHeadingLabel.AdjustHeight; dy := FinishedHeadingLabel.Height - dy; FinishedLabel.Top := FinishedLabel.Top + dy; FinishedLabel.Left := FinishedLabel.Left + dx; FinishedLabel.Width := FinishedLabel.Width + cx - dx; FinishedLabel.AdjustHeight; RunList.Left := RunList.Left + dx; RunList.Width := RunList.Width + cx - dx; dy := RunList.Top; RunList.Top := FinishedPage.Height - RunList.Height; dy := RunList.Top - dy; YesRadio.Top := YesRadio.Top + dy; YesRadio.Left := YesRadio.Left + dx; YesRadio.Width := YesRadio.Width + cx - dx; NoRadio.Top := NoRadio.Top + dy; NoRadio.Left := NoRadio.Left + dx; NoRadio.Width := NoRadio.Width + cx - dx; { new position } Center; end; end; /////////////////////////// procedure InitializeWizard; begin RecreateWizardForm(150, 50, True); end; |
Отправлено: 19:01, 07-01-2016 | #1212 |
Старожил Сообщения: 203
|
Профиль | Отправить PM | Цитировать Собрал инсталлятор. Есть-ли возможность указать в скрипте, чтобы в Programs and Features не указывалась версия продукта, и наименование было взято не из MyAppName ?
|
Отправлено: 16:32, 08-01-2016 | #1213 |
Старожил Сообщения: 203
|
Профиль | Отправить PM | Цитировать Нашел - UninstallDisplayName
|
Отправлено: 18:18, 08-01-2016 | #1214 |
Новый участник Сообщения: 23
|
Профиль | Отправить PM | Цитировать Подскажите, как правильно реализовать описание компонентов, когда часть из них доступно только для определенного языка.
Варианты для русской локализации скрыты, а описание к ним остается. В примере вместо описания английских компонентов E и F описываются скрытые компоненты В и С. Скрытый текст
[Components] Name: Mode; Description: mode; Types: custom; Languages: rus; flags: fixed Name: Mode/A; Description: {cm:C1}; Languages: rus; Flags: disablenouninstallwarning Name: Mode/B; Description: {cm:C2}; Languages: rus; Flags: disablenouninstallwarning Name: Mode/C; Description: {cm:C3}; Languages: rus; Flags: disablenouninstallwarning Name: Mode/D; Description: {cm:C4} Languages: rus; Flags: disablenouninstallwarning Name: Mode/E; Description: {cm:C5}; Languages: rus; Flags: disablenouninstallwarning Name: Mode2; Description: mode; Types: custom; Languages: eng; flags: fixed Name: Mode2/A; Description: {cm:C1}; Languages: eng; Flags: disablenouninstallwarning Name: Mode2/E; Description: {cm:C5}; Languages: eng; Flags: disablenouninstallwarning Name: Mode2/F; Description: {cm:C6} Languages: eng; Flags: disablenouninstallwarning [_code] function enabledesc(ComponentsListHandle: HWND; DescLabelHandle: HWND; DescStrings: PChar): BOOL; external 'enabledesc@files:descctrl.dll stdcall'; function disabledesc(): BOOL; external 'disabledesc@files:descctrl.dll stdcall'; var Info: TNewStaticText; InfoCaption: TNewStaticText; InfoPanel: TPanel; procedure DeinitializeSetup3(); begin disabledesc(); end; procedure InitializeWizard3(); begin WizardForm.TypesCombo.Visible:=True; //WizardForm.TypesCombo.Height := ScaleY(20) WizardForm.TypesCombo.Top := ScaleY(45); WizardForm.TypesCombo.Width := ScaleX(417); WizardForm.ComponentsList.Height := ScaleY(186) - WizardForm.TypesCombo.Top; WizardForm.ComponentsList.Top := ScaleY(68); WizardForm.ComponentsList.Width := ScaleX(417); InfoPanel := TPanel.Create(WizardForm); InfoPanel.Parent := WizardForm.SelectComponentsPage; InfoPanel.Caption := ''; InfoPanel.Top := ScaleY(2); InfoPanel.Left := ScaleX(0); InfoPanel.Width := ScaleX(418); InfoPanel.Height := ScaleY(42); InfoPanel.BevelInner := bvRaised; InfoPanel.BevelOuter := bvLowered; InfoCaption := TNewStaticText.Create(WizardForm); InfoCaption.Parent := WizardForm.SelectComponentsPage; InfoCaption.Caption := ExpandConstant('{cm:ComponentsInfoPanel1}'); InfoCaption.Left := ScaleX(7); InfoCaption.Top := InfoPanel.Top - ScaleY(6); InfoCaption.Font.Color := clActiveCaption; Info := TNewStaticText.Create(WizardForm); Info.Parent := InfoPanel; Info.AutoSize := False; Info.Left := ScaleX(6); Info.Width := ScaleX(403); Info.Top := ScaleY(6); Info.Height := ScaleY(26); Info.Caption := ExpandConstant('{cm:ComponentsInfoPanel2}'); Info.WordWrap := true; enabledesc(WizardForm.ComponentsList.Handle,Info.Handle, ExpandConstant('{cm:W1};')+ ExpandConstant('{cm:W2};')+ ExpandConstant('{cm:W3};')+ ExpandConstant('{cm:W4};')+ ExpandConstant('{cm:W5};')+ ExpandConstant('{cm:W6};') // ExpandConstant('{cm:W7};')+ // ExpandConstant('{cm:W8};')+ // ExpandConstant('{cm:W9};') ); end; |
Отправлено: 18:24, 09-01-2016 | #1215 |
Новый участник Сообщения: 1
|
Профиль | Отправить PM | Цитировать Скрытый текст
#define MyAppName "My Program"
#define MyAppVersion "1.5" #define MyAppPublisher "My Company, Inc." #define MyAppURL "http://www.example.com/" #define MyAppExeName "MyProg.exe" //---Сюда вставлять include---\\ #include "SHFileOperation.iss"; [Setup] ; Примечание: Значение AppId идентифицирует это приложение. ; Не используйте одно и тоже значение в разных установках. ; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.) AppId={{FD7CFF3B-3C19-4FAE-A164-CA3A90B2C135} 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 [Languages] Name: "default"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "D:\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion ; Примечание: Не используйте "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] //---Сюда вставлять скрипт---\\ var BackupPage: TWizardPage; DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton; const BackupDescText = 'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\0.8.11", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.'; DeleteDescText = 'Установщик удалит все файлы в папках.'; MoveDescText = 'Установщик сделает резервную копию всех файлов в папках.'; NoneDescText = 'Установщик оставит всё как есть.'; function BackupCheck_1(): Boolean; var BackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel; begin BackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.'); BackupDescLabel:=TLabel.Create(WizardForm); BackupDescLabel.Parent:=BackupPage.Surface; BackupDescLabel.Left:=0; BackupDescLabel.Top:=0; BackupDescLabel.Width:=BackupPage.SurfaceWidth; BackupDescLabel.Height:=90; BackupDescLabel.AutoSize:=False; BackupDescLabel.Wordwrap:=True; BackupDescLabel.Caption:=BackupDescText; DeleteRadioButton:=TNewRadioButton.Create(WizardForm); DeleteRadioButton.Parent:=BackupPage.Surface; DeleteRadioButton.Checked:=False; DeleteRadioButton.Top:=95; DeleteRadioButton.Width:=BackupPage.SurfaceWidth; DeleteRadioButton.Font.Style:=[fsBold]; DeleteRadioButton.Font.Size:=9; DeleteRadioButton.Caption:='Удалить файлы' DeleteDescLabel:=TLabel.Create(WizardForm); DeleteDescLabel.Parent:=BackupPage.Surface; DeleteDescLabel.Left:=18; DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4; DeleteDescLabel.Width:=BackupPage.SurfaceWidth; DeleteDescLabel.Height:=40; DeleteDescLabel.AutoSize:=False; DeleteDescLabel.Wordwrap:=True; DeleteDescLabel.Caption:=DeleteDescText; MoveRadioButton:=TNewRadioButton.Create(WizardForm); MoveRadioButton.Parent:=BackupPage.Surface; MoveRadioButton.Checked:=True; MoveRadioButton.Top:=140; MoveRadioButton.Width:=BackupPage.SurfaceWidth; MoveRadioButton.Font.Style:=[fsBold]; MoveRadioButton.Font.Size:=9; MoveRadioButton.Caption:='Сделать резервную копию файлов' MoveDescLabel:=TLabel.Create(WizardForm); MoveDescLabel.Parent:=BackupPage.Surface; MoveDescLabel.Left:=18; MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4; MoveDescLabel.Width:=BackupPage.SurfaceWidth; MoveDescLabel.Height:=40; MoveDescLabel.AutoSize:=False; MoveDescLabel.Wordwrap:=True; MoveDescLabel.Caption:=MoveDescText; NoneRadioButton:=TNewRadioButton.Create(WizardForm); NoneRadioButton.Parent:=BackupPage.Surface; NoneRadioButton.Checked:=False; NoneRadioButton.Top:=185; NoneRadioButton.Width:=BackupPage.SurfaceWidth; NoneRadioButton.Font.Style:=[fsBold]; NoneRadioButton.Font.Size:=9; NoneRadioButton.Caption:='Ничего не трогать' NoneDescLabel:=TLabel.Create(WizardForm); NoneDescLabel.Parent:=BackupPage.Surface; NoneDescLabel.Left:=18; NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4; NoneDescLabel.Width:=BackupPage.SurfaceWidth; NoneDescLabel.Height:=40; NoneDescLabel.AutoSize:=False; NoneDescLabel.Wordwrap:=True; NoneDescLabel.Caption:=NoneDescText; end; function BackupCheck_2(): Boolean; begin If DeleteRadioButton.Checked then begin DelTree(ExpandConstant('{app}\res_mods\0.8.11'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True); CreateDir(ExpandConstant('{app}\res_mods\0.8.11')); end; end; function BackupCheck_3(): Boolean; begin If MoveRadioButton.Checked then begin MoveDir(ExpandConstant('{app}\res_mods\0.8.11\'),ExpandConstant('{app}\res_mods\backup\0.8.11')); MoveDir(ExpandConstant('{app}\res_mods\xvm\'),ExpandConstant('{app}\res_mods\backup\xvm')); CreateDir(ExpandConstant('{app}\res_mods\0.8.11')); DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True); end; end; procedure CurStepChanged(CurStep: TSetupStep); begin If CurStep=ssInstall then begin BackupCheck_2(); BackupCheck_3(); end; end; procedure InitializeWizard(); begin BackupCheck_1(); end; Скрытый текст
[Setup]
WizardSmallImageFile=C:\Users\PowerTanks\Desktop\Без имени-1.bmp WizardImageFile=D:\FFOutput\PowerTanks.bmp AppName=PowerTanks ModPack-0.9.2-Extendet AppVerName=1 DefaultDirName={code:MyDirName} Compression=lzma/max SetupIconFile=D:\Mods\Иконки проги и т.д\powertanks.ico AppId={{DE24C6EE-F032-412E-8A6D-A594EA2C8BF5} AppVersion=[2] DefaultGroupName=PowerTanks ModPack-0.9.2-Extendet [Files] //------- ваши картинки ------------ Source: 5.bmp; Flags: dontcopy nocompression Source: 6.bmp; Flags: dontcopy nocompression //------- ваши файлы ------------ Source: BELIE TRUPI\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: BT; Source: KRUG15M\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: K5; [Components] Name: BT; Description: 1.Белые трупы таков.; Name: K5; Description: 2.Круг 15м.; [code] { RedesignWizardFormBegin } // Не удалять эту строку! // Не изменять эту секцию. Она создана автоматически. var OldEvent_BackButtonClick: TNotifyEvent; procedure WizardFormCreate(Sender: TObject); forward; procedure MainPanelClick(Sender: TObject); forward; procedure PageDescriptionLabelClick(Sender: TObject); forward; procedure _BackButtonClick(Sender: TObject); forward; function MyDirName(S:String): String; var InsPath: String; er: boolean; myFile:String; begin Result:=ExpandConstant('C:\Games\World_of_Tanks\'); //если ключа нет то будем ставить сюда er := RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1EAC1D02-C6AC-4FA6-9A44-96258C37C812RU}_is1', 'InstallLocation', InsPath); if er and (InsPath<>'') then //если ключ существует и там что-то записано begin Result := InsPath; end; end; procedure RedesignWizardForm; begin with WizardForm do begin OnCreate := @WizardFormCreate; AutoScroll := False; ClientHeight := ScaleY(490); ClientWidth := ScaleX(740); end; with WizardForm.Bevel do begin Top := ScaleY(243); Width := ScaleX(457); Height := ScaleY(70); end; with WizardForm.OuterNotebook do begin Width := ScaleX(745); Height := ScaleY(457); end; with WizardForm.WizardBitmapImage do begin Width := ScaleX(740); Height := ScaleY(458); end; with WizardForm.WelcomeLabel2 do begin Caption := '' + #13#10 + ''; Left := ScaleX(744); Top := ScaleY(-23); Width := ScaleX(125); Height := ScaleY(25); end; with WizardForm.WelcomeLabel1 do begin Caption := ''; Left := ScaleX(744); Top := ScaleY(-23); Width := ScaleX(13); Height := ScaleY(25); end; with WizardForm.Bevel1 do begin Top := ScaleY(57); Width := ScaleX(523); Height := ScaleY(1); end; with WizardForm.InnerNotebook do begin Width := ScaleX(659); Height := ScaleY(357); end; with WizardForm.LicenseNotAcceptedRadio do begin Top := ScaleY(312); end; with WizardForm.LicenseAcceptedRadio do begin Top := ScaleY(292); end; with WizardForm.LicenseMemo do begin Width := ScaleX(617); Height := ScaleY(244); end; with WizardForm.DiskSpaceLabel do begin Top := ScaleY(344); Width := ScaleX(353); end; with WizardForm.DirBrowseButton do begin Left := ScaleX(574); Top := ScaleY(79); end; with WizardForm.DirEdit do begin Left := ScaleX(16); Width := ScaleX(540); end; with WizardForm.ComponentsDiskSpaceLabel do begin Top := ScaleY(344); Width := ScaleX(273); end; with WizardForm.ComponentsList do begin Width := ScaleX(657); Height := ScaleY(227); end; with WizardForm.TypesCombo do begin Width := ScaleX(657); end; with WizardForm.SelectComponentsLabel do begin Caption := 'Выберите моды которые хотите установить, и нажмите далее'; Height := ScaleY(16); end; with WizardForm.TasksList do begin Width := ScaleX(465); Height := ScaleY(240); end; with WizardForm.ReadyMemo do begin Width := ScaleX(657); Height := ScaleY(333); end; with WizardForm.ProgressGauge do begin Left := ScaleX(8); Width := ScaleX(641); end; with WizardForm.InfoAfterMemo do begin Width := ScaleX(465); Height := ScaleY(253); end; with WizardForm.MainPanel do begin Width := ScaleX(745); Height := ScaleY(66); OnClick := @MainPanelClick; end; with WizardForm.WizardSmallBitmapImage do begin Left := ScaleX(0); Top := ScaleY(3); Width := ScaleX(735); Height := ScaleY(63); end; with WizardForm.PageDescriptionLabel do begin OnClick := @PageDescriptionLabelClick; Left := ScaleX(-288); Top := ScaleY(-5); Width := ScaleX(285); Height := ScaleY(5); end; with WizardForm.PageNameLabel do begin Left := ScaleX(-104); Top := ScaleY(-14); Width := ScaleX(101); end; with WizardForm.WizardBitmapImage2 do begin Top := ScaleY(-24); Width := ScaleX(740); Height := ScaleY(484); end; with WizardForm.RunList do begin Left := ScaleX(-128); Top := ScaleY(459); Width := ScaleX(125); Height := ScaleY(62); end; with WizardForm.NoRadio do begin Left := ScaleX(736); Top := ScaleY(-7); Width := ScaleX(245); Height := ScaleY(9); Caption := ''; end; with WizardForm.YesRadio do begin Left := ScaleX(736); Top := ScaleY(459); Width := ScaleX(173); Height := ScaleY(1); Caption := ''; end; with WizardForm.FinishedLabel do begin Caption := ''; Left := ScaleX(736); Top := ScaleY(-57); Width := ScaleX(269); Height := ScaleY(59); end; with WizardForm.FinishedHeadingLabel do begin Caption := ''; Left := ScaleX(736); Top := ScaleY(-16); Width := ScaleX(213); Height := ScaleY(18); end; with WizardForm.BeveledLabel do begin Left := ScaleX(-48); Top := ScaleY(402); end; with WizardForm.CancelButton do begin Left := ScaleX(617); Top := ScaleY(463); end; with WizardForm.NextButton do begin Left := ScaleX(533); Top := ScaleY(463); end; with WizardForm.BackButton do begin Left := ScaleX(445); Top := ScaleY(463); OldEvent_BackButtonClick := OnClick; OnClick := @_BackButtonClick; end; { ReservationBegin } // Вы можете добавить ваш код здесь. { ReservationEnd } end; // Не изменять эту секцию. Она создана автоматически. { RedesignWizardFormEnd } // Не удалять эту строку! procedure NewButton1Click(Sender: TObject); begin end; procedure MainPanelClick(Sender: TObject); begin end; procedure PageDescriptionLabelClick(Sender: TObject); begin end; procedure _BackButtonClick(Sender: TObject); begin OldEvent_BackButtonClick(Sender); end; procedure WizardFormCreate(Sender: TObject); begin end; const UNDEF_INDEX = -777; function GetCursorPos(var lpPoint: TPoint): BOOL; external 'GetCursorPos@user32.dll stdcall'; var InfoPic: TBitmapImage; LastIndex: Integer; TempPath: String; procedure ShowPicHint(const PicFilePath: String); var pt: TPoint; begin if not GetCursorPos(pt) then Exit; InfoPic.Bitmap.LoadFromFile(PicFilePath); InfoPic.SetBounds(ScaleX(360), ScaleY(40), ScaleX(290), ScaleY(278)); InfoPic.Show; end; procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea); var UndefPic: String; begin if Index = -1 then Exit; if Index = LastIndex then Exit; try case TNewCheckListBox(Sender).ItemCaption[Index] of '2.Белые трупы танков.': UndefPic := '5.bmp'; // пишем точно так же, как прописано в компонентах '4.Боевое меню TRJ.': UndefPic := '6.bmp'; else begin LastIndex := UNDEF_INDEX; InfoPic.Hide; Exit; end; end; if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic); ShowPicHint(TempPath + UndefPic); finally LastIndex := Index; end; end; procedure CompOnMouseLeave(Sender: TObject); begin InfoPic.Hide; LastIndex := -1; end; procedure InitInfo(); begin WizardForm.TypesCombo.Hide; WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(40), ScaleX(310), ScaleY(278)); WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove; WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave; TempPath := AddBackslash(ExpandConstant('{tmp}')); LastIndex := UNDEF_INDEX; with TBevel.Create(WizardForm) do begin Parent := WizardForm.SelectComponentsPage; SetBounds(ScaleX(360), ScaleY(40), ScaleX(290), ScaleY(278)); Shape := bsFrame; end; InfoPic := TBitmapImage.Create(WizardForm) with InfoPic do begin Parent := WizardForm.SelectComponentsPage; AutoSize := True; end; end; procedure InitializeWizard(); begin RedesignWizardForm; InitInfo(); end; [ISFormDesigner] WizardForm=FF0A005457495A415244464F524D0030101812000054504630F10B5457697A617264466F726D0A57697A61726 4466F726D0C436C69656E7448656967687403EA010B436C69656E74576964746803E402134F6E436F6E73747261696E65645 26573697A65071057697A617264466F726D437265617465084F6E437265617465071057697A617264466F726D43726561746 50C4578706C696369744C65667402000B4578706C69636974546F7002000D4578706C69636974576964746803F4020E45787 06C696369744865696768740310020D506978656C73506572496E636802600A54657874486569676874020D00F1065442657 6656C05426576656C03546F7003F30005576964746803C9010648656967687402460B4578706C69636974546F7003F3000D4 578706C69636974576964746803C9010E4578706C6963697448656967687402460000F302010C544E65774E6F7465626F6F6 B0D4F757465724E6F7465626F6F6B05576964746803E9020648656967687403C9010D4578706C69636974576964746803E90 20E4578706C6963697448656967687403C90100F110544E65774E6F7465626F6F6B506167650B57656C636F6D65506167650 D4578706C69636974576964746803F1010E4578706C6963697448656967687403390100F10C544269746D6170496D6167651 157697A6172644269746D617 Помогите пожалуйста соединить два верхних скрипта |
Отправлено: 21:06, 09-01-2016 | #1216 |
Старожил Сообщения: 212
|
Профиль | Отправить PM | Цитировать ТимКрай, лучше изучите основы Inno Setup и используемого языка.
|
------- Отправлено: 21:43, 09-01-2016 | #1217 |
Старожил Сообщения: 284
|
Профиль | Отправить PM | Цитировать Требуется помощь опытных пользователей.
Как прописать в Inno Setup картинки .gif, имеется ввиду флаги rus и eng развиваюшиеся. Знаю что через botvy, но почему то не получается. на строке FlagImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\rus.gif')); выдает ошибку. |
Последний раз редактировалось ZVSRus, 10-01-2016 в 18:13. Отправлено: 16:44, 10-01-2016 | #1218 |
Старожил Сообщения: 212
|
Профиль | Отправить PM | Цитировать Цитата ZVSRus:
|
|
------- Отправлено: 22:53, 10-01-2016 | #1219 |
Старожил Сообщения: 284
|
Профиль | Отправить PM | Цитировать Цитата kotyarko@fb:
|
|
Отправлено: 10:21, 11-01-2016 | #1220 |
Участник сейчас на форуме | Участник вне форума | Автор темы | Сообщение прикреплено |
| |||||
Название темы | Автор | Информация о форуме | Ответов | Последнее сообщение | |
Скрипты Inno Setup. Помощь и советы [часть 7] | El Sanchez | Автоматическая установка приложений | 2499 | 02-02-2015 08:59 | |
Скрипты Inno Setup. Помощь и советы [часть 6] | El Sanchez | Автоматическая установка приложений | 2494 | 10-03-2014 11:51 | |
Скрипты Inno Setup. Помощь и советы [часть 5] | El Sanchez | Автоматическая установка приложений | 1999 | 28-03-2013 19:09 | |
Скрипты Inno Setup. Помощь и советы [часть 4] | El Sanchez | Автоматическая установка приложений | 2099 | 22-05-2012 23:16 | |
Скрипты Inno Setup. Помощь и советы [часть 3] | Serega | Автоматическая установка приложений | 3755 | 26-10-2011 17:58 |
|