|
Компьютерный форум OSzone.net » Автоматическая установка Windows » Автоматическая установка приложений » Скрипты Inno Setup. Помощь и советы [часть 9] |
|
Скрипты Inno Setup. Помощь и советы [часть 9]
|
Ветеран Сообщения: 1274 |
Внимание! Данная тема предназначена только для обсуждения написания скриптов!
Остальные вопросы, а также последние версии компилятора в теме Inno Setup. Прочие вопросы. Показать/скрыть: Справка, руководство, примеры:
Показать/скрыть: Ссылки на примеры скриптов:
Показать/скрыть: Дополнительные программы для Inno Setup:
Предыдущие ветки обсуждения по ссылкам ниже и в прикреплённых архивах: Скрипты Inno Setup. Помощь и советы [часть 6] | Скрипты Inno Setup. Помощь и советы [часть 6].7z Скрипты Inno Setup. Помощь и советы [часть 7] | Скрипты Inno Setup. Помощь и советы [часть 7].7z Скрипты Inno Setup. Помощь и советы [часть 8] | Скрипты Inno Setup. Помощь и советы [часть 8].7z |
|
Отправлено: 16:09, 04-04-2018 |
Пользователь Сообщения: 76
|
Профиль | Отправить PM | Цитировать proffbik, страницу обнови, или сетап в другое место перенеси, не может быть такого чтобы без изменений. и куда ты вообще смотришь, о какой версии говорил - свойства>подробно>версия файла? если да, то прекрасно работает Resource Tuner
|
Последний раз редактировалось Beavimo, 05-11-2024 в 13:29. Отправлено: 13:23, 05-11-2024 | #1111 |
Для отключения данного рекламного блока вам необходимо зарегистрироваться или войти с учетной записью социальной сети. Если же вы забыли свой пароль на форуме, то воспользуйтесь данной ссылкой для восстановления пароля. |
Старожил Сообщения: 292
|
Профиль | Отправить PM | Цитировать Цитата proffbik:
#define MyAppName "My Program" [Setup] AppName={#MyAppName} AppVerName={#MyAppName} DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} |
|
------- Отправлено: 15:46, 05-11-2024 | #1112 |
Пользователь Сообщения: 76
|
Профиль | Отправить PM | Цитировать почему при компиляции
код
[Setup] AppName=Test AppVerName=Test OutputBaseFilename=Test OutputDir=userdocs:..\desktop DefaultDirName={pf}\Test SetupIconFile=Test.ico Uninstallable=no это ж уже windows доставляет этот щит, или я ошибаюсь? |
Последний раз редактировалось Beavimo, 29-12-2024 в 00:04. Отправлено: 17:46, 05-11-2024 | #1113 |
Новый участник Сообщения: 8
|
Профиль | Отправить PM | Цитировать Цитата ZVSRus:
![]() |
|
Отправлено: 03:28, 06-11-2024 | #1114 |
Пользователь Сообщения: 76
|
Профиль | Отправить PM | Цитировать |
Последний раз редактировалось Beavimo, 29-12-2024 в 00:07. Отправлено: 22:20, 07-11-2024 | #1115 |
Пользователь Сообщения: 76
|
Профиль | Отправить PM | Цитировать может есть у кого пример хранения временных файлов в оперативке - для актуальной Inno Setup скачанной c оф сайта? пользуюсь sndPlaySound, и хотелось бы (.wav) файлы держать в оперативной памяти, а не в папке ТЕМП. буду рад любой помощи.
|
Последний раз редактировалось Beavimo, 10-01-2025 в 13:59. Отправлено: 12:48, 10-01-2025 | #1116 |
Новый участник Сообщения: 41
|
Профиль | Отправить PM | Цитировать Здравствуйте, уважаемые программисты!
Обращаюсь за помощью, т.к. очень хочется сделать всё красиво! Итак, есть кастомное окно с выбором языков установщика (всего 7 языков). В нём при выборе русского или английского языка, инсталлятор запускается правильно на выбранном языке, однако при выборе любого другого языка, например французский, всё время запускается последний - голландский язык установщика. 1) Как сделать, чтобы инсталлятор запускался правильно на выбранном языке? 2) Как сделать, что бы по умолчанию был выбран русский язык (это необязательно, но вдруг кто-то знает)? Очень надеюсь на Вашу помощь, заранее Огромное Спасибо! ![]() Скрипт
#include "botva2.iss" #include "BASS_Module.iss" #ifdef UNICODE #define S "W" #else #define S "A" #endif [Setup] SourceDir=. OutputDir=Setup AppName=Bugs Bunny & Taz: Time Busters AppVersion=1.0 AppPublisher=EmuGames AppCopyright=by Ma2012ks © AppPublisherURL=www.emugames.do.am AppSupportURL=www.emugames.do.am AppUpdatesURL=www.emugames.do.am DefaultDirName={pf}\Artificial Mind and Movement\Bugs Bunny™ & Taz™ - Time Busters DefaultGroupName=Artificial Mind and Movement\Bugs Bunny™ & Taz™ - Time Busters AllowNoIcons=yes InfoBeforeFile=D:\Spyro 3\Pictures\System requirements.txt InfoAfterFile=D:\Spyro 3\Pictures\Thank you for the installation!.txt OutputBaseFilename=setup WizardImageFile=D:\Spyro 3\Pictures\Image-Left.bmp WizardSmallImageFile=D:\Spyro 3\Pictures\icon-up.bmp SetupIconFile=D:\Spyro 3\Pictures\Icon.ico WindowVisible=no WindowShowCaption=no WindowResizable=no Compression=none SolidCompression=no CompressionThreads=6 DiskSpanning=yes DiskSliceSize=2100000000 SlicesPerDisk=1 RestartIfNeededByRun=no PrivilegesRequired=none ShowUndisplayableLanguages=yes UserInfoPage=yes ShowLanguageDialog=no [Languages] Name: rus; MessagesFile: compiler:Languages\Russian.isl Name: eng; MessagesFile: compiler:Languages\English.isl Name: french; MessagesFile: compiler:Languages\French.isl Name: german; MessagesFile: compiler:Languages\German.isl Name: spanish; MessagesFile: compiler:Languages\Spanish.isl Name: italian; MessagesFile: compiler:Languages\Italian.isl Name: dutch; MessagesFile: compiler:Languages\Dutch.isl [Messages] SelectLanguageTitle=Bugs Bunny & Taz: Time Busters SelectLanguageLabel=Please select installation language. Выберите язык установки. [LangOptions] rus.LanguageName=Russian eng.LanguageName=English french.LanguageName=French german.LanguageName=German spanish.LanguageName=Spanish italian.LanguageName=Italian dutch.LanguageName=Dutch [Types] Name: "full"; Description: "Полная установка" Name: "custom"; Description: "Выборочная установка"; Flags: iscustom [Tasks] Name: desktopicon; Description: Создать ярлык на рабочем столе; GroupDescription: Ярлыки: Name: pin; Description: Закрепить ярлык на панели задач; GroupDescription: Ярлыки:; Flags: unchecked Name: DirectX; Description: Обновить DirectX (Jun2010-Pack); GroupDescription: Дополнительное ПО:; Flags: checkablealone Name: Redist; Description: Установить Visual C++ 2010; GroupDescription: Дополнительное ПО:; Flags: checkablealone [Files] Source: BASS.dll; DestDir: {tmp}; Flags: dontcopy Source: CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy Source: innocallback.dll; Flags: dontcopy Source: botva2.dll; DestDir: {tmp}; Flags: dontcopy Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: "isgsg.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: Music.mp3; DestDir: {tmp}; Flags: dontcopy Source: Bass_Files\*; DestDir: {tmp}; Flags: dontcopy Source: D:\Spyro 3\Pictures\0.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\1.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\2.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\3.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\4.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\5.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\6.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\7.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\8.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\Miniature-1.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\Miniature-2.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Spyro 3\Pictures\Miniature-3.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: D:\Max\NightLection Team\CurrentProject\Bugs Bunny & Taz Time Busters\Pakovano\ALLRIGHT\*; DestDir: {app}; Check: PortableCheck; AfterInstall: ExtLog(); Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension Source: D:\Max\NightLection Team\CurrentProject\Bugs Bunny & Taz Time Busters\Pakovano\FARGUS\*; DestDir: {app}; Check: InstallerCheck; AfterInstall: ExtLog(); Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension [Icons] Name: "{group}\Bugs Bunny & Taz - Time Busters"; Filename: "{app}\Bugs Bunny & Taz - Time Busters.exe"; WorkingDir: "{app}"; Name: "{userdesktop}\Bugs Bunny & Taz - Time Busters"; Filename: "{app}\Bugs Bunny & Taz - Time Busters.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Name: "{group}\Bugs Bunny & Taz - Time Busters-Options"; Filename: "{app}\Bugs Bunny & Taz - Time Busters-Options.exe"; WorkingDir: "{app}"; Name: "{userdesktop}\Bugs Bunny & Taz - Time Busters - Options"; Filename: "{app}\Bugs Bunny & Taz - Time Busters-Options.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Name: "{group}\{cm:UninstallProgram,Bugs Bunny & Taz: Time Busters}"; Filename: "{uninstallexe}" [Run] Filename: {src}\Redistributable\DirectX Update\DXSETUP.exe; Parameters: /silent; Tasks: DirectX; StatusMsg: Обновление DirectX®... Filename: {src}\Redistributable\Redist\vcredist_x86.exe; Parameters: /q; Tasks: Redist; StatusMsg: Установка Microsoft® Visual С++ 2010 Redistributable (x86)... Description: "{cm:LaunchProgram, Bugs Bunny and Taz - Time Busters}"; Filename: "{app}\Bugs Bunny & Taz - Time Busters.exe"; WorkingDir: "{app}"; Flags: nowait postinstall skipifsilent unchecked Description: "{cm:LaunchProgram, Bugs Bunny and Taz - Time Busters-Options (настройки)}"; Filename: "{app}\Bugs Bunny & Taz - Time Busters-Options.exe"; WorkingDir: "{app}"; Flags: nowait postinstall skipifsilent unchecked [UninstallDelete] Type: filesandordirs; Name: {app} Type: filesandordirs; Name: "{localappdata}\Thinstall\*"; Type: filesandordirs; Name: "{userappdata}\Roaming\Thinstall\Bugs Bunny™ & Taz™ - Time Busters\*"; [code] #include "ExecAndWait.iss" type LCID = LongInt; function GetSystemDefaultLCID() : LCID; external 'GetSystemDefaultLCID@kernel32.dll stdcall'; var LSelectLanguageForm: TSetupForm; LBevel: TBevel; LOkButton, LCancelButton: TButton; LangCombo: TNewComboBox; LSelectLabel: TLabel; m,n,f,g,s,i,d: integer; Locale: string; rus, eng, french, german, spanish, italian, dutch: boolean; function CheckParam(s: string): boolean; var i: integer; begin for i := 0 to ParamCount do begin Result := ParamStr(i) = s; if Result then Break; end; end; procedure LangChange(Sender : TObject); begin if rus then begin m:=0; n:=1; end else begin m:=1; n:=0; f:=0; g:=0; end; case LangCombo.ItemIndex of m: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'rus'; end; n: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'eng'; end; f: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'french'; end; g: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'german'; end; s: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'spanish'; end; i: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'italian'; end; d: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'dutch'; end; end; end; procedure OkClick(Sender: TObject); begin ExecAndWait(ExpandConstant('{srcexe}'), '/LANG=' + Locale, SW_SHOW, false, 0); LSelectLanguageForm.Close; end; procedure CancelClick(Sender: TObject); begin LSelectLanguageForm.Close; end; procedure Lang; begin LSelectLanguageForm := CreateCustomForm; with LSelectLanguageForm do begin ClientWidth:= ScaleX(325); ClientHeight:= ScaleY(125); BorderIcons:= [biSystemMenu]; BorderStyle:= bsDialog; Position:= poScreenCenter; Caption:= SetupMessage(msgSelectLanguageTitle); end; LBevel := TBevel.Create(LSelectLanguageForm); with LBevel do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(0), ScaleY(82), LSelectLanguageForm.ClientWidth, ScaleY(2)); Shape:= bsTopLine; end; LSelectLabel:= TLabel.Create(LSelectLanguageForm); with LSelectLabel do begin SetBounds(ScaleX(79), ScaleY(10), ScaleX(230), ScaleY(42)); Transparent:= True; AutoSize:= False; WordWrap:= True; Parent:= LSelectLanguageForm; Caption:= SetupMessage(msgSelectLanguageLabel); end; LangCombo:= TNewComboBox.Create(LSelectLanguageForm) with LangCombo do begin SetBounds(ScaleX(79), ScaleY(45), ScaleX(230), ScaleY(21)); Parent:= LSelectLanguageForm; Style:= csDropDownList; OnChange:= @LangChange; if rus then begin Items.add('Русский / Russian') Items.add('Английский / English') Items.add('Французский / French') Items.add('Немецкий / German') Items.add('Испанский / Spanish') Items.add('Итальянский / Italian') Items.add('Голландский / Dutch') Locale:= 'rus'; Locale:= 'eng'; Locale:= 'french'; Locale:= 'german'; Locale:= 'spanish'; Locale:= 'italian'; Locale:= 'dutch'; end; ItemIndex := 0 ItemIndex := 1 ItemIndex := 2 ItemIndex := 3 ItemIndex := 4 ItemIndex := 5 ItemIndex := 6 end; LOkButton:= TButton.Create(LSelectLanguageForm); with LOkButton do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(152), ScaleY(92), ScaleX(75), ScaleY(23)); OnClick:= @OkClick; Caption:= SetupMessage(msgButtonOK); end; LCancelButton:= TButton.Create(LSelectLanguageForm); with LCancelButton do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(235), ScaleY(92), ScaleX(75), ScaleY(23)); OnClick:= @CancelClick; Caption:= Setupmessage(msgButtonCancel); end; LSelectLanguageForm.ShowModal; LSelectLanguageForm.Free; end; { RedesignWizardFormBegin } // Не удалять эту строку! // Не изменять эту секцию. Она создана автоматически. procedure RedesignWizardForm; begin with WizardForm.UserInfoSerialLabel do begin Caption := '&Installation key | Серийный номер:'; end; with WizardForm.UserInfoOrgEdit do begin Left := ScaleX(-16); Top := ScaleY(16); Visible := False; end; with WizardForm.UserInfoOrgLabel do begin Top := ScaleY(0); Width := ScaleX(0); end; with WizardForm.UserInfoNameEdit do begin Top := ScaleY(68); end; with WizardForm.UserInfoNameLabel do begin Caption := '&Username | Имя пользователя:'; Top := ScaleY(52); end; { ReservationBegin } // Вы можете добавить ваш код здесь. { ReservationEnd } end; // Не изменять эту секцию. Она создана автоматически. { RedesignWizardFormEnd } // Не удалять эту строку! var ComponentPage : TWizardPage; InstallGroupBox : TNewGroupBox; Installer : TNewRadioButton; Portable : TNewRadioButton; var ProgressLabel: TLabel; procedure ExtLog(); begin SaveStringToFile(ExpandConstant('{tmp}\setup.log'), #13#10 + GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':') + ' - ' + ExpandConstant(CurrentFileName), True); with WizardForm.ProgressGauge do ProgressLabel.Caption:= IntToStr((Position-Min)/((Max - Min)/100)) + '%'; end; const AW_BLEND = $00080000; AW_HIDE = $00010000; const WM_NCLBUTTONDOWN = $00A1; HTCAPTION = 2; WM_NCMOUSEMOVE = $00A0; GWL_EXSTYLE = -20; WS_EX_LAYERED = $80000; LWA_ALPHA = 2; TransparentPercent = 50; function CheckSerial(Serial: String): Boolean; begin Result := Serial = '{#437430218}'; end; function InstallerCheck: Boolean; begin Result := Installer.Checked; end; function PortableCheck: Boolean; begin Result := Portable.Checked; end; const LOAD_LIBRARY_AS_DATAFILE = $2; #define A = (Defined UNICODE) ? "W" : "A" function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall'; function SetLayeredWindowAttributes(hwnd: HWND; crKey: TColor; bAlpha: BYTE; dwFlags: DWORD): Boolean; external 'SetLayeredWindowAttributes@user32.dll stdcall'; function LoadLibraryEx(lpFileName: String; hFile: THandle; dwFlags: DWORD): THandle; external 'LoadLibraryEx{#A}@kernel32.dll stdcall'; function LoadString(hInstance: THandle; uID: SmallInt; var lpBuffer: Char; nBufferMax: Integer): Integer; external 'LoadString{#A}@user32.dll stdcall'; function SHGetNewLinkInfo(pszLinkTo, pszDir: String; var pszName: Char; var pfMustCopy: Longint; uFlags: UINT): BOOL; external 'SHGetNewLinkInfo{#A}@shell32.dll stdcall'; function PinToTaskbar(const szFilename: String; IsPin: Boolean): Boolean; var hInst: THandle; buf: array [0..255] of Char; i, res: Integer; strLnk, strVerb: String; objShell, colVerbs: Variant; begin Result := False; if (GetWindowsVersion < $06010000) or not FileExists(szFilename) then Exit; { below Windows 7 } { String resources } if IsPin then begin if SHGetNewLinkInfo(szFilename, ExpandConstant('{tmp}'), buf[0], res, 0) then begin while buf[Length(strLnk)] <> #0 do Insert(buf[Length(strLnk)], strLnk, Length(strLnk)+1); if FileExists(ExpandConstant('{userappdata}\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\') + ExtractFileName(strLnk)) then Exit; end; res := 5386; { Pin to Tas&kbar } end else res := 5387; { Unpin from Tas&kbar } { Load string resource } hInst := LoadLibraryEx(ExpandConstant('{sys}\shell32.dll'), 0, LOAD_LIBRARY_AS_DATAFILE); if hInst <> 0 then try for i := 0 to LoadString(hInst, res, buf[0], 255)-1 do Insert(buf[i], strVerb, i+1); try objShell := CreateOleObject('Shell.Application'); colVerbs := objShell.Namespace(ExtractFileDir(szFilename)).ParseName(ExtractFileName(szFilename)).Verbs; for i := 1 to colVerbs.Count do if CompareText(colVerbs.Item[i].Name, strVerb) = 0 then begin colVerbs.Item[i].DoIt; Result := True; Break; end; except Exit; end; finally FreeDLL(hInst); end; end; type TTimerProc = procedure(HandleW, Msg, idEvent, TimeSys: LongWord); var PercentsTimer: LongWord; PercentsLabel: TLabel; function WrapTimerProc(callback: TTimerProc; Paramcount: Integer): longword; external 'wrapcallback@files:innocallback.dll stdcall'; function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): longword; external 'SetTimer@user32'; function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32 stdcall delayload'; Function NumToStr(Float: Extended): String; Begin Result:= Format('%.1n', [Float]); StringChange(Result, ',', '.'); while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do SetLength(Result, Length(Result)-1); End; Procedure PercentsProc(h, msg, idevent, dwTime: Longword); Begin with WizardForm.ProgressGauge do begin PercentsLabel.Caption:= 'Выполнено ' + NumToStr((Position*100)/Max) + ' %'; end; End; const Indent=25; function AppendMenu(hMenu: HMENU; uFlags, uIDNewItem: UINT; lpNewItem: PChar): BOOL; external 'AppendMenuA@user32.dll stdcall'; function GetSystemMenu(hWnd: HWND; bRevert: BOOL): HMENU; external 'GetSystemMenu@user32.dll stdcall'; function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall delayload'; function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boo lean; external 'ssInitialize@files:isgsg.dll stdcall delayload'; procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload'; procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload'; procedure ssAddImage(FileName:PChar); external 'ssAddImage@files:isgsg.dll stdcall delayload'; procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload'; procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload'; 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'; function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload'; procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall'; procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall'; function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall'; function AnimateWindow(hWnd: HWND; dwTime: DWORD; dwFlags: DWORD): Boolean; external 'AnimateWindow@user32 stdcall'; procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean); begin Confirm := False; end; procedure RunListClickCheck(Sender: TObject); var i:integer; begin if WizardForm.RunList.Checked[WizardForm.RunList.ItemIndex] then begin for i:=0 to WizardForm.RunList.Items.Count-1 do WizardForm.RunList.Checked[i]:=False; WizardForm.RunList.Checked[WizardForm.RunList.ItemIndex]:=True; end; end; procedure EnableTransparencyOnDrag(var Msg: TMsg; var Handled: Boolean); begin if (Msg.message = WM_NCLBUTTONDOWN) and (Msg.wParam = HTCAPTION) then begin SetWindowLong(WizardForm.Handle, GWL_EXSTYLE, GetWindowLong(WizardForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED); SetLayeredWindowAttributes(WizardForm.Handle, 0, (255 * TransparentPercent) / 100, LWA_ALPHA); Handled := False; end; if Msg.message = WM_NCMOUSEMOVE then begin SetWindowLong(WizardForm.Handle, GWL_EXSTYLE, GetWindowLong(WizardForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED); SetLayeredWindowAttributes(WizardForm.Handle, 0, 255, LWA_ALPHA); Handled := False; end; end; function InitializeSetup:boolean; begin ExtractTemporaryFile('steam.cjstyles'); LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', ''); Result:=True; begin if GetSystemDefaultLCID = 1049 then rus:= True; if CheckParam('/LANG=rus') or CheckParam('/LANG=eng') or CheckParam('/LANG=french') or CheckParam('/LANG=german') or CheckParam('/LANG=spanish') or CheckParam('/LANG=italian') or CheckParam('/LANG=dutch') then eng:= True; if not eng then begin Lang; Result:= False; end else Result:= True; end; end; procedure InitializeWizard; begin Application.OnMessage:=@EnableTransparencyOnDrag; RedesignWizardForm; if not AppendMenu(GetSystemMenu(Wizardform.Handle, True), 200, 0, SetupMessage(msgAboutSetupMenuItem)) then WizardForm.Position:= poScreenCenter; begin ComponentPage := CreateCustomPage(wpInfoBefore, 'ЛОКАЛИЗАЦИЯ', 'Выберите...'); { InstallGroupBox } InstallGroupBox := TNewGroupBox.Create(WizardForm); with InstallGroupBox do begin Parent := ComponentPage.Surface; SetBounds(ScaleX(0),ScaleY(0),ScaleX(380),ScaleY(70)); Caption := 'Локализация:'; end; { Portable } Portable := TNewRadioButton.Create(WizardForm); with Portable do begin Parent := ComponentPage.Surface; SetBounds(ScaleX(9),ScaleY(19),ScaleX(360),ScaleY(17)); Caption := 'Русская версия (текст) | Multi5 (перевод студии «All Right»)'; end; { Installer } Installer := TNewRadioButton.Create(WizardForm); with Installer do begin Parent := ComponentPage.Surface; SetBounds(ScaleX(9),ScaleY(43),ScaleX(365),ScaleY(17)); Caption := 'Полная русская версия (текст+звук) | Multi5 («Paradox», «Фаргус»)'; Checked := True; end; begin ProgressLabel := TLabel.Create(WizardForm); with WizardForm.ProgressGauge do begin ProgressLabel.Top := Top + Height + ScaleY(8); ProgressLabel.Left:= Left + Width/2 - ScaleX(8); ProgressLabel.Caption := '0%'; ProgressLabel.AutoSize := True; ProgressLabel.Parent := WizardForm.InstallingPage; end; begin WizardForm.RunList.OnClickCheck:=@RunListClickCheck; ExtractTemporaryFile('Miniature-1.png'); ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Miniature-1.png',6000,3000,2000,0,255,False,$FFFFFF,10); ExtractTemporaryFile('Miniature-2.png'); ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Miniature-2.png',3000,2000,1000,0,255,False,$FFFFFF,10); ExtractTemporaryFile('Miniature-3.png'); ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Miniature-3.png',6000,3000,2000,0,255,False,$FFFFFF,10); ssInitialize(GetWindowLong(MainForm.Handle,-8),15,True,1,$FF000000); ExtractTemporaryFile('0.png'); ssSetBkgImage(ExpandConstant('{tmp}')+'\0.png'); WizardForm.TypesCombo.ItemIndex:=0; WizardForm.BeveledLabel.Enabled:=True; begin ExtractTemporaryFile('Bass.dll'); ExtractTemporaryFile('CallbackCtrl.dll'); ExtractTemporaryFile('botva2.dll'); ExtractTemporaryFile('volmax.png'); ExtractTemporaryFile('volmin.png'); ExtractTemporaryFile('volpb.png'); ExtractTemporaryFile('voldote.png'); ExtractTemporaryFile('Music.mp3'); ExtractTemporaryFile('MusicButton.png'); BASS_Init('{tmp}\Music.mp3') BASS_CreateMediaPlayer(WizardForm, '{tmp}\volmax.png', '{tmp}\volmin.png', '{tmp}\volpb.png', '{tmp}\voldote.png', 70, 325) BASS_CreateOnOffButton(WizardForm, '{tmp}\MusicButton.png', 20, 320, 36, 36, 4) begin PercentsLabel:= TLabel.Create(WizardForm); with PercentsLabel do begin Left:= WizardForm.ProgressGauge.Left; Top:= WizardForm.ProgressGauge.Top + WizardForm.ProgressGauge.Height + ScaleY(10); Width:= WizardForm.StatusLabel.Width; Height:= WizardForm.StatusLabel.Height; AutoSize:= False; Transparent := True; Parent:= WizardForm.InstallingPage; end; end; end; end; end; end; end; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep=ssInstall then begin PercentsTimer:= SetTimer(0, 0, 100, WrapTimerProc(@PercentsProc, 4)); ExtractTemporaryFile('1.png'); ssAddImage(ExpandConstant('{tmp}')+'\1.png'); ExtractTemporaryFile('2.png'); ssAddImage(ExpandConstant('{tmp}')+'\2.png'); ExtractTemporaryFile('3.png'); ssAddImage(ExpandConstant('{tmp}')+'\3.png'); ExtractTemporaryFile('4.png'); ssAddImage(ExpandConstant('{tmp}')+'\4.png'); ExtractTemporaryFile('5.png'); ssAddImage(ExpandConstant('{tmp}')+'\5.png'); ExtractTemporaryFile('6.png'); ssAddImage(ExpandConstant('{tmp}')+'\6.png'); ExtractTemporaryFile('7.png'); ssAddImage(ExpandConstant('{tmp}')+'\7.png') ExtractTemporaryFile('8.png'); ssAddImage(ExpandConstant('{tmp}')+'\8.png') ssStartShow; end; if CurStep=ssPostInstall then ssStopShow; end; procedure CurPageChanged(CurPageID: Integer); begin WizardForm.TypesCombo.Hide; if IsTaskSelected('Pin') then PinToTaskbar(ExpandConstant('{app}\Bugs Bunny & Taz - Time Busters-Options.exe'), True); if CurPageID=wpInstalling then begin WizardForm.MainPanel.Visible:=False; WizardForm.Bevel1.Visible:=False; WizardForm.Width:=ScaleX(395); WizardForm.Height:=ScaleY(142); WizardForm.Left:=ScaleX(GetSystemMetrics(0)-WizardForm.Width-Indent); WizardForm.Top:=ScaleY(GetSystemMetrics(1)-WizardForm.Height-Indent); WizardForm.InnerNotebook.Left:=ScaleX(10); WizardForm.InnerNotebook.Top:=ScaleY(10); WizardForm.InnerNotebook.Width:=ScaleX(370); 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(20); WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width; WizardForm.ProgressGauge.Top:=ScaleY(40); WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width; WizardForm.CancelButton.Left:=ScaleX(154); WizardForm.CancelButton.Top:=ScaleY(80); end; if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then begin WizardForm.RunList.Checked[0]:=True; if WizardForm.Width<>502 then begin WizardForm.Visible:=False; WizardForm.Width:=ScaleX(502); WizardForm.Height:=ScaleY(392); WizardForm.Left:=(GetSystemMetrics(0)-WizardForm.Width) div 2; WizardForm.Top:=(GetSystemMetrics(1)-WizardForm.Height) div 2; WizardForm.MainPanel.Visible:=True; WizardForm.Bevel1.Visible:=True; WizardForm.InnerNotebook.Left:=ScaleX(40); WizardForm.InnerNotebook.Top:=ScaleY(72); WizardForm.InnerNotebook.Width:=ScaleX(417); WizardForm.Visible:=True; end; end; end; function NextButtonClick(CurPageID: Integer): Boolean; begin Result := True; if CurPageID=wpFinished then begin if WizardForm.RunList.Checked[0] then Result := True; end; end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin case CurUninstallStep of usUninstall: begin PinToTaskbar(ExpandConstant('{app}\Bugs Bunny & Taz - Time Busters-Options.exe'), False); end; end; end; procedure DeinitializeSetup; begin if ExpandConstant('{wizardhwnd}') = '0' then Exit; KillTimer(0, PercentsTimer); ShowWindow(WizardForm.Handle,0); UnloadSkin(); ssDeInitialize; BASS_DeInit; gdipShutdown end; |
Последний раз редактировалось OldGamer, 11-01-2025 в 12:23. Отправлено: 12:14, 11-01-2025 | #1117 |
![]() Ветеран Сообщения: 863
|
Профиль | Отправить PM | Цитировать OldGamer, Можете сделать скрипт без модулей, без файлов и прочих функций не относящихся к кастомному окну выбора языка? Сложновато ванговать)
Но попытаюсь: Цитата OldGamer:
Цитата OldGamer:
|
||
------- Отправлено: 12:43, 11-01-2025 | #1118 |
Новый участник Сообщения: 41
|
Профиль | Отправить PM | Цитировать Цитата Dodakaedr:
Вот скрипт с применённым стилем Steam и выбором языков, постарался убрать всё лишнее: картинки, различные эффекты и т.п. "чистый" скрипт
#ifdef UNICODE #define S "W" #else #define S "A" #endif [Setup] SourceDir=. OutputDir=Setup AppName=Bugs Bunny & Taz: Time Busters AppVerName=Bugs Bunny & Taz: Time Busters AppVersion=Bugs Bunny & Taz: Time Busters AppPublisher=EmuGames AppCopyright=by Ma2012ks © AppPublisherURL=www.emugames.do.am AppSupportURL=www.emugames.do.am AppUpdatesURL=www.emugames.do.am DefaultDirName={pf}\Bugs Bunny™ & Taz™ - Time Busters DefaultGroupName=Bugs Bunny & Taz Time Busters AllowNoIcons=yes OutputBaseFilename=setup WindowVisible=no WindowShowCaption=no WindowResizable=no Compression=none DiskSpanning=yes DiskSliceSize=2100000000 SlicesPerDisk=1 ShowLanguageDialog=no [Languages] Name: eng; MessagesFile: compiler:Languages\English.isl Name: french; MessagesFile: compiler:Languages\French.isl Name: german; MessagesFile: compiler:Languages\German.isl Name: spanish; MessagesFile: compiler:Languages\Spanish.isl Name: italian; MessagesFile: compiler:Languages\Italian.isl Name: dutch; MessagesFile: compiler:Languages\Dutch.isl Name: rus; MessagesFile: compiler:Languages\Russian.isl [Messages] SelectLanguageTitle=Bugs Bunny & Taz: Time Busters SelectLanguageLabel=Please select installation language. Выберите язык установки. [LangOptions] eng.LanguageName=English french.LanguageName=French german.LanguageName=German spanish.LanguageName=Spanish italian.LanguageName=Italian dutch.LanguageName=Dutch rus.LanguageName=Russian [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" [Files] Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: "D:\Max\NightLection Team\CurrentProject\Bugs Bunny & Taz Time Busters\Pakovano\FARGUS\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension [Icons] Name: "{group}\Bugs Bunny & Taz: - Time Busters"; Filename: "{app}\Bugs Bunny & Taz - Time Busters.exe"; WorkingDir: "{app}"; Name: "{userdesktop}\Bugs Bunny & Taz: - Time Busters"; Filename: "{app}\Bugs Bunny & Taz - Time Busters.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Name: "{group}\Bugs Bunny & Taz - Time Busters - Options"; Filename: "{app}\Bugs Bunny & Taz - Time Busters-Options.exe"; WorkingDir: "{app}"; Name: "{userdesktop}\Bugs Bunny & Taz - Time Busters - Options"; Filename: "{app}\Bugs Bunny & Taz - Time Busters-Options.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Name: "{group}\{cm:UninstallProgram,Bugs Bunny & Taz: Time Busters}"; Filename: "{uninstallexe}" [Run] Description: "{cm:LaunchProgram, Bugs Bunny & Taz: - Time Busters}"; Filename: "{app}\Bugs Bunny & Taz - Time Busters.exe"; WorkingDir: "{app}"; Flags: nowait postinstall skipifsilent unchecked Description: "{cm:LaunchProgram, Bugs Bunny & Taz - Time Busters - Options}"; Filename: "{app}\Bugs Bunny & Taz - Time Busters-Options.exe"; WorkingDir: "{app}"; Flags: nowait postinstall skipifsilent unchecked [UninstallDelete] Type: filesandordirs; Name: "{app}" [code] #include "ExecAndWait.iss" procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall'; procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall'; type LCID = LongInt; function GetSystemDefaultLCID() : LCID; external 'GetSystemDefaultLCID@kernel32.dll stdcall'; var LSelectLanguageForm: TSetupForm; LBevel: TBevel; LOkButton, LCancelButton: TButton; LangCombo: TNewComboBox; LSelectLabel: TLabel; m,n,f,g,s,i,d: integer; Locale: string; rus, eng, french, german, spanish, italian, dutch: boolean; function CheckParam(s: string): boolean; var i: integer; begin for i := 0 to ParamCount do begin Result := ParamStr(i) = s; if Result then Break; end; end; procedure LangChange(Sender : TObject); begin if rus then begin m:=0; n:=1; end else begin m:=1; n:=0; f:=0; g:=0; end; case LangCombo.ItemIndex of m: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'rus'; end; n: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'eng'; end; f: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'french'; end; g: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'german'; end; s: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'spanish'; end; i: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'italian'; end; d: begin with LSelectLanguageForm do begin LSelectLabel.Caption:= 'Please select installation language. Выберите язык установки.'; LSelectLanguageForm.Caption:= 'Bugs Bunny & Taz: Time Busters'; LCancelButton.Caption := 'Отмена'; LOkButton.Caption:= 'ОК'; end; Locale:= 'dutch'; end; end; end; procedure OkClick(Sender: TObject); begin ExecAndWait(ExpandConstant('{srcexe}'), '/LANG=' + Locale, SW_SHOW, false, 0); LSelectLanguageForm.Close; end; procedure CancelClick(Sender: TObject); begin LSelectLanguageForm.Close; end; procedure Lang; begin LSelectLanguageForm := CreateCustomForm; with LSelectLanguageForm do begin ClientWidth:= ScaleX(325); ClientHeight:= ScaleY(125); BorderIcons:= [biSystemMenu]; BorderStyle:= bsDialog; Position:= poScreenCenter; Caption:= SetupMessage(msgSelectLanguageTitle); end; LBevel := TBevel.Create(LSelectLanguageForm); with LBevel do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(0), ScaleY(82), LSelectLanguageForm.ClientWidth, ScaleY(2)); Shape:= bsTopLine; end; LSelectLabel:= TLabel.Create(LSelectLanguageForm); with LSelectLabel do begin SetBounds(ScaleX(79), ScaleY(10), ScaleX(230), ScaleY(42)); Transparent:= True; AutoSize:= False; WordWrap:= True; Parent:= LSelectLanguageForm; Caption:= SetupMessage(msgSelectLanguageLabel); end; LangCombo:= TNewComboBox.Create(LSelectLanguageForm) with LangCombo do begin SetBounds(ScaleX(79), ScaleY(45), ScaleX(230), ScaleY(21)); Parent:= LSelectLanguageForm; Style:= csDropDownList; OnChange:= @LangChange; if rus then begin Items.add('Русский / Russian') Items.add('Английский / English') Items.add('Французский / French') Items.add('Немецкий / German') Items.add('Испанский / Spanish') Items.add('Итальянский / Italian') Items.add('Голландский / Dutch') Locale:= 'rus'; Locale:= 'eng'; Locale:= 'french'; Locale:= 'german'; Locale:= 'spanish'; Locale:= 'italian'; Locale:= 'dutch'; end; ItemIndex := 0 ItemIndex := 1 ItemIndex := 2 ItemIndex := 3 ItemIndex := 4 ItemIndex := 5 ItemIndex := 6 end; LOkButton:= TButton.Create(LSelectLanguageForm); with LOkButton do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(152), ScaleY(92), ScaleX(75), ScaleY(23)); OnClick:= @OkClick; Caption:= SetupMessage(msgButtonOK); end; LCancelButton:= TButton.Create(LSelectLanguageForm); with LCancelButton do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(235), ScaleY(92), ScaleX(75), ScaleY(23)); OnClick:= @CancelClick; Caption:= Setupmessage(msgButtonCancel); end; LSelectLanguageForm.ShowModal; LSelectLanguageForm.Free; end; function InitializeSetup:boolean; begin ExtractTemporaryFile('steam.cjstyles'); LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', ''); Result:=True; begin if GetSystemDefaultLCID = 1049 then rus:= True; if CheckParam('/LANG=rus') or CheckParam('/LANG=eng') or CheckParam('/LANG=french') or CheckParam('/LANG=german') or CheckParam('/LANG=spanish') or CheckParam('/LANG=italian') or CheckParam('/LANG=dutch') then eng:= True; if not eng then begin Lang; Result:= False; end else Result:= True; end; end; const dURL=2; var URLLabel,URLLabelShadow:TLabel; function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall'; procedure URLLabelClick(Sender: TObject); var ErrorCode:integer; begin ShellExec('open','www.emugames.do.am','','',SW_SHOWNORMAL,ewNoWait,ErrorCode); end; procedure URLLabelMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer); begin URLLabel.Top:=URLLabel.Top+dURL; URLLabel.Left:=URLLabel.Left+dURL; URLLabel.Font.Style:=URLLabel.Font.Style+[fsUnderline]; URLLabel.Font.Color:=$50B5C4; URLLabelShadow.Visible:=False; end; procedure URLLabelMouseUp(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer); begin URLLabel.Top:=URLLabel.Top-dURL; URLLabel.Left:=URLLabel.Left-dURL; URLLabel.Font.Style:=URLLabel.Font.Style-[fsUnderline]; URLLabel.Font.Color:=$708A7A; URLLabelShadow.Visible:=True; end; procedure RunListClickCheck(Sender: TObject); var i:integer; begin if WizardForm.RunList.Checked[WizardForm.RunList.ItemIndex] then begin for i:=0 to WizardForm.RunList.Items.Count-1 do WizardForm.RunList.Checked[i]:=False; WizardForm.RunList.Checked[WizardForm.RunList.ItemIndex]:=True; end; end; procedure InitializeWizard; begin WizardForm.RunList.OnClickCheck:=@RunListClickCheck; URLLabelShadow:=TLabel.Create(WizardForm); with URLLabelShadow do begin Top:=ScaleY(331); Left:=ScaleX(25); Caption:='www.emugames.do.am'; AutoSize:=True; Parent:=WizardForm; Transparent:=True; Font.Color:=$041207; Font.Size:=9; Font.Style:=Font.Style+[fsBold]; end; URLLabel:=TLabel.Create(WizardForm); with URLLabel do begin Top:=ScaleY(331)-dURL; Left:=ScaleX(25)-dURL; Caption:='www.emugames.do.am'; AutoSize:=True; Parent:=WizardForm; Cursor:=crHand; Transparent:=True; Font.Color:=$708A7A; Font.Size:=9; Font.Style:=Font.Style+[fsBold]; BringToFront; OnClick:=@URLLabelClick; OnMouseDown:=@URLLabelMouseDown; OnMouseUp:=@URLLabelMouseUp; end; WizardForm.BeveledLabel.Enabled:=True; end; procedure CurPageChanged(CurPageID: Integer); begin if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then WizardForm.RunList.Checked[0]:=True; end; procedure DeinitializeSetup; begin ShowWindow(WizardForm.Handle,0); UnloadSkin(); end; Цитата Dodakaedr:
Цитата Dodakaedr:
|
|||
Последний раз редактировалось OldGamer, 11-01-2025 в 15:25. Отправлено: 15:12, 11-01-2025 | #1119 |
![]() Ветеран Сообщения: 863
|
Профиль | Отправить PM | Цитировать Цитата OldGamer:
Цитата OldGamer:
Цитата OldGamer:
вот чистый код кастомного окна выбора языка скрипт
#include "Execandwait.iss" [Setup] SourceDir=. OutputDir=Setup AppName=Bugs Bunny & Taz: Time Busters AppVerName=Bugs Bunny & Taz: Time Busters DefaultDirName={pf}\Bugs Bunny™ & Taz™ - Time Busters ShowLanguageDialog=no [Languages] Name: eng; MessagesFile: compiler:Languages\English.isl Name: french; MessagesFile: compiler:Languages\French.isl Name: german; MessagesFile: compiler:Languages\German.isl Name: spanish; MessagesFile: compiler:Languages\Spanish.isl Name: italian; MessagesFile: compiler:Languages\Italian.isl Name: dutch; MessagesFile: compiler:Languages\Dutch.isl Name: rus; MessagesFile: compiler:Languages\Russian.isl [Messages] SelectLanguageTitle=Bugs Bunny & Taz: Time Busters SelectLanguageLabel=Please select installation language. Выберите язык установки. [code] var LSelectLanguageForm: TSetupForm; LBevel: TBevel; LOkButton, LCancelButton: TButton; LangCombo: TNewComboBox; LSelectLabel: TLabel; Locale: string; procedure LangChange(Sender : TObject); begin case LangCombo.ItemIndex of 0: Locale := 'rus'; 1: Locale := 'eng'; 2: Locale := 'french'; 3: Locale := 'german'; 4: Locale := 'spanish'; 5: Locale := 'italian'; 6: Locale := 'dutch'; end; end; procedure OkClick(Sender: TObject); begin ExecAndWait(ExpandConstant('{srcexe}'), '/LANG=' + Locale, SW_SHOW, false, 0); LSelectLanguageForm.Close; end; procedure CancelClick(Sender: TObject); begin LSelectLanguageForm.Close; end; procedure Lang; begin LSelectLanguageForm := CreateCustomForm; with LSelectLanguageForm do begin ClientWidth:= ScaleX(325); ClientHeight:= ScaleY(125); BorderIcons:= [biSystemMenu]; BorderStyle:= bsDialog; Position:= poScreenCenter; Caption:= SetupMessage(msgSelectLanguageTitle); end; LBevel := TBevel.Create(LSelectLanguageForm); with LBevel do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(0), ScaleY(82), LSelectLanguageForm.ClientWidth, ScaleY(2)); Shape:= bsTopLine; end; LSelectLabel:= TLabel.Create(LSelectLanguageForm); with LSelectLabel do begin SetBounds(ScaleX(79), ScaleY(10), ScaleX(230), ScaleY(42)); Transparent:= True; AutoSize:= False; WordWrap:= True; Parent:= LSelectLanguageForm; Caption:= SetupMessage(msgSelectLanguageLabel); end; LangCombo:= TNewComboBox.Create(LSelectLanguageForm) with LangCombo do begin SetBounds(ScaleX(79), ScaleY(45), ScaleX(230), ScaleY(21)); Parent:= LSelectLanguageForm; Style:= csDropDownList; OnChange:= @LangChange; Items.add('Русский / Russian') //0 Items.add('Английский / English') //1 Items.add('Французский / French') //2 Items.add('Немецкий / German') //3 Items.add('Испанский / Spanish') //4 Items.add('Итальянский / Italian') //5 Items.add('Голландский / Dutch') //6 ItemIndex := 0 end; LOkButton:= TButton.Create(LSelectLanguageForm); with LOkButton do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(152), ScaleY(92), ScaleX(75), ScaleY(23)); OnClick:= @OkClick; Caption:= SetupMessage(msgButtonOK); end; LCancelButton:= TButton.Create(LSelectLanguageForm); with LCancelButton do begin Parent:= LSelectLanguageForm; SetBounds(ScaleX(235), ScaleY(92), ScaleX(75), ScaleY(23)); OnClick:= @CancelClick; Caption:= Setupmessage(msgButtonCancel); end; LSelectLanguageForm.ShowModal; LSelectLanguageForm.Free; end; function InitializeSetup:boolean; begin Result := False; if Pos(AnsiLowercase('/LANG='), AnsiLowercase(GetCmdTail)) > 0 then Result := true else Lang; end; P.S. советую оформлять код в легко читабельном виде, а то у вас какой-то "водопад" получился. |
|||
------- Последний раз редактировалось Dodakaedr, 11-01-2025 в 17:04. Отправлено: 16:46, 11-01-2025 | #1120 |
![]() |
Участник сейчас на форуме |
![]() |
Участник вне форума |
![]() |
Автор темы |
![]() |
Сообщение прикреплено |
| |||||
Название темы | Автор | Информация о форуме | Ответов | Последнее сообщение | |
Скрипты 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 |
|