From 446dc776b04bf07eedeb6a00f91b49b5d58bf462 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 30 Aug 2019 20:13:38 -0400 Subject: [PATCH] Make `make install` work --- TODO.md | 1 - harmonyqml.pro | 44 +++++++++++++++++++++++++++++--------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/TODO.md b/TODO.md index 3d5c7deb..52eea6b1 100644 --- a/TODO.md +++ b/TODO.md @@ -11,7 +11,6 @@ - When qml syntax highlighting supports ES6 string interpolation, use them - Fixes - - `make install` - Make uvloop optional - Backspace bug diff --git a/harmonyqml.pro b/harmonyqml.pro index 406ccd40..26727f04 100644 --- a/harmonyqml.pro +++ b/harmonyqml.pro @@ -1,25 +1,39 @@ -TEMPLATE = app # widgets: Make native file dialogs available to QML (must use QApplication) -QT = quick widgets -DEFINES += QT_DEPRECATED_WARNINGS -CONFIG += warn_off c++11 release +QT = quick widgets +DEFINES += QT_DEPRECATED_WARNINGS +CONFIG += warn_off c++11 release +TEMPLATE = app + +BUILD_DIR = build +MOC_DIR = $$BUILD_DIR/moc +OBJECTS_DIR = $$BUILD_DIR/obj +RCC_DIR = $$BUILD_DIR/rcc + +QRC_FILE = $$BUILD_DIR/resources.qrc + +SOURCES += src/main.cpp +TARGET = harmonyqml + + +# Custom CONFIG options + +!no_embedded { + RESOURCES += $$QRC_FILE +} + dev { CONFIG -= warn_off release CONFIG += debug qml_debug declarative_debug } -BUILD_DIR = build -MOC_DIR = $$BUILD_DIR/moc -OBJECTS_DIR = $$BUILD_DIR/obj -RCC_DIR = $$BUILD_DIR/rcc -QRC_FILE = $$BUILD_DIR/resources.qrc -!no_embedded { - RESOURCES += $$QRC_FILE -} +# Files to copy for `make install` -SOURCES += src/main.cpp -TARGET = harmonyqml +win32:executables.path = "C:/Program Files" +!win32:executables.path = /usr/local/bin +executables.files = $$TARGET + +INSTALLS += executables # Libraries includes @@ -62,7 +76,7 @@ write_file($$QRC_FILE, file_content) # Allow cleaning folders instead of just files win32:QMAKE_DEL_FILE = rmdir /q /s -unix:QMAKE_DEL_FILE = rm -rf +!win32:QMAKE_DEL_FILE = rm -rf for(file, $$list($$glob_filenames(*.py))) { PYCACHE_DIRS *= $$dirname(file)/__pycache__