aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Endler <pokusew@seznam.cz>2019-05-12 01:07:51 +0200
committerMartin Endler <pokusew@seznam.cz>2019-05-12 01:07:51 +0200
commit0a2bdb14622e6c6fa333e1f504f40a5f2050a816 (patch)
treeb6a25789041ecdc07b4490ddf6d54195f2845849
parentc620f4ec119813c7815493399b10a2b9f94de5f3 (diff)
downloadqtmips-0a2bdb14622e6c6fa333e1f504f40a5f2050a816.tar.gz
qtmips-0a2bdb14622e6c6fa333e1f504f40a5f2050a816.tar.bz2
qtmips-0a2bdb14622e6c6fa333e1f504f40a5f2050a816.zip
Add icon for macOS
-rw-r--r--data/icons/macos/README.md31
-rw-r--r--data/icons/macos/qtmips_gui.afdesignbin0 -> 32147 bytes
-rw-r--r--data/icons/macos/qtmips_qui.icnsbin0 -> 172643 bytes
-rw-r--r--qtmips_gui/icons/qtmips_gui.icnsbin0 -> 172643 bytes
-rw-r--r--qtmips_gui/qtmips_gui.pro5
5 files changed, 36 insertions, 0 deletions
diff --git a/data/icons/macos/README.md b/data/icons/macos/README.md
new file mode 100644
index 0000000..80c15d1
--- /dev/null
+++ b/data/icons/macos/README.md
@@ -0,0 +1,31 @@
+# App icon on macOS
+
+Qt Docs: [Setting the Application Icon on macOS](https://doc.qt.io/qt-5/appicon.html#setting-the-application-icon-on-macos)
+
+**qtmips_qui.svg** icon is exported using [Affinity Designer](https://affinity.serif.com/en-gb/designer/)
+in **all required dimensions together with the manifest for the Apple iconutil**. Export config and the icon are saved in `qtmips_qui.afdesign`.
+
+## Steps to generate macOS icon
+
+Requirements: macOS with XCode (iconutil)
+
+1. Open **qtmips_qui.afdesign** in [Affinity Designer](https://affinity.serif.com/en-gb/designer/).
+2. Switch to the **Export Persona** and run **Export Slices**.
+ You will be asked to select export folder.
+ In that folder, **icon.iconset** folder will be created.
+ **icon.iconset** contains rendered icons for all required dimensions together with the **Contents.json manifest** file.
+3. Generate **qtmips_qui.icns** using Apple's `iconutil` _(supply the correct path to the previously created icon.iconset):_
+ ```bash
+ iconutil iconutil --convert icns --output qtmips_qui.icns icon.iconset
+ ```
+ **Few caveats**:
+ - Iconset folder must have **.iconset** extension. Otherwise icontuil fails with error: _Invalid Iconset._
+ - Names of icons in Iconset must start with icon_ (case sensitive). Otherwise icontuil fails with error: _Failed to generate ICNS._
+4. Copy generated qtmips_qui.icns to project's `data/icons/macos/qtmips_qui.icns`.
+5. Finally copy `data/icons/macos/qtmips_qui.icns` to `qtmips_qui/icons/qtmips_qui.icns`
+
+**Note:** [Affinity Designer](https://affinity.serif.com/en-gb/designer/) is not required. It is possible to create .iconset folder with the icons manually.
+However, it is good idea to automatize the .iconset creation (i.e. use Affinity Designer or other tools).
+
+
+
diff --git a/data/icons/macos/qtmips_gui.afdesign b/data/icons/macos/qtmips_gui.afdesign
new file mode 100644
index 0000000..164935c
--- /dev/null
+++ b/data/icons/macos/qtmips_gui.afdesign
Binary files differ
diff --git a/data/icons/macos/qtmips_qui.icns b/data/icons/macos/qtmips_qui.icns
new file mode 100644
index 0000000..71b8433
--- /dev/null
+++ b/data/icons/macos/qtmips_qui.icns
Binary files differ
diff --git a/qtmips_gui/icons/qtmips_gui.icns b/qtmips_gui/icons/qtmips_gui.icns
new file mode 100644
index 0000000..71b8433
--- /dev/null
+++ b/qtmips_gui/icons/qtmips_gui.icns
Binary files differ
diff --git a/qtmips_gui/qtmips_gui.pro b/qtmips_gui/qtmips_gui.pro
index c0fbb70..9237f9b 100644
--- a/qtmips_gui/qtmips_gui.pro
+++ b/qtmips_gui/qtmips_gui.pro
@@ -120,3 +120,8 @@ FORMS += \
RESOURCES += \
icons.qrc
+
+# ICON is config specific to macOS
+# see https://doc.qt.io/qt-5/appicon.html#setting-the-application-icon-on-macos
+# see data/icons/macos/README.md
+ICON = icons/qtmips_gui.icns