From 328e36b9d8449f34104d160b5b1f405358e1d1e3 Mon Sep 17 00:00:00 2001 From: GillianMC <70141395+SandeMC@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:11:17 +0300 Subject: [PATCH] solves the issue maybe --- .gitmodules | 5 ++++- external/modupdater | 1 + external/updater/123.txt | 0 premake5.lua | 12 ++++++++++++ source/modupdater.ixx | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 1 deletion(-) create mode 160000 external/modupdater create mode 100644 external/updater/123.txt create mode 100644 source/modupdater.ixx diff --git a/.gitmodules b/.gitmodules index f9a6cc53..6dc2aff4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,4 +10,7 @@ [submodule "shaders/GTAIV.EFLC.FusionShaders"] path = shaders/GTAIV.EFLC.FusionShaders url = https://github.com/Parallellines0451/GTAIV.EFLC.FusionShaders - ignore = dirty \ No newline at end of file + ignore = dirty +[submodule "external/modupdater"] + path = external/modupdater + url = https://github.com/ThirteenAG/modupdater diff --git a/external/modupdater b/external/modupdater new file mode 160000 index 00000000..5fb99622 --- /dev/null +++ b/external/modupdater @@ -0,0 +1 @@ +Subproject commit 5fb9962268d57d1ba549e273e020186e6e0eb97f diff --git a/external/updater/123.txt b/external/updater/123.txt new file mode 100644 index 00000000..e69de29b diff --git a/premake5.lua b/premake5.lua index 07cbb252..c4f163bd 100644 --- a/premake5.lua +++ b/premake5.lua @@ -65,7 +65,9 @@ workspace "GTAIV.EFLC.FusionFix" includedirs { "external/hooking" } includedirs { "external/injector/include" } includedirs { "external/inireader" } + includedirs { "external/modupdater/dist" } includedirs { "source/gxt/src" } + libdirs { "external/modupdater/dist" } files { "external/hooking/Hooking.Patterns.h", "external/hooking/Hooking.Patterns.cpp" } files { "external/injector/safetyhook/include/**.hpp", "external/injector/safetyhook/src/**.cpp" } files { "external/injector/zydis/**.h", "external/injector/zydis/**.c" } @@ -102,6 +104,16 @@ workspace "GTAIV.EFLC.FusionFix" end targetdir ("bin") end + + filter "configurations:Debug" + defines { "DEBUG" } + symbols "On" + links { "libmodupdater_debug_win32.lib" } + + filter "configurations:Release" + defines { "NDEBUG" } + optimize "On" + links { "libmodupdater_release_win32.lib" } project "GTAIV.EFLC.FusionFix" setpaths("H:/SteamLibrary/steamapps/common/Grand Theft Auto IV/GTAIV/", "GTAIV.exe", "plugins/") \ No newline at end of file diff --git a/source/modupdater.ixx b/source/modupdater.ixx new file mode 100644 index 00000000..391a7dc3 --- /dev/null +++ b/source/modupdater.ixx @@ -0,0 +1,38 @@ +module; + +#include +#include "libmodupdater.h" + +export module contributing; + +import common; +import settings; + +class ModUpdater +{ +public: + static inline bool bInitialized = false; + + static void Initialize() + { + if (!bInitialized) + { + bInitialized = true; + HMODULE hm = NULL; + GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)&FusionFix::onInitEvent, &hm); + muSetUpdateURL(hm, rsc_UpdateUrl); + //muSetDevUpdateURL(hm, ""); + //muSetAlwaysUpdate(hm, true); + //muSetSkipUpdateCompleteDialog(hm, true); + muInit(); + } + } + + ModUpdater() + { + FusionFix::onInitEventAsync() += []() + { + return; + }; + } +} ModUpdater; \ No newline at end of file