Skip to content
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

Suggestions for preventing the "exec" icon from showing #71

Open
chip opened this issue Dec 12, 2024 · 0 comments
Open

Suggestions for preventing the "exec" icon from showing #71

chip opened this issue Dec 12, 2024 · 0 comments

Comments

@chip
Copy link

chip commented Dec 12, 2024

Hi @AndyObtiva,

I was inspired by the article (and your comment) at Create a MacOS desktop application with pure Ruby (Tutorial) and wanted to package my Pathos app, as seen here Go version and here Ruby version, into something available for macOS via the AppStore.

Based on that blog post I eventually ended up with a heavily tweaked Rakefile. I need to remove some cruft, but it eventually gives me something to allow Platypus to build a macOS app.

However, opening this app shows 2 icons: one that I created for the app, and the other which is the "exec" terminal icon that macOS displays whenever a shell is being executed and there's no icon associated. Application switching (using Cmd+Tab) to the icon I created does give me access to the menus created by glimmer-dsl-libui, which is great, but the application is not shown. To do that, I must application switch over to the "exec" icon.

Do you have any examples or suggestions for eliminating the "exec" icon as well as showing the app when the icon from my Platypus config is selected?

P.S. Additional inspiration in issue #65

Here are some screenshots and details for reference...

  1. Pathos macOS (created using glimmer-dsl-libui):
    PathosMacOS

  2. Platypus configuration used for creating the "PathosMacOS.app" directory. The Script Path points to a package directory created via my Rakefile. I used rake package:osx to create the package directory, pathos_gui-1.0.0-osx-arm64:
    PlatypusConfig

  3. The Script Path ultimately points to this script:

#!/bin/bash
set -e

# TODO: update this for each app
APP_ROOT="pathos_gui/launch.rb"

# Figure out where this script is located.
SELFDIR="`dirname \"$0\"`"
SELFDIR="`cd \"$SELFDIR\" && pwd`"

# Tell Bundler where the Gemfile and gems are.
export BUNDLE_GEMFILE="$SELFDIR/lib/vendor/Gemfile"
unset BUNDLE_IGNORE_CONFIG

# Run the actual app using the bundled Ruby interpreter, with Bundler activated.
exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup "$SELFDIR/lib/app/$APP_ROOT"
  1. Running open PathosMacOS.app via the terminal displays the 2 icons.

  2. Application switching (via Cmd-Tab) to this icon will show the menus created by glimmer-dsl-lib, but does not focus the app:
    PathosMacOSIcon

  3. Application switching (via Cmd-Tab) to this icon will show the app created with glimmer-dsl-libui (i.e., "put the app in focus"), but is not the icon I use for the app:
    executable_binary

Summary
I believe the "exec" icon is shown because the Script Path points to a bash script, which in turn launches the glimmer-dsl-libui app. However, I need some suggestions for launching the glimmer-dsl-lib app directly so that it can include the necessary gems, Traveling Ruby, icons, etc.

Sorry if this was too long. Any suggestions are greatly appreciated. Thanks so much for your effort on this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant