aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJagger De Leo <jcdl@fastmail.com>2020-07-05 23:36:48 -0400
committerFelix Queißner <felix@ib-queissner.de>2020-07-06 09:16:07 +0200
commit95afe80c3b8a26c6eeba0e494851d9f46f69bb4a (patch)
tree9341cb36a984a9e0af2cc0d3f05fabe099a3c071
parent821c370447dd823020fb3e9e27e3f7cb2f4c6496 (diff)
downloadkristall-95afe80c3b8a26c6eeba0e494851d9f46f69bb4a.tar.gz
Add Homebrew lib and include paths to build script
Add macOS app icon
-rw-r--r--Makefile8
-rw-r--r--src/icons/AppIcon.icnsbin0 -> 69936 bytes
-rwxr-xr-xsrc/icons/mac-icon.sh15
-rw-r--r--src/kristall.pro11
4 files changed, 33 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e20d29f..f2cdc80 100644
--- a/Makefile
+++ b/Makefile
@@ -18,12 +18,18 @@ QMAKE_COMMAND := qmake
# For Fedora 32 and similar distributions, use the next line instead of the above.
# QMAKE_COMMAND := /usr/bin/qmake-qt5
+UNAME := $(shell uname)
+# Homebrew on macOS does not link Qt5 into the system path.
+ifeq ($(UNAME),Darwin)
+ HOMEBREW_PATH=export PATH="$(PATH):/usr/local/opt/qt/bin"
+endif
+
kristall: build/kristall
cp build/kristall $@
build/kristall: src/*
mkdir -p build
- cd build && $(QMAKE_COMMAND) ../src/kristall.pro && $(MAKE) $(MAKEFLAGS)
+ cd build; $(HOMEBREW_PATH); $(QMAKE_COMMAND) ../src/kristall.pro && $(MAKE) $(MAKEFLAGS)
install: kristall
# Install icons
diff --git a/src/icons/AppIcon.icns b/src/icons/AppIcon.icns
new file mode 100644
index 0000000..b2df08c
--- /dev/null
+++ b/src/icons/AppIcon.icns
Binary files differ
diff --git a/src/icons/mac-icon.sh b/src/icons/mac-icon.sh
new file mode 100755
index 0000000..cd6e4e9
--- /dev/null
+++ b/src/icons/mac-icon.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+mkdir AppIcon.iconset
+rsvg-convert kristall.svg -h 1024 > AppIcon.iconset/icon_512x512@2.png
+rsvg-convert kristall.svg -h 512 > AppIcon.iconset/icon_512x512.png
+rsvg-convert kristall.svg -h 512 > AppIcon.iconset/icon_256x256@2.png
+rsvg-convert kristall.svg -h 256 > AppIcon.iconset/icon_256x256.png
+rsvg-convert kristall.svg -h 256 > AppIcon.iconset/icon_128x128@2.png
+rsvg-convert kristall.svg -h 128 > AppIcon.iconset/icon_128x128.png
+rsvg-convert kristall.svg -h 64 > AppIcon.iconset/icon_32x32@2.png
+rsvg-convert kristall.svg -h 32 > AppIcon.iconset/icon_32x32.png
+rsvg-convert kristall.svg -h 32 > AppIcon.iconset/icon_16x16@2.png
+rsvg-convert kristall.svg -h 16 > AppIcon.iconset/icon_16x16.png
+iconutil -c icns AppIcon.iconset
+rm -rf AppIcon.iconset
diff --git a/src/kristall.pro b/src/kristall.pro
index 917c212..eca386e 100644
--- a/src/kristall.pro
+++ b/src/kristall.pro
@@ -47,6 +47,17 @@ win32-g++ {
LIBS += -llibcrypto
}
+macx {
+ # Homebrew include paths
+ INCLUDEPATH += /usr/local/opt/qt/include
+ LIBS += -L/usr/local/opt/qt/lib
+
+ INCLUDEPATH += /usr/local/opt/openssl/include
+ LIBS += -L/usr/local/opt/openssl/lib
+
+ ICON = icons/AppIcon.icns
+}
+
android: include(/home/felix/projects/android-hass/android-sdk/android_openssl/openssl.pri)
# android {