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:
@@ -0,0 +1,5 @@
|
|||||||
|
load(qt_build_config)
|
||||||
|
|
||||||
|
CONFIG += warning_clean exceptions
|
||||||
|
|
||||||
|
MODULE_VERSION = 0.5.0
|
||||||
+7
-1
@@ -12,10 +12,16 @@ git clone https://github.com/probonopd/linuxdeployqt.git
|
|||||||
# Then build in Qt Creator, or use
|
# Then build in Qt Creator, or use
|
||||||
export PATH=$(readlink -f /tmp/.mount_QtCreator-*-x86_64/*/gcc_64/bin/):$PATH
|
export PATH=$(readlink -f /tmp/.mount_QtCreator-*-x86_64/*/gcc_64/bin/):$PATH
|
||||||
cd linuxdeployqt
|
cd linuxdeployqt
|
||||||
qmake linuxdeployqt.pro
|
qmake
|
||||||
make
|
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/
|
* 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
@@ -1,2 +1 @@
|
|||||||
TEMPLATE = subdirs
|
load(qt_parts)
|
||||||
SUBDIRS = linuxdeployqt
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
QT = core
|
|
||||||
SOURCES += main.cpp ../shared/shared.cpp
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
TEMPLATE = aux
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
%modules = (
|
||||||
|
);
|
||||||
|
|
||||||
|
%moduleheaders = (
|
||||||
|
);
|
||||||
+2
-2
@@ -10,8 +10,8 @@ mkdir -p linuxdeployqt.AppDir/usr/bin/
|
|||||||
cp /usr/bin/patchelf /usr/local/bin/{appimagetool,mksquashfs,zsyncmake} linuxdeployqt.AppDir/usr/bin/
|
cp /usr/bin/patchelf /usr/local/bin/{appimagetool,mksquashfs,zsyncmake} linuxdeployqt.AppDir/usr/bin/
|
||||||
find linuxdeployqt.AppDir/
|
find linuxdeployqt.AppDir/
|
||||||
export VERSION=continuous
|
export VERSION=continuous
|
||||||
cp ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/
|
cp ./bin/linuxdeployqt linuxdeployqt.AppDir/usr/bin/
|
||||||
./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt.desktop -verbose=3 -appimage
|
./bin/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt.desktop -verbose=3 -appimage
|
||||||
ls -lh
|
ls -lh
|
||||||
find *.AppDir
|
find *.AppDir
|
||||||
xpra start :99
|
xpra start :99
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
|
SUBDIRS += \
|
||||||
|
QtQuickControls2Application \
|
||||||
|
QtWebEngineApplication \
|
||||||
|
QtWidgetsApplication
|
||||||
|
|
||||||
|
DISTFILES += \
|
||||||
|
tests-ci.sh \
|
||||||
|
tests-environment.sh \
|
||||||
|
tests.sh
|
||||||
@@ -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 <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QProcessEnvironment>
|
#include <QProcessEnvironment>
|
||||||
#include "../shared/shared.h"
|
#include "shared.h"
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
TEMPLATE = subdirs
|
||||||
|
CONFIG += ordered
|
||||||
|
|
||||||
|
SUBDIRS += linuxdeployqt
|
||||||
Reference in New Issue
Block a user