From 69dfccbdb1d4bae82b34bff90c3eff00bcf86199 Mon Sep 17 00:00:00 2001 From: Kerro Date: Tue, 18 Aug 2026 15:47:32 +0800 Subject: [PATCH] =?UTF-8?q?chore(build):=20Xcode=20=E5=8A=A0=20Bundle=20Em?= =?UTF-8?q?bedded=20PostgreSQL=20=E6=9E=84=E5=BB=BA=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E2=80=94=E2=80=94=E6=9C=AC=E5=9C=B0=20flutter=20build=20macos?= =?UTF-8?q?=20=E4=BA=A7=E7=89=A9=E7=9B=B4=E6=8E=A5=E5=B8=A6=E5=B5=8C?= =?UTF-8?q?=E5=85=A5=E5=BC=8F=20PG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本机按架构从 Runner/Resources/pg/ rsync 进 app bundle;缺二进制时仅警告 提示跑 scripts/pg/make-relocatable-macos.sh,不阻塞构建。免每个开发机手配, LB-23 空载实测即靠此产物跑通。 Co-Authored-By: Claude Fable 5 --- macos/Runner.xcodeproj/project.pbxproj | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 3680df72..456eb1fa 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -241,6 +241,7 @@ 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, 67960350FD9C5662BA2D3EBE /* [CP] Embed Pods Frameworks */, + E0035BEF0DA71181CCEFA294 /* Bundle Embedded PostgreSQL */, ); buildRules = ( ); @@ -400,6 +401,25 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + E0035BEF0DA71181CCEFA294 /* Bundle Embedded PostgreSQL */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Bundle Embedded PostgreSQL"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\nARCH_DIR=\"macos-arm64\"\n[ \"$(uname -m)\" = \"x86_64\" ] && ARCH_DIR=\"macos-x64\"\nSRC=\"${SRCROOT}/Runner/Resources/pg/${ARCH_DIR}\"\nDST=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/pg/${ARCH_DIR}\"\nif [ -d \"$SRC/bin\" ]; then\n echo \"Bundling embedded PostgreSQL: $SRC -> $DST\"\n /bin/mkdir -p \"$DST\"\n /usr/bin/rsync -a --delete \"$SRC/\" \"$DST/\"\nelse\n echo \"warning: embedded PostgreSQL not found at $SRC; run scripts/pg/make-relocatable-macos.sh\"\nfi\n"; + }; EB2DCFBE4878365BD662776F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647;