Skip to content

Change install path to $HOME/.config/QtProject #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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 ..
Expand All @@ -23,5 +24,6 @@ cp -v *.* $SYNTAXDIR
cd ..

cd wizards
mkdir -p $WIZARDDIR
cp -v -r * $WIZARDDIR
cd ..
13 changes: 7 additions & 6 deletions paths.pri
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions qbs/qbs.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion qtcreator/syntax/syntax.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion qtcreator/wizards/wizards.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down