Skip to content

Commit

Permalink
Build package without notarization, app sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
yous committed May 8, 2022
1 parent d73e89c commit 37b6e28
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Gureum.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = OSX/Gureum.entitlements;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEVELOPMENT_TEAM = 9384JEL3M9;
CODE_SIGN_IDENTITY = "Apple Development";
DEVELOPMENT_TEAM = H5KJ5TM498;
ENABLE_HARDENED_RUNTIME = YES;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand Down Expand Up @@ -1298,9 +1298,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = OSX/Gureum.entitlements;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_IDENTITY = "Apple Development";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9384JEL3M9;
DEVELOPMENT_TEAM = H5KJ5TM498;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = Preferences/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
2 changes: 0 additions & 2 deletions OSX/Gureum.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array/>
<key>com.apple.security.network.client</key>
Expand Down
33 changes: 33 additions & 0 deletions tools/build_product.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
#https://discuss.atom.io/t/sandbox-supposedly-enabled-but-application-loader-disagrees/26155
set -o pipefail

if [ ! "${CONFIGURATION}" ]; then
CONFIGURATION='Release'
fi
SCRIPT_DIR="$(dirname "$0")"
# shellcheck source=tools/ready.sh
. "${SCRIPT_DIR}/ready.sh" || exit $?

if [ "${CONFIGURATION}" != 'Release' ]; then
echo "Configuration is not Release: ${CONFIGURATION}"
echo "Keep going?"
read -r
fi

BUILT_PRODUCT_PATH="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app"

rm ~/Downloads/"${PACKAGE_NAME}.pkg"
rm -rf "${BUILT_PRODUCT_PATH}"

if command -v xcpretty >/dev/null; then
PRINTER="xcpretty"
else
PRINTER="cat"
fi

(xcodebuild -project 'Gureum.xcodeproj' -scheme 'OSX' -destination="{ platform:macOS, name:Any Mac }" -configuration "${CONFIGURATION}" | $PRINTER) && \
productbuild --product "tools/preinst.plist" --component "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app" '/Library/Input Methods' ~/Downloads/"${PACKAGE_NAME}.pkg"
#tar -zcf "${PACKAGE_NAME}.app.tar.gz" "${PRODUCT_NAME}.app"

grep Copyright "${BUILT_PRODUCT_PATH}/Contents/Info.plist"

0 comments on commit 37b6e28

Please sign in to comment.