qt Deployer

This commit is contained in:
Andrei Yankovich 2018-05-07 15:34:38 +03:00
parent bfcf56bd87
commit f3267e4fbe
29 changed files with 65 additions and 7 deletions

22
.gitignore vendored
View File

@ -12,6 +12,13 @@
# Qt-es
/parts/*
/prime/*
/snap/.snapcraft/*
/stage/*
/source/android/*
!/source/android/AndroidManifest.xml
/.qmake.cache
/.qmake.stash
*.pro.user
@ -20,15 +27,26 @@
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
Makefile*
*-build-*
*build-*
# QtCreator
*.autosave
#QtCtreator Qml
# QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCtreator CMake
CMakeLists.txt.user*
snap/plugins/__pycache__/
*.snap
\.buildconfig

BIN
snap/gui/QtDeployr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

28
snap/snapcraft.yaml Executable file
View File

@ -0,0 +1,28 @@
name: qt-deployer
version: '1.0'
summary: Deploy Qt Project
description: |
Deploy Qt Projects
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
icon: snap/gui/icon.png
apps:
qt-deployer:
command: bin/QtDeployer
# desktop: usr/share/applications/desc.desktop
plugs: [desktop, unity7, home, opengl, x11, wayland]
environment:
LD_LIBRARY_PATH: $SNAP/lib
QML_IMPORT_PATH: $SNAP/qml
QML2_IMPORT_PATH: $SNAP/qml
QT_PLUGIN_PATH: $SNAP/plugins
QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/plugins/platforms
parts:
qt-deployer:
plugin: dump
source: .

View File

@ -24,6 +24,10 @@ void CppManager::setNotFoundLibs(const QStringList &notFoundLibs)
emit notFoundLibsChanged(m_notFoundLibs);
}
bool CppManager::isQtLib(const QString &lib) const{
return lib.indexOf(m_qtdir) == 0;
}
void CppManager::extractAllLibs(const QStringList &execfiles)
{
for (const QString &execfile : execfiles)
@ -72,7 +76,7 @@ void CppManager::divideLibraries()
QFileInfo libInfo(lib);
name = libInfo.fileName();
if (!name.isEmpty() && name.startsWith("libQt"))
if (!name.isEmpty() && isQtLib(libInfo.path()))
{
m_qtLibraries << name;
m_cppLibraries.removeOne(lib);

View File

@ -19,6 +19,8 @@ class CppManager : public BaseClass
QStringList m_cppLibraries;
QStringList m_notFoundLibs;
bool isQtLib(const QString&) const;
public: // TODO remove this line
void extractAllLibs(const QStringList &execfiles);
QStringList extractLibsFromExecutable(const QString &execpath);

View File

@ -11,7 +11,7 @@ Page {
property int state: MainManager.state
header: TopBar {
text: "Qt Linux Deployer"
text: "Qt Deployer"
ToolButton {
text: "➔"

View File

@ -9,7 +9,7 @@ Page {
clip: true
header: TopBar {
text: "Qt Linux Deployer"
text: "Qt Deployer"
}
Settings {

View File

@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.0
ApplicationWindow {
id: window
visible: true
title: qsTr("Qt Linux Deployer")
title: qsTr("Qt Deployer")
width: 600
height: sp.implicitHeight + 30

View File

@ -1,6 +1,6 @@
QT += qml quick
CONFIG += c++11
CONFIG += c++14
RESOURCES += qml.qrc
@ -26,6 +26,12 @@ qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
VERSION = 1.0.0.0
TARGET = QtDeployer
TEMPLATE = app
RC_ICONS = res/QtDeployr.ico
SOURCES += \
main.cpp \
CPP/baseclass.cpp \

BIN
source/res/QtDeployr.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB