Skip to content

Commit

Permalink
Fix #510 - Part 3 - Enable 'hardened runtime' on OSX (#542)
Browse files Browse the repository at this point in the history
* Add hardened runtime

* Create entitlements.plist file for node entitlements

* Use entitlements file along with hardened runtime

* Fix whitespace
  • Loading branch information
bryphe authored Aug 1, 2019
1 parent 3af281b commit 72ea674
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/osx/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else
security find-identity -v

echo "Starting codesign..."
codesign --deep --force --verbose --sign "Outrun Labs, LLC" _release/Onivim2.App
codesign --deep --force --verbose --sign "Outrun Labs, LLC" _release/Onivim2.App --options runtime --entitlements _release/entitlements.plist
echo "Onivim2.App codesign complete!"

# Validate
Expand Down
9 changes: 8 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ if (process.platform == "linux") {

fs.mkdirpSync(frameworksDirectory);
fs.mkdirpSync(resourcesDirectory);

fs.writeFileSync(plistFile, require("plist").build(plistContents));

// Copy bins over
Expand All @@ -114,6 +113,14 @@ if (process.platform == "linux") {

shell(`dylibbundler -b -x "${path.join(binaryDirectory, "Oni2_editor")}" -d "${frameworksDirectory}" -p "@executable_path/../Frameworks/" -cd`);

const entitlementsPath = path.join(releaseDirectory, "entitlements.plist");
const entitlementsContents = {
"com.apple.security.cs.allow-jit": true,
"com.apple.security.cs.allow-unsigned-executable-memory": true,
"com.apple.security.cs.disable-library-validation": true,
};
fs.writeFileSync(entitlementsPath, require("plist").build(entitlementsContents));

const dmgPath = path.join(releaseDirectory, "Onivim2.dmg");
const dmgJsonPath = path.join(releaseDirectory, "appdmg.json");
const basePath = releaseDirectory;
Expand Down

0 comments on commit 72ea674

Please sign in to comment.