diff --git a/3rdparty/mainui b/3rdparty/mainui index fd54f27e..71e73d23 160000 --- a/3rdparty/mainui +++ b/3rdparty/mainui @@ -1 +1 @@ -Subproject commit fd54f27e44baa34191265cb044a6b1d760b43d93 +Subproject commit 71e73d234d4d43ae0513603d9f19ba1f56b471fb diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index 220da8e4..2b976f30 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] acraHttp = "5.12.0" -agp = "9.0.0" +agp = "9.0.1" appcompat = "1.7.1" material = "1.12.0" navigationRuntimeKtx = "2.9.1" diff --git a/scripts/build-ninja.py b/scripts/build-ninja.py index 4c99e1db..60310598 100644 --- a/scripts/build-ninja.py +++ b/scripts/build-ninja.py @@ -62,6 +62,7 @@ def main(): # build SDL2 and hlsdk-portable with cmake sdl_bin_path = os.path.join(args.out_dir, "SDL") hlsdk_bin_path = os.path.join(args.out_dir, "hlsdk-portable") + mainui_bin_path = os.path.join(args.out_dir, "mainui") abi = args.waflock.replace(".lock-waf_android_", "").replace("_build", "") inst_path = os.path.join(args.top_dir, "android", "app", "src", "main", "jniLibs", abi) @@ -71,6 +72,7 @@ def main(): run_cmake(sdl_bin_path, ["libSDL2.so"], inst_path) run_cmake(hlsdk_bin_path, None, inst_path) + run_cmake(mainui_bin_path, None, inst_path) process = subprocess.Popen(waf_exec, env=env) process.communicate() diff --git a/scripts/configure-ninja.py b/scripts/configure-ninja.py index 0314454f..03d92337 100755 --- a/scripts/configure-ninja.py +++ b/scripts/configure-ninja.py @@ -29,13 +29,16 @@ def check_repo(name, branch, url, path): def run_cmake(root, out, toolchain, abi, build_type, ndk_root, min_sdk, *args): - cmake_exec = ["cmake", "-H{}".format(root), "-DCMAKE_BUILD_TYPE={}".format(build_type), - "-DCMAKE_TOOLCHAIN_FILE={}".format(toolchain), "-DANDROID_ABI={}".format(abi), - "-DANDROID_NDK={}".format(ndk_root), - "-DANDROID_PLATFORM=android-{}".format(min_sdk), - "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", - "-DCMAKE_SYSTEM_NAME=Android", "-DCMAKE_SYSTEM_VERSION={}".format(min_sdk), - "-B{}".format(out), "-GNinja"] + cmake_exec = ["cmake", "-H{}".format(root), + "-DCMAKE_BUILD_TYPE={}".format(build_type), + "-DCMAKE_TOOLCHAIN_FILE={}".format(toolchain), + "-DANDROID_ABI={}".format(abi), + "-DANDROID_NDK={}".format(ndk_root), + "-DANDROID_PLATFORM=android-{}".format(min_sdk), + "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", + "-DCMAKE_SYSTEM_NAME=Android", + "-DCMAKE_SYSTEM_VERSION={}".format(min_sdk), + "-B{}".format(out), "-GNinja"] cmake_exec.extend(args) cmake_process = subprocess.Popen(cmake_exec) @@ -79,6 +82,13 @@ def main(): run_cmake(hlsdk_path, hlsdk_out_path, cmake_toolchain_path, abi, cmake_build_type, args.ndk_root, args.min_sdk_version, "-DANDROID_APK=ON") + # configure mainui_cpp + mainui_path = os.path.join(args.wscript_path, "3rdparty", "mainui") + mainui_out_path = os.path.join(args.configuration_dir, "mainui") + + run_cmake(mainui_path, mainui_out_path, cmake_toolchain_path, abi, cmake_build_type, args.ndk_root, + args.min_sdk_version, "-DBUILD_AS_PART_OF_ENGINE=ON") + # waf configure waf_path = os.path.join(args.wscript_path, "waf") out_path = os.path.join(args.configuration_dir, "xash3d-fwgs") diff --git a/wscript b/wscript index 5813c065..27ffc596 100644 --- a/wscript +++ b/wscript @@ -100,7 +100,7 @@ SUBDIRS = [ Subproject('3rdparty/vorbis', lambda x: x.env.CLIENT and (not x.env.HAVE_SYSTEM_VORBIS or not x.env.HAVE_SYSTEM_VORBISFILE)), Subproject('3rdparty/opusfile', lambda x: x.env.CLIENT and not x.env.HAVE_SYSTEM_OPUSFILE), Subproject('3rdparty/maintui', lambda x: x.env.CLIENT and x.env.TUI), - Subproject('3rdparty/mainui', lambda x: x.env.CLIENT), + Subproject('3rdparty/mainui', lambda x: x.env.CLIENT and x.env.DEST_OS != 'android'), Subproject('3rdparty/vgui_support', lambda x: x.env.CLIENT), Subproject('3rdparty/MultiEmulator',lambda x: x.env.CLIENT), # Subproject('3rdparty/freevgui', lambda x: x.env.CLIENT),