From 06ed788b251e0417b0007a70a19b325e1061e96e Mon Sep 17 00:00:00 2001 From: Cherry <13651622+MolotovCherry@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:30:29 -0800 Subject: [PATCH] Separate all tools into standalone --- .github/workflows/build.yml | 30 ++++-- assets-autostarter/INSTRUCTIONS.txt | 68 ++++++++++++ {assets => assets-autostarter}/install.bat | 0 {assets => assets-autostarter}/uninstall.bat | 0 assets-injector/INSTRUCTIONS.txt | 63 ++++++++++++ assets-watcher/INSTRUCTIONS.txt | 59 +++++++++++ assets/INSTRUCTIONS.txt | 103 ------------------- 7 files changed, 211 insertions(+), 112 deletions(-) create mode 100644 assets-autostarter/INSTRUCTIONS.txt rename {assets => assets-autostarter}/install.bat (100%) rename {assets => assets-autostarter}/uninstall.bat (100%) create mode 100644 assets-injector/INSTRUCTIONS.txt create mode 100644 assets-watcher/INSTRUCTIONS.txt delete mode 100644 assets/INSTRUCTIONS.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72e7c39..bd75a31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,22 +90,34 @@ jobs: - name: Create staging folders if: github.event_name == 'release' || inputs.release run: | - New-Item -ItemType Directory -Force -Path bin - New-Item -ItemType Directory -Force -Path debug + New-Item -ItemType Directory -Force -Path _staging-watcher/bin + New-Item -ItemType Directory -Force -Path _staging-injector/bin + New-Item -ItemType Directory -Force -Path _staging-autostarter/bin + New-Item -ItemType Directory -Force -Path _staging-debug - name: Zip files up if: github.event_name == 'release' || inputs.release run: | - # release assets - Get-ChildItem -Path target/*/*.exe,target/*/*.dll,assets/* | Copy-Item -Destination "bin" - Compress-Archive -Path "bin" -CompressionLevel Optimal -DestinationPath "yet-another-bg3-native-mod-loader-x64.zip" - Get-ChildItem -Path "bin" -Recurse | Remove-Item -Force + # watcher + Get-ChildItem -Path target/*/*watcher.exe,target/*/loader.dll,assets/*,assets-watcher/* | Copy-Item -Destination "_staging-watcher/bin" + Compress-Archive -Path "_staging-watcher" -CompressionLevel Optimal -DestinationPath "yet-another-bg3-native-mod-loader-watcher-x64.zip" + Get-ChildItem -Path "_staging-watcher" -Recurse | Remove-Item -Force + + # injector + Get-ChildItem -Path target/*/*injector.exe,target/*/loader.dll,assets/*,assets-injector/* | Copy-Item -Destination "_staging-injector/bin" + Compress-Archive -Path "_staging-injector" -CompressionLevel Optimal -DestinationPath "yet-another-bg3-native-mod-loader-injector-x64.zip" + Get-ChildItem -Path "_staging-injector" -Recurse | Remove-Item -Force + + # autostart + Get-ChildItem -Path target/*/*autostart*.exe,target/*/loader.dll,assets/*,assets-autostart/* | Copy-Item -Destination "_staging-autostart/bin" + Compress-Archive -Path "_staging-autostart" -CompressionLevel Optimal -DestinationPath "yet-another-bg3-native-mod-loader-autostart-x64.zip" + Get-ChildItem -Path "_staging-autostart" -Recurse | Remove-Item -Force # debug symbols - Get-ChildItem -Path target/*/*.pdb,assets-dbg/* | Copy-Item -Destination "debug" - $files = Get-ChildItem -Path debug/* + Get-ChildItem -Path target/*/*.pdb,assets-dbg/* | Copy-Item -Destination "_staging-debug" + $files = Get-ChildItem -Path _staging-debug/* Compress-Archive -CompressionLevel Optimal -Path $files.FullName -DestinationPath "yet-another-bg3-native-mod-loader-dbg-symbols-x64.zip" - Get-ChildItem -Path "debug" -Recurse | Remove-Item -Force + Get-ChildItem -Path "_staging-debug" -Recurse | Remove-Item -Force - name: Attach assets to release if: github.event_name == 'release' || inputs.release diff --git a/assets-autostarter/INSTRUCTIONS.txt b/assets-autostarter/INSTRUCTIONS.txt new file mode 100644 index 0000000..c343234 --- /dev/null +++ b/assets-autostarter/INSTRUCTIONS.txt @@ -0,0 +1,68 @@ + _____ _ _ _ +|_ _| | | | | (_) + | | _ __ ___| |_ _ __ _ _ ___| |_ _ ___ _ __ ___ + | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __| + _| || | | \__ \ |_| | | |_| | (__| |_| | (_) | | | \__ \ + \___/_| |_|___/\__|_| \__,_|\___|\__|_|\___/|_| |_|___/ +---------------------------------------------------------- + +Place bg3_autostart.exe and loader.dll wherever you want. Keep all these files together, including loader.dll. + + bg3_autostart.exe automatically patches the game. It does not need to be manually run; + it starts when the game starts, and stops when the game stops. Just like Native Mod Loader, it is seamless. + This does however require extra registry edits to accomplish. + + The benefit of this tool is that it doesn't require manual starting. The downside is it requires installation, + and it is more work to disable it if you don't want plugins running (since that requires you to uninstall it). + + To install this tool, run install.bat, and to uninstall run uninstall.bat. + + Once you install, you must not move the exe. If you wish to move it, uninstall, move the tool, then reinstall it. + + Please also note that the registry entries point at the current bg3_autostart.exe location. If this file is in your + windows user folder and another windows user tries to launch the game, they may not have access to the exe in your + windows user folder (since it's another windows user's files). If multiple windows users play this game, you should + instead place this exe at a location accessible by all windows users to avoid this problem. + + Also, if you delete the tools, make sure to uninstall it! + + The two registry entries added/removed are. You may also remove these manually if you wish. + HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\bg3.exe + HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\bg3_dx11.exe + + ____ _ + / ___|| |_ ___ _ __ ___ + \___ \| __/ _ \ '_ \/ __| + ___) | || __/ |_) \__ \ + |____/ \__\___| .__/|___/ + |_| +-------------------------- + +The first time you run a tool, it will: + - Generate a config.toml for you + - Check the `config.toml` file inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` + - If the game was installed to a non-standard path, you must adjust this path to correct it. + It needs to point to the game's root installation directory. + E.g. `C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3` + - If the tools are placed in /bin or /bin/subfolder, they will detect the install root + automatically, and install_root in config.toml won't require configuring. + - Place any dll plugins you have inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` + - Remember, all NativeModLoader plugins are compatible! + +Using: + 1. Run your game as normal. It will automatically be patched. + +If you wish to disable a mod, add an entry without extension to the `disabled` key + - For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, the entry looks like: + disabled = ["FooBar", "FooBaz"] + - If you wish to disable all plugins, uninstall autostart tool, uninstall it, + and then start the game normally as you always do. + +Source code: https://github.com/MolotovCherry/Yet-Another-BG3-Native-Mod-Loader + +Disclaimer: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/assets/install.bat b/assets-autostarter/install.bat similarity index 100% rename from assets/install.bat rename to assets-autostarter/install.bat diff --git a/assets/uninstall.bat b/assets-autostarter/uninstall.bat similarity index 100% rename from assets/uninstall.bat rename to assets-autostarter/uninstall.bat diff --git a/assets-injector/INSTRUCTIONS.txt b/assets-injector/INSTRUCTIONS.txt new file mode 100644 index 0000000..c5a166c --- /dev/null +++ b/assets-injector/INSTRUCTIONS.txt @@ -0,0 +1,63 @@ + _____ _ _ _ +|_ _| | | | | (_) + | | _ __ ___| |_ _ __ _ _ ___| |_ _ ___ _ __ ___ + | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __| + _| || | | \__ \ |_| | | |_| | (__| |_| | (_) | | | \__ \ + \___/_| |_|___/\__|_| \__,_|\___|\__|_|\___/|_| |_|___/ +---------------------------------------------------------- + +Place bg3_injector.exe and loader.dll wherever you want, maybe create a shortcut to it. +Keep all these files together, including loader.dll. + + bg3_injector.exe is a simpler, one-time use tool, which finds any instance of the game that's already + running (vulkan or dx11), and injects the plugins into it at runtime. The purpose of this + tool is to be an alternative to bg3_watcher; for those people who don't want a tool always + running in the background. + + The benefit of this tool is that it doesn't require installation, and if you don't want plugins + running, just don't start the tool. The downside is it requires manual running. + + Please use it BEFORE loading a save. Plugins expect that they are run on the game process startup, + so please run it as soon as possible. + + ____ _ + / ___|| |_ ___ _ __ ___ + \___ \| __/ _ \ '_ \/ __| + ___) | || __/ |_) \__ \ + |____/ \__\___| .__/|___/ + |_| +-------------------------- + +The first time you run a tool, it will: + - Generate a config.toml for you + - Check the `config.toml` file inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` + - If the game was installed to a non-standard path, you must adjust this path to correct it. + It needs to point to the game's root installation directory. + E.g. `C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3` + - If the tools are placed in /bin or /bin/subfolder, they will detect the install root + automatically, and install_root in config.toml won't require configuring. + - Place any dll plugins you have inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` + - Remember, all NativeModLoader plugins are compatible! + +Using: + - This tool is similar to the watcher, but it is a one-time use tool. It is useful if you don't + want the watcher tool always running in the background. + 1. Start your game. + 2. Start the injector tool.* + + * If you start too late, some plugins may not properly load. You could try starting the injector tool + first, then the game after to fix this. As long as you start the game within 10 seconds, it'll work. + +If you wish to disable a mod, add an entry without extension to the `disabled` key + - For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, the entry looks like: + disabled = ["FooBar", "FooBaz"] + - If you wish to disable all plugins, don't run the injector, and then start the game normally as you always do. + +Source code: https://github.com/MolotovCherry/Yet-Another-BG3-Native-Mod-Loader + +Disclaimer: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/assets-watcher/INSTRUCTIONS.txt b/assets-watcher/INSTRUCTIONS.txt new file mode 100644 index 0000000..d6d6968 --- /dev/null +++ b/assets-watcher/INSTRUCTIONS.txt @@ -0,0 +1,59 @@ + _____ _ _ _ +|_ _| | | | | (_) + | | _ __ ___| |_ _ __ _ _ ___| |_ _ ___ _ __ ___ + | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __| + _| || | | \__ \ |_| | | |_| | (__| |_| | (_) | | | \__ \ + \___/_| |_|___/\__|_| \__,_|\___|\__|_|\___/|_| |_|___/ +---------------------------------------------------------- + +Place bg3_watcher.exe and loader.dll wherever you want, maybe create a shortcut to it. +Keep all these files together, including loader.dll. + + bg3_watcher is a tool which stays running in the background. It watches for the launch of bg3 or + bg3_dx11, and injects the plugins into the game. You can load your game through normal means, and + it'll all be transparently patched in the background. This tool creates a tray icon. You can go + to your taskbar to find the icon, right click on it, and press quit, when you are done using it. + + The benefit of this tool is that it doesn't require installation, and if you don't want plugins + running, just don't start the tool. The downside is it requires manual running. + + ____ _ + / ___|| |_ ___ _ __ ___ + \___ \| __/ _ \ '_ \/ __| + ___) | || __/ |_) \__ \ + |____/ \__\___| .__/|___/ + |_| +-------------------------- + +The first time you run a tool, it will: + - Generate a config.toml for you + - Check the `config.toml` file inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` + - If the game was installed to a non-standard path, you must adjust this path to correct it. + It needs to point to the game's root installation directory. + E.g. `C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3` + - If the tools are placed in /bin or /bin/subfolder, they will detect the install root + automatically, and install_root in config.toml won't require configuring. + - Place any dll plugins you have inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` + - Remember, all NativeModLoader plugins are compatible! + +Using: + - This will silently run in the background and watch for game launches. Once the game launches, + it will auto-patch the game instance. When you're done using the tool, go to the systray, right + click on the icon, and click Quit + 1. Run the watcher tool + 2. When the game launches, it will auto-patch the game instance + +If you wish to disable a mod, add an entry without extension to the `disabled` key + - For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, the entry looks like: + disabled = ["FooBar", "FooBaz"] + - If you wish to disable all plugins, quit the watcher tool if it's running, + then start the game normally as you always do. + +Source code: https://github.com/MolotovCherry/Yet-Another-BG3-Native-Mod-Loader + +Disclaimer: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/assets/INSTRUCTIONS.txt b/assets/INSTRUCTIONS.txt deleted file mode 100644 index 80944ab..0000000 --- a/assets/INSTRUCTIONS.txt +++ /dev/null @@ -1,103 +0,0 @@ - _____ _ _ _ -|_ _| | | | | (_) - | | _ __ ___| |_ _ __ _ _ ___| |_ _ ___ _ __ ___ - | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __| - _| || | | \__ \ |_| | | |_| | (__| |_| | (_) | | | \__ \ - \___/_| |_|___/\__|_| \__,_|\___|\__|_|\___/|_| |_|___/ ----------------------------------------------------------- - - Place bg3_watcher.exe, bg3_injector.exe, bg3_autostart, and loader.dll wherever you want, - maybe create shortcuts to them. Keep all these files together, including loader.dll. - - - bg3_watcher is a tool which stays running in the background. It watches for the launch of bg3 or - bg3_dx11, and injects the plugins into the game. You can load your game through normal means, and - it'll all be transparently patched in the background. This tool creates a tray icon. You can go - to your taskbar to find the icon, right click on it, and press quit, when you are done using it. - - The benefit of this tool is that it doesn't require installation, and if you don't want plugins - running, just don't start the tool. The downside is it requires manual running. - - - bg3_injector.exe is a simpler, one-time use tool, which finds any instance of the game that's already - running (vulkan or dx11), and injects the plugins into it at runtime. The purpose of this - tool is to be an alternative to bg3_watcher; for those people who don't want a tool always - running in the background. - - The benefit of this tool is that it doesn't require installation, and if you don't want plugins - running, just don't start the tool. The downside is it requires manual running. - - Please use it BEFORE loading a save. Plugins expect that they are run on the game process startup, - so please run it as soon as possible. - - - bg3_autostart.exe automatically patches the game when it runs. It does not need to ever be manually run; - it starts when the game starts, and stops when the game stops. Just like Native Mod Loader, it is seamless. - This does however require extra registry edits. - - The benefit of this tool is that it doesn't require manual starting. The downside is it requires installation, - and it is more work to disable it if you don't want plugins running (since that requires you to uninstall it). - - To install this tool, run install.bat, and to uninstall run uninstall.bat. - - Once you install, you must not move the exe. If you wish to move it, uninstall, move the tool, then reinstall it. - Please also note that the registry entries point at the current bg3_autostart.exe location. If this file is in your - windows user folder and another windows user tries to launch the game, they may not have access to the exe in your - windows user folder (since it's another windows user's files). If multiple windows users play this game, you should - instead place this exe at a location accessible by all windows users to avoid this problem. - - Also, if you delete the tools, make sure to uninstall first! - - The two registry entries added/removed are. You may also remove these manually if you wish. - HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\bg3.exe - HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\bg3_dx11.exe - - ____ _ - / ___|| |_ ___ _ __ ___ - \___ \| __/ _ \ '_ \/ __| - ___) | || __/ |_) \__ \ - |____/ \__\___| .__/|___/ - |_| --------------------------- - -The first time you run a tool, it will: - - Generate a config.toml for you - - Check the `config.toml` file inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` - - If the game was installed to a non-standard path, you must adjust this path to correct it. - It needs to point to the game's root installation directory. - E.g. `C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3` - - If the tools are placed in /bin or /bin/subfolder, they will detect the install root - automatically, and install_root in config.toml won't require configuring. - - Place any dll plugins you have inside `C:\Users\\AppData\Local\Larian Studios\Baldur's Gate 3\Plugins` - - Remember, all NativeModLoader plugins are compatible! - -Watcher: - - This will silently run in the background and watch for game launches. Once the game launches, - it will auto-patch the game instance. When you're done using the tool, go to the systray, right - click on the icon, and click Quit - 1. Run the watcher tool - 2. When the game launches, it will auto-patch the game instance - -Injector: - - This tool is similar to the watcher, but it is a one-time use tool. It is useful if you don't - want the watcher tool always running in the background. - 1. Start your game. - 2. Start the injector tool.* - - * If you start too late, some plugins may not properly load. You could try starting the injector tool - first, then the game after to fix this. As long as you start the game within 10 seconds, it'll work. - -Autostart: - 1. Run your game as normal. It will automatically be patched. - -If you wish to disable a mod, add an entry without extension to the `disabled` key - - For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, the entry looks like: - disabled = ["FooBar", "FooBaz"] - - If you wish to disable all plugins, don't run the injector, quit the watcher tool if it's running, - and if autostart was installed, uninstall it; then start the game normally as you always do. - -Source code: https://github.com/MolotovCherry/Yet-Another-BG3-Native-Mod-Loader - -Disclaimer: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.