[feat] support building xcode app on MacOSX

This commit is contained in:
dijunkun
2024-08-16 17:19:17 +08:00
parent 06a7243ac1
commit 6168009cef
3 changed files with 40 additions and 3 deletions

35
Info.plist Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- 应用的Bundle identifier通常使用反向域名标记 -->
<key>CFBundleIdentifier</key>
<string>com.yourcompany.yourappname</string>
<!-- 应用的显示名称 -->
<key>CFBundleName</key>
<string>Your App Name</string>
<!-- 应用的版本号 -->
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<!-- 应用的构建版本号 -->
<key>CFBundleVersion</key>
<string>1</string>
<!-- 请求麦克风访问权限 -->
<key>NSMicrophoneUsageDescription</key>
<string>App requires access to the microphone for audio recording.</string>
<!-- 请求相机访问权限 -->
<key>NSCameraUsageDescription</key>
<string>App requires access to the camera for video recording.</string>
<!-- 请求使用连续相机设备 -->
<key>NSCameraUseContinuityCameraDeviceType</key>
<string>Your usage description here</string>
<!-- 其他权限和配置可以在这里添加 -->
</dict>
</plist>

View File

@@ -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