From 053f2bb27edb074bf81fe86053cdebe714123ac7 Mon Sep 17 00:00:00 2001 From: Wujidadi Date: Sat, 25 Jul 2026 14:51:31 +0800 Subject: [PATCH 1/3] fix(build): fix add_data_files anchor template and restore missing octagram model references - The file_ref_entry template in package/add_data_files wrote lastKnownFileType = text, while the anchor line for zhuyin.yaml in project.pbxproj actually reads text.yaml, so the sed-based PBXFileReference insertion silently failed - As a result, newly added data files got only the PBXBuildFile, copy phase and group entries but no PBXFileReference definition; Xcode skips such dangling references without any error, so the files were quietly left out of Squirrel.app - The two octagram grammar files added in 4db2c85 (build(xcode): bundle octagram data) were affected exactly this way; this commit adds the two missing PBXFileReference definitions, reusing the original fileRef IDs - Reproducible by building from source: deployment reports "missing input schema: quick5" and the two .gram files are absent from SharedSupport --- Squirrel.xcodeproj/project.pbxproj | 2 ++ package/add_data_files | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Squirrel.xcodeproj/project.pbxproj b/Squirrel.xcodeproj/project.pbxproj index 813deaeb0..60e5844d5 100644 --- a/Squirrel.xcodeproj/project.pbxproj +++ b/Squirrel.xcodeproj/project.pbxproj @@ -256,6 +256,8 @@ 447765C725C30E6B002415AF /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = ""; }; 448363D925BDBBBF0022C7BA /* pinyin.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = pinyin.yaml; path = data/plum/pinyin.yaml; sourceTree = ""; }; 448363DA25BDBBBF0022C7BA /* zhuyin.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = zhuyin.yaml; path = data/plum/zhuyin.yaml; sourceTree = ""; }; + B93B1B771BA746E5EF3B229F /* zh-hant-t-essay-bgw.gram */ = {isa = PBXFileReference; lastKnownFileType = file; name = "zh-hant-t-essay-bgw.gram"; path = "data/plum/zh-hant-t-essay-bgw.gram"; sourceTree = ""; }; + 7DE20C60B65C3F0D24E29547 /* zh-hant-t-essay-bgc.gram */ = {isa = PBXFileReference; lastKnownFileType = file; name = "zh-hant-t-essay-bgc.gram"; path = "data/plum/zh-hant-t-essay-bgc.gram"; sourceTree = ""; }; 44986A93184B421700B3278D /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; 44986A94184B421700B3278D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; 44AEBC7121F569CF00344375 /* punctuation.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = punctuation.yaml; path = data/plum/punctuation.yaml; sourceTree = ""; }; diff --git a/package/add_data_files b/package/add_data_files index fab06178f..ba9f923ad 100755 --- a/package/add_data_files +++ b/package/add_data_files @@ -35,7 +35,7 @@ copy_files_entry() { } file_ref_entry() { - echo "$2 /* $3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = $3; path = data/plum/$3; sourceTree = \"\"; };" + echo "$2 /* $3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = $3; path = data/plum/$3; sourceTree = \"\"; };" } group_entry() { From 2069dba2f40df125bf122490a4dda62a691bbf8e Mon Sep 17 00:00:00 2001 From: Wujidadi Date: Sat, 25 Jul 2026 14:51:31 +0800 Subject: [PATCH 2/3] fix(build): derive lastKnownFileType from file extension in add_data_files - Address code review: the previous fix hardcoded text.yaml for all data/plum files, but the script also handles non-YAML assets - Dispatch by extension: .yaml uses text.yaml, .txt uses text, anything else (e.g. .gram) uses the generic file type with quoted name/path - The anchor file zhuyin.yaml takes the .yaml branch, so anchor matching is unchanged --- package/add_data_files | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/package/add_data_files b/package/add_data_files index ba9f923ad..e78a290e7 100755 --- a/package/add_data_files +++ b/package/add_data_files @@ -35,7 +35,19 @@ copy_files_entry() { } file_ref_entry() { - echo "$2 /* $3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = $3; path = data/plum/$3; sourceTree = \"\"; };" + # Pick lastKnownFileType by extension; + # non-text assets (e.g. .gram) use the generic file type with quoted name/path + case "$3" in + *.yaml) + echo "$2 /* $3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = $3; path = data/plum/$3; sourceTree = \"\"; };" + ;; + *.txt) + echo "$2 /* $3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = $3; path = data/plum/$3; sourceTree = \"\"; };" + ;; + *) + echo "$2 /* $3 */ = {isa = PBXFileReference; lastKnownFileType = file; name = \"$3\"; path = \"data/plum/$3\"; sourceTree = \"\"; };" + ;; + esac } group_entry() { From a5053dafdfc12c7aeb0c16cd575d30dd51fd857c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E6=88=8E=E6=B0=8F?= Date: Mon, 27 Jul 2026 23:04:38 +0800 Subject: [PATCH 3/3] remove files from rime-octagram-data --- Squirrel.xcodeproj/project.pbxproj | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Squirrel.xcodeproj/project.pbxproj b/Squirrel.xcodeproj/project.pbxproj index 60e5844d5..edde5866a 100644 --- a/Squirrel.xcodeproj/project.pbxproj +++ b/Squirrel.xcodeproj/project.pbxproj @@ -36,9 +36,6 @@ 447765CA25C30E97002415AF /* Sparkle.framework in Copy 3rd-party Frameworks */ = {isa = PBXBuildFile; fileRef = 447765C725C30E6B002415AF /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 448363DD25BDBBED0022C7BA /* pinyin.yaml in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = 448363D925BDBBBF0022C7BA /* pinyin.yaml */; }; 448363DE25BDBBED0022C7BA /* zhuyin.yaml in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = 448363DA25BDBBBF0022C7BA /* zhuyin.yaml */; }; - 207BACE41D4D6308E1699BB5 /* zh-hant-t-essay-bgw.gram in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = B93B1B771BA746E5EF3B229F /* zh-hant-t-essay-bgw.gram */; }; - DF31C997BE556AC470BE6DFC /* zh-hant-t-essay-bgc.gram in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = 7DE20C60B65C3F0D24E29547 /* zh-hant-t-essay-bgc.gram */; }; - 91C92106F786AEFE06164570 /* grammar.yaml in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = 4639481E7541071A4259FDE6 /* grammar.yaml */; }; 44986A95184B421700B3278D /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = 44986A93184B421700B3278D /* LICENSE.txt */; }; 44986A96184B421700B3278D /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 44986A94184B421700B3278D /* README.md */; }; 44AEBC7521F569FD00344375 /* key_bindings.yaml in Copy Shared Support Files */ = {isa = PBXBuildFile; fileRef = 44AEBC7221F569CF00344375 /* key_bindings.yaml */; }; @@ -163,9 +160,6 @@ files = ( 448363DD25BDBBED0022C7BA /* pinyin.yaml in Copy Shared Support Files */, 448363DE25BDBBED0022C7BA /* zhuyin.yaml in Copy Shared Support Files */, - 207BACE41D4D6308E1699BB5 /* zh-hant-t-essay-bgw.gram in Copy Shared Support Files */, - DF31C997BE556AC470BE6DFC /* zh-hant-t-essay-bgc.gram in Copy Shared Support Files */, - 91C92106F786AEFE06164570 /* grammar.yaml in Copy Shared Support Files */, 441E637722B7E96F006DCCDD /* bopomofo_express.schema.yaml in Copy Shared Support Files */, 441E637822B7E96F006DCCDD /* bopomofo_tw.schema.yaml in Copy Shared Support Files */, 441E637922B7E96F006DCCDD /* bopomofo.schema.yaml in Copy Shared Support Files */, @@ -256,8 +250,6 @@ 447765C725C30E6B002415AF /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = ""; }; 448363D925BDBBBF0022C7BA /* pinyin.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = pinyin.yaml; path = data/plum/pinyin.yaml; sourceTree = ""; }; 448363DA25BDBBBF0022C7BA /* zhuyin.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; name = zhuyin.yaml; path = data/plum/zhuyin.yaml; sourceTree = ""; }; - B93B1B771BA746E5EF3B229F /* zh-hant-t-essay-bgw.gram */ = {isa = PBXFileReference; lastKnownFileType = file; name = "zh-hant-t-essay-bgw.gram"; path = "data/plum/zh-hant-t-essay-bgw.gram"; sourceTree = ""; }; - 7DE20C60B65C3F0D24E29547 /* zh-hant-t-essay-bgc.gram */ = {isa = PBXFileReference; lastKnownFileType = file; name = "zh-hant-t-essay-bgc.gram"; path = "data/plum/zh-hant-t-essay-bgc.gram"; sourceTree = ""; }; 44986A93184B421700B3278D /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; 44986A94184B421700B3278D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; 44AEBC7121F569CF00344375 /* punctuation.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = punctuation.yaml; path = data/plum/punctuation.yaml; sourceTree = ""; }; @@ -496,9 +488,6 @@ children = ( 448363D925BDBBBF0022C7BA /* pinyin.yaml */, 448363DA25BDBBBF0022C7BA /* zhuyin.yaml */, - B93B1B771BA746E5EF3B229F /* zh-hant-t-essay-bgw.gram */, - 7DE20C60B65C3F0D24E29547 /* zh-hant-t-essay-bgc.gram */, - 4639481E7541071A4259FDE6 /* grammar.yaml */, 441E636C22B7E90D006DCCDD /* bopomofo_express.schema.yaml */, 441E636722B7E90D006DCCDD /* bopomofo_tw.schema.yaml */, 441E636822B7E90D006DCCDD /* bopomofo.schema.yaml */,