mirror of
https://github.com/QuasarApp/QtDeployer.git
synced 2025-04-26 13:34:32 +00:00
v 1.0
This commit is contained in:
parent
d61fd894f5
commit
9256052979
@ -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. |
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
62
source/QML/BuildPage.qml
Normal file
62
source/QML/BuildPage.qml
Normal file
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -21,7 +21,7 @@ TopBar {
|
||||
font.pointSize: smallFont
|
||||
anchors.right: home.left
|
||||
onClicked: {
|
||||
swipeview.currentIndex = 4
|
||||
swipeview.currentIndex = 5
|
||||
}
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ Page {
|
||||
|
||||
onClicked: {
|
||||
pp.erase = erase.checked
|
||||
swipeview.currentIndex = 2
|
||||
swipeview.currentIndex = 3
|
||||
CppManager.cppLibraries = cpplibs
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ Page {
|
||||
if (page.state == 0)
|
||||
MainManager.start(erase)
|
||||
else if (page.state == 2)
|
||||
swipeview.currentIndex = 3
|
||||
swipeview.currentIndex = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -94,9 +94,6 @@ int main(int argc, char *argv[])
|
||||
mainApp.show();
|
||||
#endif
|
||||
|
||||
|
||||
int returnCode = app->exec();
|
||||
delete app;
|
||||
return returnCode;
|
||||
return app->exec();
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
<file>QML/Header.qml</file>
|
||||
<file>QML/About.qml</file>
|
||||
<file>QML/Theme.js</file>
|
||||
<file>QML/BuildPage.qml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/languages">
|
||||
<file alias="en">languages/en.qm</file>
|
||||
|
Loading…
x
Reference in New Issue
Block a user