Skip to content

Commit

Permalink
More hack removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Plotkin authored and Andrew Plotkin committed Jul 17, 2022
1 parent ca9d4f9 commit ded0c50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,14 @@ You can add arguments to narrow down the platforms you are building, e.g.:
python3 makedist.py linux
python3 makedist.py win32-x64

To build a universal (Intel/ARM) Mac binary, you must first build the Intel and ARM binaries. This command will build all three:

python3 makedist.py darwin
Note that "darwin" includes "darwin-x64", "darwin-arm64", and "darwin-universal" (both packaged together).

If you want to code-sign the Mac version, use the `--macsign` argument:

python3 makedist.py darwin --macsign 'Developer ID Application: ...'

You must be a registered Apple developer to do this. The argument must be the name of the "Developer Id Application" certificate in your keychain. Run the Keychain Access app to see this. If you don't have one, the easiest way to set it up is to run Xcode, open the Preferences, select Accounts, and hit Manage Certificates.

Building a *signed* universal Mac version is unfortunately a pain in the butt. You must (a) build the `darwin-x64` and `darwin-arm64` versions unsigned; (b) build `darwin-univ` with the `--macsign` argument; (c) build the first two again with the `--macsign` argument. I may streamline this in the future.

## Packaging a bound game

You will need to create a separate directory for your game's files. Copy `package.json` to the directory, adding or modifying these lines:
Expand Down
15 changes: 2 additions & 13 deletions makedist.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
all_packages = [
'darwin-x64',
'darwin-arm64',
'darwin-univ',
'darwin-universal',
'linux-x64',
'linux-arm64',
'win32-ia32',
Expand Down Expand Up @@ -194,18 +194,7 @@ def builddir(dir, pack, pkg):
'--overwrite'
]

if platform == 'darwin' and arch == 'univ':
cmd = 'node'
args = [ cmd, 'tools/makemacuni.js', dir, product_name ]
if opts.macsign:
args = args + [
'--osx-sign.entitlements', 'resources/mac-app.entitlements',
'--osx-sign.entitlements-inherit', 'resources/mac-app.entitlements',
'--osx-sign.identity', opts.macsign,
'--osx-sign.hardenedRuntime', 'true',
]

elif platform == 'darwin':
if platform == 'darwin':
appid = 'com.eblong.lectrote'
if opts.gamedir:
appid = pkg.get('lectroteMacAppID')
Expand Down

0 comments on commit ded0c50

Please sign in to comment.