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

Improve CKAN.app launch script #2329

Merged
merged 1 commit into from
Mar 4, 2018
Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 27, 2018

Problem

The currently released CKAN.app opens the wiki page about installing on Mac when it can't find Mono. Currently that is every time, even if Mono is installed.

Cause

Non-ObjC app bundles on MacOSX are not provided:

  1. The proper system PATH variable for running other programs (even though there is a /etc/paths.d/ architecture for configuring it)
  2. The path to their own folder

We need both to run mono ckan.exe, so we have to write code to figure them out at run time.

The mono executable has lived in several different places on MacOSX, there's no way to just ask where it is, and our script previously only checked a path that was used in an older version of Mono.

The script's logic for finding its own folder was an overly complicated awk script that may or may not have worked.

Changes

Now we check more places for the mono executable, by way of the /etc/paths.d/mono-commands file.

Now our logic for finding our folder is simplified; we use dirname $0 to find where the script lives, then we cd to that directory and run pwd to get its absolute path.

Test build available.

Fixes #2307.

@HebaruSan HebaruSan added Pull request macOS Issues specific for macOS labels Feb 27, 2018
@HebaruSan HebaruSan changed the title Simplify path handling, add Mono 5 path, alert on errors Improve CKAN.app build Feb 27, 2018
@HebaruSan HebaruSan changed the title Improve CKAN.app build Improve CKAN.app launch script Feb 28, 2018
@politas politas merged commit a523648 into KSP-CKAN:master Mar 4, 2018
politas added a commit that referenced this pull request Mar 4, 2018
@HebaruSan HebaruSan deleted the fix/osx-script branch March 4, 2018 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Issues specific for macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants