aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-07-20 17:34:39 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-07-20 17:34:39 +0200
commit57819218dc9fcfcec75c92ae1db910c9709df379 (patch)
treefcc5adfff0724a8e142ea287b382b5d675f4fc81
parent06abd3f6f20ca2008b71fa3967baeaf53f5775eb (diff)
parent7fbf49b216895d6870f46f54ab8e1289f541a723 (diff)
downloadkristall-57819218dc9fcfcec75c92ae1db910c9709df379.tar.gz
Merge branch 'master' of github.com:MasterQ32/kristall
-rw-r--r--BUILDING.md17
-rw-r--r--Makefile14
-rw-r--r--src/icons/AppIcon.icnsbin0 -> 69936 bytes
-rwxr-xr-xsrc/icons/mac-icon.sh15
-rw-r--r--src/kristall.pro11
-rw-r--r--src/mainwindow.cpp2
6 files changed, 58 insertions, 1 deletions
diff --git a/BUILDING.md b/BUILDING.md
index 9940f1f..c3725f3 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -47,6 +47,23 @@ Unsupported Versions: 16.04
These notes are probably also correct for Debian (someone please verify)
+#### Notes for Fedora 32 (and probably other recent versions)
+In the small `Makefile` mentioned above, comment out the line:
+
+* `QMAKE_COMMAND := qmake`
+
+And uncomment the line:
+* `# QMAKE_COMMAND := /usr/bin/qmake-qt5`
+
+This is because Fedora has a different naming scheme for the qmake executable.
+
+- Key required packages
+ - `qt5-qtbase`
+ - `qt5-qtbase-devel`
+ - `ccache-3.7.7-1.fc32.x86_64`
+ - `make`
+ - And the packages they depend on
+
#### Notes for Manjaro/Arch
- Required packages
- `qt5-base`
diff --git a/Makefile b/Makefile
index 4f77fd2..5668c79 100644
--- a/Makefile
+++ b/Makefile
@@ -13,12 +13,24 @@ bindir=$(DESTDIR)$(PREFIX)/bin
sharedir=$(DESTDIR)$(PREFIX)/share
MAKEDIR=makedir -p
+# Default Qmake Command For Ubuntu (and probably other Debian) distributions
+
+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 ../src/kristall.pro && $(MAKE) $(MAKEFLAGS)
+ cd build; $(HOMEBREW_PATH) $(QMAKE_COMMAND) ../src/kristall.pro && $(MAKE) $(MAKEFLAGS)
install: kristall
# Prepare directories
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 {
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index bf77974..ba80651 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -99,6 +99,8 @@ BrowserTab * MainWindow::addEmptyTab(bool focus_new, bool load_default)
tab->navigateTo(QUrl("about:blank"), BrowserTab::DontPush);
}
+ tab->focusUrlBar();
+
return tab;
}