镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

How to make a clean terminal app for MacOS? #404

Closed as duplicate
Closed as duplicate

Description

@EasyG0ing1

When I make a .deb file with JP in Ubuntu, and I install it with dpkg, it creates a nicely packaged folder in /opt then it adds the link to the executable in /usr/local/bin and the program works just like any other command line program that one would install via apt etc.

It's tight, clean and it works well.

My question is, how can we build something like that for MacOS? JP seems to only build .app files but what if my program is just a command line utility that I want to package up with the JRE included?

Activity

  1. fvarrui commented on Apr 30, 2024

    @fvarrui
    Collaborator

    Hi @EasyG0ing1!

    I'm not a mac proficient user/developer 😞 ... What's more, the mac I had was borrowed, and I no longer have it 😢

    Ok, now let's go to the point. I'm not sure what kind of package JP can generate to do that, it only supports PKG and DMG packages, containing an ".app" in both cases as you said. Maybe you can create an app (distributed in a DMG package), and instead of move it to Applications folder you can run it with elevated privileges and then this app installs your command tools in /user/local/bin?

  2. EasyG0ing1 commented on May 1, 2024

    @EasyG0ing1
    ContributorAuthor

    @fvarrui I'll have to look a little deeper into how programs are distributed that are "command line" programs vs. "app" programs wrapped in an app package. I do know that things like the Java SDK as one example, gets installed by a pkg file where it simply extracts the files into the root Library folder where Java SDKs are intended to exist. There is no use of any .app packages in those instances. So I tend to think there should be a way to utilize a tool that creates a PKG installer so that it can be directed to package things in either scenario. The next question would be ... where to unpack a command line program so that it aligns with the way things should be in MacOS ... and I suppose one could follow HomeBrews methods for that where it tends to put programs in /usr/local/bin though it uses shortcuts to its own Cellar folder, I've seen other programs use /usr/local/bin ... such as VirtualBox and others... I think it's a safe place for executables in general since it's always in the default path of any MacOS install.

    How does JP create PKG files?

  3. EasyG0ing1 commented on May 1, 2024

    @EasyG0ing1
    ContributorAuthor

    @fvarrui I am also curious ... when I package a program using Linux and I direct JP to include the JRE and create a single program that just runs, it does a nice job of that... how is that done, exactly? Clearly in the case of MacOS, the process assumes a .app file must be generated, but the same process that you use to create the linux self contained executable could be used in macOS where the option is available in the POM file to package it either as an executable or as an .app file.

  4. fvarrui commented on May 6, 2024

    @fvarrui
    Collaborator

    I do know that things like the Java SDK as one example, gets installed by a pkg file where it simply extracts the files into the root Library folder where Java SDKs are intended to exist.

    Yep, good point.

    The next question would be ... where to unpack a command line program so that it aligns with the way things should be in MacOS

    I'm not sure, but as you say, maybe PKG packages are the answer. I'll have a look into it. Maybe JP can install command line apps in Library folder and create a symlink in /usr/local/bin pointing to the binary file in Library folder

  5. fvarrui commented on May 6, 2024

    @fvarrui
    Collaborator

    when I package a program using Linux and I direct JP to include the JRE and create a single program that just runs, it does a nice job of that... how is that done, exactly?

    JP just concatenates the JAR file to a BASH startup script, and yes, I think we can do the same on macOS

  6. fvarrui commented on Oct 4, 2026

    @fvarrui
    Collaborator

    Closing as a duplicate of #384, to keep console apps on macOS in one place. I've summed up both requests there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions