Mac OS X 용 멋진 dmg "설치 프로그램"만들기
Mac OS X 용 Qt 응용 프로그램을 처음 만들었습니다. 이제 사용자가 쉽게 설치할 수있는 멋진 .dmg 파일을 만들고 싶습니다. 나는 firefox와 같은 것에 대해 생각하고 있습니다 (그림 참조).
나는 이것에 완전히 새롭기 때문에 어디서부터 시작 해야할지조차 모릅니다.
이 답변을 제공하여이 질문을 최신 상태로 만드십시오.
appdmg
간단한 json 사양에서 dmg 파일을 생성하는 간단하고 사용하기 쉬운 오픈 소스 명령 줄 프로그램입니다. 공식 웹 사이트에서 readme를 살펴보십시오.
https://github.com/LinusU/node-appdmg
빠른 예 :
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" } ] }
프로그램 실행
appdmg spec.json test.dmg
(면책 조항. 저는 appdmg의 제작자입니다)
매우 쉽습니다. 기본 아이디어는 디스크 유틸리티를 사용하여 빈 이미지를 만들고 (최소한 물건을 담을 수있을만큼 충분히 크게 만드십시오. 정확한 크기는 중요하지 않습니다) Finder를 사용하여 해당 이미지를 열고 물건을 넣고 정렬하는 것입니다. 원하는 방식으로 (오른쪽 클릭 및 보기 옵션 표시를 사용 하여 아이콘 크기 또는 배경 이미지와 같은 항목을 설정). 즉 거의이다 - 남아 압축 된 이미지로 이미지 W / R이 변환 할 모든 것을 : 꺼내기 IT 및 사용 변환 에서 디스크 유틸리티 압축 된 이미지로 변환 할 수 있습니다.
기존 답변 중 어느 것도 나를 위해 실제로 해주지 않았습니다. 한 가지 대답은 수동이고 다른 두 가지 옵션 인 iDMG 및 node-appdmg는 모두 이상적이지 않은 파인더를 애플 스크립팅하는 것과 관련이 있습니다.
자동 빌드 단계로이 작업을 수행하는 가장 좋은 방법은 원하는대로 정확하게 보이는 template.dmg를 만든 다음 (예 : Simon Urbanek의 답변과 같은 일반적인 지침을 따르지만 압축하는 마지막 단계는 수행하지 않음) 빌드에서 만드는 것입니다. 스크립트:
- hdiutil을 사용하여 이미지 첨부
- cp 등을 사용하여 애플리케이션을 탑재 된 이미지에 복사합니다.
- hdiutil 분리
- 이미지 압축 : hdiutil convert "in.dmg"-quiet -format UDZO -imagekey zlib-level = 9 -o "MyApp-0.3.dmg"
https://github.com/remko/fancy-dmg/ 에 이러한 단계가 포함 된 makefile 이 있습니다.
이 스크립트는 DMG 생성을 매우 쉽게 만듭니다 : https://github.com/andreyvit/create-dmg
또한 노드 종속성이 없습니다 :-)
Finder로 할 수 있습니다.
- 이 빈 DMG 파일을 다운로드하고 압축을 풉니 다 ( 이 파일 을 만들고 업로드 한 사람은 저입니다).
- DMG 파일의 크기를 적절한 크기로 조정합니다 (적절한 크기는 일반적으로 현재 크기에 .app 파일 크기를 더한 것입니다). 이렇게하려면 디스크 유틸리티를 엽니 다 (이 방법을 모르는 경우
disk utility
Launchpad에서 검색 ). 그런 다음 메뉴 표시 줄에서 "이미지"를 클릭하고 "크기 조정 ..."을 선택합니다. 파일을 열 수있는 창이 나타나고 빈 DMG 파일을 엽니 다. - DMG 파일을 두 번 클릭하여 마운트합니다. 이름
Untitled
이 지정된 데스크탑에 장치 가 나타납니다. 원하는 이름으로 이름을 바꿉니다 (프로그램과 같은 이름을 지정하고 싶을 것입니다). 해당 장치를 엽니 다. 다음과 같은 내용이 표시됩니다.
If everything is white except the shortcut to the Applications folder, press Cmd+J and a window will be opened. On the bottom of that window, there is a square with the label "Drag image here". Click on that square and an Open dialog will open. In that dialog, press Cmd+Shift+G and type
/Volumes/(whatever you called the device in step 3)/.image
and select image.png.Everything here except the shortcut to the Applications folder is just a background image. You might want to change the background image (which contains the background color and the arrow). To do so, open the file
/Volumes/(whatever you called the device in step 3)/.image/image.png
in an image editor and edit it to whatever you want. After you've done this, you might need to unmount the device and remount it by opening the DMG file to see the changes. Depending on what you put in the image, you might also need to move the shortcut to the Applications folder around to fit the new background image.Drag your .app file to the beginning of the arrow in the window where the device from the DMG file is opened so that it looks like this:
You might get an error saying that there isn't enough free space. If that's the case, go back to step 2 and resize the DMG file to a larger size.
Unmount the device by clicking on the arrow next to the device name in Finder:
Convert the DMG file to read only. To do this, open the terminal and type this (replace
/path/to/dmg/file
by the path to the DMG file andnameOfDmgFile.dmg
by the name of the DMG file):cd /path/to/dmg/file hdiutil convert -format UDZO -o newNameOfDmgFile.dmg nameOfDmgFile.dmg
This will create a new DMG file called
newNameOfDmgFile.dmg
(or whatever other name you used above), which is the file that you want.
You could use Disk Utility for this, but if you want a picture in the background, you need some advanced directions.
First, open Disk Utility
Then, Click File > New Image > Blank image.
It will ask you for the size of it and the name.
After that, you can put files into it, and there you go!
NOTE: This was tested on Mac OS Mojave. I don't know about previous versions.
참고 URL : https://stackoverflow.com/questions/8680132/creating-nice-dmg-installer-for-mac-os-x
'IT박스' 카테고리의 다른 글
유지 관리를 위해 사이트가 다운되었을 때 보낼 올바른 HTTP 상태 코드는 무엇입니까? (0) | 2020.10.17 |
---|---|
JAXP와 JAXB의 차이점은 무엇입니까? (0) | 2020.10.17 |
Chrome 개발자 도구 : 스 니펫 지원이란 무엇인가요? (0) | 2020.10.17 |
CSS에`pointer-events : hoverOnly` 또는 이와 유사한 것이 있습니까? (0) | 2020.10.17 |
개인 및 웹 호스팅 인증서 저장소의 차이점은 무엇입니까? (0) | 2020.10.17 |