diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 7c11507..0a19116 100755
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -1,5 +1,5 @@
name: qt-deployer
-version: '1.0.3.core16.test2'
+version: '1.0.4'
summary: Deploy Qt Project
description: |
Deploy Qt Projects. this application extract all depends library of executable and create launch script for your application. |
diff --git a/source/CPP/buildmanager.cpp b/source/CPP/buildmanager.cpp
index 761780b..7c20122 100644
--- a/source/CPP/buildmanager.cpp
+++ b/source/CPP/buildmanager.cpp
@@ -111,14 +111,6 @@ bool BuildManager::build(){
return false;
}
- QProcess P;
- P.start("ldd " + qmake, QProcess::ReadOnly);
- P.waitForFinished();
-
-
- tempLog = P.readAll();
- emit logChanged(tempLog);
-
pQMake.setProgram(qmake);
pQMake.setWorkingDirectory(tempBuildFolder);
pQMake.setArguments(QStringList() << m_projectdir);
diff --git a/source/CPP/cppmanager.cpp b/source/CPP/cppmanager.cpp
index 774f734..2b52d23 100755
--- a/source/CPP/cppmanager.cpp
+++ b/source/CPP/cppmanager.cpp
@@ -25,7 +25,7 @@ void CppManager::setNotFoundLibs(const QStringList ¬FoundLibs)
}
bool CppManager::isQtLib(const QString &lib) const{
- return lib.indexOf(m_qtdir) == 0;
+ return lib.indexOf(m_qtdir) == 0 || lib.indexOf("libQt") > -1;
}
void CppManager::extractAllLibs(const QStringList &execfiles)
@@ -41,7 +41,15 @@ void CppManager::extractAllLibs(const QStringList &execfiles)
QStringList CppManager::extractLibsFromExecutable(const QString &execpath)
{
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ env.insert("LD_LIBRARY_PATH", m_qtdir + "/lib");
+ env.insert("QML_IMPORT_PATH", m_qtdir + "/qml");
+ env.insert("QML2_IMPORT_PATH", m_qtdir + "/qml");
+ env.insert("QT_PLUGIN_PATH", m_qtdir + "/plugins");
+ env.insert("QT_QPA_PLATFORM_PLUGIN_PATH", m_qtdir + "/plugins/platforms");
+
QProcess P;
+ P.setProcessEnvironment(env);
P.start("ldd " + execpath, QProcess::ReadOnly);
if (!P.waitForStarted()) return QStringList();
diff --git a/source/QML/BuildPage.qml b/source/QML/BuildPage.qml
new file mode 100644
index 0000000..986c70f
--- /dev/null
+++ b/source/QML/BuildPage.qml
@@ -0,0 +1,62 @@
+import QtQuick 2.7
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Layouts 1.3
+import Qt.labs.settings 1.0
+
+Page {
+ id: page
+ clip: false
+
+ header: Header {
+ message: qsTr("Qt Deployer")
+ }
+
+ property string outdir
+ property var cpplibs: []
+
+ Flickable {
+ id: flick
+
+ Connections {
+ target: BuildManager
+ onLogChanged:{
+ log.append(BuildManager.log)
+ }
+ }
+
+ Connections {
+ target: BuildManager
+ onFinished:{
+ swipeview.currentIndex = 2
+ CppManager.cppLibraries = cpplibs
+ }
+ }
+
+ anchors.fill: parent
+ contentWidth: log.paintedWidth
+ contentHeight: log.paintedHeight
+ clip: true
+
+ function ensureVisible(r)
+ {
+ if (contentX >= r.x)
+ contentX = r.x;
+ else if (contentX+width <= r.x+r.width)
+ contentX = r.x+r.width-width;
+ if (contentY >= r.y)
+ contentY = r.y;
+ else if (contentY+height <= r.y+r.height)
+ contentY = r.y+r.height-height;
+ }
+
+ TextEdit {
+ id: log
+ width: flick.width
+ focus: true
+ wrapMode: TextEdit.Wrap
+ onCursorRectangleChanged: flick.ensureVisible(cursorRectangle)
+ }
+ }
+
+}
diff --git a/source/QML/Header.qml b/source/QML/Header.qml
index e54a39e..ea1a02f 100644
--- a/source/QML/Header.qml
+++ b/source/QML/Header.qml
@@ -21,7 +21,7 @@ TopBar {
font.pointSize: smallFont
anchors.right: home.left
onClicked: {
- swipeview.currentIndex = 4
+ swipeview.currentIndex = 5
}
anchors.verticalCenter: parent.verticalCenter
}
diff --git a/source/QML/PreparePage.qml b/source/QML/PreparePage.qml
index 88b1ff3..62c508e 100755
--- a/source/QML/PreparePage.qml
+++ b/source/QML/PreparePage.qml
@@ -93,7 +93,7 @@ Page {
onClicked: {
pp.erase = erase.checked
- swipeview.currentIndex = 2
+ swipeview.currentIndex = 3
CppManager.cppLibraries = cpplibs
}
}
diff --git a/source/QML/ProcessPage.qml b/source/QML/ProcessPage.qml
index 1bdebe5..8258afd 100755
--- a/source/QML/ProcessPage.qml
+++ b/source/QML/ProcessPage.qml
@@ -25,7 +25,7 @@ Page {
if (page.state == 0)
MainManager.start(erase)
else if (page.state == 2)
- swipeview.currentIndex = 3
+ swipeview.currentIndex = 4
}
}
}
diff --git a/source/QML/main.qml b/source/QML/main.qml
index 4519a5c..b27cbbe 100755
--- a/source/QML/main.qml
+++ b/source/QML/main.qml
@@ -9,7 +9,8 @@ ApplicationWindow {
title: qsTr("Qt Deployer")
width: 600
- height: sp.implicitHeight + 30
+
+ height: sp.implicitHeight + 300
property real smallFont: window.font.pointSize
property real mediumFont: window.font.pointSize + 2
@@ -29,6 +30,10 @@ ApplicationWindow {
id: sp
}
+ BuildPage {
+ id: rb
+ }
+
PreparePage {
id: prp
}
diff --git a/source/main.cpp b/source/main.cpp
index b8490e9..eb98a6c 100755
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -94,9 +94,6 @@ int main(int argc, char *argv[])
mainApp.show();
#endif
-
- int returnCode = app->exec();
- delete app;
- return returnCode;
+ return app->exec();
}
diff --git a/source/qml.qrc b/source/qml.qrc
index 4267adc..ea81970 100755
--- a/source/qml.qrc
+++ b/source/qml.qrc
@@ -13,6 +13,7 @@
QML/Header.qml
QML/About.qml
QML/Theme.js
+ QML/BuildPage.qml
languages/en.qm