如何创建拖放 mac 安装程序?

发布于 2024-08-27 17:47:48 字数 83 浏览 5 评论 0原文

我已经制作了 java 应用程序的 jar 文件,现在想要为其创建拖放安装程序。此外,我想知道如何为相同目的创建应用程序文件夹的快捷方式。 我该怎么做?

I have made my java application's jar file and now want to create drag and drop installer for it.Also I want to know that how to create shortcut for Applications folder for the same purpose.
how can I do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

没企图 2024-09-03 17:47:48

Seth Willits 的 DMG Canvas 是创建自定义 DMG 的一种很棒且简单的方法(带有“应用程序”文件夹等内容)快捷方式、背景图像等)。是的,您可以使用 hdiutil 之类的东西自己完成这一切,但我更喜欢使用 GUI。

Seth Willits' DMG Canvas is a great and easy way to create customized DMGs (with things like an Applications folder shortcut, background image, etc). Yes, you can do this all yourself with hdiutil and whatnot, but I much prefer using a GUI.

三生殊途 2024-09-03 17:47:48

您可以使用 Javapackager.jar 打包到 .app (在具有拖放功能的 dmg 内),如下所示:

javapackager -deploy \
    -title "YourTitle" \
    -name "Name" \
    -appclass your.class.start \
    -native dmg \
    -outdir ~/Downloads \
    -outfile yourOutFileWithoutExtension \
    -srcdir "SourceDir"

您可以使用 < code>-srcfiles Your.jar 如果它只是一个 jar。

You can Package your .jar into a .app (inside a dmg that has drag&drop) with Javapackager like this:

javapackager -deploy \
    -title "YourTitle" \
    -name "Name" \
    -appclass your.class.start \
    -native dmg \
    -outdir ~/Downloads \
    -outfile yourOutFileWithoutExtension \
    -srcdir "SourceDir"

you could use -srcfiles Your.jar if its only a single jar.

少跟Wǒ拽 2024-09-03 17:47:48

使用磁盘工具或 hdiutil 命令行工具。将 hdiutil 集成到自动构建工作流程中更加容易。

Use either Disk Utility or the hdiutil command-line tool. It's easier to integrate hdiutil into an automatic build workflow.

╭⌒浅淡时光〆 2024-09-03 17:47:48

您需要创建一个小磁盘映像,其中包含您的应用程序和指向“应用程序”文件夹的符号链接。使用“磁盘工具”或 hdiutil 创建映像。您只需复制应用程序,然后使用终端创建符号链接:

cd /Volumes/DiskImageName
ln -s /Applications Applications

You need to create a small disk image containing your application and a symbolic link to the Applications folder. Use Disk Utility or hdiutil to create the image. You can just copy the application in, and create the symbolic link using Terminal:

cd /Volumes/DiskImageName
ln -s /Applications Applications
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文