diff --git a/CHANGELOG.md b/CHANGELOG.md index 72160cc..a5a5952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +### 1.0.3-dev + +- add support for the latest Trilogy patch 1.04.5 + +**SDK AND PLUGINS** + +- new SDK methods `GetDirectoryPath`, `GetCLEOVersion`, `GetSymbolAddress`, `GetNumberOfActiveCSScripts`, `GetNumberOfActiveJSScripts`. SDK version is now 6. +- code that displays a CLEO version in the main menu was extracted into a separate plugin - `frontend.cleo`. Works with GTA III, VC, re3, reVC, and SA. + +**BREAKING CHANGES** + +- bumped minimum required versions of [command definitions](https://re.cleo.li/docs/en/definitions.html) + ### 1.0.2 - September 9, 2022 - add JavaScript support in 64-bit versions of re3 and reVC (see [Feature Matrix](https://github.com/cleolibrary/CLEO-Redux/wiki/Feature-Support-Matrix/) for details) diff --git a/SDK/cleo_redux.lib b/SDK/cleo_redux.lib index 8b335a7..9e6ea40 100644 Binary files a/SDK/cleo_redux.lib and b/SDK/cleo_redux.lib differ diff --git a/SDK/cleo_redux64.lib b/SDK/cleo_redux64.lib index 68eae8f..2487be6 100644 Binary files a/SDK/cleo_redux64.lib and b/SDK/cleo_redux64.lib differ diff --git a/SDK/cleo_redux_sdk.h b/SDK/cleo_redux_sdk.h index 1bbcefd..f6503d9 100644 --- a/SDK/cleo_redux_sdk.h +++ b/SDK/cleo_redux_sdk.h @@ -31,6 +31,22 @@ enum class HostId UNKNOWN = 255 }; +enum class Directory +{ + // /CLEO directory + CLEO = 0, + // /CLEO/.config + CONFIG = 1, + // /CLEO/CLEO_TEXT + TEXT = 2, + // /CLEO/CLEO_PLUGINS + PLUGINS = 3, + // Current working directory + CWD = 4, + // Host root directory + HOST = 5, +}; + typedef void* Context; typedef intptr_t isize; @@ -52,6 +68,7 @@ extern "C" { void ResolvePath(const char* src, char* dest); // since v1 // Returns the absolute path to the CLEO directory + // deprecated: use GetDirectoryPath void GetCLEOFolder(char* dest); // since v1 // Returns the absolute path to the current working directory (normally the game directory) @@ -116,5 +133,20 @@ extern "C" { // since v5 // Registers a new callback invoked on a ShowTextBox function call. Providing a callback shadows built-in ShowTextBox implementation. void OnShowTextBox(OnShowTextBoxCallback callback); + /// since v6 + /// Returns the absolute path to the CLEO root directory or one of its sub-directories + void GetDirectoryPath(Directory dir, char* dest); + /// since v6 + /// Returns CLEO Redux version as a string + void GetCLEOVersion(char* dest); + /// since v6 + /// Returns a memory address for the given symbol, or 0 if not found + void* GetSymbolAddress(const char* symbol); + /// since v6 + /// Returns number of active CS scripts + size_t GetNumberOfActiveCSScripts(); + /// since v6 + /// Returns number of active JS scripts + size_t GetNumberOfActiveJSScripts(); } diff --git a/SDK/cleo_redux_sdk.rs b/SDK/cleo_redux_sdk.rs index 2103032..3ef963b 100644 --- a/SDK/cleo_redux_sdk.rs +++ b/SDK/cleo_redux_sdk.rs @@ -2,6 +2,7 @@ pub const SDK_STRING_MAX_LEN: usize = 128; #[allow(non_camel_case_types)] #[repr(C)] +#[derive(Debug, Copy, Clone)] pub enum HandlerResult { /// Proceed to the next command CONTINUE = 0, @@ -15,6 +16,7 @@ pub enum HandlerResult { #[allow(non_camel_case_types)] #[repr(C)] +#[derive(Debug, Copy, Clone)] pub enum HostId { RE3 = 1, REVC = 2, @@ -30,6 +32,24 @@ pub enum HostId { UNKNOWN = 255, } +#[allow(non_camel_case_types)] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub enum Directory { + /// /CLEO directory + CLEO = 0, + /// /CLEO/.config + CONFIG = 1, + /// /CLEO/CLEO_TEXT + TEXT = 2, + /// /CLEO/CLEO_PLUGINS + PLUGINS = 3, + /// Current working directory + CWD = 4, + /// Host root directory + HOST = 5, +} + #[allow(non_camel_case_types)] pub type c_char = i8; #[allow(non_camel_case_types)] @@ -65,6 +85,7 @@ extern "C" { /// Returns the absolute path to the CLEO directory /// /// since v1 + /// deprecated: use GetDirectoryPath fn GetCLEOFolder(dest: *mut c_char); /// Returns the absolute path to the current working directory (normally the game directory) /// @@ -150,6 +171,26 @@ extern "C" { /// /// since v5 fn OnShowTextBox(cb: OnShowTextBoxCallback); + /// Returns the absolute path to the CLEO root directory or one of its sub-directories + /// + /// since v6 + fn GetDirectoryPath(dir: Directory, dest: *mut c_char); + /// Returns CLEO Redux version as a string + /// + /// since v6 + fn GetCLEOVersion(dest: *mut c_char); + /// Returns a memory address for the given symbol, or 0 if not found + /// + /// since v6 + fn GetSymbolAddress(symbol: *const c_char) -> usize; + /// Returns number of active CS scripts + /// + /// since v6 + fn GetNumberOfActiveCSScripts() -> usize; + /// Returns number of active JS scripts + /// + /// since v6 + fn GetNumberOfActiveJSScripts() -> usize; } macro_rules! sz { @@ -225,10 +266,10 @@ pub fn set_int_param(ctx: Context, value: isize) { /// Returns the absolute path to the CLEO directory /// /// since v1 +/// +/// deprecated: use get_directory_path() pub fn get_cleo_folder() -> std::path::PathBuf { - let mut buf = [0i8; 256]; - unsafe { GetCLEOFolder(buf.as_mut_ptr()) }; - std::path::Path::new(&to_rust_string(buf.as_ptr())).into() + get_directory_path(Directory::CLEO) } /// Returns the absolute path to the current working directory (normally the game directory) @@ -380,4 +421,48 @@ pub fn on_show_text_box(cb: OnShowTextBoxCallback) { unsafe { OnShowTextBox(cb); } -} \ No newline at end of file +} + +/// Returns the absolute path to the CLEO root directory or one of its sub-directories +/// +/// since v6 +#[allow(dead_code)] +pub fn get_directory_path(dir: Directory) -> std::path::PathBuf { + let mut buf = [0i8; 256]; + unsafe { GetDirectoryPath(dir, buf.as_mut_ptr()) }; + std::path::Path::new(&to_rust_string(buf.as_ptr())).into() +} + +/// Returns CLEO Redux version as a string +/// +/// since v6 +#[allow(dead_code)] +pub fn get_cleo_version() -> String { + let mut buf = [0i8; 256]; + unsafe { GetCLEOVersion(buf.as_mut_ptr()) }; + to_rust_string(buf.as_ptr()) +} + +/// Returns a memory address for the given symbol, or 0 if not found +/// +/// since v6 +#[allow(dead_code)] +pub fn get_symbol_address(symbol: &str) -> usize { + unsafe { GetSymbolAddress(sz!(symbol)) } +} + +/// Get number of active CS scripts +/// +/// since v6 +#[allow(dead_code)] +pub fn get_number_of_active_cs_scripts() -> usize { + unsafe { GetNumberOfActiveCSScripts() } +} + +/// Get number of active JS scripts +/// +/// since v6 +#[allow(dead_code)] +pub fn get_number_of_active_js_scripts() -> usize { + unsafe { GetNumberOfActiveJSScripts() } +} diff --git a/docs/en/config.md b/docs/en/config.md index 7075a07..6cf8789 100644 --- a/docs/en/config.md +++ b/docs/en/config.md @@ -7,7 +7,7 @@ CLEO Redux exposes some of the configurable settings in the file `CLEO\.config\c - `AllowCs` - when set to `1` CLEO loads and executes `*.cs` files located in the [CLEO directory](./cleo-directory.md). Enabled by default. - `AllowJs` - when set to `1` CLEO loads and executes `*.js` files located in the [CLEO directory](./cleo-directory.md). Enabled by default. - `AllowFxt` - when set to `1` CLEO loads and [uses](./using-fxt.md) `*.fxt` files located in the CLEO\CLEO_TEXT directory. Enabled by default. -- `CheckUpdates` - when set to `1` CLEO check if there is a new update available for download during the game startup. Disabled by default. +- `CheckUpdates` - (deprecated in favor of [Frontend](./installation-plugins.md) plugin) - `LogOpcodes` - when set to `1` CLEO [logs](./log.md) all executed opcodes in custom scripts. - `DisplayMenuInfo` - when set to `1` CLEO displays some information in the main menu. Enabled by default. - `PermissionLevel` - sets the [permission level](./permissions.md) for unsafe operations (see below). Default is `Lax`. @@ -19,4 +19,4 @@ CLEO Redux exposes some of the configurable settings in the file `CLEO\.config\c ## Permissions -This section lists permission tokens and sets whether they are allowed or not in the [Strict mode](./permissions.md#strict). \ No newline at end of file +This section lists permission tokens and sets whether they are allowed or not in the [Strict mode](./permissions.md#strict). diff --git a/docs/en/definitions.md b/docs/en/definitions.md index 3807b8f..6c4ff8f 100644 --- a/docs/en/definitions.md +++ b/docs/en/definitions.md @@ -6,13 +6,13 @@ At start CLEO validates that a definition file is present and correct and if not | Game | File | Minimum Required Version | | ----------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------ | -| GTA III, re3 | [gta3.json](https://github.com/sannybuilder/library/blob/master/gta3/gta3.json) | `0.237` | -| GTA VC, reVC | [vc.json](https://github.com/sannybuilder/library/blob/master/vc/vc.json) | `0.242` | -| GTA San Andreas (Classic) 1.0 | [sa.json](https://github.com/sannybuilder/library/blob/master/sa/sa.json) | `0.271` | -| GTA IV | [gta_iv.json](https://github.com/sannybuilder/library/blob/master/gta_iv/gta_iv.json) | `0.41` | -| GTA III: The Definitive Edition | [gta3_unreal.json](https://github.com/sannybuilder/library/blob/master/gta3_unreal/gta3_unreal.json) | `0.217` | -| Vice City: The Definitive Edition | [vc_unreal.json](https://github.com/sannybuilder/library/blob/master/vc_unreal/vc_unreal.json) | `0.223` | -| San Andreas: The Definitive Edition | [sa_unreal.json](https://github.com/sannybuilder/library/blob/master/sa_unreal/sa_unreal.json) | `0.235` | +| GTA III, re3 | [gta3.json](https://github.com/sannybuilder/library/blob/master/gta3/gta3.json) | `0.241` | +| GTA VC, reVC | [vc.json](https://github.com/sannybuilder/library/blob/master/vc/vc.json) | `0.248` | +| GTA San Andreas (Classic) 1.0 | [sa.json](https://github.com/sannybuilder/library/blob/master/sa/sa.json) | `0.286` | +| GTA IV | [gta_iv.json](https://github.com/sannybuilder/library/blob/master/gta_iv/gta_iv.json) | `0.43` | +| GTA III: The Definitive Edition | [gta3_unreal.json](https://github.com/sannybuilder/library/blob/master/gta3_unreal/gta3_unreal.json) | `0.220` | +| Vice City: The Definitive Edition | [vc_unreal.json](https://github.com/sannybuilder/library/blob/master/vc_unreal/vc_unreal.json) | `0.227` | +| San Andreas: The Definitive Edition | [sa_unreal.json](https://github.com/sannybuilder/library/blob/master/sa_unreal/sa_unreal.json) | `0.248` | | Bully: Scholarship Edition | [bully.json](https://github.com/sannybuilder/library/blob/master/bully/bully.json) | `0.29` | | Unknown (32-bit) | [unknown_x86.json](https://github.com/sannybuilder/library/blob/master/unknown_x86/unknown_x86.json) | `0.216` | | Unknown (64-bit) | [unknown_x64.json](https://github.com/sannybuilder/library/blob/master/unknown_x64/unknown_x64.json) | `0.220` | diff --git a/docs/en/installation-plugins.md b/docs/en/installation-plugins.md index 807567b..a7b80b4 100644 --- a/docs/en/installation-plugins.md +++ b/docs/en/installation-plugins.md @@ -4,12 +4,13 @@ Plugins are optional programs adding extra scripting commands with the help of [ ## List of plugins -| Name | Description | Link | -| ------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------- | -| [IniFiles](https://library.sannybuilder.com/#/unknown_x86/ini) | Reading from and writing to INI files | [src](https://github.com/cleolibrary/CLEO-Redux/tree/master/plugins/IniFiles) | -| [Dylib](https://library.sannybuilder.com/#/unknown_x86/dylib) | Loading DLL files and importing functions | [src](https://github.com/cleolibrary/CLEO-Redux/tree/master/plugins/Dylib) | -| [Input](https://library.sannybuilder.com/#/unknown_x86/input) | Checking for keyboard and mouse input, emulating key presses | [src](https://github.com/cleolibrary/CLEO-Redux/tree/master/plugins/Input) | -| [ImGuiRedux](https://library.sannybuilder.com/#/unknown_x86/imgui) | Dear ImGui bindings | [GitHub repo](https://github.com/user-grinch/ImGuiRedux) | -| [MemoryOperations](https://library.sannybuilder.com/#/unknown_x86/memops) | Low-level memory operations | [GitHub repo](https://github.com/cleolibrary/CLEO-REDUX-PLUGINS) | - -Plugins are included in the CLEO Redux installer. You can opt out of some of them by unchecking the corresponding checkbox in the installer. \ No newline at end of file +| Name | Description | Link | +| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| [IniFiles](https://library.sannybuilder.com/#/unknown_x86/ini) | Reading from and writing to INI files | [src](https://github.com/cleolibrary/CLEO-Redux/tree/master/plugins/IniFiles) | +| [Dylib](https://library.sannybuilder.com/#/unknown_x86/dylib) | Loading DLL files and importing functions | [src](https://github.com/cleolibrary/CLEO-Redux/tree/master/plugins/Dylib) | +| [Input](https://library.sannybuilder.com/#/unknown_x86/input) | Checking for keyboard and mouse input, emulating key presses | [src](https://github.com/cleolibrary/CLEO-Redux/tree/master/plugins/Input) | +| [ImGuiRedux](https://library.sannybuilder.com/#/unknown_x86/imgui) | Dear ImGui bindings | [GitHub repo](https://github.com/user-grinch/ImGuiRedux) | +| [MemoryOperations](https://library.sannybuilder.com/#/unknown_x86/memops) | Low-level memory operations | [GitHub repo](https://github.com/cleolibrary/CLEO-REDUX-PLUGINS) | +| Frontend | Checks the latest version on GitHub and display information in the main menu | | + +Plugins are included in the CLEO Redux installer. You can opt out of some of them by unchecking the corresponding checkbox in the installer. diff --git a/docs/en/the-definitive-edition-faq.md b/docs/en/the-definitive-edition-faq.md index 765ed18..4241b9f 100644 --- a/docs/en/the-definitive-edition-faq.md +++ b/docs/en/the-definitive-edition-faq.md @@ -11,20 +11,21 @@ Here you can find answers to the frequently asked questions about support for Th ### What versions are supported? -- GTA III: The Definitive Edition **1.0.0.14718** (Title Update 1.03), **1.0.0.15284** (Title Update 1.04) -- GTA Vice City: The Definitive Edition **1.0.0.14718** (Title Update 1.03), **1.0.0.15399** (Title Update 1.04) -- San Andreas: The Definitive Edition **1.0.0.14296**, **1.0.0.14388**, **1.0.0.14718** (Title Update 1.03), **1.0.0.15483** (Title Update 1.04) +- GTA III: The Definitive Edition **1.0.0.14718** (Title Update 1.03), **1.0.0.15284** (Title Update 1.04), **1.0.8.11827** (Title Update 1.04.5) +- GTA Vice City: The Definitive Edition **1.0.0.14718** (Title Update 1.03), **1.0.0.15399** (Title Update 1.04), **1.0.8.11827** (Title Update 1.04.5) +- San Andreas: The Definitive Edition **1.0.0.14296**, **1.0.0.14388**, **1.0.0.14718** (Title Update 1.03), **1.0.0.15483** (Title Update 1.04), **1.0.8.11827** (Title Update 1.04.5) ### Is there any difference from support of the classic games? In short, yes. [See this page](https://github.com/cleolibrary/CLEO-Redux/wiki/Feature-Support-Matrix) for detail on what's supported and what's not. + ### Can I use original opcodes? Yes, you can. Refer to the Sanny Builder library https://library.sannybuilder.com/#/sa_unreal. Take a note that some opcodes have been changed from the classic games, so don't expect everything to work like it was in classic. If you run into an issue, find help in [our Discord](https://discord.gg/d5dZSfgBZr). ### How do I know what commands can I use in JavaScript? -After each game run, CLEO generates a d.ts file in the CLEO\.config directory. It's called gta3.d.ts, vc.d.ts or sa.d.ts depending on the game. This file lists all supported functions and methods that you can use in JavaScript code. +After each game run, CLEO generates a d.ts file in the CLEO\.config directory. It's called gta3.d.ts, vc.d.ts or sa.d.ts depending on the game. This file lists all supported functions and methods that you can use in JavaScript code. To enable autocomplete in VS Code include the following line in your JS script: @@ -38,16 +39,16 @@ Update the file name accordingly depending on which game your script is for. Opcodes from CLEO Library (CLEO 4 or CLEO for GTA III and Vice City) are not supported. But CLEO Redux adds its own new opcodes for some operations. - - 0C00 [IS_KEY_PRESSED](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C00) - - 0C01 [INT_ADD](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C01) - - 0C02 [INT_SUB](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C02) - - 0C03 [INT_MUL](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C03) - - 0C04 [INT_DIV](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C04) - - 0C05 [TERMINATE_THIS_CUSTOM_SCRIPT](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C05) - - 0C06 [WRITE_MEMORY](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C06) (**UNSAFE** - requires `mem` permission) - - 0C07 [READ_MEMORY](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C07) (**UNSAFE** - requires `mem` permission) - - 0C08 [CALL_FUNCTION](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C08) (**UNSAFE** - requires `mem` permission) - - 0C09 [CALL_FUNCTION_RETURN](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C09) (**UNSAFE** - requires `mem` permission) +- 0C00 [IS_KEY_PRESSED](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C00) +- 0C01 [INT_ADD](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C01) +- 0C02 [INT_SUB](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C02) +- 0C03 [INT_MUL](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C03) +- 0C04 [INT_DIV](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C04) +- 0C05 [TERMINATE_THIS_CUSTOM_SCRIPT](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C05) +- 0C06 [WRITE_MEMORY](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C06) (**UNSAFE** - requires `mem` permission) +- 0C07 [READ_MEMORY](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C07) (**UNSAFE** - requires `mem` permission) +- 0C08 [CALL_FUNCTION](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C08) (**UNSAFE** - requires `mem` permission) +- 0C09 [CALL_FUNCTION_RETURN](https://library.sannybuilder.com/#/sa_unreal/CLEO/0C09) (**UNSAFE** - requires `mem` permission) Note that Sanny Builder does not support these new opcodes out-of-the-box yet. To enable new opcodes in your CS scripts add the following lines on top of your script: diff --git a/docs/en/using-sdk.md b/docs/en/using-sdk.md index 28a0416..7bcedbc 100644 --- a/docs/en/using-sdk.md +++ b/docs/en/using-sdk.md @@ -4,7 +4,7 @@ SDK provides a way to create new script commands for any game that CLEO Redux su ## SDK Version -The current version is `5`. Changes to SDK advance this number by one. +The current version is `6`. Changes to SDK advance this number by one. ## Platforms Support diff --git a/installer/cleo_redux.iss b/installer/cleo_redux.iss index 4185f5c..adc2ee8 100644 --- a/installer/cleo_redux.iss +++ b/installer/cleo_redux.iss @@ -1,5 +1,5 @@ #define AppName "CLEO Redux" -#define AppVersion "1.0.2" +#define AppVersion "1.0.3-dev.20221023" #define AppPublisher "Seemann" #define AppURL "https://re.cleo.li" #define SourceDir "..\" @@ -61,6 +61,7 @@ Name: "plugins/imgui/d3d8to9"; Description: "d3d8to9 Wrapper - for games using D Name: "plugins/imgui/SilentPatch"; Description: "SilentPatch - needed for the mouse to work properly in classic GTA"; Types: full Name: "plugins/memops"; Description: "MemoryOperations (by ThirteenAG)"; Types: full Name: "plugins/input"; Description: "Input 1.3"; Types: full +Name: "plugins/frontend"; Description: "Frontend 1.0"; Types: full Name: "loaders"; Description: "File Loaders"; Types: full Name: "loaders/text"; Description: "*.txt, *.text (Text files)"; Types: full Name: "loaders/ide"; Description: "*.ide (Item Definition files)"; Types: full @@ -146,6 +147,7 @@ Source: "{#SourceDir}\plugins\IniFiles\build\IniFiles.cleo"; DestDir: "{app}\CLE Source: "{#SourceDir}\plugins\IniFiles\build\IniFiles64.cleo"; DestDir: "{app}\CLEO\CLEO_PLUGINS"; Flags: ignoreversion; Check: IsX64; Components: plugins/ini Source: "{#SourceDir}\plugins\Input\build\Input.cleo"; DestDir: "{app}\CLEO\CLEO_PLUGINS"; Flags: ignoreversion; Check: IsX86; Components: plugins/input Source: "{#SourceDir}\plugins\Input\build\Input64.cleo"; DestDir: "{app}\CLEO\CLEO_PLUGINS"; Flags: ignoreversion; Check: IsX64; Components: plugins/input +Source: "{#SourceDir}\plugins\Frontend\Frontend.cleo"; DestDir: "{app}\CLEO\CLEO_PLUGINS"; Flags: ignoreversion; Check: IsX86 and (IsGta3 or IsVC or IsSA); Components: plugins/frontend Source: "{tmp}\ImGuiRedux.zip"; DestDir: "{app}\CLEO\CLEO_PLUGINS"; Flags: deleteafterinstall external; Check: IsX86; AfterInstall: InstallImGuiRedux32; Components: plugins/imgui; Source: "{tmp}\ImGuiRedux.zip"; DestDir: "{app}\CLEO\CLEO_PLUGINS"; Flags: deleteafterinstall external; Check: IsX64; AfterInstall: Extract('{app}\CLEO\CLEO_PLUGINS\ImGuiRedux.zip', 'ImGuiReduxWin64.cleo', '{app}\CLEO\CLEO_PLUGINS'); Components: plugins/imgui; @@ -232,6 +234,11 @@ begin Result := (FGameId in [3, 4, 5]); end; +function SupportsFrontend(): Boolean; +begin + Result := (FGameId in [1, 2, 3, 4, 5]); +end; + procedure unzipFile(Src, FileName, TargetFldr: PAnsiChar); var Shell: variant; @@ -430,8 +437,6 @@ end; procedure InitializeWizard; -var - CheckBox: TNewCheckBox; begin DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress); @@ -471,6 +476,7 @@ begin if CurPageID = wpSelectComponents then begin + FGameId := IdentifyGame(WizardDirValue); // reset all checkboxes to their initial state first for I := 1 to 13 do begin @@ -486,6 +492,10 @@ begin // SilentPatch WizardForm.ComponentsList.Checked[7] := False; WizardForm.ComponentsList.ItemEnabled[7] := False; + + // Frontend Plugin + WizardForm.ComponentsList.Checked[10] := False; + WizardForm.ComponentsList.ItemEnabled[10] := False; end // 32-bit else begin @@ -501,13 +511,19 @@ begin WizardForm.ComponentsList.Checked[7] := False; WizardForm.ComponentsList.ItemEnabled[7] := False; end; + if not SupportsFrontend then + begin + // Frontend plugin + WizardForm.ComponentsList.Checked[10] := False; + WizardForm.ComponentsList.ItemEnabled[10] := False; + end; end; // disable IDE Loader for unknown host if IsUnknown then begin // ide loader - WizardForm.ComponentsList.Checked[12] := False; + WizardForm.ComponentsList.Checked[13] := False; end; // ImGuiRedux is bugged on re3 @@ -523,7 +539,7 @@ begin // MSS lib is an ASI loader if FileExists(ExpandConstant('{app}\Mss32.dll')) then begin - WizardForm.ComponentsList.Checked[13] := False; + WizardForm.ComponentsList.Checked[14] := False; end; end; end;