From 6168009cefb424db9d99dbe429c30a72e76e3ba5 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 16 Aug 2024 17:19:17 +0800 Subject: [PATCH] [feat] support building xcode app on MacOSX --- Info.plist | 35 +++++++++++++++++++++++++++++++++++ thirdparty/projectx | 2 +- xmake.lua | 6 ++++-- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 Info.plist diff --git a/Info.plist b/Info.plist new file mode 100644 index 0000000..8a20f46 --- /dev/null +++ b/Info.plist @@ -0,0 +1,35 @@ + + + + + + CFBundleIdentifier + com.yourcompany.yourappname + + + CFBundleName + Your App Name + + + CFBundleShortVersionString + 1.0.0 + + + CFBundleVersion + 1 + + + NSMicrophoneUsageDescription + App requires access to the microphone for audio recording. + + + NSCameraUsageDescription + App requires access to the camera for video recording. + + + NSCameraUseContinuityCameraDeviceType + Your usage description here + + + + \ No newline at end of file diff --git a/thirdparty/projectx b/thirdparty/projectx index d6599ab..4eac29b 160000 --- a/thirdparty/projectx +++ b/thirdparty/projectx @@ -1 +1 @@ -Subproject commit d6599abf81035911af91238dfe6eab0626594353 +Subproject commit 4eac29b6de0f93d3e5080280d55494daa0f02870 diff --git a/xmake.lua b/xmake.lua index b997235..100da37 100644 --- a/xmake.lua +++ b/xmake.lua @@ -18,10 +18,10 @@ end add_requires("spdlog 1.14.1", {system = false}) add_requires("imgui v1.91.0", {configs = {sdl2 = true, sdl2_renderer = true}}) -add_requires("libyuv") add_requires("miniaudio 0.11.21") if is_os("windows") then + add_requires("libyuv") add_links("Shell32", "windowsapp", "dwmapi", "User32", "kernel32", "SDL2-static", "SDL2main", "gdi32", "winmm", "setupapi", "version", "Imm32", "iphlpapi") @@ -63,9 +63,9 @@ target("common") target("screen_capturer") set_kind("object") add_deps("rd_log") - add_packages("libyuv") add_includedirs("src/screen_capturer", {public = true}) if is_os("windows") then + add_packages("libyuv") add_files("src/screen_capturer/windows/*.cpp") add_includedirs("src/screen_capturer/windows", {public = true}) elseif is_os("macosx") then @@ -138,6 +138,8 @@ target("remote_desk") add_files("icon/app.rc") elseif is_os("macosx") then add_packages("ffmpeg") + add_rules("xcode.application") + add_files("Info.plist") elseif is_os("linux") then add_packages("ffmpeg") end