Smaller bundles: stripped Mac binaries, one math font, smaller iOS asset catalog !458

merged merged by cmc on 2026-11-22 17:57 UTC · krz/orgstar:issue-207-bundle-size into main

4 files changed, +114 −3

Layout: unified · split

CONTRIBUTING.org +4
@@ -161,6 +161,10 @@ There is no CI; run these before committing.
161keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the 161keychain's Developer ID, notarizes a DMG, tags =v<version>=, uploads the DMG to the
162gitbay release and updates the cask in krz/homebrew-tap. 162gitbay release and updates the cask in krz/homebrew-tap.
163 163
164=scripts/build-app.sh= strips the executables and copies their dSYMs to =.build/app/dSYMs=;
165the release zips them to =.build/release/orgstar-<version>-dSYMs.zip= and doesn't upload
166them. Keep the zip to symbolicate that release's crash reports.
167
164Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's 168Set =ORGSTAR_NOTES= to an HTML file of release notes for the appcast, which Sparkle's
165update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay 169update window shows, and =ORGSTAR_RELEASE_NOTES= to a Markdown file for the gitbay
166release. Without them both get the one-line platform note. 170release. Without them both get the one-line platform note.
ios/Orgstar.xcodeproj/project.pbxproj +98
@@ -409,6 +409,7 @@
409 FD11E99E3EE9450636C880B9 /* Sources */, 409 FD11E99E3EE9450636C880B9 /* Sources */,
410 843FAAECD041CD2466904790 /* Frameworks */, 410 843FAAECD041CD2466904790 /* Frameworks */,
411 287027B677CE75B2D4715EE6 /* Resources */, 411 287027B677CE75B2D4715EE6 /* Resources */,
412 3B3A530168A4B0C6DC41A289 /* Remove unused math fonts */,
412 269605D45C104F12CBCDC8FB /* Embed Foundation Extensions */, 413 269605D45C104F12CBCDC8FB /* Embed Foundation Extensions */,
413 2EBC267BEE9E23673AE8DADC /* Embed Watch Content */, 414 2EBC267BEE9E23673AE8DADC /* Embed Watch Content */,
414 ); 415 );
@@ -441,6 +442,7 @@
441 E5AC38BB173B87555EBEC0AC /* Sources */, 442 E5AC38BB173B87555EBEC0AC /* Sources */,
442 1439C48F60EF427CC7ADB87B /* Frameworks */, 443 1439C48F60EF427CC7ADB87B /* Frameworks */,
443 1A9DC7DD7E76A6C5A1DC674C /* Resources */, 444 1A9DC7DD7E76A6C5A1DC674C /* Resources */,
445 C6B3DD5221D3870C9175CC69 /* Remove unused math fonts */,
444 ); 446 );
445 buildRules = ( 447 buildRules = (
446 ); 448 );
@@ -538,6 +540,7 @@
538 0EFD7F2537761E968D3FE030 /* Sources */, 540 0EFD7F2537761E968D3FE030 /* Sources */,
539 39CC8FCF3B50EC810191AF52 /* Frameworks */, 541 39CC8FCF3B50EC810191AF52 /* Frameworks */,
540 EDF6CA650FB1A0A57A682074 /* Resources */, 542 EDF6CA650FB1A0A57A682074 /* Resources */,
543 C7926A563D8955E2098E6D1E /* Remove unused math fonts */,
541 50EAF92A2ABF4715F69C1B26 /* Embed Foundation Extensions */, 544 50EAF92A2ABF4715F69C1B26 /* Embed Foundation Extensions */,
542 ); 545 );
543 buildRules = ( 546 buildRules = (
@@ -592,6 +595,7 @@
592 296E85448BDDDD3245D3D432 /* Sources */, 595 296E85448BDDDD3245D3D432 /* Sources */,
593 AE22603FB5DE3C5FFFBBC68E /* Frameworks */, 596 AE22603FB5DE3C5FFFBBC68E /* Frameworks */,
594 EA6C64E8D42ADCFBC3B131FF /* Resources */, 597 EA6C64E8D42ADCFBC3B131FF /* Resources */,
598 52900680D96A1A4CD35C68D4 /* Remove unused math fonts */,
595 ); 599 );
596 buildRules = ( 600 buildRules = (
597 ); 601 );
@@ -720,6 +724,27 @@
720/* End PBXResourcesBuildPhase section */ 724/* End PBXResourcesBuildPhase section */
721 725
722/* Begin PBXShellScriptBuildPhase section */ 726/* Begin PBXShellScriptBuildPhase section */
727 3B3A530168A4B0C6DC41A289 /* Remove unused math fonts */ = {
728 isa = PBXShellScriptBuildPhase;
729 buildActionMask = 2147483647;
730 files = (
731 );
732 inputFileListPaths = (
733 );
734 inputPaths = (
735 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
736 );
737 name = "Remove unused math fonts";
738 outputFileListPaths = (
739 );
740 outputPaths = (
741 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
742 "$(DERIVED_FILE_DIR)/math-fonts-removed",
743 );
744 runOnlyForDeploymentPostprocessing = 0;
745 shellPath = /bin/sh;
746 shellScript = "# LatexPreview uses only SwiftMath's default font, Latin Modern. A signed copy is signed again.\nfind \"$SCRIPT_OUTPUT_FILE_0\" -path '*/mathFonts.bundle/*' \\( -name '*.otf' -o -name '*.plist' \\) ! -name 'latinmodern-math.*' -delete\nif codesign -d \"$SCRIPT_OUTPUT_FILE_0\" 2> /dev/null; then\n codesign --force --sign \"${EXPANDED_CODE_SIGN_IDENTITY:--}\" \"$SCRIPT_OUTPUT_FILE_0\"\nfi\ntouch \"$SCRIPT_OUTPUT_FILE_1\"\n";
747 };
723 4316AE7E93B32A6A11452968 /* Compile string catalog */ = { 748 4316AE7E93B32A6A11452968 /* Compile string catalog */ = {
724 isa = PBXShellScriptBuildPhase; 749 isa = PBXShellScriptBuildPhase;
725 buildActionMask = 2147483647; 750 buildActionMask = 2147483647;
@@ -751,6 +776,27 @@
751 shellPath = /bin/sh; 776 shellPath = /bin/sh;
752 shellScript = "# The catalog is compiled here rather than as a resource, so that Xcode doesn't sync it\n# from this target's sources; scripts/sync-strings.sh keeps it.\nxcrun xcstringstool compile \"$SCRIPT_INPUT_FILE_0\" --output-directory \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\n"; 777 shellScript = "# The catalog is compiled here rather than as a resource, so that Xcode doesn't sync it\n# from this target's sources; scripts/sync-strings.sh keeps it.\nxcrun xcstringstool compile \"$SCRIPT_INPUT_FILE_0\" --output-directory \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\n";
753 }; 778 };
779 52900680D96A1A4CD35C68D4 /* Remove unused math fonts */ = {
780 isa = PBXShellScriptBuildPhase;
781 buildActionMask = 2147483647;
782 files = (
783 );
784 inputFileListPaths = (
785 );
786 inputPaths = (
787 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
788 );
789 name = "Remove unused math fonts";
790 outputFileListPaths = (
791 );
792 outputPaths = (
793 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
794 "$(DERIVED_FILE_DIR)/math-fonts-removed",
795 );
796 runOnlyForDeploymentPostprocessing = 0;
797 shellPath = /bin/sh;
798 shellScript = "# LatexPreview uses only SwiftMath's default font, Latin Modern. A signed copy is signed again.\nfind \"$SCRIPT_OUTPUT_FILE_0\" -path '*/mathFonts.bundle/*' \\( -name '*.otf' -o -name '*.plist' \\) ! -name 'latinmodern-math.*' -delete\nif codesign -d \"$SCRIPT_OUTPUT_FILE_0\" 2> /dev/null; then\n codesign --force --sign \"${EXPANDED_CODE_SIGN_IDENTITY:--}\" \"$SCRIPT_OUTPUT_FILE_0\"\nfi\ntouch \"$SCRIPT_OUTPUT_FILE_1\"\n";
799 };
754 641BAD6CBA4413E3690E3513 /* Compile string catalog */ = { 800 641BAD6CBA4413E3690E3513 /* Compile string catalog */ = {
755 isa = PBXShellScriptBuildPhase; 801 isa = PBXShellScriptBuildPhase;
756 buildActionMask = 2147483647; 802 buildActionMask = 2147483647;
@@ -875,6 +921,48 @@
875 shellPath = /bin/sh; 921 shellPath = /bin/sh;
876 shellScript = "# The catalog is compiled here rather than as a resource, so that Xcode doesn't sync it\n# from this target's sources; scripts/sync-strings.sh keeps it.\nxcrun xcstringstool compile \"$SCRIPT_INPUT_FILE_0\" --output-directory \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\n"; 922 shellScript = "# The catalog is compiled here rather than as a resource, so that Xcode doesn't sync it\n# from this target's sources; scripts/sync-strings.sh keeps it.\nxcrun xcstringstool compile \"$SCRIPT_INPUT_FILE_0\" --output-directory \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\n";
877 }; 923 };
924 C6B3DD5221D3870C9175CC69 /* Remove unused math fonts */ = {
925 isa = PBXShellScriptBuildPhase;
926 buildActionMask = 2147483647;
927 files = (
928 );
929 inputFileListPaths = (
930 );
931 inputPaths = (
932 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
933 );
934 name = "Remove unused math fonts";
935 outputFileListPaths = (
936 );
937 outputPaths = (
938 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
939 "$(DERIVED_FILE_DIR)/math-fonts-removed",
940 );
941 runOnlyForDeploymentPostprocessing = 0;
942 shellPath = /bin/sh;
943 shellScript = "# LatexPreview uses only SwiftMath's default font, Latin Modern. A signed copy is signed again.\nfind \"$SCRIPT_OUTPUT_FILE_0\" -path '*/mathFonts.bundle/*' \\( -name '*.otf' -o -name '*.plist' \\) ! -name 'latinmodern-math.*' -delete\nif codesign -d \"$SCRIPT_OUTPUT_FILE_0\" 2> /dev/null; then\n codesign --force --sign \"${EXPANDED_CODE_SIGN_IDENTITY:--}\" \"$SCRIPT_OUTPUT_FILE_0\"\nfi\ntouch \"$SCRIPT_OUTPUT_FILE_1\"\n";
944 };
945 C7926A563D8955E2098E6D1E /* Remove unused math fonts */ = {
946 isa = PBXShellScriptBuildPhase;
947 buildActionMask = 2147483647;
948 files = (
949 );
950 inputFileListPaths = (
951 );
952 inputPaths = (
953 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
954 );
955 name = "Remove unused math fonts";
956 outputFileListPaths = (
957 );
958 outputPaths = (
959 "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/SwiftMath_SwiftMath.bundle",
960 "$(DERIVED_FILE_DIR)/math-fonts-removed",
961 );
962 runOnlyForDeploymentPostprocessing = 0;
963 shellPath = /bin/sh;
964 shellScript = "# LatexPreview uses only SwiftMath's default font, Latin Modern. A signed copy is signed again.\nfind \"$SCRIPT_OUTPUT_FILE_0\" -path '*/mathFonts.bundle/*' \\( -name '*.otf' -o -name '*.plist' \\) ! -name 'latinmodern-math.*' -delete\nif codesign -d \"$SCRIPT_OUTPUT_FILE_0\" 2> /dev/null; then\n codesign --force --sign \"${EXPANDED_CODE_SIGN_IDENTITY:--}\" \"$SCRIPT_OUTPUT_FILE_0\"\nfi\ntouch \"$SCRIPT_OUTPUT_FILE_1\"\n";
965 };
878 C9A138A7D511613ADA30B0C1 /* Compile string catalog */ = { 966 C9A138A7D511613ADA30B0C1 /* Compile string catalog */ = {
879 isa = PBXShellScriptBuildPhase; 967 isa = PBXShellScriptBuildPhase;
880 buildActionMask = 2147483647; 968 buildActionMask = 2147483647;
@@ -1020,6 +1108,7 @@
1020 COMBINE_HIDPI_IMAGES = YES; 1108 COMBINE_HIDPI_IMAGES = YES;
1021 CURRENT_PROJECT_VERSION = 17; 1109 CURRENT_PROJECT_VERSION = 17;
1022 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1110 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1111 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1023 GENERATE_INFOPLIST_FILE = NO; 1112 GENERATE_INFOPLIST_FILE = NO;
1024 INFOPLIST_FILE = OrgstarMac/Info.plist; 1113 INFOPLIST_FILE = OrgstarMac/Info.plist;
1025 LD_RUNPATH_SEARCH_PATHS = ( 1114 LD_RUNPATH_SEARCH_PATHS = (
@@ -1076,6 +1165,7 @@
1076 CODE_SIGN_STYLE = Automatic; 1165 CODE_SIGN_STYLE = Automatic;
1077 CURRENT_PROJECT_VERSION = 17; 1166 CURRENT_PROJECT_VERSION = 17;
1078 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1167 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1168 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1079 GENERATE_INFOPLIST_FILE = NO; 1169 GENERATE_INFOPLIST_FILE = NO;
1080 INFOPLIST_FILE = OrgstarShare/Info.plist; 1170 INFOPLIST_FILE = OrgstarShare/Info.plist;
1081 LD_RUNPATH_SEARCH_PATHS = ( 1171 LD_RUNPATH_SEARCH_PATHS = (
@@ -1098,6 +1188,7 @@
1098 CODE_SIGN_STYLE = Automatic; 1188 CODE_SIGN_STYLE = Automatic;
1099 CURRENT_PROJECT_VERSION = 17; 1189 CURRENT_PROJECT_VERSION = 17;
1100 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1190 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1191 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1101 GENERATE_INFOPLIST_FILE = NO; 1192 GENERATE_INFOPLIST_FILE = NO;
1102 INFOPLIST_FILE = OrgstarShare/Info.plist; 1193 INFOPLIST_FILE = OrgstarShare/Info.plist;
1103 LD_RUNPATH_SEARCH_PATHS = ( 1194 LD_RUNPATH_SEARCH_PATHS = (
@@ -1143,10 +1234,12 @@
1143 buildSettings = { 1234 buildSettings = {
1144 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1235 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1145 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; 1236 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
1237 ASSETCATALOG_COMPILER_OPTIMIZATION = space;
1146 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; 1238 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements;
1147 CODE_SIGN_STYLE = Automatic; 1239 CODE_SIGN_STYLE = Automatic;
1148 CURRENT_PROJECT_VERSION = 17; 1240 CURRENT_PROJECT_VERSION = 17;
1149 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1241 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1242 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1150 GENERATE_INFOPLIST_FILE = NO; 1243 GENERATE_INFOPLIST_FILE = NO;
1151 INFOPLIST_FILE = Orgstar/Info.plist; 1244 INFOPLIST_FILE = Orgstar/Info.plist;
1152 INFOPLIST_KEY_CFBundleDisplayName = orgstar; 1245 INFOPLIST_KEY_CFBundleDisplayName = orgstar;
@@ -1246,6 +1339,7 @@
1246 CODE_SIGN_STYLE = Automatic; 1339 CODE_SIGN_STYLE = Automatic;
1247 CURRENT_PROJECT_VERSION = 17; 1340 CURRENT_PROJECT_VERSION = 17;
1248 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1341 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1342 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1249 GENERATE_INFOPLIST_FILE = NO; 1343 GENERATE_INFOPLIST_FILE = NO;
1250 INFOPLIST_FILE = OrgstarWidgets/Info.plist; 1344 INFOPLIST_FILE = OrgstarWidgets/Info.plist;
1251 IPHONEOS_DEPLOYMENT_TARGET = 26.0; 1345 IPHONEOS_DEPLOYMENT_TARGET = 26.0;
@@ -1351,10 +1445,12 @@
1351 buildSettings = { 1445 buildSettings = {
1352 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1446 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1353 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; 1447 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
1448 ASSETCATALOG_COMPILER_OPTIMIZATION = space;
1354 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; 1449 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements;
1355 CODE_SIGN_STYLE = Automatic; 1450 CODE_SIGN_STYLE = Automatic;
1356 CURRENT_PROJECT_VERSION = 17; 1451 CURRENT_PROJECT_VERSION = 17;
1357 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1452 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1453 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1358 GENERATE_INFOPLIST_FILE = NO; 1454 GENERATE_INFOPLIST_FILE = NO;
1359 INFOPLIST_FILE = Orgstar/Info.plist; 1455 INFOPLIST_FILE = Orgstar/Info.plist;
1360 INFOPLIST_KEY_CFBundleDisplayName = orgstar; 1456 INFOPLIST_KEY_CFBundleDisplayName = orgstar;
@@ -1379,6 +1475,7 @@
1379 CODE_SIGN_STYLE = Automatic; 1475 CODE_SIGN_STYLE = Automatic;
1380 CURRENT_PROJECT_VERSION = 17; 1476 CURRENT_PROJECT_VERSION = 17;
1381 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1477 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1478 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1382 GENERATE_INFOPLIST_FILE = NO; 1479 GENERATE_INFOPLIST_FILE = NO;
1383 INFOPLIST_FILE = OrgstarWidgets/Info.plist; 1480 INFOPLIST_FILE = OrgstarWidgets/Info.plist;
1384 IPHONEOS_DEPLOYMENT_TARGET = 26.0; 1481 IPHONEOS_DEPLOYMENT_TARGET = 26.0;
@@ -1459,6 +1556,7 @@
1459 COMBINE_HIDPI_IMAGES = YES; 1556 COMBINE_HIDPI_IMAGES = YES;
1460 CURRENT_PROJECT_VERSION = 17; 1557 CURRENT_PROJECT_VERSION = 17;
1461 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1558 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1559 ENABLE_USER_SCRIPT_SANDBOXING = NO;
1462 GENERATE_INFOPLIST_FILE = NO; 1560 GENERATE_INFOPLIST_FILE = NO;
1463 INFOPLIST_FILE = OrgstarMac/Info.plist; 1561 INFOPLIST_FILE = OrgstarMac/Info.plist;
1464 LD_RUNPATH_SEARCH_PATHS = ( 1562 LD_RUNPATH_SEARCH_PATHS = (
scripts/build-app.sh +10 −3
@@ -31,9 +31,11 @@ swift build -c release $arch_flags --product OrgstarWidgets
31# shellcheck disable=SC2086 31# shellcheck disable=SC2086
32binary="$(swift build -c release $arch_flags --show-bin-path)/Orgstar" 32binary="$(swift build -c release $arch_flags --show-bin-path)/Orgstar"
33 33
34rm -rf "$app" 34rm -rf "$app" .build/app/dSYMs
35mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$app/Contents/Frameworks" 35mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources" "$app/Contents/Frameworks" .build/app/dSYMs
36cp "$binary" "$app/Contents/MacOS/Orgstar" 36cp "$binary" "$app/Contents/MacOS/Orgstar"
37# The build's debug symbols, for symbolicating crash reports; the executables ship stripped.
38for dsym in "$(dirname "$binary")"/*.dSYM; do ditto "$dsym" ".build/app/dSYMs/$(basename "$dsym")"; done
37 39
38# Sparkle, from its SwiftPM artifact: the framework beside the binary, found through an rpath. 40# Sparkle, from its SwiftPM artifact: the framework beside the binary, found through an rpath.
39sparkle="$(find .build/artifacts -path '*Sparkle.xcframework/macos-*/Sparkle.framework' -maxdepth 7 | head -1)" 41sparkle="$(find .build/artifacts -path '*Sparkle.xcframework/macos-*/Sparkle.framework' -maxdepth 7 | head -1)"
@@ -41,9 +43,13 @@ sparkle="$(find .build/artifacts -path '*Sparkle.xcframework/macos-*/Sparkle.fra
41ditto "$sparkle" "$app/Contents/Frameworks/Sparkle.framework" 43ditto "$sparkle" "$app/Contents/Frameworks/Sparkle.framework"
42otool -l "$app/Contents/MacOS/Orgstar" | grep -q '@executable_path/../Frameworks' \ 44otool -l "$app/Contents/MacOS/Orgstar" | grep -q '@executable_path/../Frameworks' \
43 || install_name_tool -add_rpath @executable_path/../Frameworks "$app/Contents/MacOS/Orgstar" 45 || install_name_tool -add_rpath @executable_path/../Frameworks "$app/Contents/MacOS/Orgstar"
46strip -x "$app/Contents/MacOS/Orgstar"
44 47
45# SwiftMath's math fonts, which it finds in the app's resources. 48# SwiftMath's math fonts, which it finds in the app's resources. LatexPreview uses only the
49# default, Latin Modern.
46cp -R "$(dirname "$binary")/SwiftMath_SwiftMath.bundle" "$app/Contents/Resources/" 50cp -R "$(dirname "$binary")/SwiftMath_SwiftMath.bundle" "$app/Contents/Resources/"
51find "$app/Contents/Resources/SwiftMath_SwiftMath.bundle" -path '*/mathFonts.bundle/*' \
52 \( -name '*.otf' -o -name '*.plist' \) ! -name 'latinmodern-math.*' -delete
47# MathJax, for PDF export. 53# MathJax, for PDF export.
48cp -R "$(dirname "$binary")/Orgstar_OrgMathJax.bundle" "$app/Contents/Resources/" 54cp -R "$(dirname "$binary")/Orgstar_OrgMathJax.bundle" "$app/Contents/Resources/"
49 55
@@ -176,6 +182,7 @@ appex() { # name, extension point, principal class (or ""), attributes, extra en
176 dir="$app/Contents/PlugIns/$1.appex/Contents" 182 dir="$app/Contents/PlugIns/$1.appex/Contents"
177 mkdir -p "$dir/MacOS" "$dir/Resources" 183 mkdir -p "$dir/MacOS" "$dir/Resources"
178 cp "$(dirname "$binary")/$1" "$dir/MacOS/$1" 184 cp "$(dirname "$binary")/$1" "$dir/MacOS/$1"
185 strip -x "$dir/MacOS/$1"
179 scripts/localize.sh "$dir/Resources" 186 scripts/localize.sh "$dir/Resources"
180 cat > "$dir/Info.plist" <<PLIST 187 cat > "$dir/Info.plist" <<PLIST
181<?xml version="1.0" encoding="UTF-8"?> 188<?xml version="1.0" encoding="UTF-8"?>
scripts/release-mac.sh +2
@@ -52,6 +52,8 @@ out=".build/release"
52dmg="$out/orgstar-$version.dmg" 52dmg="$out/orgstar-$version.dmg"
53rm -rf "${out:?}" 53rm -rf "${out:?}"
54mkdir -p "$out/dmg" 54mkdir -p "$out/dmg"
55# The debug symbols of the stripped executables, for symbolicating crash reports; not uploaded.
56ditto -c -k --keepParent .build/app/dSYMs "$out/orgstar-$version-dSYMs.zip"
55ditto "$app" "$out/dmg/orgstar.app" 57ditto "$app" "$out/dmg/orgstar.app"
56ln -s /Applications "$out/dmg/Applications" 58ln -s /Applications "$out/dmg/Applications"
57hdiutil create -quiet -volname "orgstar $version" -srcfolder "$out/dmg" -format UDZO -fs HFS+ "$dmg" 59hdiutil create -quiet -volname "orgstar $version" -srcfolder "$out/dmg" -format UDZO -fs HFS+ "$dmg"