Skip to content

[macOS] Add support for app shortcuts #2161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 10, 2022
Merged

[macOS] Add support for app shortcuts #2161

merged 7 commits into from
Dec 10, 2022

Conversation

flavioislima
Copy link
Member

@flavioislima flavioislima commented Dec 8, 2022

Implements #723

Adds shortcut inside HOME/Applications folder
The shortcut is a TITLE.app that contains a shell script to call Heroic with the -no-gui option.
It also contains and icon for the game and a generic plist file that is needed for the app to run.
Used nativeImage from electron to resize the image and https://www.npmjs.com/package/@shockpkg/icon-encoder to convert it to .icns.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@flavioislima flavioislima linked an issue Dec 8, 2022 that may be closed by this pull request
@flavioislima flavioislima added the pr:ready-for-review Feature-complete, ready for the grind! :P label Dec 8, 2022
@flavioislima flavioislima requested review from a team, arielj, CommandMC, Nocccer, imLinguin and redromnon and removed request for a team December 8, 2022 15:23
Copy link
Collaborator

@arielj arielj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and the shortcut has the right icon and shows up in the apps launcher properly, that's great.

I'm having an issue when I try to run a game using the shortcut, but I don't know if it's because I try running the app with yarn

Unable to find Electron app at /heroic:/launch/1207659026

Cannot find module '/heroic:/launch/1207659026'
Require stack:
- /Users/arielj/dev/oss/HeroicGamesLauncher/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js

the content of the run.sh is:

/Users/arielj/dev/oss/HeroicGamesLauncher/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron --no-gui heroic://launch/1207659026

if it helps

(I'm going to try installing the binary from this PR in a moment)

Copy link
Collaborator

@arielj arielj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the installed app works fine, looks like it doesn't like the path when running as dev, but not a big deal

@flavioislima flavioislima merged commit b2dc470 into main Dec 10, 2022
@flavioislima flavioislima deleted the mac/shortcuts branch December 10, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support adding game shortcuts on Mac
3 participants