Skip to content

Commit

Permalink
Add back missing assets
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Oct 22, 2024
1 parent 4182200 commit e1f0491
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules

# Builds
build
!packages/core/assets/**
dist
**/*.spec

Expand Down
12 changes: 12 additions & 0 deletions packages/core/assets/electron/build/entitlements.mac.plist
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-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
34 changes: 34 additions & 0 deletions packages/core/assets/electron/build/notarize.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

const { notarize } = require('@electron/notarize')

module.exports = async (context) => {
if (process.platform !== 'darwin') return

const envVariables = ['APPLE_TEAM_ID', 'APPLE_ID', 'APPLE_ID_PASSWORD']

if (!envVariables.every((key) => !!process.env[key])) {
console.log(`\nSkipping notarization: ${envVariables.join(' + ')} env variables must be set.\n`)
return
}

const { appOutDir, packager } = context

const { appInfo } = packager

const { productFilename, productName, info } = appInfo

const { appId, mac } = info._configuration

if (mac.identity === null) return // Code-signing was not performed

const appPath = `${appOutDir}/${productFilename}.app`
console.log(`\nNotarizing ${productName} (${appId})`)

await notarize({
teamId: process.env.APPLE_TEAM_ID,
appPath,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD
})
.catch(e => console.error(`\nFailed to notarize: ${e}`))
}

0 comments on commit e1f0491

Please sign in to comment.