[gimp-macos-build/wip/lukaso/tests] Upgrade create-dmg to version 1.0.9
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-macos-build/wip/lukaso/tests] Upgrade create-dmg to version 1.0.9
- Date: Sat, 16 Oct 2021 17:28:40 +0000 (UTC)
commit f839e8552c8bf5128806bc8863a5496bd2cd378e
Author: Lukas Oberhuber <lukaso gmail com>
Date: Sat Oct 16 11:00:10 2021 +0100
Upgrade create-dmg to version 1.0.9
package/create-dmg/LICENSE | 1 +
package/create-dmg/Makefile | 33 +++++
package/create-dmg/README.md | 113 ++++++++------
package/create-dmg/doc-project/Developer Notes.md | 35 +++++
.../create-dmg/doc-project/Release Checklist.md | 10 ++
.../01-main-example/installer_background.png | Bin 0 -> 35656 bytes
package/create-dmg/examples/01-main-example/sample | 25 ++++
.../01-main-example/source_folder/Application.app | 0
package/create-dmg/sample | 18 ---
package/create-dmg/support/brew-me.sh | 21 ---
package/create-dmg/support/dmg-license.py | 163 ---------------------
.../create-dmg/support/eula-resources-template.xml | 105 +++++++++++++
.../tests/007-space-in-dir-name/my files/hello.txt | 1 +
.../tests/007-space-in-dir-name/run-test | 5 +
14 files changed, 281 insertions(+), 249 deletions(-)
---
diff --git a/package/create-dmg/LICENSE b/package/create-dmg/LICENSE
index 349b6d8..deb407f 100644
--- a/package/create-dmg/LICENSE
+++ b/package/create-dmg/LICENSE
@@ -1,6 +1,7 @@
The MIT License (MIT)
Copyright (c) 2008-2014 Andrey Tarantsov
+Copyright (c) 2020 Andrew Janke
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/package/create-dmg/Makefile b/package/create-dmg/Makefile
new file mode 100644
index 0000000..41e8f08
--- /dev/null
+++ b/package/create-dmg/Makefile
@@ -0,0 +1,33 @@
+# Makefile for Cowsay
+
+PACKAGE_TARNAME = create-dmg
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+bindir = ${exec_prefix}/bin
+datarootdir = ${prefix}/share
+datadir = ${datarootdir}
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+sysconfdir = ${prefix}/etc
+mandir=${datarootdir}/man
+srcdir = .
+
+SHELL = /bin/sh
+INSTALL = install
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = ${INSTALL} -m 644
+
+.PHONY: install uninstall
+
+install: create-dmg
+ $(INSTALL) -d $(DESTDIR)$(prefix)
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) create-dmg $(DESTDIR)$(bindir)/create-dmg
+ $(INSTALL) -d $(DESTDIR)$(datadir)/$(PACKAGE_TARNAME)
+ cp -R support $(DESTDIR)$(datadir)/$(PACKAGE_TARNAME)
+ cp -R examples $(DESTDIR)$(datadir)/$(PACKAGE_TARNAME)
+ cp -R tests $(DESTDIR)$(datadir)/$(PACKAGE_TARNAME)
+
+uninstall:
+ rm -f $(DESTDIR)$(bindir)/create-dmg
+ rm -rf $(DESTDIR)$(datadir)/$(PACKAGE_TARNAME)
diff --git a/package/create-dmg/README.md b/package/create-dmg/README.md
index 495f306..e62c424 100644
--- a/package/create-dmg/README.md
+++ b/package/create-dmg/README.md
@@ -3,16 +3,18 @@ create-dmg
A shell script to build fancy DMGs.
-
Status and contribution policy
------------------------------
-This project is maintained thanks to the contributors who send pull requests, and now (Sep 2018) with the
help of [@aonez](https://github.com/aonez).
+Create-dmg is maintained thanks to the contributors who send pull requests.
+As of May 2020, [Andrew Janke](https://github.com/apjanke) is the primary maintainer, and (since September
2018) [@aonez](https://github.com/aonez) has helped with the maintenance.
+The project home page is <https://github.com/create-dmg/create-dmg>.
-We will merge any pull request that adds something useful and does not break existing things, and will often
grant commit access to the repository.
+We will merge any pull request that adds something useful and does not break existing things.
-If you're an active user and want to be a maintainer, or just want to chat, please ping us at
[gitter.im/create-dmg/Lobby](https://gitter.im/create-dmg/Lobby).
+If you're an active user and want to be a maintainer, or just want to chat, please ping us on Gitter at
[gitter.im/create-dmg/Lobby](https://gitter.im/create-dmg/Lobby), or [email Andrew directly](floss apjanke
net).
+Create-dmg was originally created by [Andrey Tarantsov](https://github.com/andreyvit).
Installation
------------
@@ -23,50 +25,52 @@ Installation
brew install create-dmg
```
-- You can download the [latest release](https://github.com/andreyvit/create-dmg/releases/latest)
+- You can download the [latest release](https://github.com/create-dmg/create-dmg/releases/latest) and
install it from there:
+
+ ```sh
+ make install
+ ```
-- You can also clone the entire repository:
+- You can also clone the entire repository and run it locally from there:
```sh
- git clone https://github.com/andreyvit/create-dmg.git
+ git clone https://github.com/create-dmg/create-dmg.git
```
Usage
-----
```sh
-create-dmg [options...] [output\_name.dmg] [source\_folder]
+create-dmg [options ...] <output_name.dmg> <source_folder>
```
All contents of source\_folder will be copied into the disk image.
**Options:**
-* **--volname [name]:** set volume name (displayed in the Finder sidebar and window title)
-* **--volicon [icon.icns]:** set volume icon
-* **--background [pic.png]:** set folder background image (provide png, gif, jpg)
-* **--window-pos [x y]:** set position the folder window
-* **--window-size [width height]:** set size of the folder window
-* **--text-size [text size]:** set window text size (10-16)
-* **--icon-size [icon size]:** set window icons size (up to 128)
-* **--icon [file name] [x y]:** set position of the file's icon
-* **--hide-extension [file name]:** hide the extension of file
-* **--custom-icon [file name]/[custom icon]/[sample file] [x y]:** set position and custom icon
-* **--app-drop-link [x y]:** make a drop link to Applications, at location x, y
-* **--ql-drop-link [x y]:** make a drop link to /Library/QuickLook, at location x, y
-* **--eula [eula file]:** attach a license file to the dmg
-* **--rez [rez path]:** specify custom path to Rez tool used to include license file
-* **--no-internet-enable:** disable automatic mount©
-* **--format:** specify the final image format (default is UDZO)
-* **--add-file [target name] [path to source file] [x y]:** add additional file (option can be used
multiple times)
-* **--add-folder [target name] [path to source folder] [x y]:** add additional folder (option can be used
multiple times)
-* **--disk-image-size [x]:** set the disk image size manually to x MB
-* **--hdiutil-verbose:** execute hdiutil in verbose mode
-* **--hdiutil-quiet:** execute hdiutil in quiet mode
-* **--sandbox-safe:** execute hdiutil with sandbox compatibility and don not bless
-* **--version:** show tool version number
-* **-h, --help:** display the help
-
+- **--volname \<name\>:** set volume name (displayed in the Finder sidebar and window title)
+- **--volicon \<icon.icns\>:** set volume icon
+- **--background \<pic.png\>:** set folder background image (provide png, gif, jpg)
+- **--window-pos \<x\> \<y\>:** set position the folder window
+- **--window-size \<width\> \<height\>:** set size of the folder window
+- **--text-size \<text_size\>:** set window text size (10-16)
+- **--icon-size \<icon_size\>:** set window icons size (up to 128)
+- **--icon \<file_name\> \<x\> \<y\>:** set position of the file's icon
+- **--hide-extension \<file_name\>:** hide the extension of file
+- **--custom-icon \<file_name|custom_icon|sample_file\> \<x\> \<y\>:** set position and -tom icon
+- **--app-drop-link \<x\> \<y\>:** make a drop link to Applications, at location x, y
+- **--ql-drop-link \<x\> \<y\>:** make a drop link to /Library/QuickLook, at location x, y
+- **--eula \<eula_file\>:** attach a license file to the dmg
+- **--rez \<rez_path\>:** specify custom path to Rez tool used to include license file
+- **--no-internet-enable:** disable automatic mount©
+- **--format:** specify the final image format (default is UDZO)
+- **--add-file \<target_name\> \<file|folder\> \<x\> \<y\>:** add additional file or folder (can be used
multiple times)
+- **--disk-image-size \<x\>:** set the disk image size manually to x MB
+- **--hdiutil-verbose:** execute hdiutil in verbose mode
+- **--hdiutil-quiet:** execute hdiutil in quiet mode
+- **--sandbox-safe:** execute hdiutil with sandbox compatibility, do not bless and do not execute the
cosmetic AppleScript
+- **--version:** show tool version number
+- **-h, --help:** display the help
Example
-------
@@ -75,22 +79,37 @@ Example
#!/bin/sh
test -f Application-Installer.dmg && rm Application-Installer.dmg
create-dmg \
---volname "Application Installer" \
---volicon "application\_icon.icns" \
---background "installer\_background.png" \
---window-pos 200 120 \
---window-size 800 400 \
---icon-size 100 \
---icon "Application.app" 200 190 \
---hide-extension "Application.app" \
---app-drop-link 600 185 \
-"Application-Installer.dmg" \
-"source_folder/"
+ --volname "Application Installer" \
+ --volicon "application_icon.icns" \
+ --background "installer_background.png" \
+ --window-pos 200 120 \
+ --window-size 800 400 \
+ --icon-size 100 \
+ --icon "Application.app" 200 190 \
+ --hide-extension "Application.app" \
+ --app-drop-link 600 185 \
+ "Application-Installer.dmg" \
+ "source_folder/"
```
+See the `examples` folder in the source tree for more examples.
+
+Requirements
+------------
+
+Nothing except a standard installation of macOS/OS X is required.
+
+We think this works in OS X 10.6 Snow Leopard and later.
+
+We'd like to keep it working in as many versions as possible, but unfortunately, we just don't have test
boxes running old versions of OS X adequate to make this happen. Development and testing mostly happens in
the last 3-5 years' worth of macOS releases; as of 2020, this means macOS 10.12 and later.
+
+But if you find a bug in an older version, go ahead and report it! We'll try to work with you to get it
fixed.
+
+If you're running OS X 10.5 or later, you're SOL. That's just too hard to deal with in 2020. ;)
+
Alternatives
------------
-* [node-appdmg](https://github.com/LinusU/node-appdmg)
-* [dmgbuild](https://pypi.python.org/pypi/dmgbuild)
-* see the [StackOverflow
question](http://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools)
+- [node-appdmg](https://github.com/LinusU/node-appdmg)
+- [dmgbuild](https://pypi.python.org/pypi/dmgbuild)
+- see the [StackOverflow
question](http://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools)
diff --git a/package/create-dmg/doc-project/Developer Notes.md b/package/create-dmg/doc-project/Developer
Notes.md
new file mode 100644
index 0000000..892c0e5
--- /dev/null
+++ b/package/create-dmg/doc-project/Developer Notes.md
@@ -0,0 +1,35 @@
+# create-dmg Developer Notes
+
+## Repo layout
+
+- `create-dmg` in the root of the repo is the main program
+- `support/` contains auxiliary scripts used by `create-dmg`; it must be at that relative position to
`create-dmg`
+- `builder/` contains ????
+- `examples/` contains user-facing examples
+- `tests/` contains regression tests for developers
+- `doc-project/` contains developer-facing documentation about this project
+
+### tests/
+
+The `tests/` folder contains regression tests for developers.
+
+Each test is in its own subfolder.
+Each subfolder name should start with a 3-digit number that is the number of the corresponding bug report in
create-dmg's GitHub issue tracker.
+
+The tests are to be run manually, with the results examined manually.
+There's no automated script to run them as a suite and check their results.
+That might be nice to have.
+
+### examples/
+
+Each example is in its own subfolder.
+The subfolder prefix number is arbitrary; these numbers should roughly be in order of "advancedness" of
examples, so it makes sense for users to go through them in order.
+
+## Versioning
+
+As of May 2020, we're using SemVer versioning.
+The old version numbers were 4-parters, like "1.0.0.7".
+Now we use 3-part SemVer versions, like "1.0.8".
+This change happened after version 1.0.0.7; 1.0.8 is the next release after 1.0.0.7.
+
+The suffix "-SNAPSHOT" is used to denote a version that is still under development.
diff --git a/package/create-dmg/doc-project/Release Checklist.md b/package/create-dmg/doc-project/Release
Checklist.md
new file mode 100644
index 0000000..5083920
--- /dev/null
+++ b/package/create-dmg/doc-project/Release Checklist.md
@@ -0,0 +1,10 @@
+# Release Checklist
+
+- Update the version in `create-dmg`'s `pure_version` function
+ - Remove the "-SNAPSHOT" suffix
+- Commit
+- Tag the release as `vX.X.X`
+- `git push --tags`
+- Create a release on the GitHub project page
+- Open development on the next release
+ - Bump the version number and add a "-SNAPSHOT" suffix to it
diff --git a/package/create-dmg/examples/01-main-example/installer_background.png
b/package/create-dmg/examples/01-main-example/installer_background.png
new file mode 100644
index 0000000..bdfa5ed
Binary files /dev/null and b/package/create-dmg/examples/01-main-example/installer_background.png differ
diff --git a/package/create-dmg/examples/01-main-example/sample
b/package/create-dmg/examples/01-main-example/sample
new file mode 100755
index 0000000..c18a65b
--- /dev/null
+++ b/package/create-dmg/examples/01-main-example/sample
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+if [[ -e ../../create-dmg ]]; then
+ # We're running from the repo
+ CREATE_DMG=../../create-dmg
+else
+ # We're running from an installation under a prefix
+ CREATE_DMG=../../../../bin/create-dmg
+fi
+
+# Since create-dmg does not clobber, be sure to delete previous DMG
+[[ -f Application-Installer.dmg ]] && rm Application-Installer.dmg
+
+# Create the DMG
+$CREATE_DMG \
+ --volname "Application Installer" \
+ --background "installer_background.png" \
+ --window-pos 200 120 \
+ --window-size 800 400 \
+ --icon-size 100 \
+ --icon "Application.app" 200 190 \
+ --hide-extension "Application.app" \
+ --app-drop-link 600 185 \
+ "Application-Installer.dmg" \
+ "source_folder/"
diff --git a/package/create-dmg/examples/01-main-example/source_folder/Application.app
b/package/create-dmg/examples/01-main-example/source_folder/Application.app
new file mode 100644
index 0000000..e69de29
diff --git a/package/create-dmg/support/eula-resources-template.xml
b/package/create-dmg/support/eula-resources-template.xml
new file mode 100644
index 0000000..7495632
--- /dev/null
+++ b/package/create-dmg/support/eula-resources-template.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>LPic</key>
+ <array>
+ <dict>
+ <key>Attributes</key>
+ <string>0x0000</string>
+ <key>Data</key>
+ <data>
+ AAAAAgAAAAAAAAAAAAQAAA==
+ </data>
+ <key>ID</key>
+ <string>5000</string>
+ <key>Name</key>
+ <string></string>
+ </dict>
+ </array>
+ <key>STR#</key>
+ <array>
+ <dict>
+ <key>Attributes</key>
+ <string>0x0000</string>
+ <key>Data</key>
+ <data>
+ AAYNRW5nbGlzaCB0ZXN0MQVBZ3JlZQhEaXNhZ3JlZQVQcmludAdT
+ YXZlLi4ueklmIHlvdSBhZ3JlZSB3aXRoIHRoZSB0ZXJtcyBvZiB0
+ aGlzIGxpY2Vuc2UsIGNsaWNrICJBZ3JlZSIgdG8gYWNjZXNzIHRo
+ ZSBzb2Z0d2FyZS4gIElmIHlvdSBkbyBub3QgYWdyZWUsIHByZXNz
+ ICJEaXNhZ3JlZS4i
+ </data>
+ <key>ID</key>
+ <string>5000</string>
+ <key>Name</key>
+ <string>English buttons</string>
+ </dict>
+ <dict>
+ <key>Attributes</key>
+ <string>0x0000</string>
+ <key>Data</key>
+ <data>
+ AAYHRW5nbGlzaAVBZ3JlZQhEaXNhZ3JlZQVQcmludAdTYXZlLi4u
+ e0lmIHlvdSBhZ3JlZSB3aXRoIHRoZSB0ZXJtcyBvZiB0aGlzIGxp
+ Y2Vuc2UsIHByZXNzICJBZ3JlZSIgdG8gaW5zdGFsbCB0aGUgc29m
+ dHdhcmUuICBJZiB5b3UgZG8gbm90IGFncmVlLCBwcmVzcyAiRGlz
+ YWdyZWUiLg==
+ </data>
+ <key>ID</key>
+ <string>5002</string>
+ <key>Name</key>
+ <string>English</string>
+ </dict>
+ </array>
+ <key>${EULA_FORMAT}</key>
+ <array>
+ <dict>
+ <key>Attributes</key>
+ <string>0x0000</string>
+ <key>Data</key>
+ <data>
+${EULA_DATA}
+ </data>
+ <key>ID</key>
+ <string>5000</string>
+ <key>Name</key>
+ <string>English</string>
+ </dict>
+ </array>
+ <key>TMPL</key>
+ <array>
+ <dict>
+ <key>Attributes</key>
+ <string>0x0000</string>
+ <key>Data</key>
+ <data>
+ E0RlZmF1bHQgTGFuZ3VhZ2UgSUREV1JEBUNvdW50T0NOVAQqKioq
+ TFNUQwtzeXMgbGFuZyBJRERXUkQebG9jYWwgcmVzIElEIChvZmZz
+ ZXQgZnJvbSA1MDAwRFdSRBAyLWJ5dGUgbGFuZ3VhZ2U/RFdSRAQq
+ KioqTFNURQ==
+ </data>
+ <key>ID</key>
+ <string>128</string>
+ <key>Name</key>
+ <string>LPic</string>
+ </dict>
+ </array>
+ <key>styl</key>
+ <array>
+ <dict>
+ <key>Attributes</key>
+ <string>0x0000</string>
+ <key>Data</key>
+ <data>
+ AAMAAAAAAAwACQAUAAAAAAAAAAAAAAAAACcADAAJABQBAAAAAAAA
+ AAAAAAAAKgAMAAkAFAAAAAAAAAAAAAA=
+ </data>
+ <key>ID</key>
+ <string>5000</string>
+ <key>Name</key>
+ <string>English</string>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/package/create-dmg/tests/007-space-in-dir-name/my files/hello.txt
b/package/create-dmg/tests/007-space-in-dir-name/my files/hello.txt
new file mode 100644
index 0000000..802992c
--- /dev/null
+++ b/package/create-dmg/tests/007-space-in-dir-name/my files/hello.txt
@@ -0,0 +1 @@
+Hello world
diff --git a/package/create-dmg/tests/007-space-in-dir-name/run-test
b/package/create-dmg/tests/007-space-in-dir-name/run-test
new file mode 100755
index 0000000..ab7f96a
--- /dev/null
+++ b/package/create-dmg/tests/007-space-in-dir-name/run-test
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+# Test for https://github.com/create-dmg/create-dmg/issues/7 - spaces in folder names
+
+../../create-dmg "my disk image.dmg" "my files"
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]