F1nder 4 #526036 Posted September 6, 2022 Just now, Qirashi said: Да искал уже... Тишина, ничего подобного нет. Но вроде у Джова в установщике было похожее, даже не лагало) Там оно реализовано как-то через dll если я не ошибаюсь. Щас посмотрю. @Qirashi У Джова оно сделано через botva botva2.dll Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #526053 Posted September 6, 2022 Не знаешь у кого можно заказать? Quote Share this post Link to post Short link Share on other sites
F1nder 4 #526054 Posted September 6, 2022 1 minute ago, Qirashi said: Не знаешь у кого можно заказать? Я не анализировал рынок. Но попробуй либо здесь сделать тему и тебе сами напишут либо спроси в теме у кого можно заказать)) Quote Share this post Link to post Short link Share on other sites
yepev 259 #526055 Posted September 6, 2022 @Qirashi здесь сделай тему, возможно найдётся желающий. Quote Share this post Link to post Short link Share on other sites
StranikS_Scan 4,150 #526066 Posted September 6, 2022 2 часа назад, Qirashi сказал: Уже использовал этот код, с ним есть огромный минус. Невозможно сделать нормальные фотографии к модам, их просто не видно из-за маленького размера. Так там в коде легко меняются размеры, выводимого окна и элементов на нем: 1 Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #526068 Posted September 6, 2022 9 минут назад, StranikS_Scan сказал: Так там в коде легко меняются размеры, выводимого окна и элементов на нем: Мне этого оказалось недостаточно( 1 час назад, yepev сказал: @Qirashi здесь сделай тему, возможно найдётся желающий. Спасибо! Quote Share this post Link to post Short link Share on other sites
F1nder 4 #526089 Posted September 6, 2022 Еще хотел бы спросить вопрос. Хотел сделать поиск клиента через Combobox. Сделал. Теперь не компилируется. Вылазит такая кракозябра. Что делать? Код прилагается. Буду признателен ; Скрипт создан через Мастер Inno Setup Script. ; ИСПОЛЬЗУЙТЕ ДОКУМЕНТАЦИЮ ДЛЯ ПОДРОБНОСТЕЙ ИСПОЛЬЗОВАНИЯ INNO SETUP! #define MyAppName "Модпак от F1nder 1.18.0.0 - 0" #define MyAppVersion "0" #define MyAppPublisher "F1nder YT" #define MyAppURL "https://openvk.su/club2271" #define Patch "1.18.0.0" #include "BackUpPage.iss" #include "Components.iss" #include "faq.iss" #include "InnoExtensions.iss" [Setup] ; Примечание: Значение AppId идентифицирует это приложение. ; Не используйте одно и тоже значение в разных установках. ; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.) AppId={{CCA4D068-372F-45ED-AE39-C4A37A19D64C} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName=C:\ DefaultGroupName={#MyAppName} InfoAfterFile=C:\Users\A4ivi4\Desktop\modpack\author.rtf OutputBaseFilename=ModPack_by_F1nder_#0 - 1.18.0.0 SetupIconFile=C:\Users\A4ivi4\Desktop\modpack\Files\wot_ico.ico Compression=lzma2/ultra64 InternalCompressLevel=ultra64 SolidCompression=yes UninstallFilesDir={app}\F1nder_ModPack SetupLogging=yes DirExistsWarning=false CreateAppDir=true AppendDefaultDirName=false ShowLanguageDialog=true DisableProgramGroupPage=true Uninstallable=true DisableDirPage=false [Languages] Name: "default"; MessagesFile: "compiler:Default.isl" [CustomMessages] IsAppRunningLabel=Клиент игры World of Tanks в настоящее время запущен. Для подолжения установки необходимо закрыть клиент! wotNotFound=Клиент игры не был найден в этой папке. Установка невозможна Path=1.18.0.0 [Files] Source: "dll\xvmextensions.dll"; DestName: xvmextensions.dll; Flags: dontcopy; Source: "dll\bass.dll"; Flags: dontcopy; Source: "dll\unmerg_f.dll"; Flags: dontcopy; [Code] var WotList: TNewComboBox; Buffer: String; procedure WotList_Update(); var ClientsCount, Index, ListIndex: Integer; Str: String; begin ListIndex := WotList.ItemIndex; ClientsCount := WOT_GetClientsCount(); WotList.Items.Clear(); if ClientsCount > 0 then begin for Index := 0 to ClientsCount - 1 do begin WOT_GetClientVersionW(Buffer, 1024, Index); Str := Copy(Buffer, 0, Pos(#0, Buffer)); Insert(' [', Str, Pos(#0, Str)); case WOT_GetClientWgcFlavour(Index) of 1: Insert('WG/', Str, Pos(#0, Str)); 2: Insert('360/', Str, Pos(#0, Str)); 3: Insert('Steam/', Str, Pos(#0, Str)); end; case WOT_GetClientBranch(Index) of 1: Insert('Release', Str, Pos(#0, Str)); 2: Insert('CT', Str, Pos(#0, Str)); 3: Insert('ST', Str, Pos(#0, Str)); 4: Insert('SB', Str, Pos(#0, Str)); end; Insert('] - ', Str, Pos(#0, Str)); WOT_GetClientPathW(Buffer, 1024, Index); Insert(Buffer, Str, Pos(#0, Str)); WotList.Items.Add(Str); end; end; WotList.Items.Add(ExpandConstant('{cm:browse}')); WotList.ItemIndex := ListIndex; end; procedure WotList_AddClient(ClientPath: String); var Index: Integer; begin if Length(ClientPath) = 0 then begin WotList.ItemIndex := -1; Exit; end; Index := WOT_AddClientW(ClientPath); if Index >= 0 then begin WotList_Update(); WotList.ItemIndex := Index; end else begin MsgBox(ExpandConstant('{cm:wotNotFound}'), mbError, MB_OK); WotList.ItemIndex := -1; end; end; procedure WotList_OnChange(Sender: TObject); begin if WoTList.Text = ExpandConstant('{cm:browse}') then begin WizardForm.DirBrowseButton.OnClick(nil); WotList_AddClient(WizardForm.DirEdit.Text); end; WOT_GetClientPathW(Buffer, 1024, WotList.ItemIndex); WizardForm.DirEdit.Text := Buffer; end; function IsAppRunning(const FileName : AnsiString): Boolean; var FSWbemLocator: Variant; FWMIService : Variant; FWbemObjectSet: Variant; begin Result := False; FSWbemLocator := CreateOleObject('WBEMScripting.SWBEMLocator'); FWMIService := FSWbemLocator.ConnectServer('', 'root\CIMV2', '', ''); FWbemObjectSet := FWMIService.ExecQuery(Format('SELECT Name FROM Win32_Process Where Name="%s"', [FileName])); Result := (FWbemObjectSet.Count > 0); FWbemObjectSet := Unassigned; FWMIService := Unassigned; FSWbemLocator := Unassigned; end; function InitializeSetup(): Boolean; begin case IsAppRunning('WorldOfTanks.exe') of True: begin MsgBox(ExpandConstant('{cm:IsAppRunningLabel}'), mbError, MB_OK); Result := False; end; False: begin Result := True; end; end; end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); InitializeWizard3(); RedesignWizardForm; //MsgBox('{cm:Path}', mbInformation, MB_OK); WizardForm.TypesCombo.OnChange := @TypesComboOnChange; SetLength(Buffer, 1024); WizardForm.DirEdit.Visible := False; WizardForm.DirEdit.Text := ''; WizardForm.DirBrowseButton.Visible := False; WotList := TNewComboBox.Create(WizardForm); WotList.Parent := WizardForm.DirEdit.Parent; WotList.Style := csDropDownList; WotList.OnChange := @WotList_OnChange; WotList.SetBounds( WizardForm.DirEdit.Left, WizardForm.DirEdit.Top, WizardForm.DirBrowseButton.Left + WizardForm.DirBrowseButton.Width, WizardForm.DirEdit.Height ); WotList_Update(); end; procedure CurPageChanged(CurPage: Integer); begin if (CurPage = wpSelectDir) then begin if WotList.ItemIndex = -1 then begin WotList.ItemIndex := 0; end; WotList.OnChange(nil); end; if (CurPage = wpSelectComponents) then AddButtonSelectComponent(); if (CurPage = wpFinished) then ApplySettings(); end; function NextButtonClick(CurPage: Integer): Boolean; begin Result := True; if (CurPage = wpSelectDir) then begin if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin MsgBox(ExpandConstant('{cm:wotNotFound}'), mbError, MB_OK); Result := False; Exit; end; end; end; Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #526103 Posted September 7, 2022 Поиск пути установки или поиск процесса игры? Quote Share this post Link to post Short link Share on other sites
F1nder 4 #526105 Posted September 7, 2022 1 hour ago, Qirashi said: Поиск пути установки или поиск процесса игры? Поиск пути установки. Сделал как в инсталляторе xvm. Где через комбобокс показывает все клиенты на пк. Возникла ошибка на скриншоте Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #526106 Posted September 7, 2022 10 минут назад, F1nder сказал: Поиск пути установки. Сделал как в инсталляторе xvm. Где через комбобокс показывает все клиенты на пк. Возникла ошибка на скриншоте function GetHKCU: Integer; //-| begin // | if IsWin64 then // | Определение разрядности Result := HKCU64 // | else // | Result := HKCU32; //-| HKCU/HKLM.... end; var InstallationPath: string; function GetInstallationPath(Param: string): string; begin if InstallationPath = '' then begin if RegQueryStringValue( GetHKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WOT.RU.PRODUCTION', 'InstallLocation', InstallationPath) then begin Log(CustomMessage('Caption5') + InstallationPath); end else begin InstallationPath := 'C:\путь в случае если не найдено ничего в реестре\'; Log(CustomMessage('Caption6') + InstallationPath); end; end; Result := InstallationPath; end; Могу только такое предложить... HKCU, HKLM... - Это краткое название стартовой папки в реестре. Надеюсь разберёшься) 1 Quote Share this post Link to post Short link Share on other sites
ktulho 5,737 #526108 Posted September 7, 2022 8 часов назад, F1nder сказал: Вылазит такая кракозябра. Что делать? Код прилагается. Буду признателен Процедура TypesComboOnChange https://gitlab.com/xvm/xvm.installer/-/blob/master/src/configuration_settings.iss#L22 3 Quote Share this post Link to post Short link Share on other sites
F1nder 4 #526111 Posted September 7, 2022 (edited) 2 hours ago, ktulho said: Процедура TypesComboOnChange https://gitlab.com/xvm/xvm.installer/-/blob/master/src/configuration_settings.iss#L22 Спасибо. Но теперь появилась другая проблема. Жалуется на эту строчку. if (CurPage = wpSelectComponents) then AddButtonSelectComponent(); if (CurPage = wpFinished) then ApplySettings(); end; Попробовал закоментировать AddButtonSelectComponent(); и ApplySettings(); инсталлятор запускается и даже нашел путь. Но нашел только букву диска без папки с игрой. Что в этом случае делать? upd. ошибку решил но путь всеравно показывает одну букву диска. Кидаю код ; Скрипт создан через Мастер Inno Setup Script. ; ИСПОЛЬЗУЙТЕ ДОКУМЕНТАЦИЮ ДЛЯ ПОДРОБНОСТЕЙ ИСПОЛЬЗОВАНИЯ INNO SETUP! #define MyAppName "Модпак от F1nder 1.18.0.0 - 0" #define MyAppVersion "0" #define MyAppPublisher "F1nder YT" #define MyAppURL "https://openvk.su/club2271" #define Patch "1.18.0.0" #include "BackUpPage.iss" #include "Components.iss" #include "faq.iss" #include "InnoExtensions.iss" [Setup] ; Примечание: Значение AppId идентифицирует это приложение. ; Не используйте одно и тоже значение в разных установках. ; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.) AppId={{CCA4D068-372F-45ED-AE39-C4A37A19D64C} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName=C:\ DefaultGroupName={#MyAppName} InfoAfterFile=C:\Users\A4ivi4\Desktop\modpack\author.rtf OutputBaseFilename=ModPack_by_F1nder_#0 - 1.18.0.0 SetupIconFile=C:\Users\A4ivi4\Desktop\modpack\Files\wot_ico.ico Compression=lzma2/ultra64 InternalCompressLevel=ultra64 SolidCompression=yes UninstallFilesDir={app}\F1nder_ModPack SetupLogging=yes DirExistsWarning=false CreateAppDir=true AppendDefaultDirName=false ShowLanguageDialog=true DisableProgramGroupPage=true Uninstallable=true DisableDirPage=false [Languages] Name: "default"; MessagesFile: "compiler:Default.isl" [CustomMessages] IsAppRunningLabel=Клиент игры World of Tanks в настоящее время запущен. Для подолжения установки необходимо закрыть клиент! wotNotFound=Клиент игры не был найден в этой папке. Установка невозможна Path=1.18.0.0 browse=Обзор... [Files] Source: "dll\xvmextensions.dll"; DestName: xvmextensions.dll; Flags: dontcopy; Source: "dll\bass.dll"; Flags: dontcopy; Source: "dll\unmerg_f.dll"; Flags: dontcopy; [Code] var WotList: TNewComboBox; Buffer: String; procedure WotList_Update(); var ClientsCount, Index, ListIndex: Integer; Str: String; begin ListIndex := WotList.ItemIndex; ClientsCount := WOT_GetClientsCount(); WotList.Items.Clear(); if ClientsCount > 0 then begin for Index := 0 to ClientsCount - 1 do begin WOT_GetClientVersionW(Buffer, 1024, Index); Str := Copy(Buffer, 0, Pos(#0, Buffer)); Insert(' [', Str, Pos(#0, Str)); case WOT_GetClientWgcFlavour(Index) of 1: Insert('WG/', Str, Pos(#0, Str)); 2: Insert('360/', Str, Pos(#0, Str)); 3: Insert('Steam/', Str, Pos(#0, Str)); end; case WOT_GetClientBranch(Index) of 1: Insert('Release', Str, Pos(#0, Str)); 2: Insert('CT', Str, Pos(#0, Str)); 3: Insert('ST', Str, Pos(#0, Str)); 4: Insert('SB', Str, Pos(#0, Str)); end; Insert('] - ', Str, Pos(#0, Str)); WOT_GetClientPathW(Buffer, 1024, Index); Insert(Buffer, Str, Pos(#0, Str)); WotList.Items.Add(Str); end; end; WotList.Items.Add(ExpandConstant('{cm:browse}')); WotList.ItemIndex := ListIndex; end; procedure WotList_AddClient(ClientPath: String); var Index: Integer; begin if Length(ClientPath) = 0 then begin WotList.ItemIndex := -1; Exit; end; Index := WOT_AddClientW(ClientPath); if Index >= 0 then begin WotList_Update(); WotList.ItemIndex := Index; end else begin MsgBox(ExpandConstant('{cm:wotNotFound}'), mbError, MB_OK); WotList.ItemIndex := -1; end; end; procedure TypesComboOnChange(Sender: TObject); begin if WizardForm.TypesCombo.Text = 'Default config' then end; procedure WotList_OnChange(Sender: TObject); begin if WoTList.Text = ExpandConstant('{cm:browse}') then begin WizardForm.DirBrowseButton.OnClick(nil); WotList_AddClient(WizardForm.DirEdit.Text); end; WOT_GetClientPathW(Buffer, 1024, WotList.ItemIndex); WizardForm.DirEdit.Text := Buffer; end; procedure AddButtonSelectComponent(); var SelectComponentButton: TNewButton; begin with WizardForm do begin SelectComponentButton := TNewButton.Create(WizardForm); SelectComponentButton.Width := ScaleX(145); SelectComponentButton.Left := TypesCombo.Left + TypesCombo.Width - SelectComponentButton.Width + ScaleX(1); SelectComponentButton.Top := TypesCombo.Top + TypesCombo.Height + ScaleX(15); SelectComponentButton.Height := CancelButton.Height; SelectComponentButton.Caption := ExpandConstant('{cm:SettingConfigurationBtn}'); SelectComponentButton.Parent := SelectComponentsLabel.Parent; end; end; function IsAppRunning(const FileName : AnsiString): Boolean; var FSWbemLocator: Variant; FWMIService : Variant; FWbemObjectSet: Variant; begin Result := False; FSWbemLocator := CreateOleObject('WBEMScripting.SWBEMLocator'); FWMIService := FSWbemLocator.ConnectServer('', 'root\CIMV2', '', ''); FWbemObjectSet := FWMIService.ExecQuery(Format('SELECT Name FROM Win32_Process Where Name="%s"', [FileName])); Result := (FWbemObjectSet.Count > 0); FWbemObjectSet := Unassigned; FWMIService := Unassigned; FSWbemLocator := Unassigned; end; function InitializeSetup(): Boolean; begin case IsAppRunning('WorldOfTanks.exe') of True: begin MsgBox(ExpandConstant('{cm:IsAppRunningLabel}'), mbError, MB_OK); Result := False; end; False: begin Result := True; end; end; end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); InitializeWizard3(); RedesignWizardForm; //MsgBox('{cm:Path}', mbInformation, MB_OK); WizardForm.TypesCombo.OnChange := @TypesComboOnChange; SetLength(Buffer, 1024); WizardForm.DirEdit.Visible := False; WizardForm.DirEdit.Text := ''; WizardForm.DirBrowseButton.Visible := False; WotList := TNewComboBox.Create(WizardForm); WotList.Parent := WizardForm.DirEdit.Parent; WotList.Style := csDropDownList; WotList.OnChange := @WotList_OnChange; WotList.SetBounds( WizardForm.DirEdit.Left, WizardForm.DirEdit.Top, WizardForm.DirBrowseButton.Left + WizardForm.DirBrowseButton.Width, WizardForm.DirEdit.Height ); WotList_Update(); end; procedure CurPageChanged(CurPage: Integer); begin if (CurPage = wpSelectDir) then begin if WotList.ItemIndex = -1 then begin WotList.ItemIndex := 0; end; WotList.OnChange(nil); end; if (CurPage = wpSelectComponents) then AddButtonSelectComponent(); if (CurPage = wpFinished) then end; function NextButtonClick(CurPage: Integer): Boolean; begin Result := True; if (CurPage = wpSelectDir) then begin if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin MsgBox(ExpandConstant('{cm:wotNotFound}'), mbError, MB_OK); Result := False; Exit; end; end; end; 3 hours ago, Qirashi said: function GetHKCU: Integer; //-| begin // | if IsWin64 then // | Определение разрядности Result := HKCU64 // | else // | Result := HKCU32; //-| HKCU/HKLM.... end; var InstallationPath: string; function GetInstallationPath(Param: string): string; begin if InstallationPath = '' then begin if RegQueryStringValue( GetHKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WOT.RU.PRODUCTION', 'InstallLocation', InstallationPath) then begin Log(CustomMessage('Caption5') + InstallationPath); end else begin InstallationPath := 'C:\путь в случае если не найдено ничего в реестре\'; Log(CustomMessage('Caption6') + InstallationPath); end; end; Result := InstallationPath; end; Могу только такое предложить... HKCU, HKLM... - Это краткое название стартовой папки в реестре. Надеюсь разберёшься) Этот способ у меня не работает. Либо ключи в реестре устарели либо у меня игра как-то криво стоит. Но он не ищет не в какую. Даже на другом компьютере где клиент стоит правильно и с установщика он не ищет и оставляет пусть дефолтный. Но спасибо за помощь))) upd. Я решил проблему сам. Вопросов больше не имею. Спасибо @Qirashiза наталкивание на правильную мыслю Edited September 7, 2022 by F1nder 1 Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #526126 Posted September 7, 2022 3 часа назад, F1nder сказал: Спасибо. Но теперь появилась другая проблема. Жалуется на эту строчку. if (CurPage = wpSelectComponents) then AddButtonSelectComponent(); if (CurPage = wpFinished) then ApplySettings(); end; Попробовал закоментировать AddButtonSelectComponent(); и ApplySettings(); инсталлятор запускается и даже нашел путь. Но нашел только букву диска без папки с игрой. Что в этом случае делать? upd. ошибку решил но путь всеравно показывает одну букву диска. Кидаю код ; Скрипт создан через Мастер Inno Setup Script. ; ИСПОЛЬЗУЙТЕ ДОКУМЕНТАЦИЮ ДЛЯ ПОДРОБНОСТЕЙ ИСПОЛЬЗОВАНИЯ INNO SETUP! #define MyAppName "Модпак от F1nder 1.18.0.0 - 0" #define MyAppVersion "0" #define MyAppPublisher "F1nder YT" #define MyAppURL "https://openvk.su/club2271" #define Patch "1.18.0.0" #include "BackUpPage.iss" #include "Components.iss" #include "faq.iss" #include "InnoExtensions.iss" [Setup] ; Примечание: Значение AppId идентифицирует это приложение. ; Не используйте одно и тоже значение в разных установках. ; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.) AppId={{CCA4D068-372F-45ED-AE39-C4A37A19D64C} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName=C:\ DefaultGroupName={#MyAppName} InfoAfterFile=C:\Users\A4ivi4\Desktop\modpack\author.rtf OutputBaseFilename=ModPack_by_F1nder_#0 - 1.18.0.0 SetupIconFile=C:\Users\A4ivi4\Desktop\modpack\Files\wot_ico.ico Compression=lzma2/ultra64 InternalCompressLevel=ultra64 SolidCompression=yes UninstallFilesDir={app}\F1nder_ModPack SetupLogging=yes DirExistsWarning=false CreateAppDir=true AppendDefaultDirName=false ShowLanguageDialog=true DisableProgramGroupPage=true Uninstallable=true DisableDirPage=false [Languages] Name: "default"; MessagesFile: "compiler:Default.isl" [CustomMessages] IsAppRunningLabel=Клиент игры World of Tanks в настоящее время запущен. Для подолжения установки необходимо закрыть клиент! wotNotFound=Клиент игры не был найден в этой папке. Установка невозможна Path=1.18.0.0 browse=Обзор... [Files] Source: "dll\xvmextensions.dll"; DestName: xvmextensions.dll; Flags: dontcopy; Source: "dll\bass.dll"; Flags: dontcopy; Source: "dll\unmerg_f.dll"; Flags: dontcopy; [Code] var WotList: TNewComboBox; Buffer: String; procedure WotList_Update(); var ClientsCount, Index, ListIndex: Integer; Str: String; begin ListIndex := WotList.ItemIndex; ClientsCount := WOT_GetClientsCount(); WotList.Items.Clear(); if ClientsCount > 0 then begin for Index := 0 to ClientsCount - 1 do begin WOT_GetClientVersionW(Buffer, 1024, Index); Str := Copy(Buffer, 0, Pos(#0, Buffer)); Insert(' [', Str, Pos(#0, Str)); case WOT_GetClientWgcFlavour(Index) of 1: Insert('WG/', Str, Pos(#0, Str)); 2: Insert('360/', Str, Pos(#0, Str)); 3: Insert('Steam/', Str, Pos(#0, Str)); end; case WOT_GetClientBranch(Index) of 1: Insert('Release', Str, Pos(#0, Str)); 2: Insert('CT', Str, Pos(#0, Str)); 3: Insert('ST', Str, Pos(#0, Str)); 4: Insert('SB', Str, Pos(#0, Str)); end; Insert('] - ', Str, Pos(#0, Str)); WOT_GetClientPathW(Buffer, 1024, Index); Insert(Buffer, Str, Pos(#0, Str)); WotList.Items.Add(Str); end; end; WotList.Items.Add(ExpandConstant('{cm:browse}')); WotList.ItemIndex := ListIndex; end; procedure WotList_AddClient(ClientPath: String); var Index: Integer; begin if Length(ClientPath) = 0 then begin WotList.ItemIndex := -1; Exit; end; Index := WOT_AddClientW(ClientPath); if Index >= 0 then begin WotList_Update(); WotList.ItemIndex := Index; end else begin MsgBox(ExpandConstant('{cm:wotNotFound}'), mbError, MB_OK); WotList.ItemIndex := -1; end; end; procedure TypesComboOnChange(Sender: TObject); begin if WizardForm.TypesCombo.Text = 'Default config' then end; procedure WotList_OnChange(Sender: TObject); begin if WoTList.Text = ExpandConstant('{cm:browse}') then begin WizardForm.DirBrowseButton.OnClick(nil); WotList_AddClient(WizardForm.DirEdit.Text); end; WOT_GetClientPathW(Buffer, 1024, WotList.ItemIndex); WizardForm.DirEdit.Text := Buffer; end; procedure AddButtonSelectComponent(); var SelectComponentButton: TNewButton; begin with WizardForm do begin SelectComponentButton := TNewButton.Create(WizardForm); SelectComponentButton.Width := ScaleX(145); SelectComponentButton.Left := TypesCombo.Left + TypesCombo.Width - SelectComponentButton.Width + ScaleX(1); SelectComponentButton.Top := TypesCombo.Top + TypesCombo.Height + ScaleX(15); SelectComponentButton.Height := CancelButton.Height; SelectComponentButton.Caption := ExpandConstant('{cm:SettingConfigurationBtn}'); SelectComponentButton.Parent := SelectComponentsLabel.Parent; end; end; function IsAppRunning(const FileName : AnsiString): Boolean; var FSWbemLocator: Variant; FWMIService : Variant; FWbemObjectSet: Variant; begin Result := False; FSWbemLocator := CreateOleObject('WBEMScripting.SWBEMLocator'); FWMIService := FSWbemLocator.ConnectServer('', 'root\CIMV2', '', ''); FWbemObjectSet := FWMIService.ExecQuery(Format('SELECT Name FROM Win32_Process Where Name="%s"', [FileName])); Result := (FWbemObjectSet.Count > 0); FWbemObjectSet := Unassigned; FWMIService := Unassigned; FSWbemLocator := Unassigned; end; function InitializeSetup(): Boolean; begin case IsAppRunning('WorldOfTanks.exe') of True: begin MsgBox(ExpandConstant('{cm:IsAppRunningLabel}'), mbError, MB_OK); Result := False; end; False: begin Result := True; end; end; end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); InitializeWizard3(); RedesignWizardForm; //MsgBox('{cm:Path}', mbInformation, MB_OK); WizardForm.TypesCombo.OnChange := @TypesComboOnChange; SetLength(Buffer, 1024); WizardForm.DirEdit.Visible := False; WizardForm.DirEdit.Text := ''; WizardForm.DirBrowseButton.Visible := False; WotList := TNewComboBox.Create(WizardForm); WotList.Parent := WizardForm.DirEdit.Parent; WotList.Style := csDropDownList; WotList.OnChange := @WotList_OnChange; WotList.SetBounds( WizardForm.DirEdit.Left, WizardForm.DirEdit.Top, WizardForm.DirBrowseButton.Left + WizardForm.DirBrowseButton.Width, WizardForm.DirEdit.Height ); WotList_Update(); end; procedure CurPageChanged(CurPage: Integer); begin if (CurPage = wpSelectDir) then begin if WotList.ItemIndex = -1 then begin WotList.ItemIndex := 0; end; WotList.OnChange(nil); end; if (CurPage = wpSelectComponents) then AddButtonSelectComponent(); if (CurPage = wpFinished) then end; function NextButtonClick(CurPage: Integer): Boolean; begin Result := True; if (CurPage = wpSelectDir) then begin if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin MsgBox(ExpandConstant('{cm:wotNotFound}'), mbError, MB_OK); Result := False; Exit; end; end; end; Этот способ у меня не работает. Либо ключи в реестре устарели либо у меня игра как-то криво стоит. Но он не ищет не в какую. Даже на другом компьютере где клиент стоит правильно и с установщика он не ищет и оставляет пусть дефолтный. Но спасибо за помощь))) upd. Я решил проблему сам. Вопросов больше не имею. Спасибо @Qirashiза наталкивание на правильную мыслю Да не за что) 2 Quote Share this post Link to post Short link Share on other sites
Lom 41 #528689 Posted October 23, 2022 всем приветы. подскажите в чем может быть проблема. при скачивании файла/ов если вдруг какие то проблемы то по идее должно появиться вот такое окошко https://skr.sh/sGY84vbhVwV и далее на выбор. но... иногда оно как бы не совсем прогружается что ли https://skr.sh/sGYj2mJOFKi и модпак возможно закрыть только через дисп.задач. при скачивании одного и того же файла то есть эта проблема то всё норм. файлы для докачки использую вот эти idp7777777777.rar 1 Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #528698 Posted October 23, 2022 @Lom Попробуй использовать полную библиотеку, без переписанной локализации, возможно ты что-то упустил. Скачать можно из интернета, если не найдёшь, могу свою скинуть 2 Quote Share this post Link to post Short link Share on other sites
Lom 41 #528701 Posted October 23, 2022 5 часов назад, Qirashi сказал: @Lom Попробуй использовать полную библиотеку, без переписанной локализации, возможно ты что-то упустил. Скачать можно из интернета, если не найдёшь, могу свою скинуть я его в этой теме когда то скачивал и кроме координат полосы загрузки вообще там ничего не менял. если не трудно скинь свой вариант. 1 Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #528709 Posted October 23, 2022 1 час назад, Lom сказал: я его в этой теме когда то скачивал и кроме координат полосы загрузки вообще там ничего не менял. если не трудно скинь свой вариант. https://cdn.discordapp.com/attachments/1000386728202354688/1033741055163637920/-.zip Держи 2 Quote Share this post Link to post Short link Share on other sites
Lom 41 #528736 Posted October 24, 2022 (edited) народ подскажите как сделать в этом файле чтобы кнопка ПРОДОЛЖИТЬ работала и чтобы она была активной. https://skr.sh/sGZUeicPFSr ? idp1.iss P/S... отбой. допетрил)) Edited October 24, 2022 by Lom 1 Quote Share this post Link to post Short link Share on other sites
P.S.Enot 416 #529187 Posted November 2, 2022 привет подскажите пожалуйста как щас выглядит код поиска игры . ну типа на каком диске игра установлена. чтобы автоматически определяло на каком диске установлена игра Quote Share this post Link to post Short link Share on other sites
Qirashi 15 #529494 Posted November 11, 2022 02.11.2022 в 23:29, P.S.Enot сказал: привет подскажите пожалуйста как щас выглядит код поиска игры . ну типа на каком диске игра установлена. чтобы автоматически определяло на каком диске установлена игра Поиск пути установки игры ведётся через запись в реестре. Quote Share this post Link to post Short link Share on other sites