mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
Bump Qt and CI script versions, fix macOS support, and drop support for qmake (#98)
This commit is contained in:
@@ -14,10 +14,10 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
qt_version: [5.12.11, 5.15.2, 6.2.0]
|
||||
qt_version: [5.12.12, 5.15.2, 6.2.2]
|
||||
platform: [ubuntu-20.04, windows-latest, macos-latest]
|
||||
include:
|
||||
- qt_version: 6.2.0
|
||||
- qt_version: 6.2.2
|
||||
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
|
||||
- platform: ubuntu-20.04
|
||||
make: make
|
||||
@@ -41,31 +41,16 @@ jobs:
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2.14.0
|
||||
uses: jurplel/install-qt-action@v3.3.0
|
||||
with:
|
||||
version: ${{ matrix.qt_version }}
|
||||
|
||||
- name: Build with CMake as static
|
||||
run: |
|
||||
cmake . -D QHOTKEY_EXAMPLES=ON ${{ matrix.additional_arguments }}
|
||||
cmake . -D QHOTKEY_EXAMPLES=ON -D CMAKE_OSX_ARCHITECTURES="x86_64" ${{ matrix.additional_arguments }}
|
||||
cmake --build .
|
||||
|
||||
- name: Build with CMake as shared
|
||||
run: |
|
||||
cmake . -D BUILD_SHARED_LIBS=ON -D QHOTKEY_EXAMPLES=ON ${{ matrix.additional_arguments }}
|
||||
cmake . -D BUILD_SHARED_LIBS=ON -D QHOTKEY_EXAMPLES=ON -D CMAKE_OSX_ARCHITECTURES="x86_64" ${{ matrix.additional_arguments }}
|
||||
cmake --build .
|
||||
|
||||
- name: Setup MSVC environment for QMake
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Build with QMake as static
|
||||
working-directory: HotkeyTest
|
||||
run: |
|
||||
qmake
|
||||
${{ matrix.make }}
|
||||
|
||||
- name: Build with QMake as shared
|
||||
working-directory: HotkeyTest
|
||||
run: |
|
||||
qmake "DEFINES+=QHOTKEY_SHARED QHOTKEY_LIBRARY"
|
||||
${{ matrix.make }}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2016-02-05T22:01:03
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = HotkeyTest
|
||||
TEMPLATE = app
|
||||
|
||||
include(../qhotkey.pri)
|
||||
|
||||
SOURCES += main.cpp\
|
||||
hottestwidget.cpp
|
||||
|
||||
HEADERS += hottestwidget.h
|
||||
|
||||
FORMS += hottestwidget.ui
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += \
|
||||
HotkeyTest \
|
||||
QHotkey
|
||||
|
||||
DISTFILES += README.md \
|
||||
LICENSE \
|
||||
doc/qhotkey.doxy \
|
||||
doc/qhotkey.dox
|
||||
@@ -1,16 +0,0 @@
|
||||
TEMPLATE = lib
|
||||
win32: CONFIG += dll
|
||||
|
||||
TARGET = QHotkey
|
||||
VERSION = 1.5.0
|
||||
|
||||
include(../qhotkey.pri)
|
||||
|
||||
DEFINES += QHOTKEY_SHARED QHOTKEY_LIBRARY
|
||||
|
||||
# use INSTALL_ROOT to modify the install location
|
||||
headers.files = $$PUBLIC_HEADERS
|
||||
headers.path = $$[QT_INSTALL_HEADERS]
|
||||
target.path = $$[QT_INSTALL_LIBS]
|
||||
INSTALLS += target headers
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
message(The pri file has been moved one directory up! use that one instead)
|
||||
@@ -16,7 +16,7 @@ The QHotkey is a class that can be used to create hotkeys/global shortcuts, aka
|
||||
|
||||
## Building
|
||||
|
||||
QHotkey supports both Qt6 and Qt5. When using Qt6, version 6.2.0 or later required. It can be built by either the CMake or qmake building systems.
|
||||
QHotkey supports both Qt6 and Qt5. When using Qt6, version 6.2.0 or later required. It can be built using the CMake building system.
|
||||
|
||||
### CMake
|
||||
|
||||
@@ -29,17 +29,6 @@ $ cmake --build build
|
||||
# cmake --install build
|
||||
```
|
||||
|
||||
### qmake
|
||||
|
||||
The major version of Qt is chosen by the qmake invocation itself, as the qmake executable is tied to a specific Qt version. The executable name can vary between operating systems. qmake example usage:
|
||||
|
||||
```
|
||||
$ cd QHotkey
|
||||
$ qmake
|
||||
$ make
|
||||
# make install
|
||||
```
|
||||
|
||||
## Installation
|
||||
The package is providet as qpm package, [`de.skycoder42.qhotkey`](https://www.qpm.io/packages/de.skycoder42.qhotkey/index.html). You can install it either via qpmx (preferred) or directly via qpm.
|
||||
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
mac: LIBS += -framework Carbon
|
||||
else:win32: LIBS += -luser32
|
||||
else:unix {
|
||||
equals(QT_MAJOR_VERSION, 6) {
|
||||
lessThan(QT_VERSION, 6.2.0) {
|
||||
error("Qt 6.2.0 or greater is required when using Qt6")
|
||||
}
|
||||
}
|
||||
else {
|
||||
lessThan(QT_MAJOR_VERSION, 6) {
|
||||
QT += x11extras
|
||||
}
|
||||
}
|
||||
LIBS += -lX11
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
CONFIG += C++11
|
||||
|
||||
PUBLIC_HEADERS += $$PWD/QHotkey/qhotkey.h \
|
||||
$$PWD/QHotkey/QHotkey
|
||||
|
||||
HEADERS += $$PUBLIC_HEADERS \
|
||||
$$PWD/QHotkey/qhotkey_p.h
|
||||
|
||||
SOURCES += $$PWD/QHotkey/qhotkey.cpp
|
||||
|
||||
mac: SOURCES += $$PWD/QHotkey/qhotkey_mac.cpp
|
||||
else:win32: SOURCES += $$PWD/QHotkey/qhotkey_win.cpp
|
||||
else:unix: SOURCES += $$PWD/QHotkey/qhotkey_x11.cpp
|
||||
|
||||
INCLUDEPATH += $$PWD/QHotkey
|
||||
|
||||
include($$PWD/qhotkey.prc)
|
||||
Reference in New Issue
Block a user