Skip to content

Commit

Permalink
fix(build/#2816): Use development Info.plist on OSX (#2822)
Browse files Browse the repository at this point in the history
Fix #2816 - Use a development `Info.plist` that specifies the `NSSupportsAutomaticGraphicsSwitching` setting.
  • Loading branch information
bryphe authored Dec 12, 2020
1 parent dc52e3c commit 2a12d8e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES_CURRENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- #2810 - Extensions: Fix intermittent request failure getting extension details
- #2811 - Extensions: Show logo image for remote extensions
- #2819 - Auto-Update: Set default update channel based on build type
- #2822 - Build: Use development `Info.plist` that sets `NSSupportsAutomaticGraphicsSwitching` (fixes #2816)

### Performance

Expand Down
28 changes: 28 additions & 0 deletions assets/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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>CFBundleName</key>
<string>Onivim 2</string>
<key>CFBundleDisplayName</key>
<string>Onivim 2 - Development</string>
<key>CFBundleIdentifier</key>
<string>com.outrunlabs.onivim2-dev</string>
<key>CFBundleIconFile</key>
<string>Onivim2</string>
<key>CFBundleVersion</key>
<string>9.9.9999</string>
<key>CFBundleShortVersionString</key>
<string>9.9.9</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>Oni2_editor</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
4 changes: 4 additions & 0 deletions assets/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(install
(section bin)
(package Oni2)
(files Info.plist))
4 changes: 3 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ if (process.platform == "linux") {
const bundleVersion = `${semvers[0]}.${semvers[1]}.${numCommits}`

const plistContents = {
CFBundleName: "Onivim2",
CFBundleName: "Onivim 2",
CFBundleDisplayName: "Onivim 2",
CFBundleIdentifier: "com.outrunlabs.onivim2",
CFBundleIconFile: "Onivim2",
Expand Down Expand Up @@ -205,6 +205,8 @@ if (process.platform == "linux") {
// Remove setup.json prior to remapping bundled files,
// so it doesn't get symlinked.
fs.removeSync(path.join(binaryDirectory, "setup.json"))
// Remove development plist file
fs.removeSync(path.join(binaryDirectory, "Info.plist"))

// We need to remap the binary files - we end up with font files, images, and configuration files in the bin folder
// These should be in 'Resources' instead. Move everything that is _not_ a binary out, and symlink back in.
Expand Down

0 comments on commit 2a12d8e

Please sign in to comment.