Skip to content

Commit 7374956

Browse files
committed
add entitlements, fixes "Unable to load Java Runtime Environment"
1 parent d24b843 commit 7374956

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

build/build.xml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,13 @@
822822

823823
<!-- Replace libjli.dylib symlink with actual file.
824824
Deals with code signing issues on OS X 10.9.5+ -->
825+
<!--
825826
<property name="jli.path" value="${contents.dir}/PlugIns/${jdk.prefix}-${jdk.esoteric}+${jdk.build}/Contents/MacOS/libjli.dylib" />
826827
<delete file="${jli.path}" />
827828
<exec executable="cp">
828829
<arg line="${jdk.path.macosx}/Contents/Home/lib/jli/libjli.dylib ${jli.path}"/>
829830
</exec>
831+
-->
830832

831833
<copy todir="${contents.dir}/Java" preservelastmodified="true">
832834
<fileset dir=".." includes="core/library/**" /> <!-- why this? -->
@@ -947,12 +949,17 @@
947949

948950
<exec executable="/usr/bin/codesign" dir="macosx/work" failonerror="true">
949951
<arg value="--force" />
952+
950953
<arg value="--sign" />
951954
<arg value="Developer ID Application" />
955+
956+
<arg value="--entitlements" />
957+
<arg value="../ffs.entitlements" />
958+
952959
<arg value="Processing.app/Contents/PlugIns/jdk-${jdk.esoteric}+${jdk.build}" />
953960
</exec>
954961

955-
<!-- codesign can't work inside jars, so instead temporarily unpack the files
962+
<!-- codesign can't work inside jars? so instead temporarily unpack the files
956963
that contain dylib entries, just before doing our big signing event -->
957964

958965
<property name="unpack.jogl" value="macosx/work/Processing.app/Contents/Java/core/library/jogl-all-natives-macosx-universal" />
@@ -979,6 +986,9 @@
979986
<!-- remove all other signatures -->
980987
<arg value="--force" />
981988

989+
<arg value="--entitlements" />
990+
<arg value="../ffs.entitlements" />
991+
982992
<!-- recursively sign everything -->
983993
<arg value="--deep" />
984994

@@ -1023,6 +1033,9 @@
10231033
<!-- recursively sign everything -->
10241034
<arg value="--deep" />
10251035

1036+
<arg value="--entitlements" />
1037+
<arg value="../ffs.entitlements" />
1038+
10261039
<!-- enable the "hardened runtime" -->
10271040
<arg value="--options" />
10281041
<arg value="runtime" />
@@ -1073,8 +1086,7 @@
10731086
<echo>
10741087
Check on notarization status with:
10751088

1076-
xcrun altool -u $PROCESSING_APPLE_ID -p $PROCESSING_APP_PASSWORD \
1077-
--notarization-info [the RequestUUID above]
1089+
xcrun altool -u $PROCESSING_APPLE_ID -p $PROCESSING_APP_PASSWORD --notarization-info [the RequestUUID above]
10781090
</echo>
10791091
</target>
10801092

build/macosx/ffs.entitlements

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.disable-executable-page-protection</key>
10+
<true/>
11+
<key>com.apple.security.cs.disable-library-validation</key>
12+
<true/>
13+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
14+
<true/>
15+
</dict>
16+
</plist>

0 commit comments

Comments
 (0)