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

how to package CLI app on MacOS? #1133

Closed
rolandjohann opened this issue Jun 4, 2018 · 5 comments
Closed

how to package CLI app on MacOS? #1133

rolandjohann opened this issue Jun 4, 2018 · 5 comments
Labels

Comments

@rolandjohann
Copy link

I am familiar with RPM, Deb, Docker and in the old days the universal zip. Today I wanted to install a Scala CLI app on my mac and recognized that there is no rule of thumb how to do that.
The desired way is to do that via some sort of package manager, so one don't have to move files into different places at file system.

How do you install apps at MacOS?

@muuki88 muuki88 added the macosx label Jun 4, 2018
@muuki88
Copy link
Contributor

muuki88 commented Jun 4, 2018

Thanks for your question @rolandjohann :)

sbt-native-packager provides two ways for building dmg files, which are AFAIK the common package format for MacOS X. I have never build a native

  • Universal Plugin provides a universal:packageOsxDmg task.
  • JdkPackager can build two kinds of mac osx packages. It simply wraps the java8 javapackager interface.

hope that helps :)

If you found a good solution would you mind sharing it here?

@muuki88 muuki88 closed this as completed Jun 4, 2018
@rolandjohann
Copy link
Author

already tried both ways.

DMG output will install the app to Applications directory.
As far as I can remember JdkPackager was the same.

What I need is a way to install the app as CLI and use it from shell. Therefore the CLI must be placed at some directory which is in the PATH.

As of now, one must package with universal:packageBin, unzip to /usr/local/bin or somewhere else. On new release old binaries must be removed and start from beginning - this is anarchy 😉
This is due lack of native package manager at MacOS.

I had the hope that someone came across this issue already and has a proper solution.

@LeifW
Copy link

LeifW commented Aug 13, 2019

On OSX you can use the pkgbuild command to create a package that installs a command-line program to e.g. /usr/local/.
Example invocation: https://github.com/idris-lang/Idris-dev/blob/master/mkpkg.sh#L61

@dportabella
Copy link

@rolandjohann , did you find a solution?

@rolandjohann
Copy link
Author

@dportabella not yet. Currently I stage the project and use the starter script at target dir...

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

No branches or pull requests

4 participants