本文介绍了创建漂亮的dmg“安装程序";对于Mac OS X的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为Mac OS X制作了第一个Qt应用程序.现在,我想创建一个漂亮的.dmg文件,该文件使用户可以轻松地安装它.我正在考虑类似Firefox的东西(参见图片):

I've made my first Qt application for Mac OS X. Now I want to create nice .dmg file that will allow user to easily install it. I am thinking about something like firefox has (see the picture):

我对此完全陌生,所以我什至不知道从哪里开始.

I am completly new to this, so I don't even know where to start.

推荐答案

通过提供此答案来使此问题最新.

Bringing this question up to date by providing this answer.

appdmg是一个简单,易于使用的开放源代码命令行程序,可根据简单的json规范创建dmg文件.看看官方网站上的自述文件:

appdmg is a simple, easy-to-use, open-source command line program that creates dmg-files from a simple json specification. Take a look at the readme at the official website:

https://github.com/LinusU/node-appdmg

简单示例:

  1. 安装appdmg

  1. Install appdmg

npm install -g appdmg

  • 写一个json文件(spec.json)

    {
      "title": "Test Title",
      "background": "background.png",
      "icon-size": 80,
      "contents": [
        { "x": 192, "y": 344, "type": "file", "path": "TestApp.app" },
        { "x": 448, "y": 344, "type": "link", "path": "/Applications" }
      ]
    }
    

  • 运行程序

  • Run program

    appdmg spec.json test.dmg
    

  • (免责声明.我是appdmg的创建者)

    (disclaimer. I'm the creator of appdmg)

    这篇关于创建漂亮的dmg“安装程序";对于Mac OS X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    08-13 02:16