diff --git a/install.sh b/install.sh index bb6558b..91b2d97 100755 --- a/install.sh +++ b/install.sh @@ -1,16 +1,17 @@ #!/bin/bash -QTCREATORDIR=$1/Tools/QtCreator -TARGETDIR=$QTCREATORDIR/share/qtcreator/qbs -SYNTAXDIR=~/.config/QtProject/qtcreator/generic-highlighter/ -WIZARDDIR=$QTCREATORDIR/share/qtcreator/templates/wizards/ +QT_BASE_DIR=$HOME/.config/QtProject +QTCREATOR_INSTALL_DIR=$QT_BASE_DIR/qtcreator +QBS_INSTALL_DIR=$QT_BASE_DIR/qbs +SYNTAXDIR=$QTCREATOR_INSTALL_DIR/generic-highlighter/ +WIZARDDIR=$QTCREATOR_INSTALL_DIR/templates/wizards/ cd qbs -MODULEDIR=$TARGETDIR/share/qbs/modules/hal/ +MODULEDIR=$QBS_INSTALL_DIR/modules/hal/ mkdir -p $MODULEDIR cp -v ./modules/hal/*.qbs $MODULEDIR -IMPORTDIR=$TARGETDIR/share/qbs/imports/qbs/base/ +IMPORTDIR=$QBS_INSTALL_DIR/imports/qbs/base/ mkdir -p $IMPORTDIR cp -v ./imports/*.qbs $IMPORTDIR cd .. @@ -23,5 +24,6 @@ cp -v *.* $SYNTAXDIR cd .. cd wizards +mkdir -p $WIZARDDIR cp -v -r * $WIZARDDIR cd .. diff --git a/paths.pri b/paths.pri index affa49c..3a454ba 100644 --- a/paths.pri +++ b/paths.pri @@ -1,14 +1,15 @@ # Modify these paths to your needs and then build the project -# Qt SDK directory - autodetected based on qmake path -QTSDK_DIR=$$absolute_path($$[QT_INSTALL_PREFIX]/../..) +# User local directory +# https://doc-snapshots.qt.io/qbs/cli-config.html +unix:QT_BASE_DIR=$$HOME/.config/QtProject +win32:QT_BASE_DIR=%APPDATA%\QtProject +macx:QT_BASE_DIR=$$HOME/Library/Preferences # Qt Creator paths for the Qt Quick Designer plugin -# Path to the Qt Creator source - not needed anymore -QTCREATOR_SOURCE_DIR=$$QTSDK_DIR/../qt-creator # Path to installed Qt Creator (where the plugin should be installed to) -QTCREATOR_INSTALL_DIR=$$QTSDK_DIR/Tools/QtCreator - +QTCREATOR_INSTALL_DIR=$$QT_BASE_DIR/qtcreator +QBS_INSTALL_DIR=$$QT_BASE_DIR/qbs # Qt documentation directory containing Qt documentation with .index files # -> somehow only the Android toolchain comes with .index files QT_DOC_DIR = $$[QT_INSTALL_PREFIX]/../android_armv7/doc diff --git a/qbs/qbs.pro b/qbs/qbs.pro index 9ab251e..c81268c 100644 --- a/qbs/qbs.pro +++ b/qbs/qbs.pro @@ -9,9 +9,9 @@ IMPORTS_FILES = imports/MachinekitApplication.qbs MODULES_FILES = modules/hal/HalModule.qbs imports_install.files = $$IMPORTS_FILES -imports_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/qbs/share/qbs/imports/qbs/base/ +imports_install.path = $$QBS_INSTALL_DIR/imports/qbs/base/ modules_install.files = $$MODULES_FILES -modules_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/qbs/share/qbs/modules/$$MODULE_NAME/ +modules_install.path = $$QBS_INSTALL_DIR/modules/$$MODULE_NAME/ INSTALLS += imports_install modules_install diff --git a/qtcreator/syntax/syntax.pro b/qtcreator/syntax/syntax.pro index c279cf5..d38a097 100644 --- a/qtcreator/syntax/syntax.pro +++ b/qtcreator/syntax/syntax.pro @@ -5,7 +5,7 @@ OTHER_FILES = hal.xml include(../../paths.pri) files_install.files = $$OTHER_FILES -files_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/generic-highlighter/ +files_install.path = $$QTCREATOR_INSTALL_DIR/generic-highlighter/ INSTALLS += files_install diff --git a/qtcreator/wizards/wizards.pro b/qtcreator/wizards/wizards.pro index 6c95717..852a1f5 100644 --- a/qtcreator/wizards/wizards.pro +++ b/qtcreator/wizards/wizards.pro @@ -9,7 +9,7 @@ WIZARD_FILES = machinekitapplication \ include(../../paths.pri) wizard_install.files = $$WIZARD_FILES -wizard_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/templates/wizards/ +wizard_install.path = $$QTCREATOR_INSTALL_DIR/templates/wizards/ OTHER_FILES += $$WIZARD_FILES