Qt module project structure (#124)

Refactor the project structure to make it build as a "Qt module". It's a first step to get this tool closer to Qt.

The main advantage here is: Simply running:
```
qmake
make
make install
```

will compile and install the tool into your Qt installation, and make it a part of your Qt just like any other tool (qmake, etc.)
This commit is contained in:
Felix Barz
2017-06-19 18:32:53 +02:00
committed by probonopd
parent d6b9ee7ba6
commit 93ba2f186e
13 changed files with 56 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
load(qt_build_config)
CONFIG += warning_clean exceptions
MODULE_VERSION = 0.5.0
+7 -1
View File
@@ -12,10 +12,16 @@ git clone https://github.com/probonopd/linuxdeployqt.git
# Then build in Qt Creator, or use
export PATH=$(readlink -f /tmp/.mount_QtCreator-*-x86_64/*/gcc_64/bin/):$PATH
cd linuxdeployqt
qmake linuxdeployqt.pro
qmake
make
```
* Optional if you want to install `linuxdeployqt` into your Qt installation, and make it a part of your Qt just like any other tool (qmake, etc.)
```
sudo make install
```
* Build and install [patchelf](https://nixos.org/patchelf.html) (a small utility to modify the dynamic linker and RPATH of ELF executables; similar to `install_name_tool` on macOS). To learn more about this, see http://blog.qt.io/blog/2011/10/28/rpath-and-runpath/
```
+1 -2
View File
@@ -1,2 +1 @@
TEMPLATE = subdirs
SUBDIRS = linuxdeployqt
load(qt_parts)
-2
View File
@@ -1,2 +0,0 @@
QT = core
SOURCES += main.cpp ../shared/shared.cpp
+1
View File
@@ -0,0 +1 @@
TEMPLATE = aux
+5
View File
@@ -0,0 +1,5 @@
%modules = (
);
%moduleheaders = (
);
+2 -2
View File
@@ -10,8 +10,8 @@ mkdir -p linuxdeployqt.AppDir/usr/bin/
cp /usr/bin/patchelf /usr/local/bin/{appimagetool,mksquashfs,zsyncmake} linuxdeployqt.AppDir/usr/bin/
find linuxdeployqt.AppDir/
export VERSION=continuous
cp ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/
./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt.desktop -verbose=3 -appimage
cp ./bin/linuxdeployqt linuxdeployqt.AppDir/usr/bin/
./bin/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt.desktop -verbose=3 -appimage
ls -lh
find *.AppDir
xpra start :99
+11
View File
@@ -0,0 +1,11 @@
TEMPLATE = subdirs
SUBDIRS += \
QtQuickControls2Application \
QtWebEngineApplication \
QtWidgetsApplication
DISTFILES += \
tests-ci.sh \
tests-environment.sh \
tests.sh
+17
View File
@@ -0,0 +1,17 @@
option(host_build)
QT = core
CONFIG += console
TARGET = linuxdeployqt
VERSION = $$MODULE_VERSION
DEFINES += BUILD_LINUXDEPLOYQT
load(qt_tool)
HEADERS += shared.h
SOURCES += main.cpp \
shared.cpp
DEFINES -= QT_USE_QSTRINGBUILDER #leads to compile errors if not disabled
@@ -28,7 +28,7 @@
#include <QCoreApplication>
#include <QDir>
#include <QProcessEnvironment>
#include "../shared/shared.h"
#include "shared.h"
#include <QRegularExpression>
#include <stdlib.h>
#include <QSettings>
+4
View File
@@ -0,0 +1,4 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += linuxdeployqt