From 824d2d3f0b86373421da3874c6aaeac1b3966e3c Mon Sep 17 00:00:00 2001 From: jhaizhou <258432107+jhaizhou-ops@users.noreply.github.com> Date: Mon, 12 Oct 2026 21:36:47 +0800 Subject: [PATCH] Target both iPhone and iPad by default (#2) Proposed by @strangeliu in #2. Applied at the source this repository is exported from, so the pull request itself is not merged directly. Co-authored-by: strangeliu <5244588+strangeliu@users.noreply.github.com> --- README.md | 2 +- README.zh-CN.md | 2 +- dm/ios/project.yml | 8 ++++---- dm/ios/run.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6a11f2e..4b669b2 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ The Apple account used for signing: a paid developer account gives you everythin ``` cp dm/ios/local.env.example dm/ios/local.env # set DM_TEAM_ID and DM_BUNDLE_ID; with a free Apple ID also set DM_FREE_ACCOUNT=1 and DM_IOS_UDID, and keep the phone connected while building - cd dm/ios && DM_DEVICE_FAMILY=1,2 ./run.sh build # 1,2 = build for both iPhone and iPad; leave it out for iPhone only + cd dm/ios && ./run.sh build # targets both iPhone and iPad by default; for iPhone only: DM_DEVICE_FAMILY=1 ./run.sh build ``` The first time you open the app on your phone, it asks for the "game resource folder" — the 18 resource archives from your game files. Where to put them is in the section "The "game resource folder" that goes on the phone" of [docs/GAME_FILES.md](docs/GAME_FILES.md). diff --git a/README.zh-CN.md b/README.zh-CN.md index 5e8519d..a71f35a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -222,7 +222,7 @@ flowchart LR ``` cp dm/ios/local.env.example dm/ios/local.env # 填 DM_TEAM_ID 与 DM_BUNDLE_ID;免费 Apple ID 另填 DM_FREE_ACCOUNT=1 与 DM_IOS_UDID,构建时手机连着 - cd dm/ios && DM_DEVICE_FAMILY=1,2 ./run.sh build # 1,2 = 同时面向 iPhone 与 iPad;只要 iPhone 可以不写 + cd dm/ios && ./run.sh build # 缺省同时面向 iPhone 与 iPad;只要 iPhone:DM_DEVICE_FAMILY=1 ./run.sh build ``` 装到手机上第一次打开,App 会要「游戏资源文件夹」——就是游戏文件里的 18 个资源档案,怎么放见 [docs/GAME_FILES.zh-CN.md](docs/GAME_FILES.zh-CN.md) 的「手机上要放的那个游戏资源文件夹」一节。 diff --git a/dm/ios/project.yml b/dm/ios/project.yml index f088fea..d8684e3 100644 --- a/dm/ios/project.yml +++ b/dm/ios/project.yml @@ -104,8 +104,8 @@ targets: DM_UPDATE_URL: "" # tools/adhoc.sh 在环境里有 DM_UPDATE_URL 时传入;本地构建缺省空 | Passed in by tools/adhoc.sh when DM_UPDATE_URL is in the environment; empty by default for local builds DEVELOPMENT_TEAM: ${DM_TEAM_ID} CODE_SIGN_STYLE: Automatic - TARGETED_DEVICE_FAMILY: $(DM_DEVICE_FAMILY) # 设备族:缺省只面向 iPhone("1");给 iPad 用的直装包出包时传 DM_DEVICE_FAMILY=1,2。Mac 冒烟 / 开发包不传,窗口与坐标换算不变 | Device family: defaults to iPhone only ("1"); pass DM_DEVICE_FAMILY=1,2 when building the direct-install package for iPad. Mac smoke test / development builds do not pass it; window and coordinate conversion are unchanged - DM_DEVICE_FAMILY: "1" + TARGETED_DEVICE_FAMILY: $(DM_DEVICE_FAMILY) # 设备族:缺省同时面向 iPhone 与 iPad("1,2");只要 iPhone 时构建传 DM_DEVICE_FAMILY=1 | Device family: targets both iPhone and iPad by default ("1,2"); for iPhone only, pass DM_DEVICE_FAMILY=1 to the build + DM_DEVICE_FAMILY: "1,2" ENABLE_BITCODE: NO GCC_C_LANGUAGE_STANDARD: gnu11 OTHER_CFLAGS: $(inherited) -mcpu=apple-a18 # 只给 iPhone 17 Pro Max(A19)用;宿主汇编里有 LSE 原子指令,默认 a10 基线不认 | Only for iPhone 17 Pro Max (A19); the host assembly contains LSE atomic instructions, which the default a10 baseline does not accept @@ -132,8 +132,8 @@ targets: PRODUCT_BUNDLE_IDENTIFIER: ${DM_BUNDLE_ID}.romfs-downloader DEVELOPMENT_TEAM: ${DM_TEAM_ID} CODE_SIGN_STYLE: Automatic - TARGETED_DEVICE_FAMILY: $(DM_DEVICE_FAMILY) # 设备族:缺省只面向 iPhone("1");给 iPad 用的直装包出包时传 DM_DEVICE_FAMILY=1,2。Mac 冒烟 / 开发包不传,窗口与坐标换算不变 | Device family: defaults to iPhone only ("1"); pass DM_DEVICE_FAMILY=1,2 when building the direct-install package for iPad. Mac smoke test / development builds do not pass it; window and coordinate conversion are unchanged - DM_DEVICE_FAMILY: "1" + TARGETED_DEVICE_FAMILY: $(DM_DEVICE_FAMILY) # 设备族:缺省同时面向 iPhone 与 iPad("1,2");只要 iPhone 时构建传 DM_DEVICE_FAMILY=1 | Device family: targets both iPhone and iPad by default ("1,2"); for iPhone only, pass DM_DEVICE_FAMILY=1 to the build + DM_DEVICE_FAMILY: "1,2" IPHONEOS_DEPLOYMENT_TARGET: "26.4" SWIFT_VERSION: "6.0" MARKETING_VERSION: "1.0" diff --git a/dm/ios/run.sh b/dm/ios/run.sh index b9a8194..e76345a 100755 --- a/dm/ios/run.sh +++ b/dm/ios/run.sh @@ -1,9 +1,9 @@ #!/bin/bash # 构建、显式装机、按模式启动并拉回 Documents/.txt。用法:[DM_OUT=产物目录] [DM_NOINSTALL=1] run.sh build | run.sh install | run.sh [上限秒] -# 包缺省只面向 iPhone;要同时面向 iPad:DM_DEVICE_FAMILY=1,2 ./run.sh build(设备族是构建设置,这里替你传给 xcodebuild) +# 包缺省同时面向 iPhone 与 iPad;只要 iPhone:DM_DEVICE_FAMILY=1 ./run.sh build(设备族是构建设置,这里替你传给 xcodebuild) # 产物与日志在 $DM_ROOT/run/ios/(不进仓)。真机按 bundle 停:--terminate-existing 只停本 App。 # Build, explicitly install, launch by mode and pull back Documents/.txt. Usage: [DM_OUT=output dir] [DM_NOINSTALL=1] run.sh build | run.sh install | run.sh [timeout seconds] -# The app targets iPhone only by default; to target iPad as well: DM_DEVICE_FAMILY=1,2 ./run.sh build (device family is a build setting; this passes it to xcodebuild for you) +# The app targets both iPhone and iPad by default; for iPhone only: DM_DEVICE_FAMILY=1 ./run.sh build (device family is a build setting; this passes it to xcodebuild for you) # Outputs and logs go to $DM_ROOT/run/ios/ (not in the repo). On device, stopping is by bundle: --terminate-existing stops only this App. set -u cd "$(dirname "$0")"