Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build/build_macos_qt5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,7 @@ cp -R -v $LITEIDE_ROOT/bin/gomodifytags liteide/LiteIDE.app/Contents/MacOS
cp -R -v $LITEIDE_ROOT/bin/gopls liteide/LiteIDE.app/Contents/MacOS
cp -R -v $LITEIDE_ROOT/deploy/* liteide/LiteIDE.app/Contents/Resources
cp -R -v $LITEIDE_ROOT/os_deploy/macosx/* liteide/LiteIDE.app/Contents/Resources

# Hardened Runtime is required on Apple Silicon so CoreText/ImageIO can decode
# Apple Color Emoji (otherwise the editor crashes at 0xbad4007 while painting).
codesign --force --deep --options runtime --entitlements "$LITEIDE_ROOT/src/liteide/LiteIDE.entitlements" --sign - liteide/LiteIDE.app || exit 1
3 changes: 3 additions & 0 deletions build/build_macos_qt6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ cp "$LITEIDE_ROOT/bin/gocode" "$LITEIDE_ROOT/bin/gotools" \
liteide/LiteIDE.app/Contents/MacOS/
cp -R "$LITEIDE_ROOT/deploy/." liteide/LiteIDE.app/Contents/Resources/
cp -R "$LITEIDE_ROOT/os_deploy/macosx/." liteide/LiteIDE.app/Contents/Resources/
# Hardened Runtime is required on Apple Silicon so CoreText/ImageIO can decode
# Apple Color Emoji (otherwise the editor crashes at 0xbad4007 while painting).
codesign --force --deep --options runtime --entitlements "$LITEIDE_ROOT/src/liteide/LiteIDE.entitlements" --sign - liteide/LiteIDE.app
4 changes: 3 additions & 1 deletion build/deploy_macos_qt5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ fi

rm -f liteide/LiteIDE.app/Contents/Resources/qt.conf
macdeployqt liteide/LiteIDE.app || exit 1
codesign --force --deep --sign - liteide/LiteIDE.app || exit 1
# Hardened Runtime is required on Apple Silicon so CoreText/ImageIO can decode
# Apple Color Emoji (otherwise the editor crashes at 0xbad4007 while painting).
codesign --force --deep --options runtime --entitlements "$LITEIDE_ROOT/src/liteide/LiteIDE.entitlements" --sign - liteide/LiteIDE.app || exit 1
12 changes: 12 additions & 0 deletions liteidex/src/liteide/LiteIDE.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
3 changes: 3 additions & 0 deletions liteidex/src/liteide/liteide.pro
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ win32 {
} else:macx {
ICON = liteide.icns
QMAKE_INFO_PLIST = Info.plist
# Apple Silicon crashes in CoreText/ImageIO when drawing emoji unless the
# process is signed with the Hardened Runtime (EXC_ARM_DA_ALIGN / 0xbad4007).
QMAKE_POST_LINK += codesign --force --deep --sign - --options runtime --entitlements $$shell_quote($$PWD/LiteIDE.entitlements) $$shell_quote($$IDE_APP_PATH/$${IDE_APP_TARGET}.app)
} else {
target.path = $$BINPREFIX
INSTALLS += target
Expand Down
Loading