diff --git a/.gitignore b/.gitignore index 90cc9cf..d617183 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .vscode build/* data +.qmake.stash +Makefile diff --git a/README.md b/README.md index 6b8dc36..71636d7 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,13 @@ This fork adds support for specifying an interval to wait before the action is triggered. There may be more improvements in the future. -![Screenshot of lead](https://github.com/almamu/lead/blob/master/screenshots/screenshot1.png) -![Screenshot of lead](https://github.com/almamu/lead/blob/master/screenshots/screenshot2.png) +![Screenshot of lead](./screenshots/screenshot1.png) +![Screenshot of lead](./screenshots/screenshot2.png) > Sensors are not displayed unless the debug mode is enabled ### Features + - hot corners: sensors in the corners of the screen - hot sides: sensors on center/middle edge of the screen - freely configurable action for each sensor @@ -25,17 +26,29 @@ This fork adds support for specifying an interval to wait before the action is t # Build it -*lead* uses [clang](http://clang.llvm.org/) as compiler, [g++](https://gcc.gnu.org/) as linker and [make](https://www.gnu.org/software/make/) as build-tool. +*lead* uses [make](https://www.gnu.org/software/make/) as the build-tool, but the makefile is generated with [qmake](https://wiki.qt.io/Qmake). + +*qmake* offers flexibility in compiler and linker choice, but [gcc](https://gcc.gnu.org/) and [g++](https://gcc.gnu.org/) have been proven to work. To build *lead* open a terminal in the root folder of the repository and: - $ make + $ qmake && make + +or alternatively (depending on distribution): + + $ qmake-qt5 && make ### Dependencies + - Qt5Widgets - Qt5Gui - Qt5Core +Instructions on installing the dependencies: +|OS|Command| +|---|---| +|Ubuntu 20.04|`$ sudo apt install -y qt5-default qt5-qmake`| +|Fedora 34|`$ sudo dnf install -y qmake-qt5-devel`| # Install it diff --git a/lead.pro b/lead.pro new file mode 100644 index 0000000..ed02111 --- /dev/null +++ b/lead.pro @@ -0,0 +1,29 @@ +TEMPLATE = app +TARGET = lead +INCLUDEPATH += . + +QT += widgets + +# Output folders, thanks https://stackoverflow.com/a/12872585/12036073 +release: DESTDIR = build/release +debug: DESTDIR = build/debug + +OBJECTS_DIR = $$DESTDIR/.obj +MOC_DIR = $$DESTDIR/.moc +RCC_DIR = $$DESTDIR/.qrc +UI_DIR = $$DESTDIR/.ui + +# Make commands, thanks https://stackoverflow.com/a/9378280/12036073 +target.path = /usr/bin/lead +INSTALLS += target + +# Input +HEADERS += src/app.h src/screenname.h src/sensor.h +SOURCES += src/app.cpp src/main.cpp src/screenname.cpp src/sensor.cpp + +# You can make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# Please consult the documentation of the deprecated API in order to know +# how to port your code away from it. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 diff --git a/makefile b/makefile deleted file mode 100644 index 78a4df5..0000000 --- a/makefile +++ /dev/null @@ -1,53 +0,0 @@ -###### BUILD ###### - -INCLUDES = -Isrc -I/usr/include -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -COMPILER = clang -std=c++11 -Wall -O3 -fPIC -MMD $(INCLUDES) -c $< -o $@ -MOC = moc $(INCLUDES) -o $@ $< -LINKER = g++ -o $@ $^ -lQt5Xdg -lQt5Widgets -lQt5Gui -lQt5Core -MKDIR = mkdir -p $(dir $@) - - -# this prevents make from deleting the generated moc_*.cpp files -# so that the including of the dep-files will not fail -.SECONDARY: - - -data/usr/bin/lead: build/main.o build/app.o build/sensor.o build/screenname.o build/moc_app.o build/moc_sensor.o build/moc_screenname.o - $(MKDIR) - $(LINKER) - -build/%.o: src/%.cpp - $(MKDIR) - $(COMPILER) - -build/moc_%.o: build/moc_%.cpp - $(MKDIR) - $(COMPILER) - -build/moc_%.cpp: src/%.h - $(MKDIR) - $(MOC) - --include build/*.d - - -###### CLEAN ###### - -clean: - rm -f build/* - rm -f data/usr/bin/lead - - -###### INSTALL ###### - -install: - cp -r data/* / - - -###### UNINSTALL ###### - -uninstall: - rm -f /usr/bin/lead - - -.PHONY: clean install uninstall \ No newline at end of file