Skip to content

Commit

Permalink
Add Homebrew lib and include paths to build script
Browse files Browse the repository at this point in the history
Add macOS app icon
  • Loading branch information
danielledeleo authored and ikskuh committed Jul 6, 2020
1 parent 821c370 commit 95afe80
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added src/icons/AppIcon.icns
Binary file not shown.
15 changes: 15 additions & 0 deletions src/icons/mac-icon.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions src/kristall.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 95afe80

Please sign in to comment.