From 50b44b0be709391da1d62d6dce31013021144495 Mon Sep 17 00:00:00 2001 From: Seemann Date: Sun, 23 Oct 2022 17:00:52 -0400 Subject: [PATCH] update to 1.0.3-dev --- CHANGELOG.md | 13 ++++ SDK/cleo_redux.lib | Bin 6596 -> 7528 bytes SDK/cleo_redux64.lib | Bin 6640 -> 7554 bytes SDK/cleo_redux_sdk.h | 32 +++++++++ SDK/cleo_redux_sdk.rs | 93 ++++++++++++++++++++++++-- docs/en/config.md | 4 +- docs/en/definitions.md | 14 ++-- docs/en/installation-plugins.md | 19 +++--- docs/en/the-definitive-edition-faq.md | 29 ++++---- docs/en/using-sdk.md | 2 +- installer/cleo_redux.iss | 26 +++++-- 11 files changed, 190 insertions(+), 42 deletions(-) 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 8b335a7eca831fc257a02e07f5e66c36dd01cd6c..9e6ea4062a243fa9015306567bc670ca3f91ced7 100644 GIT binary patch delta 1615 zcmai!YiJW$6vt1ZZE{=FOeT{~9<`>zb`>8qHa=Pfjj69b>_U7&i&;&^7;GDx#+ELN z6@^+5ihBIwr>ZCvAEi*}2Swe5-A^hO7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 zq^=eNT0#7|xA0>YjclX$VR!IQcc3GPrwv9dv=-wnL163mW}jrz1UXI%ovh@UZ-aMB zf!U&)1=lV;=ShhpVgvfMB1;|gzu?=Y;D+9#zJbbRJ0-?9$FEig?lOuRpXTNoH3w2@ zv^LbJwd!z=Qs3zPH+-Fd`I%lecdT-r z?QQ5LvtP?^Kk;P1K}zq}u6?jmGUBS$!>+6wmbX(fVVf-%+l@uV g<%uWMZs*TvEC$eZd52+TV<$~A({Z=@FFq24zlY5GIRF3v 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;