Skip to content

Qt module project structure #124

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

Merged
merged 7 commits into from
Jun 19, 2017
Merged
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
5 changes: 5 additions & 0 deletions .qmake.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
load(qt_build_config)

CONFIG += warning_clean exceptions

MODULE_VERSION = 0.5.0
8 changes: 7 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

```
Expand Down
3 changes: 1 addition & 2 deletions linuxdeployqt.pro
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
TEMPLATE = subdirs
SUBDIRS = linuxdeployqt
load(qt_parts)
2 changes: 0 additions & 2 deletions linuxdeployqt/linuxdeployqt.pro

This file was deleted.

1 change: 1 addition & 0 deletions src/src.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TEMPLATE = aux
5 changes: 5 additions & 0 deletions sync.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%modules = (
);

%moduleheaders = (
);
4 changes: 2 additions & 2 deletions tests/tests-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions tests/tests.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TEMPLATE = subdirs

SUBDIRS += \
QtQuickControls2Application \
QtWebEngineApplication \
QtWidgetsApplication

DISTFILES += \
tests-ci.sh \
tests-environment.sh \
tests.sh
17 changes: 17 additions & 0 deletions tools/linuxdeployqt/linuxdeployqt.pro
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions linuxdeployqt/main.cpp → tools/linuxdeployqt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <QCoreApplication>
#include <QDir>
#include <QProcessEnvironment>
#include "../shared/shared.h"
#include "shared.h"
#include <QRegularExpression>
#include <stdlib.h>
#include <QSettings>
Expand Down Expand Up @@ -146,7 +146,7 @@ int main(int argc, char **argv)
// Allow binaries next to linuxdeployqt to be found; this is useful for bundling
// this application itself together with helper binaries such as patchelf
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString oldPath = env.value("PATH");
QString oldPath = env.value("PATH");
QString newPath = QCoreApplication::applicationDirPath() + ":" + oldPath;
LogDebug() << newPath;
setenv("PATH",newPath.toUtf8().constData(),1);
Expand Down Expand Up @@ -306,7 +306,7 @@ int main(int argc, char **argv)
qDebug() << "preExistingToplevelIcon:" << preExistingToplevelIcon;
} else {
qDebug() << "iconToBeUsed:" << iconToBeUsed;
QString targetIconPath = appDirPath + "/" + QFileInfo(iconToBeUsed).fileName();
QString targetIconPath = appDirPath + "/" + QFileInfo(iconToBeUsed).fileName();
if (QFile::copy(iconToBeUsed, targetIconPath)){
qDebug() << "Copied" << iconToBeUsed << "to" << targetIconPath;
QFile::copy(targetIconPath, appDirPath + "/.DirIcon");
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions tools/tools.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TEMPLATE = subdirs
CONFIG += ordered

SUBDIRS += linuxdeployqt