forked from MrBesen/lolautoaccept
159 lines
4.7 KiB
Prolog
159 lines
4.7 KiB
Prolog
QT += core gui
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|
|
|
CONFIG += c++17
|
|
|
|
# debugging
|
|
CONFIG += debug
|
|
|
|
MOC_DIR = build/generated/
|
|
UI_DIR = build/ui/
|
|
RCC_DIR = build/rcc/
|
|
OBJECTS_DIR = build/objects/
|
|
|
|
unix:LIBS += -lcurl -pthread -lrt
|
|
|
|
# The following define makes your compiler emit warnings if you use
|
|
# any Qt feature that has been marked deprecated (the exact warnings
|
|
# depend on your compiler). Please consult the documentation of the
|
|
# deprecated API in order to know how to port your code away from it.
|
|
DEFINES += QT_DEPRECATED_WARNINGS
|
|
DEFINES += LOG_ENABLEQT=1
|
|
|
|
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
# In order to do so, uncomment the following line.
|
|
# 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
|
|
|
|
DEFINES += LOLAA_VERSION=\\\"0.0.7\\\"
|
|
|
|
# parameters: var, prepend, append
|
|
defineReplace(prependAll) {
|
|
for(a,$$1):result += $$2$${a}$$3
|
|
return($$result)
|
|
}
|
|
|
|
SOURCES += \
|
|
src/arg.cpp \
|
|
src/blitzapi.cpp \
|
|
src/champcache.cpp \
|
|
src/championsearch.cpp \
|
|
src/champrow.cpp \
|
|
src/clientaccess.cpp \
|
|
src/clientapi_json.cpp \
|
|
src/clientapi.cpp \
|
|
src/clipboardpopup.cpp \
|
|
src/config.cpp \
|
|
src/datadragon.cpp \
|
|
src/datadragonimagecache.cpp \
|
|
src/files.cpp \
|
|
src/json.cpp \
|
|
src/lolautoaccept.cpp \
|
|
src/main.cpp \
|
|
src/mainwindow.cpp \
|
|
src/memoryimagecache.cpp \
|
|
src/restclient.cpp \
|
|
src/runeaspektbutton.cpp \
|
|
src/runedisplay.cpp \
|
|
src/runeeditor.cpp \
|
|
src/runemanager.cpp \
|
|
src/runepage.cpp \
|
|
src/runepagelist.cpp \
|
|
src/settingstab.cpp \
|
|
src/stagesettings.cpp \
|
|
thirdparty/Log/Log.cpp
|
|
|
|
# platform specific implementations
|
|
win32:SOURCES += src/clientaccess_windows.cpp
|
|
unix:SOURCES += src/clientaccess_linux.cpp
|
|
|
|
HEADERS += \
|
|
include/arg.h \
|
|
include/blitzapi.h \
|
|
include/champcache.h \
|
|
include/championsearch.h \
|
|
include/champrow.h \
|
|
include/clientaccess.h \
|
|
include/clientapi.h \
|
|
include/clipboardpopup.h \
|
|
include/config.h \
|
|
include/datadragon.h \
|
|
include/datadragonimagecache.h \
|
|
include/defer.h \
|
|
include/files.h \
|
|
include/json.h \
|
|
include/lolautoaccept.h \
|
|
include/mainwindow.h \
|
|
include/memoryimagecache.h \
|
|
include/restclient.h \
|
|
include/runeaspektbutton.h \
|
|
include/runedisplay.h \
|
|
include/runeeditor.h \
|
|
include/runemanager.h \
|
|
include/runepage.h \
|
|
include/runepagelist.h \
|
|
include/settingstab.h \
|
|
include/stagesettings.h \
|
|
thirdparty/Log/Log.h
|
|
|
|
FORMS += \
|
|
ui/championsearch.ui \
|
|
ui/clipboardpopup.ui \
|
|
ui/mainwindow.ui \
|
|
ui/runeaspektbutton.ui \
|
|
ui/runedisplay.ui \
|
|
ui/runeeditor.ui \
|
|
ui/runemanager.ui \
|
|
ui/runepagelist.ui \
|
|
ui/settingstab.ui \
|
|
ui/stagesettings.ui
|
|
|
|
INCLUDEPATH += $$PWD/include/ \
|
|
$$PWD/thirdparty/Log/
|
|
|
|
# translations
|
|
LANGUAGES = de_DE en
|
|
CONFIG += lrelease embed_translations
|
|
|
|
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/resources/ts/, .ts)
|
|
|
|
updatelang.commands = lupdate $$_PRO_FILE_
|
|
QMAKE_EXTRA_TARGETS += updatelang
|
|
|
|
# build AppImage
|
|
unix {
|
|
linuxdeploy-x86_64.AppImage.commands = wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
|
|
|
|
resources/lolautoaccept.png.depends = resources/lolautoaccept.svg
|
|
resources/lolautoaccept.png.commands = rsvg-convert -w 512 -h 512 resources/lolautoaccept.svg -o resources/lolautoaccept.png
|
|
|
|
appimg.depends = linuxdeploy-x86_64.AppImage $${TARGET} resources/lolautoaccept.png
|
|
appimg.commands = rm -rf AppDir ; \
|
|
mkdir -p AppDir/ts ; \
|
|
./linuxdeploy-x86_64.AppImage --appdir=AppDir -e lolautoaccept -i resources/lolautoaccept.png -d resources/lolautoaccept.desktop --output appimage
|
|
|
|
QMAKE_EXTRA_TARGETS += appimg linuxdeploy-x86_64.AppImage resources/lolautoaccept.png
|
|
|
|
QMAKE_CLEAN += linuxdeploy-x86_64.AppImage resources/lolautoaccept.png
|
|
}
|
|
|
|
win32 {
|
|
INCLUDEPATH += $$PWD/../curl/include/
|
|
LIBS += $$PWD/../curl/lib/libbrotlicommon.a $$PWD/../curl/lib/libbrotlidec.a $$PWD/../curl/lib/libcrypto.a $$PWD/../curl/lib/libcurl.a $$PWD/../curl/lib/libcurl.dll.a $$PWD/../curl/lib/libgsasl.a $$PWD/../curl/lib/libidn2.a $$PWD/../curl/lib/libnghttp2.a $$PWD/../curl/lib/libnghttp3.a $$PWD/../curl/lib/libngtcp2.a $$PWD/../curl/lib/libngtcp2_crypto_openssl.a $$PWD/../curl/lib/libssh2.a $$PWD/../curl/lib/libssl.a $$PWD/../curl/lib/libz.a $$PWD/../curl/lib/libzstd.a
|
|
|
|
# to create the ico: convert -density 300 -define icon:auto-resize=256,128,96,64,48,32,16 -background none resources/lolautoaccept.svg resources/lolautoaccept.ico
|
|
RC_ICONS = resources/lolautoaccept.ico
|
|
}
|
|
|
|
# Default rules for deployment.
|
|
qnx: target.path = /tmp/$${TARGET}/bin
|
|
else: unix:!android: target.path = /usr/bin
|
|
!isEmpty(target.path): INSTALLS += target
|
|
|
|
|
|
# https://wiki.qt.io/Automating_generation_of_qm_files
|
|
|
|
RESOURCES += \
|
|
resources/res.qrc
|