mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-26 17:54:32 +00:00
Merge pull request #715 from QuasarApp/main
Some checks failed
buildbot/DocsGenerator Build finished.
buildbot/AndroidBuilder_v7 Build finished.
buildbot/AndroidBuilder_v8 Build finished.
buildbot/AndroidBuilder_v8Qt6 Build finished.
buildbot/LinuxCMakeBuilder Build finished.
buildbot/IOSCMakeBuilder Build finished.
buildbot/LinuxCMakeBuilderQt6 Build finished.
buildbot/WindowsCMakeBuilder Build finished.
Some checks failed
buildbot/DocsGenerator Build finished.
buildbot/AndroidBuilder_v7 Build finished.
buildbot/AndroidBuilder_v8 Build finished.
buildbot/AndroidBuilder_v8Qt6 Build finished.
buildbot/LinuxCMakeBuilder Build finished.
buildbot/IOSCMakeBuilder Build finished.
buildbot/LinuxCMakeBuilderQt6 Build finished.
buildbot/WindowsCMakeBuilder Build finished.
move cqtdeployer v1.5 to arhive
This commit is contained in:
commit
0f012f7485
@ -1,6 +1,9 @@
|
|||||||
# QuassarApp operation rules
|
# QuassarApp operation rules
|
||||||
|
|
||||||
## General rules
|
## General rules
|
||||||
|
|
||||||
### QuasarApp internal developers
|
### QuasarApp internal developers
|
||||||
|
|
||||||
* if there is no instruction to complete the task, separate you new branch from the version branch (for example v1.x).
|
* if there is no instruction to complete the task, separate you new branch from the version branch (for example v1.x).
|
||||||
* Realize the task
|
* Realize the task
|
||||||
* At the end of the work, create a pull request to the branch from which you created the branch.
|
* At the end of the work, create a pull request to the branch from which you created the branch.
|
||||||
@ -8,6 +11,7 @@ Example:
|
|||||||
I made corrections for version 1.5 and created a new branch from branch v1.5, which means that I should create a pull request to branch v1.5,
|
I made corrections for version 1.5 and created a new branch from branch v1.5, which means that I should create a pull request to branch v1.5,
|
||||||
|
|
||||||
### External QuasarApp Developers
|
### External QuasarApp Developers
|
||||||
|
|
||||||
* Making Fork repository.
|
* Making Fork repository.
|
||||||
* Switch to the branch of the version in which you need to perform the correction (example of the names of the branch with the version: v1.x).
|
* Switch to the branch of the version in which you need to perform the correction (example of the names of the branch with the version: v1.x).
|
||||||
* Realize the task
|
* Realize the task
|
||||||
@ -18,26 +22,26 @@ I made corrections for version 1.5 and created a new branch from branch v1.5, wh
|
|||||||
|
|
||||||
### Forbidden
|
### Forbidden
|
||||||
|
|
||||||
* Using 'push force'. All conflicts need to be solved by a new commite.
|
* Using 'push force'. All conflicts need to be solved by a new commit.
|
||||||
* Push code directly to master.
|
* Push code directly to master.
|
||||||
* Break the code design rules. If some aspect is not described, you need to write in the same style as it was written before you.
|
* Break the code design rules. If some aspect is not described, you need to write in the same style as it was written before your change.
|
||||||
* Move the code for no particular reason.
|
* Move the code for no particular reason.
|
||||||
|
|
||||||
|
|
||||||
## Making Pull Request
|
## Making Pull Request
|
||||||
|
|
||||||
The content of the pull request must include:
|
The content of the pull request must include:
|
||||||
* The number of the task that solves (if performed according to the task)
|
* The number of the task that is solved (if performed according to the task)
|
||||||
* A complete description of everything that was done in the task.
|
* A complete description of everything that was done in the task.
|
||||||
* In the case when a pull creation is created and you still work on the task, change the header of the pool request by adding a WIP tag to the beginning (example [WIP] MyTask)
|
* In the case when a pull creation is created and you still work on the task, change the header of the pool request by adding a WIP tag to the beginning (example [WIP] MyTask)
|
||||||
* Pull Request must always be assigned to the branch from which you separated.
|
* Pull Request must always be assigned to the branch from which you branched (started to work).
|
||||||
|
|
||||||
## Making Tasks
|
## Making Tasks
|
||||||
If necessary, assign a task to someone
|
|
||||||
|
If necessary, assign a task to someone.
|
||||||
You must:
|
You must:
|
||||||
* Create relevant discussion on github, selected repository.
|
* Create relevant discussion on github for the specific repository.
|
||||||
* Completely describe the problem or task.
|
* Completely describe the problem or task.
|
||||||
* If you have a solution to the problem fully describe what and how to do.
|
* If you have a solution to the problem, then describe in detail what and how it should be done.
|
||||||
|
|
||||||
## Code Guideline
|
## Code Guideline
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2021 QuasarApp.
|
# Copyright (C) 2018-2022 QuasarApp.
|
||||||
# Distributed under the lgplv3 software license, see the accompanying
|
# Distributed under the lgplv3 software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
@ -11,7 +11,19 @@ CONFIG += ordered
|
|||||||
lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) {
|
lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) {
|
||||||
warning("Tests are only enabled on Qt 5.12.0 or later version. You are using $$[QT_VERSION].")
|
warning("Tests are only enabled on Qt 5.12.0 or later version. You are using $$[QT_VERSION].")
|
||||||
DEFINES += WITHOUT_TESTS
|
DEFINES += WITHOUT_TESTS
|
||||||
|
DEFINES += WITHOUT_TR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unix:gcc {
|
||||||
|
COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion")
|
||||||
|
COMPILER_MAJOR_VERSION = $$COMPILER_VERSION
|
||||||
|
lessThan(COMPILER_MAJOR_VERSION, 5): {
|
||||||
|
warning("The PE parser library is disabled. For build the PE parser library require gcc 5 or later version.")
|
||||||
|
DEFINES += DISABLE_PE
|
||||||
|
}
|
||||||
|
message(Version GCC : $$COMPILER_VERSION)
|
||||||
|
}
|
||||||
|
|
||||||
android: DEFINES += WITHOUT_TESTS
|
android: DEFINES += WITHOUT_TESTS
|
||||||
|
|
||||||
!android {
|
!android {
|
||||||
@ -30,6 +42,10 @@ android: DEFINES += WITHOUT_TESTS
|
|||||||
unix:SUBDIRS += tests/quicknanobrowser
|
unix:SUBDIRS += tests/quicknanobrowser
|
||||||
unix:SUBDIRS += tests/webui
|
unix:SUBDIRS += tests/webui
|
||||||
|
|
||||||
|
contains(DEFINES, DISABLE_PE) {
|
||||||
|
SUBDIRS -= Pe
|
||||||
|
DEFINES += WITHOUT_TESTS
|
||||||
|
}
|
||||||
|
|
||||||
contains(DEFINES, WITHOUT_TESTS) {
|
contains(DEFINES, WITHOUT_TESTS) {
|
||||||
SUBDIRS -= UnitTests \
|
SUBDIRS -= UnitTests \
|
||||||
@ -48,6 +64,9 @@ android: DEFINES += WITHOUT_TESTS
|
|||||||
Pe.file = $$PWD/pe/pe-parser-library/pe-parser-library.pro
|
Pe.file = $$PWD/pe/pe-parser-library/pe-parser-library.pro
|
||||||
|
|
||||||
include('$$PWD/QIFData/installerCQtDeployer.pri')
|
include('$$PWD/QIFData/installerCQtDeployer.pri')
|
||||||
|
!contains(QMAKE_HOST.arch, arm.*):{
|
||||||
|
include($$PWD/test.pri)
|
||||||
|
}
|
||||||
|
|
||||||
DISTFILES += \
|
DISTFILES += \
|
||||||
snap/snapcraft.yaml \
|
snap/snapcraft.yaml \
|
||||||
@ -56,5 +75,4 @@ android: DEFINES += WITHOUT_TESTS
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
include($$PWD/test.pri)
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2021 QuasarApp.
|
# Copyright (C) 2018-2022 QuasarApp.
|
||||||
# Distributed under the lgplv3 software license, see the accompanying
|
# Distributed under the lgplv3 software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
@ -31,8 +31,9 @@ include('$$PWD/../QuasarAppLib/QuasarLib.pri')
|
|||||||
include('$$PWD/../Deploy/Deploy.pri')
|
include('$$PWD/../Deploy/Deploy.pri')
|
||||||
include('$$PWD/../zip/zip.pri')
|
include('$$PWD/../zip/zip.pri')
|
||||||
|
|
||||||
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
!contains(DEFINES, DISABLE_PE) {
|
||||||
|
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
||||||
|
}
|
||||||
|
|
||||||
TARGET = cqtdeployer
|
TARGET = cqtdeployer
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -21,10 +21,9 @@ int main(int argc, char *argv[]) {
|
|||||||
QCoreApplication::setApplicationName("CQtDeployer");
|
QCoreApplication::setApplicationName("CQtDeployer");
|
||||||
|
|
||||||
|
|
||||||
if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
|
if (!QuasarAppUtils::Params::parseParams(argc, argv, DeployCore::avilableOptions())) {
|
||||||
QuasarAppUtils::Params::log("Wrong parameters", QuasarAppUtils::Warning);
|
QuasarAppUtils::Params::log("Wrong parameters. Please use the 'help' of 'h' option to show the help page.", QuasarAppUtils::Warning);
|
||||||
DeployCore::help();
|
exit(4);
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Deploy deploy;
|
Deploy deploy;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2021 QuasarApp.
|
# Copyright (C) 2018-2022 QuasarApp.
|
||||||
# Distributed under the lgplv3 software license, see the accompanying
|
# Distributed under the lgplv3 software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2021 QuasarApp.
|
# Copyright (C) 2018-2022 QuasarApp.
|
||||||
# Distributed under the lgplv3 software license, see the accompanying
|
# Distributed under the lgplv3 software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
@ -19,7 +19,7 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
DEFINES += DEPLOY_LIBRARY
|
DEFINES += DEPLOY_LIBRARY
|
||||||
|
|
||||||
VERSION = 1.5.0.36
|
VERSION = 1.5.4.17
|
||||||
|
|
||||||
DEFINES += APP_VERSION='\\"$$VERSION\\"'
|
DEFINES += APP_VERSION='\\"$$VERSION\\"'
|
||||||
|
|
||||||
@ -41,7 +41,9 @@ CONFIG(release, debug|release): {
|
|||||||
}
|
}
|
||||||
|
|
||||||
include('$$PWD/../QuasarAppLib/QuasarLib.pri')
|
include('$$PWD/../QuasarAppLib/QuasarLib.pri')
|
||||||
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
!contains(DEFINES, DISABLE_PE) {
|
||||||
|
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
||||||
|
}
|
||||||
include('$$PWD/../zip/zip.pri')
|
include('$$PWD/../zip/zip.pri')
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,4 +26,8 @@
|
|||||||
<file>Distributions/Templates/Icon.png</file>
|
<file>Distributions/Templates/Icon.png</file>
|
||||||
<file>Distributions/Templates/Icon.ico</file>
|
<file>Distributions/Templates/Icon.ico</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="/Scripts">
|
||||||
|
<file>ScriptsTemplates/windows.bat</file>
|
||||||
|
<file>ScriptsTemplates/linux.sh</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
APPS=$BASH_ARRAY_APPLICATIONS
|
APPS=$BASH_ARRAY_APPLICATIONS
|
||||||
|
APPS_SHORTCUTS=$BASH_ARRAY_SHORTCUTS_APPLICATIONS
|
||||||
|
|
||||||
TARGET_DIR=/opt/$PREFIX/
|
TARGET_DIR=$CQT_INSTALL_DEB_DIR/$PREFIX/
|
||||||
|
|
||||||
#creating shortcut
|
#creating shortcut
|
||||||
DEST_FILE=
|
DEST_FILE=
|
||||||
@ -20,7 +21,7 @@ function createShortCut {
|
|||||||
echo "Encoding=UTF-8" >> $DEST_FILE
|
echo "Encoding=UTF-8" >> $DEST_FILE
|
||||||
echo "Name=$DEST_NAME" >> $DEST_FILE
|
echo "Name=$DEST_NAME" >> $DEST_FILE
|
||||||
echo "Type=Application" >> $DEST_FILE
|
echo "Type=Application" >> $DEST_FILE
|
||||||
echo "Icon=/opt/$ICON" >> $DEST_FILE
|
echo "Icon=$CQT_INSTALL_DEB_DIR/icons/${SRC_FILE%%.*}.png" >> $DEST_FILE
|
||||||
echo "Terminal=false" >> $DEST_FILE
|
echo "Terminal=false" >> $DEST_FILE
|
||||||
echo "Exec=$SRC_FILE" >> $DEST_FILE
|
echo "Exec=$SRC_FILE" >> $DEST_FILE
|
||||||
|
|
||||||
@ -35,14 +36,20 @@ do
|
|||||||
|
|
||||||
DEST_NAME=$app
|
DEST_NAME=$app
|
||||||
|
|
||||||
SRC_FILE="$TARGET_DIR/$app.sh"
|
|
||||||
DEST_FILE="/usr/share/applications/$app.desktop"
|
|
||||||
createShortCut
|
|
||||||
|
|
||||||
if [ ! -e /usr/bin/"${app,,}" ]; then
|
if [ ! -e /usr/bin/"${app,,}" ]; then
|
||||||
ln -s "$TARGET_DIR/$app.sh" /usr/bin/"${app,,}"
|
ln -s "$TARGET_DIR/$app.sh" /usr/bin/"${app,,}"
|
||||||
echo "${app,,}"
|
echo "${app,,}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for app in "${APPS_SHORTCUTS[@]}"
|
||||||
|
do
|
||||||
|
|
||||||
|
DEST_NAME=$app
|
||||||
|
|
||||||
|
SRC_FILE="$TARGET_DIR/$app"
|
||||||
|
DEST_FILE="/usr/share/applications/${app%.*}.desktop"
|
||||||
|
createShortCut
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
APPS=$BASH_ARRAY_APPLICATIONS
|
APPS=$BASH_ARRAY_APPLICATIONS
|
||||||
|
APPS_SHORTCUTS=$BASH_ARRAY_SHORTCUTS_APPLICATIONS
|
||||||
|
|
||||||
for app in "${APPS[@]}"
|
for app in "${APPS[@]}"
|
||||||
do
|
do
|
||||||
|
|
||||||
SRC_FILE="$TARGET_DIR/$app.sh"
|
|
||||||
rm "/usr/share/applications/$app.desktop"
|
|
||||||
|
|
||||||
if [ -e /usr/bin/"${app,,}" ]; then
|
if [ -e /usr/bin/"${app,,}" ]; then
|
||||||
rm /usr/bin/"${app,,}"
|
rm /usr/bin/"${app,,}"
|
||||||
echo "Remove ${app,,}"
|
echo "Remove ${app,,}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for app in "${APPS_SHORTCUTS[@]}"
|
||||||
|
do
|
||||||
|
rm "/usr/share/applications/${app%.*}.desktop"
|
||||||
|
done
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
.QWidget {
|
.QWidget {
|
||||||
background-color: rgb(255, 255, 255);
|
background-color: rgb(255, 255, 255);
|
||||||
min-width: 640px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.QLabel {
|
.QLabel {
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Installer>
|
<Installer>
|
||||||
<WizardDefaultWidth>800px</WizardDefaultWidth>
|
|
||||||
<WizardDefaultHeight>500px</WizardDefaultHeight>
|
|
||||||
<Name>$NAME</Name>
|
<Name>$NAME</Name>
|
||||||
<Version>$VERSION</Version>
|
<Version>$VERSION</Version>
|
||||||
<Title>$NAME</Title>
|
<Title>$NAME</Title>
|
||||||
<Publisher>$PUBLISHER</Publisher>
|
<Publisher>$PUBLISHER</Publisher>
|
||||||
<StartMenuDir>$NAME</StartMenuDir>
|
<StartMenuDir>$NAME</StartMenuDir>
|
||||||
<TargetDir>@HomeDir@/$NAME</TargetDir>
|
<TargetDir>$CQT_INSTALL_DIR/$NAME</TargetDir>
|
||||||
<InstallActionColumnVisible>true</InstallActionColumnVisible>
|
<InstallActionColumnVisible>true</InstallActionColumnVisible>
|
||||||
<RemoveTargetDir>true</RemoveTargetDir>
|
<RemoveTargetDir>true</RemoveTargetDir>
|
||||||
<ControlScript>controlScript.qs</ControlScript>
|
<ControlScript>controlScript.qs</ControlScript>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<Title>$NAME</Title>
|
<Title>$NAME</Title>
|
||||||
<Publisher>$PUBLISHER</Publisher>
|
<Publisher>$PUBLISHER</Publisher>
|
||||||
<StartMenuDir>$NAME</StartMenuDir>
|
<StartMenuDir>$NAME</StartMenuDir>
|
||||||
<TargetDir>@HomeDir@/$NAME</TargetDir>
|
<TargetDir>$CQT_INSTALL_DIR/$NAME</TargetDir>
|
||||||
<InstallActionColumnVisible>true</InstallActionColumnVisible>
|
<InstallActionColumnVisible>true</InstallActionColumnVisible>
|
||||||
<RemoveTargetDir>true</RemoveTargetDir>
|
<RemoveTargetDir>true</RemoveTargetDir>
|
||||||
<ControlScript>controlScript.qs</ControlScript>
|
<ControlScript>controlScript.qs</ControlScript>
|
||||||
|
@ -2,6 +2,13 @@ function Component() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBasename(file) {
|
||||||
|
if (!file.length)
|
||||||
|
return ""
|
||||||
|
|
||||||
|
return file.split('.')[0];
|
||||||
|
}
|
||||||
|
|
||||||
function generateShortCutCmd(cmd) {
|
function generateShortCutCmd(cmd) {
|
||||||
|
|
||||||
var prefix = "$PREFIX";
|
var prefix = "$PREFIX";
|
||||||
@ -12,9 +19,9 @@ function generateShortCutCmd(cmd) {
|
|||||||
|
|
||||||
component.addOperation(
|
component.addOperation(
|
||||||
"CreateShortcut",
|
"CreateShortcut",
|
||||||
"@TargetDir@/" + prefix + "/" + cmd + ".bat",
|
"@TargetDir@/" + prefix + "/" + cmd,
|
||||||
"@DesktopDir@/" + cmd + ".lnk",
|
"@DesktopDir@/" + getBasename(cmd) + ".lnk",
|
||||||
"iconPath=@TargetDir@/$ICON",
|
"iconPath=@TargetDir@/" + prefix + "/icons/" + getBasename(cmd) + ".ico",
|
||||||
"iconId=0");
|
"iconId=0");
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -23,14 +30,14 @@ function generateShortCutCmd(cmd) {
|
|||||||
if (systemInfo.kernelType === "linux") {
|
if (systemInfo.kernelType === "linux") {
|
||||||
console.log("create icons!!! on LINUX");
|
console.log("create icons!!! on LINUX");
|
||||||
component.addOperation("CreateDesktopEntry",
|
component.addOperation("CreateDesktopEntry",
|
||||||
"@HomeDir@/.local/share/applications/" + cmd + ".desktop",
|
"@HomeDir@/.local/share/applications/" + getBasename(cmd) + ".desktop",
|
||||||
"Version=@Version@\n
|
"Version=@Version@\n
|
||||||
Type=Application\n
|
Type=Application\n
|
||||||
Terminal=false\n
|
Terminal=false\n
|
||||||
Exec=\"@TargetDir@/" + prefix + "/" + cmd + ".sh\"\n
|
Exec=\"@TargetDir@/" + prefix + "/" + cmd + "\"\n
|
||||||
Name=" + cmd + "\n
|
Name=" + getBasename(cmd) + "\n
|
||||||
Icon=@TargetDir@/$ICON\n
|
Icon=@TargetDir@/" + prefix + "/icons/" + getBasename(cmd) + ".png\n
|
||||||
Name[en_US]=" + cmd);
|
Name[en_US]=" + getBasename(cmd));
|
||||||
|
|
||||||
console.log("create icons!!! on LINUX done");
|
console.log("create icons!!! on LINUX done");
|
||||||
}
|
}
|
||||||
@ -41,8 +48,9 @@ Component.prototype.createOperations = function() {
|
|||||||
component.createOperations();
|
component.createOperations();
|
||||||
|
|
||||||
var cmdArray = ["array", "of", "cmds"]; // will be changed in cqtdeployer
|
var cmdArray = ["array", "of", "cmds"]; // will be changed in cqtdeployer
|
||||||
|
var shortcutsCmdArray = ["array", "of", "shortcut", "cmds"]; // will be changed in cqtdeployer
|
||||||
|
|
||||||
cmdArray.forEach( function (item){
|
shortcutsCmdArray.forEach( function (item){
|
||||||
generateShortCutCmd(item);
|
generateShortCutCmd(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,8 +60,7 @@ bool Deb::deployTemplate(PackageControl &pkg) {
|
|||||||
QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning);
|
QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
outFiles.push_back(DeployCore::_config->getTargetDir() + "/" + info.Name + ".deb");
|
inouts.push_back({local, cfg->getTargetDir() + "/" + info.debOut});
|
||||||
packageFolders.push_back(local);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -117,35 +116,23 @@ QProcessEnvironment Deb::processEnvirement() const {
|
|||||||
|
|
||||||
QList<SystemCommandData> Deb::runCmd() {
|
QList<SystemCommandData> Deb::runCmd() {
|
||||||
QList<SystemCommandData> res;
|
QList<SystemCommandData> res;
|
||||||
for (const auto& dir: qAsConst(packageFolders)) {
|
for (const auto& inout: qAsConst(inouts)) {
|
||||||
res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << dir});
|
res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << inout.input << inout.output});
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList Deb::outPutFiles() const {
|
QStringList Deb::outPutFiles() const {
|
||||||
return outFiles;
|
QStringList result;
|
||||||
}
|
for (const auto& inout: qAsConst(inouts)) {
|
||||||
|
result.push_back(inout.output);
|
||||||
bool Deb::cb() const {
|
|
||||||
const DeployConfig* cfg = DeployCore::_config;
|
|
||||||
|
|
||||||
QString from = cfg->getTargetDir() + "/" + getLocation() + "/";
|
|
||||||
QString to = cfg->getTargetDir() + "/" + getLocation() + "/../";
|
|
||||||
auto const outputFiles = outPutFiles();
|
|
||||||
for (const QString& file : outputFiles) {
|
|
||||||
if(!moveData(from + PathUtils::getName(file), to, "")) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
return result;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Deb::dataLocation(const DistroModule &module) const {
|
QString Deb::dataLocation(const DistroModule &module) const {
|
||||||
return location(module) + "/opt/" + releativeLocation(module);
|
return location(module) + module.installDirDEB() + "/" + releativeLocation(module);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Deb::location(const DistroModule &module) const {
|
QString Deb::location(const DistroModule &module) const {
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
|
|
||||||
#include "idistribution.h"
|
#include "idistribution.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The DebInOut struct contains input and output value of the debian packages.
|
||||||
|
*/
|
||||||
|
struct DebInOut {
|
||||||
|
QString input;
|
||||||
|
QString output;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The deb class contains methods for create a debian pacakge.
|
* @brief The deb class contains methods for create a debian pacakge.
|
||||||
*/
|
*/
|
||||||
@ -21,7 +29,6 @@ public:
|
|||||||
QProcessEnvironment processEnvirement() const override;
|
QProcessEnvironment processEnvirement() const override;
|
||||||
QList<SystemCommandData> runCmd() override;
|
QList<SystemCommandData> runCmd() override;
|
||||||
QStringList outPutFiles() const override;
|
QStringList outPutFiles() const override;
|
||||||
bool cb() const override;
|
|
||||||
|
|
||||||
// iDistribution interface
|
// iDistribution interface
|
||||||
protected:
|
protected:
|
||||||
@ -30,8 +37,7 @@ protected:
|
|||||||
QString releativeLocation(const DistroModule &module) const override;
|
QString releativeLocation(const DistroModule &module) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringList outFiles;
|
QList<DebInOut> inouts;
|
||||||
QStringList packageFolders;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DEB_H
|
#endif // DEB_H
|
||||||
|
@ -70,10 +70,11 @@ bool iDistribution::unpackFile(const QFileInfo &resource,
|
|||||||
inputText.replace("$DESCRIPTION", info.Description);
|
inputText.replace("$DESCRIPTION", info.Description);
|
||||||
inputText.replace("$VERSION", info.Version);
|
inputText.replace("$VERSION", info.Version);
|
||||||
inputText.replace("$RELEASEDATA", info.ReleaseData);
|
inputText.replace("$RELEASEDATA", info.ReleaseData);
|
||||||
inputText.replace("$ICON", info.Icon);
|
|
||||||
inputText.replace("$PUBLISHER", info.Publisher);
|
inputText.replace("$PUBLISHER", info.Publisher);
|
||||||
inputText.replace("$HOMEPAGE", info.Homepage);
|
inputText.replace("$HOMEPAGE", info.Homepage);
|
||||||
inputText.replace("$PREFIX", info.Prefix);
|
inputText.replace("$PREFIX", info.Prefix);
|
||||||
|
inputText.replace("$CQT_INSTALL_DIR", info.InstallDeirQIFW());
|
||||||
|
inputText.replace("$CQT_INSTALL_DEB_DIR", info.InstallDirDEB);
|
||||||
|
|
||||||
|
|
||||||
for (auto it = info.Custom.cbegin(); it != info.Custom.cend(); ++it) {
|
for (auto it = info.Custom.cbegin(); it != info.Custom.cend(); ++it) {
|
||||||
@ -160,7 +161,7 @@ bool iDistribution::collectInfoWithDeployIcons(const DistroModule &pkg,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return deployIcon(info, pkg);
|
return deployIcon(pkg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,27 +193,58 @@ bool iDistribution::collectInfo(const DistroModule& pkg,
|
|||||||
if (!pkg.homePage().isEmpty())
|
if (!pkg.homePage().isEmpty())
|
||||||
info.Homepage = pkg.homePage();
|
info.Homepage = pkg.homePage();
|
||||||
|
|
||||||
|
info.InstallDirDEB = "/opt";
|
||||||
|
if (!pkg.installDirDEB().isEmpty())
|
||||||
|
info.InstallDirDEB = pkg.installDirDEB();
|
||||||
|
|
||||||
|
info.debOut = info.Name + ".deb";
|
||||||
|
if (!pkg.debOut().isEmpty())
|
||||||
|
info.debOut = pkg.debOut();
|
||||||
|
|
||||||
|
info.zipOut = info.Name + ".zip";
|
||||||
|
if (!pkg.zipOut().isEmpty())
|
||||||
|
info.zipOut = pkg.zipOut();
|
||||||
|
|
||||||
info.Prefix = releativeLocation(pkg);
|
info.Prefix = releativeLocation(pkg);
|
||||||
|
|
||||||
QString cmdArray = "[";
|
QString cmdArray = "[";
|
||||||
QString bashArray = "";
|
QString bashArray = "(";
|
||||||
|
QString cmdShortCutsArray = "[";
|
||||||
|
QString bashShortCutsArray = "(";
|
||||||
|
|
||||||
int initSize = cmdArray.size();
|
int initSize = cmdArray.size();
|
||||||
for (const auto &target :pkg.targets()) {
|
for (const auto &target :pkg.targets()) {
|
||||||
|
const DeployConfig *cfg = DeployCore::_config;
|
||||||
auto fileinfo = QFileInfo(target);
|
auto fileinfo = QFileInfo(target);
|
||||||
if (fileinfo.suffix().compare("exe", ONLY_WIN_CASE_INSENSIATIVE) == 0 || fileinfo.suffix().isEmpty()) {
|
auto targetInfo = cfg->targets().value(target);
|
||||||
|
|
||||||
|
if (targetInfo.getShortCut()) {
|
||||||
|
|
||||||
if (cmdArray.size() > initSize) {
|
if (cmdArray.size() > initSize) {
|
||||||
cmdArray += ",";
|
cmdArray += ",";
|
||||||
bashArray += " ";
|
bashArray += " ";
|
||||||
|
cmdShortCutsArray += ",";
|
||||||
|
bashShortCutsArray += " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdArray += "\"" + fileinfo.baseName() + "\"";
|
cmdArray += "\"" + fileinfo.baseName() + "\"";
|
||||||
bashArray += "\"" + fileinfo.baseName() + "\"";
|
bashArray += "\"" + fileinfo.baseName() + "\"";
|
||||||
|
|
||||||
|
|
||||||
|
cmdShortCutsArray += "\"" + targetInfo.getRunScriptFile() + "\"";
|
||||||
|
bashShortCutsArray += "\"" + targetInfo.getRunScriptFile() + "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdArray += "]";
|
cmdArray += "]";
|
||||||
|
bashArray += ")";
|
||||||
|
cmdShortCutsArray += "]";
|
||||||
|
bashShortCutsArray += ")";
|
||||||
|
|
||||||
info.Custom = {{"[\"array\", \"of\", \"cmds\"]", cmdArray}};
|
info.Custom = {{"[\"array\", \"of\", \"cmds\"]", cmdArray}};
|
||||||
|
info.Custom["[\"array\", \"of\", \"shortcut\", \"cmds\"]"] = cmdShortCutsArray;
|
||||||
|
|
||||||
|
info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray;
|
||||||
info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray;
|
info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray;
|
||||||
|
|
||||||
if (info.Name.isEmpty()) {
|
if (info.Name.isEmpty()) {
|
||||||
@ -239,31 +271,48 @@ QString iDistribution::getName(const DistroModule& pkg) const {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool iDistribution::deployIcon(TemplateInfo &info, const DistroModule& pkg) {
|
bool iDistribution::deployIcon(const DistroModule& pkg) {
|
||||||
auto localData = dataLocation(pkg);
|
auto localData = dataLocation(pkg);
|
||||||
const DeployConfig *cfg = DeployCore::_config;
|
const DeployConfig *cfg = DeployCore::_config;
|
||||||
|
|
||||||
info.Icon = "icons/Icon.png";
|
QuasarAppUtils::Params::log(QString("Deploy icons for package %0. count targets: %1").
|
||||||
QSet<QString> icons;
|
arg(pkg.name()).arg(pkg.targets().count()),
|
||||||
|
QuasarAppUtils::Debug);
|
||||||
|
|
||||||
for (const auto& target: pkg.targets()) {
|
for (const auto& target: pkg.targets()) {
|
||||||
auto icon = cfg->targets().value(target).getIcon();
|
auto targetObject = cfg->targets().value(target);
|
||||||
|
|
||||||
|
if (!targetObject.isValid()) {
|
||||||
|
QuasarAppUtils::Params::log(QString("The target '%0' is not detected in the target list."
|
||||||
|
" Available Target List : %1"
|
||||||
|
" So icon will be copy by Default.").
|
||||||
|
arg(target, cfg->targets().keys().join(',')),
|
||||||
|
QuasarAppUtils::Warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto icon = targetObject.getIcon();
|
||||||
|
|
||||||
QuasarAppUtils::Params::log(QString("%0: %1").arg(target, icon),
|
QuasarAppUtils::Params::log(QString("%0: %1").arg(target, icon),
|
||||||
QuasarAppUtils::Debug);
|
QuasarAppUtils::Debug);
|
||||||
|
|
||||||
if (icons.contains(icon))
|
if (!targetObject.getShortCut()) {
|
||||||
break;
|
QuasarAppUtils::Params::log(QString("%0: %1 Ignored").arg(target, icon),
|
||||||
|
QuasarAppUtils::Debug);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
QFileInfo iconInfo(icon);
|
QFileInfo iconInfo(icon);
|
||||||
info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName();
|
QFileInfo runScript(targetObject.getRunScriptFile());
|
||||||
if (!copyFile(icon, localData + "/icons/", false)) {
|
|
||||||
|
QString dist = localData + "/icons/" + runScript.baseName() + "." + iconInfo.suffix();
|
||||||
|
|
||||||
|
if (!copyFile(icon, dist, true)) {
|
||||||
|
|
||||||
QuasarAppUtils::Params::log(QString("Failed to copy icon: %0.").arg(icon),
|
QuasarAppUtils::Params::log(QString("Failed to copy icon: %0.").arg(icon),
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
icons += icon;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -105,7 +105,7 @@ protected:
|
|||||||
* @param pkg This is package info
|
* @param pkg This is package info
|
||||||
* @return true if this method finished successful.
|
* @return true if this method finished successful.
|
||||||
*/
|
*/
|
||||||
bool deployIcon(TemplateInfo &info, const DistroModule &pkg);
|
bool deployIcon(const DistroModule &pkg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dataLocation This method should be retrun location of application or package files.
|
* @brief dataLocation This method should be retrun location of application or package files.
|
||||||
|
@ -59,26 +59,43 @@ QList<SystemCommandData> QIF::runCmd() {
|
|||||||
|
|
||||||
SystemCommandData cmd;
|
SystemCommandData cmd;
|
||||||
|
|
||||||
|
QString binarycreator = QuasarAppUtils::Params::getArg("binarycreator");
|
||||||
|
|
||||||
if (binarycreator.isEmpty())
|
if (binarycreator.isEmpty())
|
||||||
binarycreator = DeployCore::findProcess(toolKitEnv().concatEnv(), base);
|
binarycreator = DeployCore::findProcess(toolKitEnv().concatEnv(), base);
|
||||||
|
|
||||||
if (binarycreator.isEmpty()) {
|
if (binarycreator.isEmpty()) {
|
||||||
cmd.command = base;
|
cmd.command = base;
|
||||||
} else {
|
} else {
|
||||||
cmd.command = binarycreator;
|
auto commandsList = binarycreator.split(' ');
|
||||||
|
cmd.command = commandsList.first();
|
||||||
|
cmd.arguments = commandsList.mid(1,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto location = DeployCore::_config->getTargetDir() + "/" + getLocation();
|
auto location = DeployCore::_config->getTargetDir() + "/" + getLocation();
|
||||||
|
|
||||||
cmd.arguments = QStringList{
|
cmd.arguments += QStringList{
|
||||||
"-c",
|
"-c",
|
||||||
location + "/config/config.xml",
|
QuasarAppUtils::Params::getArg("qifConfig", location + "/config/config.xml"),
|
||||||
"-p",
|
"-p",
|
||||||
location + "/packages/",
|
QuasarAppUtils::Params::getArg("qifPackages", location + "/packages/"),
|
||||||
"-v",
|
"-v"
|
||||||
installerFile()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QString resources = QuasarAppUtils::Params::getArg("qifResources");
|
||||||
|
if (resources.size()) {
|
||||||
|
cmd.arguments.push_back("-r");
|
||||||
|
cmd.arguments.push_back(resources);
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd.arguments.push_back(installerFile());
|
||||||
|
|
||||||
|
QString customFormat = QuasarAppUtils::Params::getArg("qifArchiveFormat");
|
||||||
|
if (customFormat.size()) {
|
||||||
|
cmd.arguments.push_back("--af");
|
||||||
|
cmd.arguments.push_back(customFormat);
|
||||||
|
}
|
||||||
|
|
||||||
return {cmd};
|
return {cmd};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,6 +265,10 @@ QString QIF::installerFile() const {
|
|||||||
#else
|
#else
|
||||||
QString sufix = ".exe";
|
QString sufix = ".exe";
|
||||||
#endif
|
#endif
|
||||||
|
QString qifOut = QuasarAppUtils::Params::getArg("qifOut");
|
||||||
|
if (qifOut.size()) {
|
||||||
|
return DeployCore::_config->getTargetDir() + "/" + qifOut;
|
||||||
|
}
|
||||||
|
|
||||||
return DeployCore::_config->getTargetDir() + "/Installer" + generalInfo.Name + sufix;
|
return DeployCore::_config->getTargetDir() + "/Installer" + generalInfo.Name + sufix;
|
||||||
}
|
}
|
||||||
@ -287,5 +308,5 @@ bool QIF::initDefaultConfiguratuin() {
|
|||||||
const DeployConfig *cfg = DeployCore::_config;
|
const DeployConfig *cfg = DeployCore::_config;
|
||||||
|
|
||||||
// init default configuration
|
// init default configuration
|
||||||
return collectInfo(DistroModule{cfg->getDefaultPackage()}, generalInfo);
|
return collectInfo(cfg->getDistroFromPackage(cfg->getDefaultPackage()), generalInfo);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
bool initDefaultConfiguratuin();
|
bool initDefaultConfiguratuin();
|
||||||
|
|
||||||
QString binarycreator;
|
|
||||||
TemplateInfo generalInfo;
|
TemplateInfo generalInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1 +1,6 @@
|
|||||||
#include "templateinfo.h"
|
#include "templateinfo.h"
|
||||||
|
#include "quasarapp.h"
|
||||||
|
|
||||||
|
QString TemplateInfo::InstallDeirQIFW() const {
|
||||||
|
return QuasarAppUtils::Params::getArg("installDirQIFW", "@HomeDir@");
|
||||||
|
}
|
||||||
|
@ -5,16 +5,23 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <deploy_global.h>
|
#include <deploy_global.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The TemplateInfo struct This structure contains information about distribution packages.
|
||||||
|
*/
|
||||||
struct DEPLOYSHARED_EXPORT TemplateInfo
|
struct DEPLOYSHARED_EXPORT TemplateInfo
|
||||||
{
|
{
|
||||||
QString Name;
|
QString Name;
|
||||||
QString Description;
|
QString Description;
|
||||||
QString Version;
|
QString Version;
|
||||||
QString ReleaseData;
|
QString ReleaseData;
|
||||||
QString Icon;
|
|
||||||
QString Publisher;
|
QString Publisher;
|
||||||
QString Homepage;
|
QString Homepage;
|
||||||
QString Prefix;
|
QString Prefix;
|
||||||
|
QString InstallDirDEB;
|
||||||
|
QString zipOut;
|
||||||
|
QString debOut;
|
||||||
|
|
||||||
|
QString InstallDeirQIFW() const;
|
||||||
|
|
||||||
QHash<QString, QString> Custom;
|
QHash<QString, QString> Custom;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ bool ZipArhive::deployTemplate(PackageControl &pkg) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto arr = cfg->getTargetDir() + "/" + info.Name + ".zip";
|
auto arr = cfg->getTargetDir() + "/" + info.zipOut;
|
||||||
if (!zipWorker.compress(local, arr)) {
|
if (!zipWorker.compress(local, arr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
37
Deploy/ScriptsTemplates/linux.sh
Normal file
37
Deploy/ScriptsTemplates/linux.sh
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This is default bat run script of The CQtDeployer project.
|
||||||
|
# This file contains key word that will replaced after deploy project.
|
||||||
|
#
|
||||||
|
# ####################################################################
|
||||||
|
#
|
||||||
|
# All variables has the CQT_ prefix
|
||||||
|
# BIN_PATH - are releative path to executable files of a deployed distribution.
|
||||||
|
# LIB_PATH - are releative path to libraryes of a deployed distribution.
|
||||||
|
# QML_PATH - are releative path to qml libraryes of a deployed distribution.
|
||||||
|
# PLUGIN_PATH - are releative path to qt plugins of a deployed distribution.
|
||||||
|
# BIN_PATH - are releative path to targets of a deployed distribution.
|
||||||
|
|
||||||
|
# SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution.
|
||||||
|
# BASE_NAME - are base name of the executable that will be launched after run this script.
|
||||||
|
# CUSTOM_SCRIPT_BLOCK - This is code from the customScript option
|
||||||
|
# RUN_COMMAND - This is command for run application. Requred BASE_DIR variable.
|
||||||
|
#
|
||||||
|
# ####################################################################
|
||||||
|
|
||||||
|
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
export PATH="$BASE_DIR"CQT_BIN_PATH:$PATH
|
||||||
|
export LD_LIBRARY_PATH="$BASE_DIR"CQT_LIB_PATH:"$BASE_DIR":$LD_LIBRARY_PATH
|
||||||
|
export QML_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML_IMPORT_PATH
|
||||||
|
export QML2_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML2_IMPORT_PATH
|
||||||
|
export QT_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH:$QT_PLUGIN_PATH
|
||||||
|
export QTWEBENGINEPROCESS_PATH="$BASE_DIR"CQT_BIN_PATH/QtWebEngineProcess
|
||||||
|
export QTDIR="$BASE_DIR"
|
||||||
|
export CQT_PKG_ROOT="$BASE_DIR"
|
||||||
|
export CQT_RUN_FILE="$BASE_DIR/CQT_BASE_NAME.sh"
|
||||||
|
|
||||||
|
export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH/platforms:$QT_QPA_PLATFORM_PLUGIN_PATH
|
||||||
|
|
||||||
|
CQT_CUSTOM_SCRIPT_BLOCK
|
||||||
|
|
||||||
|
CQT_RUN_COMMAND
|
23
Deploy/ScriptsTemplates/windows.bat
Normal file
23
Deploy/ScriptsTemplates/windows.bat
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
:: This is default bat run script of The CQtDeployer project.
|
||||||
|
:: This file contains key word that will replaced after deploy project.
|
||||||
|
|
||||||
|
:: ####################################################################
|
||||||
|
:: All variables has the CQT_ prefix
|
||||||
|
:: BIN_PATH - are releative path to executable files of a deployed distribution.
|
||||||
|
:: LIB_PATH - are releative path to libraryes of a deployed distribution.
|
||||||
|
:: SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution.
|
||||||
|
:: BASE_NAME - are base name of the executable that will be launched after run this script.
|
||||||
|
:: CUSTOM_SCRIPT_BLOCK - This is code from the customScript option
|
||||||
|
:: RUN_COMMAND - This is command for run application. Requred BASE_DIR variable.
|
||||||
|
|
||||||
|
:: ####################################################################
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
SET BASE_DIR=%~dp0
|
||||||
|
SET PATH=%BASE_DIR%CQT_BIN_PATH;%BASE_DIR%CQT_LIB_PATH;%PATH%;CQT_SYSTEM_LIB_PATH
|
||||||
|
SET CQT_PKG_ROOT=%BASE_DIR%
|
||||||
|
SET CQT_RUN_FILE=%BASE_DIR%CQT_BASE_NAME.bat
|
||||||
|
|
||||||
|
CQT_CUSTOM_SCRIPT_BLOCK
|
||||||
|
|
||||||
|
CQT_RUN_COMMAND
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -71,11 +71,11 @@ void parseTargetPrivate(DeployConfig& conf,
|
|||||||
|
|
||||||
auto &cointainer = conf.targetsEdit();
|
auto &cointainer = conf.targetsEdit();
|
||||||
|
|
||||||
for (const auto &iconPair: inputParams) {
|
for (const auto &targetPair: inputParams) {
|
||||||
auto pair = iconPair.split(DeployCore::getSeparator(1), splitbehavior);
|
auto pair = targetPair.split(DeployCore::getSeparator(1), splitbehavior);
|
||||||
|
|
||||||
if (pair.size() == 1) {
|
if (pair.size() == 1) {
|
||||||
QuasarAppUtils::Params::log(QString("Set new default icon for all tagets: " + pair.value(0)),
|
QuasarAppUtils::Params::log(QString("Set new default property for all tagets: " + pair.value(0)),
|
||||||
QuasarAppUtils::Debug);
|
QuasarAppUtils::Debug);
|
||||||
for (auto& editableTarget: cointainer) {
|
for (auto& editableTarget: cointainer) {
|
||||||
(editableTarget.*adder)(pair.value(0));
|
(editableTarget.*adder)(pair.value(0));
|
||||||
@ -96,7 +96,7 @@ void parseTargetPrivate(DeployConfig& conf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &target: targetsMap) {
|
for (const auto &target: targetsMap) {
|
||||||
QuasarAppUtils::Params::log(QString("Set new icon for %0 taget. Icon: %1").
|
QuasarAppUtils::Params::log(QString("Set new property for %0 taget.").
|
||||||
arg(pair.value(0), pair.value(1)),
|
arg(pair.value(0), pair.value(1)),
|
||||||
QuasarAppUtils::Debug);
|
QuasarAppUtils::Debug);
|
||||||
(target->*adder)(pair.value(1));
|
(target->*adder)(pair.value(1));
|
||||||
@ -104,6 +104,40 @@ void parseTargetPrivate(DeployConfig& conf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Enabler>
|
||||||
|
bool enableOptionFotTargetPrivate(DeployConfig& conf,
|
||||||
|
const QStringList &inputParams,
|
||||||
|
Enabler enabler) {
|
||||||
|
|
||||||
|
for (const auto &iconPair: inputParams) {
|
||||||
|
auto pair = iconPair.split(DeployCore::getSeparator(1), splitbehavior);
|
||||||
|
|
||||||
|
if (pair.size() != 1) {
|
||||||
|
QuasarAppUtils::Params::log(QString("Failed parese list of option values, This option support only single leve list. "
|
||||||
|
" Example: use -Option val1,val2,val3 "),
|
||||||
|
QuasarAppUtils::Error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto targetsMap = conf.getTargetsListByFilter(pair.value(0));
|
||||||
|
|
||||||
|
if (!targetsMap.size()) {
|
||||||
|
QuasarAppUtils::Params::log(QString("Not found any targets for the %0 selector").
|
||||||
|
arg(pair.value(0)),
|
||||||
|
QuasarAppUtils::Warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const auto &target: targetsMap) {
|
||||||
|
QuasarAppUtils::Params::log(QString("Set new property for %0 taget.").
|
||||||
|
arg(pair.value(0)),
|
||||||
|
QuasarAppUtils::Debug);
|
||||||
|
(target->*enabler)();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ConfigParser::parseParams() {
|
bool ConfigParser::parseParams() {
|
||||||
|
|
||||||
auto path = QuasarAppUtils::Params::getArg("confFile");
|
auto path = QuasarAppUtils::Params::getArg("confFile");
|
||||||
@ -165,7 +199,7 @@ bool ConfigParser::parseParams() {
|
|||||||
QuasarAppUtils::Params::log("Deploy ...",
|
QuasarAppUtils::Params::log("Deploy ...",
|
||||||
QuasarAppUtils::Info);
|
QuasarAppUtils::Info);
|
||||||
|
|
||||||
if (!parseDeployMode()) {
|
if (!parseDeployMode(true)) {
|
||||||
QuasarAppUtils::Params::log("Deploy failed!",
|
QuasarAppUtils::Params::log("Deploy failed!",
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
return false;
|
return false;
|
||||||
@ -178,7 +212,7 @@ bool ConfigParser::parseParams() {
|
|||||||
QuasarAppUtils::Params::log("Extract defaults Templates ...",
|
QuasarAppUtils::Params::log("Extract defaults Templates ...",
|
||||||
QuasarAppUtils::Info);
|
QuasarAppUtils::Info);
|
||||||
|
|
||||||
if (!parseDeployMode()) {
|
if (!parseDeployMode(false)) {
|
||||||
QuasarAppUtils::Params::log("Extract defaults Templates is failed!",
|
QuasarAppUtils::Params::log("Extract defaults Templates is failed!",
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
return false;
|
return false;
|
||||||
@ -239,9 +273,7 @@ QJsonValue ConfigParser::writeKeyArray(int separatorLvl, const QString ¶mete
|
|||||||
|
|
||||||
void ConfigParser::writeKey(const QString& key, QJsonObject& obj,
|
void ConfigParser::writeKey(const QString& key, QJsonObject& obj,
|
||||||
const QString& confFileDir) const {
|
const QString& confFileDir) const {
|
||||||
if (QuasarAppUtils::Params::isEndable(key)) {
|
|
||||||
obj[key] = writeKeyArray(0, QuasarAppUtils::Params::getArg(key), confFileDir);
|
obj[key] = writeKeyArray(0, QuasarAppUtils::Params::getArg(key), confFileDir);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ConfigParser::readKeyArray(int separatorLvl, const QJsonArray &array,
|
QString ConfigParser::readKeyArray(int separatorLvl, const QJsonArray &array,
|
||||||
@ -323,8 +355,9 @@ bool ConfigParser::createFromDeploy(const QString& confFile) const {
|
|||||||
|
|
||||||
auto info = QFileInfo(confFile);
|
auto info = QFileInfo(confFile);
|
||||||
|
|
||||||
const auto keys = DeployCore::helpKeys();
|
const auto keys = QuasarAppUtils::Params::getUserParamsMap().keys();
|
||||||
for (const auto &key :keys) {
|
for (const auto &key :keys) {
|
||||||
|
if (key != "confFile")
|
||||||
writeKey(key, obj, info.absolutePath());
|
writeKey(key, obj, info.absolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -429,6 +462,15 @@ bool ConfigParser::initDistroStruct() {
|
|||||||
auto trData = QuasarAppUtils::Params::getArg("tr").
|
auto trData = QuasarAppUtils::Params::getArg("tr").
|
||||||
split(DeployCore::getSeparator(0), splitbehavior);
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
auto installDirDeb = QuasarAppUtils::Params::getArg("installDirDeb").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
auto debOut = QuasarAppUtils::Params::getArg("debOut").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
auto zipOut = QuasarAppUtils::Params::getArg("zipOut").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
// init distro stucts for all targets
|
// init distro stucts for all targets
|
||||||
if (binOut.size() && !parsePackagesPrivate(mainDistro, binOut, &DistroModule::setBinOutDir)) {
|
if (binOut.size() && !parsePackagesPrivate(mainDistro, binOut, &DistroModule::setBinOutDir)) {
|
||||||
packagesErrorLog("binOut");
|
packagesErrorLog("binOut");
|
||||||
@ -510,12 +552,26 @@ bool ConfigParser::initDistroStruct() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (installDirDeb.size() && !parsePackagesPrivate(mainDistro, installDirDeb, &DistroModule::setInstallDirDEB)) {
|
||||||
|
packagesErrorLog("installDirDeb");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debOut.size() && !parsePackagesPrivate(mainDistro, debOut, &DistroModule::setDebOut)) {
|
||||||
|
packagesErrorLog("debOut");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (zipOut.size() && !parsePackagesPrivate(mainDistro, zipOut, &DistroModule::setZipOut)) {
|
||||||
|
packagesErrorLog("zipOut");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigParser::initPackages() {
|
bool ConfigParser::initPackages() {
|
||||||
defaultPackage = "Application";
|
defaultPackage = "Application";
|
||||||
|
|
||||||
QSet<QString> configuredTargets;
|
QSet<QString> configuredTargets;
|
||||||
|
|
||||||
if (QuasarAppUtils::Params::isEndable("targetPackage")) {
|
if (QuasarAppUtils::Params::isEndable("targetPackage")) {
|
||||||
@ -578,35 +634,6 @@ bool ConfigParser::initPackages() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigParser::initRunScripts() {
|
|
||||||
const auto list = QuasarAppUtils::Params::getArg("runScript").split(DeployCore::getSeparator(0), splitbehavior);
|
|
||||||
|
|
||||||
for (const auto& line: list) {
|
|
||||||
auto pair = line.split(DeployCore::getSeparator(1), splitbehavior);
|
|
||||||
if (pair.size() != 2) {
|
|
||||||
QuasarAppUtils::Params::log("Syntax error of the runScript option."
|
|
||||||
" Example of use :"
|
|
||||||
" -runScript \"myTarget;path/To/Target/RunScript.sh,"
|
|
||||||
"mySecondTarget;path/To/Target/SecondRunScript.sh\"",
|
|
||||||
QuasarAppUtils::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QFileInfo script(pair.value(1));
|
|
||||||
|
|
||||||
if (!script.isFile()) {
|
|
||||||
QuasarAppUtils::Params::log(QString("The %0 file does not exist.").arg(script.absoluteFilePath()),
|
|
||||||
QuasarAppUtils::Error);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_config.registerRunScript(pair.value(0),
|
|
||||||
script.absoluteFilePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ConfigParser::initQmlInput() {
|
bool ConfigParser::initQmlInput() {
|
||||||
|
|
||||||
auto qmlDir = QuasarAppUtils::Params::getArg("qmlDir").
|
auto qmlDir = QuasarAppUtils::Params::getArg("qmlDir").
|
||||||
@ -633,7 +660,21 @@ void ConfigParser::packagesErrorLog(const QString &option) {
|
|||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigParser::parseDeployMode() {
|
void ConfigParser::initCustomPlatform() {
|
||||||
|
const auto platforms = QuasarAppUtils::Params::getArg("platform").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
Platform customPlatform = Platform::UnknownPlatform;
|
||||||
|
|
||||||
|
for (const auto& platform: platforms) {
|
||||||
|
customPlatform = customPlatform | DeployCore::getPlatformFromString(platform);
|
||||||
|
}
|
||||||
|
|
||||||
|
_config.setCustomPlatform(customPlatform);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ConfigParser::parseDeployMode(bool checkBin) {
|
||||||
|
|
||||||
if (QuasarAppUtils::Params::isEndable("deploySystem-with-libc")) {
|
if (QuasarAppUtils::Params::isEndable("deploySystem-with-libc")) {
|
||||||
QuasarAppUtils::Params::log("You are using a deprecated option \"deploySystem-with-libc\"."
|
QuasarAppUtils::Params::log("You are using a deprecated option \"deploySystem-with-libc\"."
|
||||||
@ -648,6 +689,8 @@ bool ConfigParser::parseDeployMode() {
|
|||||||
|
|
||||||
setTargetDir();
|
setTargetDir();
|
||||||
|
|
||||||
|
initCustomPlatform();
|
||||||
|
|
||||||
auto bin = QuasarAppUtils::Params::getArg("bin").
|
auto bin = QuasarAppUtils::Params::getArg("bin").
|
||||||
split(DeployCore::getSeparator(0), splitbehavior);
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
@ -661,7 +704,7 @@ bool ConfigParser::parseDeployMode() {
|
|||||||
split(DeployCore::getSeparator(0), splitbehavior);
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
|
||||||
if (!(_config.targets().count() || xData.count())) {
|
if (checkBin && !(_config.targets().count() || xData.count())) {
|
||||||
QuasarAppUtils::Params::log("Failed to initialize targets or extra data!",
|
QuasarAppUtils::Params::log("Failed to initialize targets or extra data!",
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
|
|
||||||
@ -683,11 +726,6 @@ bool ConfigParser::parseDeployMode() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!initRunScripts()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
initIgnoreEnvList();
|
initIgnoreEnvList();
|
||||||
initEnvirement();
|
initEnvirement();
|
||||||
initIgnoreList();
|
initIgnoreList();
|
||||||
@ -695,7 +733,9 @@ bool ConfigParser::parseDeployMode() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
initExtraPath();
|
if (!initExtraPath()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
initExtraNames();
|
initExtraNames();
|
||||||
initPlugins();
|
initPlugins();
|
||||||
|
|
||||||
@ -706,9 +746,9 @@ bool ConfigParser::parseDeployMode() {
|
|||||||
" then you must use the classic version of CQtDeployer instead of the snap version."
|
" then you must use the classic version of CQtDeployer instead of the snap version."
|
||||||
" This is due to the fact that the snap version"
|
" This is due to the fact that the snap version"
|
||||||
" runs in an isolated container and has limited access"
|
" runs in an isolated container and has limited access"
|
||||||
" to system utilities and the environment. "
|
" to system utilities and the environment."
|
||||||
"For get the classic version of cqtdeployer use the cqtdeployer installer "
|
" For get the classic version of cqtdeployer use the cqtdeployer installer"
|
||||||
"https://github.com/QuasarApp/CQtDeployer/releases", QuasarAppUtils::Info);
|
" https://github.com/QuasarApp/CQtDeployer/releases", QuasarAppUtils::Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -760,15 +800,39 @@ bool ConfigParser::parseInitMode() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigParser::configureTargets() {
|
bool ConfigParser::configureTargets() {
|
||||||
const auto icons = QuasarAppUtils::Params::getArg("icon").
|
const auto icons = QuasarAppUtils::Params::getArg("icon").
|
||||||
split(DeployCore::getSeparator(0), splitbehavior);
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
const auto runScripts = QuasarAppUtils::Params::getArg("runScript").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
const auto disableRunScripts = QuasarAppUtils::Params::getArg("disableRunScript").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
const auto disableShortcuts = QuasarAppUtils::Params::getArg("disableShortCut").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
|
||||||
if (icons.size()) {
|
if (icons.size()) {
|
||||||
parseTargetPrivate(_config, icons, &TargetInfo::setIcon);
|
parseTargetPrivate(_config, icons, &TargetInfo::setIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
if (runScripts.size()) {
|
||||||
|
parseTargetPrivate(_config, runScripts, &TargetInfo::setRunScript);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (disableShortcuts.size() && !enableOptionFotTargetPrivate(_config, disableShortcuts, &TargetInfo::disableShortCut)) {
|
||||||
|
packagesErrorLog("disableShortCut");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (disableRunScripts.size() && !enableOptionFotTargetPrivate(_config, disableRunScripts, &TargetInfo::disableRunScript)) {
|
||||||
|
packagesErrorLog("disableRunScript");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigParser::parseClearMode() {
|
bool ConfigParser::parseClearMode() {
|
||||||
@ -804,23 +868,33 @@ void ConfigParser::setTargetDir(const QString &target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ConfigParser::addTarget(const TargetData& target) {
|
||||||
|
|
||||||
|
if (_config.customPlatform() == Platform::UnknownPlatform ||
|
||||||
|
_config.customPlatform() & target.targetInfo.getPlatform()) {
|
||||||
|
|
||||||
|
if (!_config.targetsEdit().contains(target.target)) {
|
||||||
|
_config.targetsEdit().insert(target.target, target.targetInfo);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool ConfigParser::setTargets(const QStringList &value) {
|
bool ConfigParser::setTargets(const QStringList &value) {
|
||||||
|
|
||||||
bool isfillList = false;
|
bool isfillList = false;
|
||||||
|
|
||||||
for (const auto &i : value) {
|
for (const auto &i : value) {
|
||||||
QFileInfo targetInfo = getBinInfo(i);
|
QFileInfo targetInfo = DeployCore::findItem(i);
|
||||||
|
|
||||||
if (i.isEmpty())
|
if (i.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (targetInfo.isFile()) {
|
if (targetInfo.isFile()) {
|
||||||
|
|
||||||
auto target = createTarget(targetInfo.absoluteFilePath());
|
if (addTarget(createTarget(targetInfo.absoluteFilePath())))
|
||||||
if (!_config.targetsEdit().contains(target.target)) {
|
|
||||||
_config.targetsEdit().insert(target.target, target.targetInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
isfillList = true;
|
isfillList = true;
|
||||||
}
|
}
|
||||||
else if (targetInfo.isDir()) {
|
else if (targetInfo.isDir()) {
|
||||||
@ -831,31 +905,28 @@ bool ConfigParser::setTargets(const QStringList &value) {
|
|||||||
}
|
}
|
||||||
isfillList = true;
|
isfillList = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
QuasarAppUtils::Params::log(i + " is not a path. Try search this file in system enviroment",
|
||||||
|
QuasarAppUtils::Debug);
|
||||||
|
|
||||||
|
auto file = QFileInfo(DeployCore::findProcess(QProcessEnvironment::systemEnvironment().value("PATH"), i));
|
||||||
|
|
||||||
|
if (file.exists()) {
|
||||||
|
|
||||||
|
if (addTarget(createTarget(file.absoluteFilePath())))
|
||||||
|
isfillList = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " does not exist!",
|
QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " does not exist!",
|
||||||
QuasarAppUtils::Debug);
|
QuasarAppUtils::Debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isfillList)
|
// Work with exits target
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QFileInfo ConfigParser::getBinInfo(const QString &bin) {
|
|
||||||
auto prefixes = QuasarAppUtils::Params::getArg("binPrefix").
|
|
||||||
split(DeployCore::getSeparator(0), splitbehavior);
|
|
||||||
|
|
||||||
for (const QString& prefix :qAsConst(prefixes)) {
|
|
||||||
QFileInfo info(prefix + "/" + bin);
|
|
||||||
|
|
||||||
if (info.isFile()) {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return QFileInfo(bin);
|
return isfillList;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigParser::setTargetsRecursive(const QString &dir) {
|
bool ConfigParser::setTargetsRecursive(const QString &dir) {
|
||||||
@ -899,12 +970,7 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) {
|
|||||||
if (sufix.isEmpty() || name.contains(".dll", Qt::CaseInsensitive) ||
|
if (sufix.isEmpty() || name.contains(".dll", Qt::CaseInsensitive) ||
|
||||||
name.contains(".so", Qt::CaseInsensitive) || name.contains(".exe", Qt::CaseInsensitive)) {
|
name.contains(".so", Qt::CaseInsensitive) || name.contains(".exe", Qt::CaseInsensitive)) {
|
||||||
|
|
||||||
|
if (addTarget(createTarget(QDir::fromNativeSeparators(file.absoluteFilePath()))))
|
||||||
auto target = createTarget(QDir::fromNativeSeparators(file.absoluteFilePath()));
|
|
||||||
if (!_config.targetsEdit().contains(target.target)) {
|
|
||||||
_config.targetsEdit().insert(target.target, target.targetInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -965,9 +1031,7 @@ void ConfigParser::initIgnoreList()
|
|||||||
};
|
};
|
||||||
|
|
||||||
_config.ignoreList.addRule(addRuleUnix("libc"));
|
_config.ignoreList.addRule(addRuleUnix("libc"));
|
||||||
_config.ignoreList.addRule(addRuleUnix("libstdc++"));
|
|
||||||
_config.ignoreList.addRule(addRuleUnix("ld-"));
|
_config.ignoreList.addRule(addRuleUnix("ld-"));
|
||||||
_config.ignoreList.addRule(addRuleUnix("libpthread"));
|
|
||||||
_config.ignoreList.addRule(addRuleUnix("libm"));
|
_config.ignoreList.addRule(addRuleUnix("libm"));
|
||||||
_config.ignoreList.addRule(addRuleUnix("libz"));
|
_config.ignoreList.addRule(addRuleUnix("libz"));
|
||||||
_config.ignoreList.addRule(addRuleUnix("librt"));
|
_config.ignoreList.addRule(addRuleUnix("librt"));
|
||||||
@ -1150,7 +1214,7 @@ bool ConfigParser::initQmake() {
|
|||||||
|
|
||||||
auto qt = *qtList.begin();
|
auto qt = *qtList.begin();
|
||||||
|
|
||||||
if (qt.right(3).compare("lib", Qt::CaseInsensitive)) {
|
if (qt.rightRef(3).compare(QString("lib"), Qt::CaseInsensitive)) {
|
||||||
return initQmakePrivate(QFileInfo(qt + "/../bin/qmake").absoluteFilePath());
|
return initQmakePrivate(QFileInfo(qt + "/../bin/qmake").absoluteFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1285,7 +1349,7 @@ bool ConfigParser::setQtDir(const QString &value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigParser::initExtraPath() {
|
bool ConfigParser::initExtraPath() {
|
||||||
auto listLibDir = QuasarAppUtils::Params::getArg("libDir").
|
auto listLibDir = QuasarAppUtils::Params::getArg("libDir").
|
||||||
split(DeployCore::getSeparator(0));
|
split(DeployCore::getSeparator(0));
|
||||||
|
|
||||||
@ -1300,6 +1364,16 @@ void ConfigParser::initExtraPath() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_config.envirement.isIgnore(info.absoluteFilePath())) {
|
||||||
|
QuasarAppUtils::Params::log(QString("Failed to set libDir path!"
|
||||||
|
" The %0 path will be ignored because"
|
||||||
|
" this path is child path of the targetDir path"
|
||||||
|
" or manually added into ignore environment.").
|
||||||
|
arg(info.absoluteFilePath()),
|
||||||
|
QuasarAppUtils::Error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
dir.setPath(info.absoluteFilePath());
|
dir.setPath(info.absoluteFilePath());
|
||||||
auto extraDirs = getSetDirsRecursive(QDir::fromNativeSeparators(info.absoluteFilePath()), _config.depchLimit);
|
auto extraDirs = getSetDirsRecursive(QDir::fromNativeSeparators(info.absoluteFilePath()), _config.depchLimit);
|
||||||
_config.extraPaths.addExtraPaths(extraDirs);
|
_config.extraPaths.addExtraPaths(extraDirs);
|
||||||
@ -1317,6 +1391,8 @@ void ConfigParser::initExtraPath() {
|
|||||||
QuasarAppUtils::Debug);
|
QuasarAppUtils::Debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigParser::initExtraNames() {
|
void ConfigParser::initExtraNames() {
|
||||||
@ -1523,9 +1599,15 @@ bool ConfigParser::smartMoveTargets() {
|
|||||||
|
|
||||||
QuasarAppUtils::Params::log(QString("Available Targets: "),
|
QuasarAppUtils::Params::log(QString("Available Targets: "),
|
||||||
QuasarAppUtils::Debug);
|
QuasarAppUtils::Debug);
|
||||||
|
|
||||||
|
|
||||||
for (auto i = _config.targets().cbegin(); i != _config.targets().cend(); ++i) {
|
for (auto i = _config.targets().cbegin(); i != _config.targets().cend(); ++i) {
|
||||||
|
|
||||||
if (!i.value().isValid()) {
|
if (!i.value().isValid()) {
|
||||||
|
|
||||||
|
QuasarAppUtils::Params::log(i.value().toString(),
|
||||||
|
QuasarAppUtils::Error);
|
||||||
|
|
||||||
internalError();
|
internalError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1566,9 +1648,7 @@ bool ConfigParser::smartMoveTargets() {
|
|||||||
|
|
||||||
_config.targetsEdit() = temp;
|
_config.targetsEdit() = temp;
|
||||||
|
|
||||||
configureTargets();
|
return result && configureTargets();
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigParser::ConfigParser(FileManager *filemanager, PluginsParser *pluginsParser, DependenciesScanner* scaner, Packing *pac):
|
ConfigParser::ConfigParser(FileManager *filemanager, PluginsParser *pluginsParser, DependenciesScanner* scaner, Packing *pac):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -52,15 +52,14 @@ private:
|
|||||||
bool loadFromFile(const QString& file);
|
bool loadFromFile(const QString& file);
|
||||||
bool initDistroStruct();
|
bool initDistroStruct();
|
||||||
bool initPackages();
|
bool initPackages();
|
||||||
bool initRunScripts();
|
bool parseDeployMode(bool checkBin = true);
|
||||||
bool parseDeployMode();
|
|
||||||
bool parseInfoMode();
|
bool parseInfoMode();
|
||||||
bool parseInitMode();
|
bool parseInitMode();
|
||||||
/**
|
/**
|
||||||
* @brief configureTargets Sets targets data from options.
|
* @brief configureTargets Sets targets data from options.
|
||||||
* @return true if function finishe successfull
|
* @return true if function finishe successfull
|
||||||
*/
|
*/
|
||||||
void configureTargets();
|
bool configureTargets();
|
||||||
|
|
||||||
bool parseClearMode();
|
bool parseClearMode();
|
||||||
|
|
||||||
@ -68,7 +67,6 @@ private:
|
|||||||
|
|
||||||
void setTargetDir(const QString &target = "");
|
void setTargetDir(const QString &target = "");
|
||||||
bool setTargets(const QStringList &value);
|
bool setTargets(const QStringList &value);
|
||||||
QFileInfo getBinInfo(const QString& bin);
|
|
||||||
bool setTargetsRecursive(const QString &dir);
|
bool setTargetsRecursive(const QString &dir);
|
||||||
bool setTargetsInDir(const QString &dir, bool recursive = false);
|
bool setTargetsInDir(const QString &dir, bool recursive = false);
|
||||||
|
|
||||||
@ -85,7 +83,7 @@ private:
|
|||||||
bool setQmake(const QString &value);
|
bool setQmake(const QString &value);
|
||||||
bool setQtDir(const QString &value);
|
bool setQtDir(const QString &value);
|
||||||
|
|
||||||
void initExtraPath();
|
bool initExtraPath();
|
||||||
void initExtraNames();
|
void initExtraNames();
|
||||||
|
|
||||||
bool initPlugins();
|
bool initPlugins();
|
||||||
@ -116,6 +114,13 @@ private:
|
|||||||
|
|
||||||
QList<iDistribution *> getDistribution();
|
QList<iDistribution *> getDistribution();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief addTarget
|
||||||
|
* @param target
|
||||||
|
* @return true if target added successful
|
||||||
|
*/
|
||||||
|
bool addTarget(const TargetData &target);
|
||||||
|
void initCustomPlatform();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CQT_H
|
#endif // CQT_H
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -28,8 +28,8 @@ PrivateScaner DependenciesScanner::getScaner(const QString &lib) const {
|
|||||||
|
|
||||||
auto sufix = info.completeSuffix();
|
auto sufix = info.completeSuffix();
|
||||||
|
|
||||||
if (sufix.compare("dll", Qt::CaseSensitive) == 0 ||
|
if (sufix.contains("dll", Qt::CaseSensitive) ||
|
||||||
sufix.compare("exe", Qt::CaseSensitive) == 0) {
|
sufix.contains("exe", Qt::CaseSensitive)) {
|
||||||
return PrivateScaner::PE;
|
return PrivateScaner::PE;
|
||||||
} else if (sufix.isEmpty() || sufix.contains("so", Qt::CaseSensitive)) {
|
} else if (sufix.isEmpty() || sufix.contains("so", Qt::CaseSensitive)) {
|
||||||
return PrivateScaner::ELF;
|
return PrivateScaner::ELF;
|
||||||
@ -149,7 +149,7 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS
|
|||||||
if (!scanedLib.isValid()) {
|
if (!scanedLib.isValid()) {
|
||||||
QSet<LibInfo> listDep = {};
|
QSet<LibInfo> listDep = {};
|
||||||
|
|
||||||
if (!lib._name.compare(dep.value()._name, ONLY_WIN_CASE_INSENSIATIVE))
|
if (!lib._name.compare(dep.value()._name, DeployCore::getCaseSensitivity(lib._name)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
recursiveDep(*dep, listDep, libStack);
|
recursiveDep(*dep, listDep, libStack);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -14,12 +14,6 @@
|
|||||||
#define DISTRO_DIR QString("DistributionKit")
|
#define DISTRO_DIR QString("DistributionKit")
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
#define ONLY_WIN_CASE_INSENSIATIVE Qt::CaseInsensitive
|
|
||||||
#else
|
|
||||||
#define ONLY_WIN_CASE_INSENSIATIVE Qt::CaseSensitive
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(DEPLOY_LIBRARY)
|
#if defined(DEPLOY_LIBRARY)
|
||||||
# define DEPLOYSHARED_EXPORT Q_DECL_EXPORT
|
# define DEPLOYSHARED_EXPORT Q_DECL_EXPORT
|
||||||
#else
|
#else
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -25,6 +25,19 @@ DeployConfig::getTargetsListByFilter(const QString &filter) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QHash<QString, const TargetInfo *>
|
||||||
|
DeployConfig::getTargetsListByFilter(const QString &filter) const {
|
||||||
|
QHash<QString, const TargetInfo*> result;
|
||||||
|
|
||||||
|
for( auto it = _targets.cbegin(); it != _targets.cend(); ++it) {
|
||||||
|
if (it.key().contains(filter, Qt::CaseInsensitive)) {
|
||||||
|
result.insert(it.key(), &(*it));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
QString DeployConfig::getTargetDir(const QString &target) const {
|
QString DeployConfig::getTargetDir(const QString &target) const {
|
||||||
if (_targets.contains(target))
|
if (_targets.contains(target))
|
||||||
return targetDir + "/" + _targets.value(target).getPackage();
|
return targetDir + "/" + _targets.value(target).getPackage();
|
||||||
@ -104,15 +117,6 @@ void DeployConfig::setDefaultPackage(const QString &value) {
|
|||||||
defaultPackage = value;
|
defaultPackage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeployConfig::registerRunScript(const QString &targetName,
|
|
||||||
const QString &scriptPath) {
|
|
||||||
_runScripts.insert(targetName, scriptPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString DeployConfig::getRunScript(const QString &targetName) const {
|
|
||||||
return _runScripts.value(targetName, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
QtMajorVersion DeployConfig::isNeededQt() const {
|
QtMajorVersion DeployConfig::isNeededQt() const {
|
||||||
|
|
||||||
auto Qt = QtMajorVersion::NoQt;
|
auto Qt = QtMajorVersion::NoQt;
|
||||||
@ -139,6 +143,14 @@ QtMajorVersion DeployConfig::isNeededQt(const QString &pacakge) const {
|
|||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Platform DeployConfig::customPlatform() const {
|
||||||
|
return _customPlatform;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeployConfig::setCustomPlatform(Platform newCustomPlatform) {
|
||||||
|
_customPlatform = newCustomPlatform;
|
||||||
|
}
|
||||||
|
|
||||||
const QHash<QString, TargetInfo> &DeployConfig::targets() const {
|
const QHash<QString, TargetInfo> &DeployConfig::targets() const {
|
||||||
return _targets;
|
return _targets;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -63,6 +63,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void reset();
|
void reset();
|
||||||
QHash<QString, TargetInfo *> getTargetsListByFilter(const QString& filter);
|
QHash<QString, TargetInfo *> getTargetsListByFilter(const QString& filter);
|
||||||
|
QHash<QString, const TargetInfo *> getTargetsListByFilter(const QString& filter) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief targetPath
|
* @brief targetPath
|
||||||
@ -122,9 +123,6 @@ public:
|
|||||||
QString getDefaultPackage() const;
|
QString getDefaultPackage() const;
|
||||||
void setDefaultPackage(const QString &value);
|
void setDefaultPackage(const QString &value);
|
||||||
|
|
||||||
void registerRunScript(const QString& targetName, const QString& scriptPath);
|
|
||||||
QString getRunScript(const QString& targetName) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief isNeededQt This method return all needed qt major version for all targets.
|
* @brief isNeededQt This method return all needed qt major version for all targets.
|
||||||
* @return qt major version
|
* @return qt major version
|
||||||
@ -138,6 +136,18 @@ public:
|
|||||||
*/
|
*/
|
||||||
QtMajorVersion isNeededQt(const QString& pacakge) const;
|
QtMajorVersion isNeededQt(const QString& pacakge) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief customPlatform This is custom platform of distribution
|
||||||
|
* @return custom platform
|
||||||
|
*/
|
||||||
|
Platform customPlatform() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setCustomPlatform This method sets custom platform for this distribution.
|
||||||
|
* @param newCustomPlatform new custom platform.
|
||||||
|
*/
|
||||||
|
void setCustomPlatform(Platform newCustomPlatform);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,18 +165,14 @@ private:
|
|||||||
*/
|
*/
|
||||||
QHash<QString, DistroModule> _packages;
|
QHash<QString, DistroModule> _packages;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief _runScripts
|
|
||||||
* target - pathToScript
|
|
||||||
*/
|
|
||||||
QHash<QString, QString> _runScripts;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief targetDir - targe directory (this folder conteins all files of distrebution kit)
|
* @brief targetDir - targe directory (this folder conteins all files of distrebution kit)
|
||||||
*/
|
*/
|
||||||
QString targetDir = "";
|
QString targetDir = "";
|
||||||
QString defaultPackage = "";
|
QString defaultPackage = "";
|
||||||
|
|
||||||
|
Platform _customPlatform = Platform::UnknownPlatform;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "extracter.h"
|
#include "extracter.h"
|
||||||
#include "deploycore.h"
|
#include "deploycore.h"
|
||||||
#include "quasarapp.h"
|
|
||||||
#include "pathutils.h"
|
#include "pathutils.h"
|
||||||
#include "pluginsparser.h"
|
#include "pluginsparser.h"
|
||||||
|
|
||||||
@ -80,7 +79,8 @@ QtModuleEntry DeployCore::qtModuleEntries[] = {
|
|||||||
{ QtTextToSpeechModule, "texttospeech", "QtXTextToSpeech", nullptr },
|
{ QtTextToSpeechModule, "texttospeech", "QtXTextToSpeech", nullptr },
|
||||||
{ QtSerialBusModule, "serialbus", "QtXSerialBus", nullptr },
|
{ QtSerialBusModule, "serialbus", "QtXSerialBus", nullptr },
|
||||||
{ QtWebViewModule, "webview", "QtXWebView", nullptr },
|
{ QtWebViewModule, "webview", "QtXWebView", nullptr },
|
||||||
{ QtVirtualKeyboard, "virtualkeyboard", "QtXVirtualKeyboard", nullptr }
|
{ QtVirtualKeyboard, "virtualkeyboard", "QtXVirtualKeyboard", nullptr },
|
||||||
|
{ QtShaderToolsModule, "shadertools", "QtXShaderTools", nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
|
DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
|
||||||
@ -185,9 +185,384 @@ RunMode DeployCore::getMode() {
|
|||||||
return RunMode::Info;
|
return RunMode::Info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuasarAppUtils::OptionsDataList DeployCore::avilableOptions() {
|
||||||
|
QString group = "Part 1 Boolean options";
|
||||||
|
QuasarAppUtils::OptionsDataList help = {};
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"init"}, "",
|
||||||
|
"will initialize cqtdeployer.json file (configuration file).",
|
||||||
|
"'cqtdeployer init' - for initialize base package configuration. "
|
||||||
|
"'cqtdeployer -init multi' - for initialize multi package configuration "
|
||||||
|
"'cqtdeployer -init single' - for initialize singel package configuration"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"clear"}, "",
|
||||||
|
"Deletes deployable files of the previous session."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"force-clear"}, "",
|
||||||
|
"Deletes the destination directory before deployment."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noStrip"}, "",
|
||||||
|
"Skips strip step"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noTranslations"}, "",
|
||||||
|
"Skips the translations files. It doesn't work without qmake."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noOverwrite"}, "",
|
||||||
|
"Prevents replacing existing files."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noCheckRPATH"}, "",
|
||||||
|
"Disables automatic search of paths to qmake in executable files."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noCheckPATH"}, "",
|
||||||
|
"Disables automatic search of paths to qmake in system PATH."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noRecursiveiIgnoreEnv"}, "",
|
||||||
|
"Disables recursive ignore for ignoreEnv option."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"v", "version"}, "",
|
||||||
|
"Shows compiled version"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"h", "help"}, "",
|
||||||
|
"Show all help or help of the selected options."
|
||||||
|
" You can add any another option to a command line for show help about using options"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"qif","-qif"}, "",
|
||||||
|
"Create the QIF installer for deployment programm"
|
||||||
|
" You can specify the path to your own installer template.",
|
||||||
|
"Examples: cqtdeployer -qif path/to/myCustom/qif."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"qifFromSystem"}, "",
|
||||||
|
"force use system binarycreator tool of qif from path or qt"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"zip"}, "",
|
||||||
|
"Create the ZIP arhive for deployment programm"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"deb", "-deb"}, "",
|
||||||
|
"Create the deb package for deployment programm"
|
||||||
|
" You can specify the path to your own debian template.",
|
||||||
|
"cqtdeployer -deb path/to/myCustom/DEBIAN."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"deploySystem"}, "",
|
||||||
|
"Deploys all libraries."
|
||||||
|
" Not recomendet because there may be conflicts with system libraries"
|
||||||
|
" (on snap version you need to turn on permission)"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noQt"}, "",
|
||||||
|
"Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"allowEmptyPackages"}, "",
|
||||||
|
"Allows configure the empty packages."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"getDefaultTemplate"}, "",
|
||||||
|
"Extracts defaults deb or qif templates."
|
||||||
|
" All templates extract into targetDirectory."
|
||||||
|
" For change target directory use the targetDir option.",
|
||||||
|
"cqtdeployer -bin myExecutable getDefaultTemplate qif deb."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"noHashSum"}, "",
|
||||||
|
"This option disable computation of a packages hash sum"
|
||||||
|
}});
|
||||||
|
|
||||||
|
group = "Part 2 Deploy options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-bin"}, "{list,params}",
|
||||||
|
"Files to deploy or folders that contain files to deploy.",
|
||||||
|
"-bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll."
|
||||||
|
" For files: These files will be unconditional copied to the destination directory,"
|
||||||
|
" regardless of their format or suffix."
|
||||||
|
" For folders:"
|
||||||
|
" CCQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory."
|
||||||
|
" Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and libDir paths."
|
||||||
|
"**Note**: If CQtDeployer can't find required file then"
|
||||||
|
" CQtDeployer try find required file in the system PATH enviroment."
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-binPrefix"}, "{prefixPath}",
|
||||||
|
"Sets prefix path for bin option.",
|
||||||
|
"-bin path/MyExecutable is some as -bin MyExecutable -binPrefix path"
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-confFile"}, "{params}",
|
||||||
|
"The path to the json file with all deployment configurations. Using this file,"
|
||||||
|
" you can add the necessary options, thereby simplifying the command invocation in the console."
|
||||||
|
" However, the parameters in Kansol have a higher priority than in the file."
|
||||||
|
" For more info about this flag see https://github.com/QuasarApp/CQtDeployer/wiki/DeployConfigFileEn"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qmlDir"}, "{params}",
|
||||||
|
"Sets path to Qml data dir",
|
||||||
|
"-qmlDir ~/my/project/qml"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qmake"}, "{params}",
|
||||||
|
"Sets path to the qmake executable.",
|
||||||
|
"-qmake ~/Qt/bin/qmake or -qmake ~/Qt/bin/qmake.exe"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-ignore"}, "{list,params}",
|
||||||
|
"Sets the list of libs to ignore.",
|
||||||
|
"-ignore libicudata.so.56,libicudata2.so.56"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-ignoreEnv"}, "{list,params}",
|
||||||
|
"Sets the list of the environment to ignore.",
|
||||||
|
"-ignoreEnv /bad/dir,/my/bad/Dir"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-libDir"}, "{list,params}",
|
||||||
|
"Sets additional paths for extra libs of an app.",
|
||||||
|
"-libDir ~/myLib,~/newLibs"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-extraLibs"}, "{list,params}",
|
||||||
|
"Sets the mask of the library name for forced copying.",
|
||||||
|
"\"-extraLib mySql\" - forces to copy all libraries whose names contain mySql to the project folder."
|
||||||
|
" This option is case-insensitive on Windows and case-sensitive on other platforms."
|
||||||
|
" This option will only search libraries in system environments similar to **deploySystem**."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-customScript"}, "{scriptCode}",
|
||||||
|
"Insert extra code inTo All run script.",
|
||||||
|
"",
|
||||||
|
" This option will be removed into next release cqtdeployer."
|
||||||
|
" Please use the runScript option"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-recursiveDepth"}, "{params}",
|
||||||
|
"Sets the Depth of recursive search of libs and depth for ignoreEnv option (default 0)"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-installDirQIFW"}, "{params}",
|
||||||
|
"Sets install target directory for installers (by default it is /home path)"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-runScript"}, "{list,parems}",
|
||||||
|
"forces cqtdeployer swap default run script to new from the arguments of option."
|
||||||
|
" This option copy all content from input file and insert all code into runScript.sh or .bat",
|
||||||
|
"cqtdeployer -runScript \"myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh\""
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-platform"}, "{platforms,list}",
|
||||||
|
"Force deploy only one selected platforms. "
|
||||||
|
"If this option is enabled then CQtDeployer will deploy only binaries of a selected platform. Supported values: "
|
||||||
|
"[win_x86 win_x86_64 win_arm win_arm64 linux_x86 linux_x86_64 linux_ARM linux_ARM64]"
|
||||||
|
}});
|
||||||
|
|
||||||
|
|
||||||
|
group = "Part 3 Control of packages options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-targetPackage"}, "{package;tar1,package;tar2}",
|
||||||
|
"Creates a new package and adds 'tar1 and tar2' to it. "
|
||||||
|
"If you want configure the package that do not have any targets use the allowEmptyPackages option."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qmlOut"}, "{package;path,path}",
|
||||||
|
"Sets path to qml out directory"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-libOut"}, "{package;path,path}",
|
||||||
|
"Sets path to libraries out directory"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-trOut"}, "{package;path,path}",
|
||||||
|
"Sets path to Sets path to translations out directory"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-pluginOut"}, "{package;path,path}",
|
||||||
|
"Sets path to plugins out directory"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-binOut"}, "{package;path,path}",
|
||||||
|
"Sets path to binary out directory"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-recOut"}, "{package;path,path}",
|
||||||
|
"Sets path to recurses out directory"
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-extraDataOut"}, "{package;path,path}",
|
||||||
|
"Sets path to extra data files out directory. By Default it is root dir of the distribution."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-name"}, "{package;val,val}",
|
||||||
|
"Sets name for a package."
|
||||||
|
"If this if you do not specify a package, the value will be assigned to the default package ("")"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-description"}, "{package;val,val}",
|
||||||
|
"Sets description for a package"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-deployVersion"}, "{package;val,val}",
|
||||||
|
"Sets version for a package"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-releaseDate"}, "{package;val,val}",
|
||||||
|
"Sets release date for a package"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-publisher"}, "{package;val,val}",
|
||||||
|
"Sets publisher for a package"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-homePage"}, "{package;val,val}",
|
||||||
|
"Sets the home page url for a package"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-prefix"}, "{package;val,val}",
|
||||||
|
"Sets the prefix for the package relatively a target directory "
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-extraData"}, "{package;val,val}",
|
||||||
|
"Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-tr"}, "{package;val,val}",
|
||||||
|
"Adds qm files into the translations folder."
|
||||||
|
}});
|
||||||
|
|
||||||
|
group = "Part 4 Control of target options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-icon"}, "{target;val,val}",
|
||||||
|
"Sets path to icon for a targets"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-disableRunScript"}, "{package;val,val}",
|
||||||
|
"Disables a generation of run script for selected targets"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-disableShortCut"}, "{package;val,val}",
|
||||||
|
"Disables a generation of shortcut for selected targets"
|
||||||
|
}});
|
||||||
|
|
||||||
|
group = "Part 5 Plugins Control Options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-extraPlugin"}, "{package;val1;val2,SingeleVal}",
|
||||||
|
"Sets an additional path to third-party application plug-in"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-enablePlugins"}, "{package;val1;val2,SingeleVa}",
|
||||||
|
"Enables additional plugins for distribution."
|
||||||
|
" By default disabled next plugins: " + PluginsParser::defaultForbidenPlugins().join(',') + " if you want enable"
|
||||||
|
" it then use '-enablePlugins " + PluginsParser::defaultForbidenPlugins().join(',') + "' option"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-disablePlugins"}, "{package;val1;val2,SingeleVal}",
|
||||||
|
"Disables plugins for distribution. "
|
||||||
|
"You can disable any plugin of your Qt build, just see the yourQtFolder/plugins forlder for available plugins."
|
||||||
|
" Example if you want disable qxcb plugin: -disablePlugins qxcb."
|
||||||
|
" Note that the name of the plugin is indicated without its extension"
|
||||||
|
}});
|
||||||
|
|
||||||
|
group = "Part 6 QtInstallFramework options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifStyle"}, "{path/to/style.css}",
|
||||||
|
"Sets the path to the CSS style file or sets the default style."
|
||||||
|
" Available styles: quasar, quasarDark"
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifBanner"}, "{path/to/banner.png}",
|
||||||
|
"Sets path to the banner png file."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifLogo"}, "{path/to/logo.png}",
|
||||||
|
"Sets path to the logo png file."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifOut"}, "{nameOfOutputInstallerFile}",
|
||||||
|
"Sets name of output qifw installer. Note: on Windows, the exe suffix will be added to the installer automatically."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifConfig"}, "{path/to/config.xml}",
|
||||||
|
"Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml. Note This path sets releative target folder (sets by TargetDir option)."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifPackages"}, "{path/to/packagesFodoler}",
|
||||||
|
"Sets a custom path to the packages directories. By default it is qif/packages. Note This path sets releative target folder (sets by TargetDir option)."
|
||||||
|
}});
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifResources"}, "{path/to/resources1.qrc,path/to/resources2.qrc}",
|
||||||
|
"Sets a custom path to the resources files. By default this option is skipped. Note This path sets releative target folder (sets by TargetDir option)."
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-targetDir"}, "{params}",
|
||||||
|
"Sets target directory(by default it is the path to the first deployable file)"
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-qifArchiveFormat"}, "[7z|zip|tar|tar.gz|tar.bz2|tar.xz]",
|
||||||
|
"Sets the format used when packaging new component data archives."
|
||||||
|
" If you omit this option, the 7z format will be used as a default. "
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-binarycreator"}, "{binarycreator command}",
|
||||||
|
"Sets new binarycreator command.",
|
||||||
|
"cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'"
|
||||||
|
}});
|
||||||
|
|
||||||
|
group = "Part 7 Deb package options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-debOut"}, "{package;nameOfOutputDebFile,nameOfOutputDebFile}",
|
||||||
|
"Sets name of the output debian file. This option can be work with multiple packages"
|
||||||
|
}});
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-installDirDeb"}, "{params}",
|
||||||
|
"Sets install target directory fordebian package (by default it is /opt path)"
|
||||||
|
}});
|
||||||
|
|
||||||
|
|
||||||
|
group = "Part 8 zip package options";
|
||||||
|
|
||||||
|
help.insert(group, {QuasarAppUtils::OptionData{
|
||||||
|
{"-zipOut"}, "{package;nameOfOutputZipFile,nameOfOutputZipFile}",
|
||||||
|
"Sets name of the output zip arrhive. This option can be work with multiple packages"
|
||||||
|
}});
|
||||||
|
|
||||||
|
return help;
|
||||||
|
}
|
||||||
|
|
||||||
void DeployCore::help() {
|
void DeployCore::help() {
|
||||||
|
|
||||||
|
auto localHelp = QuasarAppUtils::Params::getHelpOfInputOptions();
|
||||||
|
|
||||||
|
if(!localHelp.isEmpty()) {
|
||||||
|
QuasarAppUtils::Help::print(localHelp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// help extra data;
|
||||||
QuasarAppUtils::Help::Charters help = {
|
QuasarAppUtils::Help::Charters help = {
|
||||||
{
|
{
|
||||||
"Part 0 General", {
|
"Part 0 General", {
|
||||||
@ -195,131 +570,6 @@ void DeployCore::help() {
|
|||||||
{"Usage", "cqtdeployer <-bin [params]> [options]"},
|
{"Usage", "cqtdeployer <-bin [params]> [options]"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Part 1 Boolean options", {
|
|
||||||
{"init", "will initialize cqtdeployer.json file (configuration file)."
|
|
||||||
" For example: 'cqtdeployer init' - for initialize base package configuration."
|
|
||||||
" 'cqtdeployer -init multi' - for initialize multi package configuration"
|
|
||||||
" 'cqtdeployer -init single' - for initialize singel package configuration"},
|
|
||||||
{"help / h", "Shows help"},
|
|
||||||
{"clear", "Deletes deployable files of the previous session."},
|
|
||||||
{"force-clear", "Deletes the destination directory before deployment."},
|
|
||||||
{"noStrip", "Skips strip step"},
|
|
||||||
{"noTranslations", "Skips the translations files. It doesn't work without qmake."},
|
|
||||||
{"noOverwrite", "Prevents replacing existing files."},
|
|
||||||
{"noCheckRPATH", "Disables automatic search of paths to qmake in executable files."},
|
|
||||||
{"noCheckPATH", "Disables automatic search of paths to qmake in system PATH."},
|
|
||||||
{"noRecursiveiIgnoreEnv", "Disables recursive ignore for ignoreEnv option."},
|
|
||||||
{"v / version", "Shows compiled version"},
|
|
||||||
{"qif", "Create the QIF installer for deployment programm"
|
|
||||||
" You can specify the path to your own installer template. Examples: cqtdeployer -qif path/to/myCustom/qif."},
|
|
||||||
{"qifFromSystem", "force use system binarycreator tool of qif from path or qt"},
|
|
||||||
{"zip", "Create the ZIP arhive for deployment programm"},
|
|
||||||
{"deb", "Create the deb package for deployment programm"
|
|
||||||
" You can specify the path to your own debian template. Examples: cqtdeployer -deb path/to/myCustom/DEBIAN."},
|
|
||||||
{"deploySystem", "Deploys all libraries."
|
|
||||||
" Not recomendet because there may be conflicts with system libraries"
|
|
||||||
" (on snap version you need to turn on permission)"},
|
|
||||||
{"noQt", "Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework."},
|
|
||||||
{"allowEmptyPackages", "Allows configure the empty packages."},
|
|
||||||
{"getDefaultTemplate", "Extracts defaults deb or qif templates."
|
|
||||||
" All templates extract into targetDirectory."
|
|
||||||
" For change target directory use the targetDir option."
|
|
||||||
" Example: cqtdeployer -bin myExecutable getDefaultTemplate qif deb."},
|
|
||||||
{"noHashSum", "This option disable computation of a packages hash sum"}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Part 2 Deploy options", {
|
|
||||||
{"-bin [list, params]", "Files to deploy or folders that contain files to deploy."
|
|
||||||
" For example -bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll."
|
|
||||||
" For files: These files will be unconditional copied to the destination directory,"
|
|
||||||
" regardless of their format or suffix."
|
|
||||||
" For folders:"
|
|
||||||
" CCQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory."
|
|
||||||
" Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and libDir paths."},
|
|
||||||
{"-binPrefix [prefixPath]", "Sets prefix path for bin option."
|
|
||||||
" Example: "
|
|
||||||
"-bin path/MyExecutable is some as -bin MyExecutable -binPrefix path" },
|
|
||||||
|
|
||||||
{"-confFile [params]", "The path to the json file with all deployment configurations. Using this file,"
|
|
||||||
" you can add the necessary options, thereby simplifying the command invocation in the console."
|
|
||||||
" However, the parameters in Kansol have a higher priority than in the file."
|
|
||||||
" For more info about this flag see https://github.com/QuasarApp/CQtDeployer/wiki/DeployConfigFileEn"},
|
|
||||||
{"-qmlDir [params]", "Qml data dir. For example -qmlDir ~/my/project/qml"},
|
|
||||||
{"-qmake [params]", "Deployable file or folder. For example -bin ~/my/project/bin/,~/my/project/bin.exe"},
|
|
||||||
{"-ignore [list,params]", "The list of libs to ignore. For example -ignore libicudata.so.56,libicudata2.so.56"},
|
|
||||||
{"-ignoreEnv [list,params]", "The list of the environment to ignore. For example -ignoreEnv /bad/dir,/my/bad/Dir"},
|
|
||||||
{"-libDir [list,params]", "Sets additional paths for extra libs of an app. For example -libDir ~/myLib,~/newLibs"},
|
|
||||||
{"-extraLibs [list,params]", "Sets the mask of the library name for forced copying."
|
|
||||||
" Example: \"-extraLib mySql\" - forces to copy all libraries whose names contain mySql to the project folder."
|
|
||||||
" This option is case-insensitive on Windows and case-sensitive on other platforms."
|
|
||||||
" This option will only search libraries in system environments similar to **deploySystem**."},
|
|
||||||
{"-customScript [scriptCode]", "Insert extra code inTo All run script."},
|
|
||||||
{"-recursiveDepth [params]", "Sets the Depth of recursive search of libs and depth for ignoreEnv option (default 0)"},
|
|
||||||
{"-targetDir [params]", "Sets target directory(by default it is the path to the first deployable file)"},
|
|
||||||
{"-runScript [list,parems]", "forces cqtdeployer swap default run script to new from the arguments of option."
|
|
||||||
" This option copy all content from input file and insert all code into runScript.sh or .bat"
|
|
||||||
" Example of use: cqtdeployer -runScript \"myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh\""},
|
|
||||||
{"-verbose [0-3]", "Shows debug log"},
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Part 3 Control of packages options", {
|
|
||||||
{"-targetPackage [package;tar1,package;tar2]", "Creates a new package and adds 'tar1 and tar2' to it."
|
|
||||||
"If you want configure the package that do not have any targets use the allowEmptyPackages option."},
|
|
||||||
{"-qmlOut [package;path,path]", "Sets path to qml out directory"},
|
|
||||||
{"-libOut [package;path,path]", "Sets path to libraries out directory"},
|
|
||||||
{"-trOut [package;path,path]", "Sets path to translations out directory"},
|
|
||||||
{"-pluginOut [package;path,path]", "Sets path to plugins out directory"},
|
|
||||||
{"-binOut [package;path,path]", "Sets path to binary out directory"},
|
|
||||||
{"-recOut [package;path,path]", "Sets path to recurses out directory"},
|
|
||||||
{"-extraDataOut [package;path,path]", "Sets path to extra data files out directory. By Default it is root dir of the distribution."},
|
|
||||||
{"-name [package;val,val]", "Sets name for a package. "
|
|
||||||
"If this if you do not specify a package, the value will be assigned to the default package ("")"},
|
|
||||||
{"-description [package;val,val]", "Sets description for a package"},
|
|
||||||
{"-deployVersion [package;val,val]", "Sets version for a package"},
|
|
||||||
{"-releaseDate [package;val,val]", "Sets release date for a package"},
|
|
||||||
{"-publisher [package;val,val]", "Sets publisher for a package"},
|
|
||||||
{"-homePage [package;val,val]", "Sets the home page url for a package"},
|
|
||||||
{"-prefix [package;val,val]", "Sets the prefix for the package relatively a target directory "},
|
|
||||||
{"-extraData [package;val,val]", "Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure."},
|
|
||||||
{"-tr [package;val,val]", "Adds qm files into the translations folder."},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"Part 4 Control of packages options", {
|
|
||||||
{"-icon [target;val,val]", "Sets path to icon for a targets"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"Part 5 Plugins Control Options", {
|
|
||||||
{"-extraPlugin [package;val1;val2,SingeleVal]", "Sets an additional path to third-party application plug-in"},
|
|
||||||
{"-enablePlugins [package;val1;val2,SingeleVal", "Enables additional plugins for distribution."
|
|
||||||
" By default disabled next plugins: " + PluginsParser::defaultForbidenPlugins().join(',') + " if you want enable"
|
|
||||||
" it then use '-enablePlugins " + PluginsParser::defaultForbidenPlugins().join(',') + "' option"},
|
|
||||||
{"-disablePlugins [package;val1;val2,SingeleVal]", "Disables plugins for distribution. "
|
|
||||||
"You can disable any plugin of your Qt build, just see the yourQtFolder/plugins forlder for available plugins."
|
|
||||||
" Example if you want disable qxcb plugin: -disablePlugins qxcb."
|
|
||||||
" Note that the name of the plugin is indicated without its extension"},
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Part 6 QtInstallFramework options", {
|
|
||||||
{"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style."
|
|
||||||
" Available styles: quasar, quasarDark"},
|
|
||||||
{"-qifBanner [path/to/banner.png]", "Sets path to the banner png file."},
|
|
||||||
{"-qifLogo [path/to/logo.png]", "Sets path to the logo png file."},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Support", {
|
"Support", {
|
||||||
{"Support for you", "If you have any questions or problems with cqtdeployer you can write to us about the problem on the GitHub page: https://github.com/QuasarApp/CQtDeployer/issues"},
|
{"Support for you", "If you have any questions or problems with cqtdeployer you can write to us about the problem on the GitHub page: https://github.com/QuasarApp/CQtDeployer/issues"},
|
||||||
@ -328,71 +578,13 @@ void DeployCore::help() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
help.unite(QuasarAppUtils::Params::getParamsHelp());
|
help += QuasarAppUtils::Params::getHelp();
|
||||||
|
|
||||||
QuasarAppUtils::Help::print(help);
|
QuasarAppUtils::Help::print(help);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList DeployCore::helpKeys() {
|
|
||||||
return {
|
|
||||||
"help",
|
|
||||||
"noOverwrite",
|
|
||||||
"bin",
|
|
||||||
"extraData",
|
|
||||||
"qmlDir",
|
|
||||||
"deploySystem",
|
|
||||||
"qmake",
|
|
||||||
"ignore",
|
|
||||||
"ignoreEnv",
|
|
||||||
"clear",
|
|
||||||
"force-clear",
|
|
||||||
"libDir",
|
|
||||||
"extraLibs",
|
|
||||||
"extraPlugin",
|
|
||||||
"recursiveDepth",
|
|
||||||
"targetDir",
|
|
||||||
"targetPackage",
|
|
||||||
"noStrip",
|
|
||||||
"extractPlugins",
|
|
||||||
"noTranslations",
|
|
||||||
"noRecursiveiIgnoreEnv",
|
|
||||||
"qifFromSystem",
|
|
||||||
"qmlOut",
|
|
||||||
"libOut",
|
|
||||||
"trOut",
|
|
||||||
"pluginOut",
|
|
||||||
"binOut",
|
|
||||||
"recOut",
|
|
||||||
"extraDataOut",
|
|
||||||
"version",
|
|
||||||
"verbose",
|
|
||||||
"qif",
|
|
||||||
"noCheckRPATH",
|
|
||||||
"noCheckPATH",
|
|
||||||
"name",
|
|
||||||
"description",
|
|
||||||
"deployVersion",
|
|
||||||
"releaseDate",
|
|
||||||
"icon",
|
|
||||||
"publisher",
|
|
||||||
"customScript",
|
|
||||||
"qifStyle",
|
|
||||||
"qifBanner",
|
|
||||||
"qifLogo",
|
|
||||||
"zip",
|
|
||||||
"noQt",
|
|
||||||
"homePage",
|
|
||||||
"prefix",
|
|
||||||
"deb",
|
|
||||||
"allowEmptyPackages",
|
|
||||||
"runScript",
|
|
||||||
"getDefaultTemplate",
|
|
||||||
"tr"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList DeployCore::extractTranslation(const QSet<QString> &libs) {
|
QStringList DeployCore::extractTranslation(const QSet<QString> &libs) {
|
||||||
QSet<QString> res;
|
QSet<QString> res;
|
||||||
const size_t qtModulesCount = sizeof(qtModuleEntries) / sizeof(QtModuleEntry);
|
const size_t qtModulesCount = sizeof(qtModuleEntries) / sizeof(QtModuleEntry);
|
||||||
@ -449,7 +641,7 @@ QString DeployCore::findProcess(const QString &env, const QString& proc) {
|
|||||||
auto files = QDir(path).entryInfoList(QDir::NoDotAndDotDot | QDir::Files);
|
auto files = QDir(path).entryInfoList(QDir::NoDotAndDotDot | QDir::Files);
|
||||||
|
|
||||||
for (const auto& bin : files) {
|
for (const auto& bin : files) {
|
||||||
if (bin.baseName().compare(proc, ONLY_WIN_CASE_INSENSIATIVE) == 0) {
|
if (bin.baseName().compare(proc, DeployCore::getCaseSensitivity()) == 0) {
|
||||||
return bin.absoluteFilePath();
|
return bin.absoluteFilePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -465,7 +657,7 @@ QStringList DeployCore::debugExtensions() {
|
|||||||
bool DeployCore::isDebugFile(const QString &file) {
|
bool DeployCore::isDebugFile(const QString &file) {
|
||||||
auto debug = debugExtensions();
|
auto debug = debugExtensions();
|
||||||
for (const auto& debugEx: debug) {
|
for (const auto& debugEx: debug) {
|
||||||
if (file.contains(debugEx, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (file.contains(debugEx, Qt::CaseInsensitive)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -588,10 +780,23 @@ QString DeployCore::getMSVCVersion(MSVCVersion msvc) {
|
|||||||
|
|
||||||
QtMajorVersion DeployCore::isQtLib(const QString &lib) {
|
QtMajorVersion DeployCore::isQtLib(const QString &lib) {
|
||||||
QFileInfo info(lib);
|
QFileInfo info(lib);
|
||||||
/*
|
|
||||||
|
QtMajorVersion isQt = isQtLibName(lib);
|
||||||
|
|
||||||
|
if (_config && !_config->qtDir.isQt(info.absoluteFilePath())) {
|
||||||
|
return QtMajorVersion::NoQt;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isQt;
|
||||||
|
}
|
||||||
|
|
||||||
|
QtMajorVersion DeployCore::isQtLibName(const QString &lib) {
|
||||||
|
QFileInfo info(lib);
|
||||||
|
|
||||||
|
/*
|
||||||
* Task https://github.com/QuasarApp/CQtDeployer/issues/422
|
* Task https://github.com/QuasarApp/CQtDeployer/issues/422
|
||||||
* All qt libs need to contains the Qt label.
|
* All qt libs need to contains the Qt label.
|
||||||
*/
|
*/
|
||||||
QtMajorVersion isQt = QtMajorVersion::NoQt;
|
QtMajorVersion isQt = QtMajorVersion::NoQt;
|
||||||
|
|
||||||
if (!isLib(info)) {
|
if (!isLib(info)) {
|
||||||
@ -599,18 +804,14 @@ QtMajorVersion DeployCore::isQtLib(const QString &lib) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString fileName = info.fileName();
|
QString fileName = info.fileName();
|
||||||
if (fileName.contains("Qt4", ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (fileName.contains("Qt4", getCaseSensitivity(fileName))) {
|
||||||
isQt = QtMajorVersion::Qt4;
|
isQt = QtMajorVersion::Qt4;
|
||||||
} else if (fileName.contains("Qt5", ONLY_WIN_CASE_INSENSIATIVE)) {
|
} else if (fileName.contains("Qt5", getCaseSensitivity(fileName))) {
|
||||||
isQt = QtMajorVersion::Qt5;
|
isQt = QtMajorVersion::Qt5;
|
||||||
} else if (fileName.contains("Qt6", ONLY_WIN_CASE_INSENSIATIVE)) {
|
} else if (fileName.contains("Qt6", getCaseSensitivity(fileName))) {
|
||||||
isQt = QtMajorVersion::Qt6;
|
isQt = QtMajorVersion::Qt6;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_config && !_config->qtDir.isQt(info.absoluteFilePath())) {
|
|
||||||
return QtMajorVersion::NoQt;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isQt && QuasarAppUtils::Params::isEndable("noQt") &&
|
if (isQt && QuasarAppUtils::Params::isEndable("noQt") &&
|
||||||
!QuasarAppUtils::Params::isEndable("qmake")) {
|
!QuasarAppUtils::Params::isEndable("qmake")) {
|
||||||
return QtMajorVersion::NoQt;
|
return QtMajorVersion::NoQt;
|
||||||
@ -625,8 +826,8 @@ bool DeployCore::isExtraLib(const QString &lib) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool DeployCore::isAlienLib(const QString &lib) {
|
bool DeployCore::isAlienLib(const QString &lib) {
|
||||||
return lib.contains("/opt/", ONLY_WIN_CASE_INSENSIATIVE) ||
|
return lib.contains("/opt/", Qt::CaseSensitive) ||
|
||||||
lib.contains("/PROGRAM FILES", ONLY_WIN_CASE_INSENSIATIVE);
|
lib.contains("/PROGRAM FILES", Qt::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DeployCore::isAllowedLib(const QString &lib) {
|
bool DeployCore::isAllowedLib(const QString &lib) {
|
||||||
@ -639,13 +840,18 @@ QStringList DeployCore::Qt3rdpartyLibs(Platform platform) {
|
|||||||
QStringList result;
|
QStringList result;
|
||||||
|
|
||||||
result << QStringList {
|
result << QStringList {
|
||||||
// Begin SQL LIBS
|
// SQL LIBS
|
||||||
// See task https://github.com/QuasarApp/CQtDeployer/issues/367
|
// See task https://github.com/QuasarApp/CQtDeployer/issues/367
|
||||||
|
|
||||||
"libpq",
|
"libpq",
|
||||||
"mysqlclient"
|
"mysqlclient",
|
||||||
|
|
||||||
|
// SLL Libs
|
||||||
|
// See task https://github.com/QuasarApp/CQtDeployer/issues/620
|
||||||
|
"libcrypto",
|
||||||
|
"libssl",
|
||||||
|
"libeay32",
|
||||||
|
"ssleay32",
|
||||||
|
|
||||||
// End SQL LIBS
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (platform & Platform::Win) {
|
if (platform & Platform::Win) {
|
||||||
@ -693,6 +899,61 @@ QStringList DeployCore::Qt3rdpartyLibs(Platform platform) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString DeployCore::platformToString(Platform platform) {
|
||||||
|
int platformVal = 1;
|
||||||
|
QString result;
|
||||||
|
|
||||||
|
QHash<int, QString> platformsMap = {
|
||||||
|
{Platform::Win32, "win_x86"},
|
||||||
|
{Platform::Win64, "win_x86_64"},
|
||||||
|
{Platform::Win_ARM_32, "win_arm"},
|
||||||
|
{Platform::win_ARM_64, "win_arm64"},
|
||||||
|
{Platform::Unix_x86_32, "linux_x86"},
|
||||||
|
{Platform::Unix_x86_64, "linux_x86_64"},
|
||||||
|
{Platform::Unix_ARM_32, "linux_ARM"},
|
||||||
|
{Platform::Unix_ARM_64, "linux_ARM64"},
|
||||||
|
{Platform::WebGl, "WebGl"},
|
||||||
|
{Platform::WebRemote, "WebRemote"},
|
||||||
|
{Platform::GeneralFile, "GeneralFile"}
|
||||||
|
};
|
||||||
|
|
||||||
|
while (platformVal <= Platform::GeneralFile) {
|
||||||
|
|
||||||
|
if (platformVal & platform) {
|
||||||
|
result.push_back((result.size()? ", " : "") + platformsMap.value(platformVal, " Unknown"));
|
||||||
|
}
|
||||||
|
|
||||||
|
platformVal = platformVal << 1;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Platform DeployCore::getPlatformFromString(const QString &platformName) {
|
||||||
|
|
||||||
|
if (platformName == "auto") {
|
||||||
|
return Platform(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
QHash<QString, Platform> platformsMap = {
|
||||||
|
{"win_x86", Platform::Win32},
|
||||||
|
{"win_x86_64", Platform::Win64},
|
||||||
|
{"win_arm", Platform::Win_ARM_32},
|
||||||
|
{"win_arm64", Platform::win_ARM_64},
|
||||||
|
{"linux_x86", Platform::Unix_x86_32},
|
||||||
|
{"linux_x86_64", Platform::Unix_x86_64},
|
||||||
|
{"linux_ARM", Platform::Unix_ARM_32},
|
||||||
|
{"linux_ARM64", Platform::Unix_ARM_64},
|
||||||
|
{"WebGl", Platform::WebGl},
|
||||||
|
{"WebRemote", Platform::WebRemote},
|
||||||
|
{"GeneralFile", Platform::GeneralFile}
|
||||||
|
};
|
||||||
|
|
||||||
|
return platformsMap.value(platformName, Platform(0));
|
||||||
|
}
|
||||||
|
|
||||||
QChar DeployCore::getSeparator(int lvl) {
|
QChar DeployCore::getSeparator(int lvl) {
|
||||||
switch (lvl) {
|
switch (lvl) {
|
||||||
case 0: return ',';
|
case 0: return ',';
|
||||||
@ -751,6 +1012,40 @@ void DeployCore::printInternalError(const char * function, const char* file, int
|
|||||||
" about this problem on the official github page"
|
" about this problem on the official github page"
|
||||||
" https://github.com/QuasarApp/CQtDeployer/issues/new/choose. "),
|
" https://github.com/QuasarApp/CQtDeployer/issues/new/choose. "),
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
QFileInfo DeployCore::findItem(const QString &bin) {
|
||||||
|
auto prefixes = QuasarAppUtils::Params::getArg("binPrefix").
|
||||||
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
|
for (const QString& prefix :qAsConst(prefixes)) {
|
||||||
|
QFileInfo info(prefix + "/" + bin);
|
||||||
|
|
||||||
|
if (info.exists()) {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return QFileInfo(bin);
|
||||||
|
}
|
||||||
|
|
||||||
|
Qt::CaseSensitivity DeployCore::getCaseSensitivity(const QString &checkedFile) {
|
||||||
|
|
||||||
|
if (checkedFile.isEmpty()) {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
return Qt::CaseInsensitive;
|
||||||
|
#else
|
||||||
|
return Qt::CaseSensitive;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
QString sufix = QFileInfo(checkedFile).completeSuffix();
|
||||||
|
if (sufix.compare("dll", Qt::CaseInsensitive) == 0 ||
|
||||||
|
sufix.compare("exe", Qt::CaseInsensitive)) {
|
||||||
|
return Qt::CaseInsensitive;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Qt::CaseSensitive;
|
||||||
};
|
};
|
||||||
|
|
||||||
QString DeployCore::systemLibsFolderName() {
|
QString DeployCore::systemLibsFolderName() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -13,6 +13,7 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include "deploy_global.h"
|
#include "deploy_global.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
|
#include "quasarapp.h"
|
||||||
|
|
||||||
enum MSVCVersion: int {
|
enum MSVCVersion: int {
|
||||||
MSVC_Unknown = 0x0,
|
MSVC_Unknown = 0x0,
|
||||||
@ -181,7 +182,8 @@ public:
|
|||||||
QtVirtualKeyboard = 0x0010000000000000,
|
QtVirtualKeyboard = 0x0010000000000000,
|
||||||
// Qt6
|
// Qt6
|
||||||
QtOpenGLWidgetsModule = 0x0010000000000000,
|
QtOpenGLWidgetsModule = 0x0010000000000000,
|
||||||
QtSvgWidgetsModule = 0x0020000000000000
|
QtSvgWidgetsModule = 0x0020000000000000,
|
||||||
|
QtShaderToolsModule = 0x0040000000000000
|
||||||
};
|
};
|
||||||
|
|
||||||
DeployCore() = delete;
|
DeployCore() = delete;
|
||||||
@ -194,7 +196,20 @@ public:
|
|||||||
static MSVCVersion getMSVC(const QString & _qtBin);
|
static MSVCVersion getMSVC(const QString & _qtBin);
|
||||||
static QString getVCredist(const QString & _qtBin);
|
static QString getVCredist(const QString & _qtBin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief isQtLib This method check full path of the library. If the @a lib contains only name then this method retun QtMajorVersion::NoQt enum. For validate @a lib by name only use the DeployCore::isQtLibName method.
|
||||||
|
* @param lib This is library full path..
|
||||||
|
* @return major version of the Qt.
|
||||||
|
*/
|
||||||
static QtMajorVersion isQtLib(const QString &lib);
|
static QtMajorVersion isQtLib(const QString &lib);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief isQtLib This method check name of the library.
|
||||||
|
* @param lib This is library full path..
|
||||||
|
* @return major version of the Qt.
|
||||||
|
*/
|
||||||
|
static QtMajorVersion isQtLibName(const QString &lib);
|
||||||
|
|
||||||
static bool isExtraLib(const QString &lib);
|
static bool isExtraLib(const QString &lib);
|
||||||
static QChar getSeparator(int lvl);
|
static QChar getSeparator(int lvl);
|
||||||
static bool isAlienLib(const QString &lib);
|
static bool isAlienLib(const QString &lib);
|
||||||
@ -215,13 +230,27 @@ public:
|
|||||||
*/
|
*/
|
||||||
static QStringList Qt3rdpartyLibs(Platform platform);
|
static QStringList Qt3rdpartyLibs(Platform platform);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief platformToString This method convert platform value to string value.
|
||||||
|
* @param platform This is input platform value.
|
||||||
|
* @return String name of the @a platform
|
||||||
|
*/
|
||||||
|
static QString platformToString(Platform platform);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getPlatformFromString This method return platform enum value form string.
|
||||||
|
* @param platformName This is string platform value.
|
||||||
|
* @return platform enum value form string.
|
||||||
|
*/
|
||||||
|
static Platform getPlatformFromString(const QString &platformName);
|
||||||
|
|
||||||
static char getEnvSeparator();
|
static char getEnvSeparator();
|
||||||
|
|
||||||
static LibPriority getLibPriority(const QString &lib);
|
static LibPriority getLibPriority(const QString &lib);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief containsModule This method compare lib name and module of qt.
|
* @brief containsModule This method compare lib name and module of qt.
|
||||||
* @param muduleIndex this is name of module library
|
* @param moduleLibrary this is name of module library
|
||||||
* @param lib This is library name
|
* @param lib This is library name
|
||||||
* @return true if library has some module that as muduleIndex
|
* @return true if library has some module that as muduleIndex
|
||||||
*/
|
*/
|
||||||
@ -236,7 +265,7 @@ public:
|
|||||||
static bool isGui(DeployCore::QtModule module);
|
static bool isGui(DeployCore::QtModule module);
|
||||||
static RunMode getMode();
|
static RunMode getMode();
|
||||||
static void help();
|
static void help();
|
||||||
static QStringList helpKeys();
|
static QuasarAppUtils::OptionsDataList avilableOptions();
|
||||||
|
|
||||||
static QStringList extractTranslation(const QSet<QString> &libs);
|
static QStringList extractTranslation(const QSet<QString> &libs);
|
||||||
static QString getAppVersion();
|
static QString getAppVersion();
|
||||||
@ -262,7 +291,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief getLibCoreName This method remove platfomr specificly prefixes and sufixes of the librarry.
|
* @brief getLibCoreName This method remove platfomr specificly prefixes and sufixes of the librarry.
|
||||||
* Example : getLibCoreName(libTest.so) return Test
|
* Example : getLibCoreName(libTest.so) return Test
|
||||||
* @param baseName This is information about checked library.
|
* @param info This is information about checked library.
|
||||||
* @return return core name of the library.
|
* @return return core name of the library.
|
||||||
*/
|
*/
|
||||||
static QString getLibCoreName(const QFileInfo& info);
|
static QString getLibCoreName(const QFileInfo& info);
|
||||||
@ -282,6 +311,19 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void printInternalError(const char *function, const char* file, int line);
|
static void printInternalError(const char *function, const char* file, int line);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief findItem This method search input file in prefixes and return absolute path to the found file. If file is not exists the return empty string.
|
||||||
|
* @param file This is file path. If the file path si absalute path then return @a file value.
|
||||||
|
* @return file info of the found file.
|
||||||
|
*/
|
||||||
|
static QFileInfo findItem(const QString &file);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getCaseSensitivity This method return case sensitivity for a @a checkedFile. Usually return Qt::CaseSensiativy exept windows binaryes files like a dll and exe.
|
||||||
|
* @param checkedFile This is checked file. By default empty value.
|
||||||
|
* @return Qt CaseSensitivity value
|
||||||
|
*/
|
||||||
|
static Qt::CaseSensitivity getCaseSensitivity(const QString& checkedFile = "");
|
||||||
};
|
};
|
||||||
|
|
||||||
#define internalError() DeployCore::printInternalError(__FUNCTION__, __FILE__, __LINE__)
|
#define internalError() DeployCore::printInternalError(__FUNCTION__, __FILE__, __LINE__)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -148,6 +148,33 @@ void DistroModule::setKey(const QString &key) {
|
|||||||
_key = key;
|
_key = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString &DistroModule::zipOut() const {
|
||||||
|
return _zipOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DistroModule::setZipOut(const QString &newZipOut) {
|
||||||
|
_zipOut = newZipOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &DistroModule::debOut() const {
|
||||||
|
return _debOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DistroModule::setDebOut(const QString &newDebOut) {
|
||||||
|
_debOut = newDebOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString DistroModule::installDirDEB() const {
|
||||||
|
if (_installDirDEB.isEmpty())
|
||||||
|
return "/opt";
|
||||||
|
|
||||||
|
return _installDirDEB;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DistroModule::setInstallDirDEB(const QString &newInstallDir) {
|
||||||
|
_installDirDEB = newInstallDir;
|
||||||
|
}
|
||||||
|
|
||||||
QSet<QString> DistroModule::tr() const {
|
QSet<QString> DistroModule::tr() const {
|
||||||
return _tr;
|
return _tr;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -74,6 +74,33 @@ public:
|
|||||||
void setTr(const QSet<QString> &tr);
|
void setTr(const QSet<QString> &tr);
|
||||||
void addTr(const QString &tr);
|
void addTr(const QString &tr);
|
||||||
|
|
||||||
|
QString installDirDEB() const;
|
||||||
|
void setInstallDirDEB(const QString &newInstallDir);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief debOut This method return output filePath to debian pacakge
|
||||||
|
* @return output filePath to debian pacakge
|
||||||
|
*/
|
||||||
|
const QString &debOut() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setDebOut This method sets new value of debian outpup path.
|
||||||
|
* @param newDebOut This is new value of the debian output
|
||||||
|
*/
|
||||||
|
void setDebOut(const QString &newDebOut);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief debOut This method return output filePath to zip pacakge
|
||||||
|
* @return output filePath to zip pacakge
|
||||||
|
*/
|
||||||
|
const QString &zipOut() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setDebOut This method sets new value of zip outpup path.
|
||||||
|
* @param newDebOut This is new value of the zip output
|
||||||
|
*/
|
||||||
|
void setZipOut(const QString &newZipOut);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setKey(const QString &key);
|
void setKey(const QString &key);
|
||||||
|
|
||||||
@ -101,6 +128,9 @@ private:
|
|||||||
// extra translations
|
// extra translations
|
||||||
QSet<QString> _tr;
|
QSet<QString> _tr;
|
||||||
|
|
||||||
|
QString _installDirDEB;
|
||||||
|
QString _debOut;
|
||||||
|
QString _zipOut;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -55,7 +55,10 @@ bool ELF::getLibInfo(const QString &lib, LibInfo &info) const {
|
|||||||
|
|
||||||
auto headers = reader.readHeaders();
|
auto headers = reader.readHeaders();
|
||||||
|
|
||||||
if (headers.elfmachine == ElfMachine::Elf_EM_ARM) {
|
const int Elf_EM_ARM64 = 0xb7;
|
||||||
|
|
||||||
|
if (headers.elfmachine == ElfMachine::Elf_EM_ARM ||
|
||||||
|
static_cast<int>(headers.elfmachine) == Elf_EM_ARM64 ) {
|
||||||
|
|
||||||
if (headers.elfclass == ElfClass::Elf_ELFCLASS32) {
|
if (headers.elfclass == ElfClass::Elf_ELFCLASS32) {
|
||||||
info.setPlatform(Unix_ARM_32);
|
info.setPlatform(Unix_ARM_32);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -65,7 +65,9 @@ void Envirement::addEnv(const QStringList &listDirs) {
|
|||||||
for (const auto& i : listDirs) {
|
for (const auto& i : listDirs) {
|
||||||
auto path = PathUtils::fixPath(QFileInfo(i).absoluteFilePath());
|
auto path = PathUtils::fixPath(QFileInfo(i).absoluteFilePath());
|
||||||
|
|
||||||
if (_ignoreEnvList && _ignoreEnvList->inThisEnvirement(i)) {
|
if (isIgnore(i)) {
|
||||||
|
QuasarAppUtils::Params::log(QString("The %0 path is ignored and not added to a search list!!").arg(i),
|
||||||
|
QuasarAppUtils::Debug);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,6 +87,10 @@ void Envirement::addEnv(const QStringList &listDirs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Envirement::isIgnore(const QString &path) const {
|
||||||
|
return _ignoreEnvList && _ignoreEnvList->inThisEnvirement(path);
|
||||||
|
}
|
||||||
|
|
||||||
void Envirement::clear() {
|
void Envirement::clear() {
|
||||||
if (_ignoreEnvList)
|
if (_ignoreEnvList)
|
||||||
delete _ignoreEnvList;
|
delete _ignoreEnvList;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -34,6 +34,13 @@ public:
|
|||||||
void addEnv(const QString &dir);
|
void addEnv(const QString &dir);
|
||||||
void addEnv(const QStringList &listDirs);
|
void addEnv(const QStringList &listDirs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief isIgnore This method return true if the @a path is contains in ignore list else return false.
|
||||||
|
* @brief path This is path to of the system enviroment that will be checked to ignore.
|
||||||
|
* @return true if the @a path is contains in ignore list else return false.
|
||||||
|
*/
|
||||||
|
bool isIgnore(const QString& path) const;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// return true if file exits in this envirement
|
// return true if file exits in this envirement
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -10,7 +10,6 @@
|
|||||||
#include "pluginsparser.h"
|
#include "pluginsparser.h"
|
||||||
#include "configparser.h"
|
#include "configparser.h"
|
||||||
#include "metafilemanager.h"
|
#include "metafilemanager.h"
|
||||||
#include "pathutils.h"
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -112,7 +111,15 @@ void Extracter::extractExtraDataTargets() {
|
|||||||
auto &dep = _packageDependencyes[i.key()];
|
auto &dep = _packageDependencyes[i.key()];
|
||||||
const auto extraData = i.value().extraData();
|
const auto extraData = i.value().extraData();
|
||||||
for (const auto &target : extraData) {
|
for (const auto &target : extraData) {
|
||||||
dep.addExtraData(target);
|
|
||||||
|
QFileInfo info = DeployCore::findItem(target);
|
||||||
|
if (!info.exists()) {
|
||||||
|
QuasarAppUtils::Params::log("Failed to copy extra data from: " + target +
|
||||||
|
" Error: target not exists!.", QuasarAppUtils::Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
dep.addExtraData(info.absoluteFilePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -261,12 +268,32 @@ bool Extracter::copyTr() {
|
|||||||
|
|
||||||
const auto trFiles = i->tr();
|
const auto trFiles = i->tr();
|
||||||
for (const auto &tr: trFiles) {
|
for (const auto &tr: trFiles) {
|
||||||
|
|
||||||
|
QFileInfo info(tr);
|
||||||
|
|
||||||
|
if (!info.exists()) {
|
||||||
|
QuasarAppUtils::Params::log("Failed to copy " + info.absoluteFilePath() + ". Not exists",
|
||||||
|
QuasarAppUtils::Warning);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.isDir()) {
|
||||||
|
QDir dir(info.absoluteFilePath());
|
||||||
|
auto availableQm = dir.entryInfoList({"*.qm"}, QDir::Files);
|
||||||
|
for (const auto & trFile : qAsConst(availableQm)) {
|
||||||
|
if (!_fileManager->copyFile(trFile.absoluteFilePath(),
|
||||||
|
cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -382,7 +409,7 @@ void Extracter::extractLib(const QString &file,
|
|||||||
|
|
||||||
for (const auto &line : data.getAllDep()) {
|
for (const auto &line : data.getAllDep()) {
|
||||||
|
|
||||||
if (mask.size() && !line.getName().contains(mask, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (mask.size() && !line.getName().contains(mask, DeployCore::getCaseSensitivity())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,8 +447,8 @@ bool Extracter::extractQml() {
|
|||||||
|
|
||||||
QStringList plugins;
|
QStringList plugins;
|
||||||
QStringList listItems;
|
QStringList listItems;
|
||||||
const auto qmlInput = distro.qmlInput();
|
const auto qmlInputList = distro.qmlInput();
|
||||||
for (const auto &qmlInput: qmlInput) {
|
for (const auto &qmlInput: qmlInputList) {
|
||||||
QFileInfo info(qmlInput);
|
QFileInfo info(qmlInput);
|
||||||
|
|
||||||
if (!info.isDir()) {
|
if (!info.isDir()) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -117,6 +117,9 @@ void FileManager::removeFromDeployed(const QString &path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FileManager::saveDeploymendFiles(const QString& targetDir) {
|
void FileManager::saveDeploymendFiles(const QString& targetDir) {
|
||||||
|
if (targetDir.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
auto settings = QuasarAppUtils::Settings::instance();
|
auto settings = QuasarAppUtils::Settings::instance();
|
||||||
settings->setValue(targetDir, getDeployedFilesStringList());
|
settings->setValue(targetDir, getDeployedFilesStringList());
|
||||||
}
|
}
|
||||||
@ -175,7 +178,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
|||||||
bool copy = !masks;
|
bool copy = !masks;
|
||||||
if (masks) {
|
if (masks) {
|
||||||
for (const auto &mask : qAsConst(*masks)) {
|
for (const auto &mask : qAsConst(*masks)) {
|
||||||
if (info.absoluteFilePath().contains(mask, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (info.absoluteFilePath().contains(mask, DeployCore::getCaseSensitivity())) {
|
||||||
copy = true;
|
copy = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -260,7 +263,7 @@ bool FileManager::smartCopyFile(const QString &file,
|
|||||||
bool ifFileTarget) {
|
bool ifFileTarget) {
|
||||||
auto config = DeployCore::_config;
|
auto config = DeployCore::_config;
|
||||||
|
|
||||||
if (file.contains(config->getTargetDir(), ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (file.contains(config->getTargetDir(), DeployCore::getCaseSensitivity())) {
|
||||||
if (!moveFile(file, target, mask)) {
|
if (!moveFile(file, target, mask)) {
|
||||||
QuasarAppUtils::Params::log("Failed to move the file. Trying to copy it");
|
QuasarAppUtils::Params::log("Failed to move the file. Trying to copy it");
|
||||||
|
|
||||||
@ -306,7 +309,7 @@ bool FileManager::copyFolder(const QString &from,
|
|||||||
if (!force) {
|
if (!force) {
|
||||||
QString skipFilter = "";
|
QString skipFilter = "";
|
||||||
for (const auto &i: filter) {
|
for (const auto &i: filter) {
|
||||||
if (item.fileName().contains(i, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (item.fileName().contains(i, DeployCore::getCaseSensitivity())) {
|
||||||
skipFilter = i;
|
skipFilter = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -493,7 +496,7 @@ bool FileManager::copyFiles(const QStringList &source,
|
|||||||
|
|
||||||
QString skipFilter = "";
|
QString skipFilter = "";
|
||||||
for (const auto &i: filter) {
|
for (const auto &i: filter) {
|
||||||
if (info.fileName().contains(i, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (info.fileName().contains(i, DeployCore::getCaseSensitivity())) {
|
||||||
skipFilter = i;
|
skipFilter = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2021-2021 QuasarApp.
|
//# Copyright (C) 2021-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2021-2021 QuasarApp.
|
//# Copyright (C) 2021-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -27,7 +27,7 @@ void IgnoreRule::addRule(const IgnoreData &rule) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IgnoreRule::check(const LibInfo &info, const QString& ignoreLabel) const {
|
bool IgnoreRule::check(const LibInfo &info, const QString& ignoreLabel) const {
|
||||||
if (info.fullPath().contains(ignoreLabel, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (info.fullPath().contains(ignoreLabel, DeployCore::getCaseSensitivity())) {
|
||||||
QuasarAppUtils::Params::log(info.fullPath() + " ignored by filter" + ignoreLabel);
|
QuasarAppUtils::Params::log(info.fullPath() + " ignored by filter" + ignoreLabel);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -104,7 +104,7 @@ void LibInfo::setWinApi(WinAPI winApi) {
|
|||||||
|
|
||||||
QtMajorVersion LibInfo::isDependetOfQt() const {
|
QtMajorVersion LibInfo::isDependetOfQt() const {
|
||||||
for (const auto& i : _dependncies) {
|
for (const auto& i : _dependncies) {
|
||||||
if (QtMajorVersion result = DeployCore::isQtLib(i)) {
|
if (QtMajorVersion result = DeployCore::isQtLibName(i)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,6 +112,23 @@ QtMajorVersion LibInfo::isDependetOfQt() const {
|
|||||||
return QtMajorVersion::NoQt;
|
return QtMajorVersion::NoQt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString LibInfo::toString() const {
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
QStringList dependenciesList = _dependncies.toList();
|
||||||
|
#else
|
||||||
|
QStringList dependenciesList{_dependncies.begin(), _dependncies.end()};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return QString("LibInfo: path: '%0', name: '%1', qtPath: '%2', platform: '%3', dependencies: '%4'").
|
||||||
|
arg(_path,
|
||||||
|
_name,
|
||||||
|
_qtPath,
|
||||||
|
DeployCore::platformToString(_platform),
|
||||||
|
dependenciesList.join(", "));
|
||||||
|
}
|
||||||
|
|
||||||
QString LibInfo::fullPath() const {
|
QString LibInfo::fullPath() const {
|
||||||
return _path + "/" + _name;
|
return _path + "/" + _name;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -48,6 +48,8 @@ public:
|
|||||||
void setWinApi(WinAPI winApi);
|
void setWinApi(WinAPI winApi);
|
||||||
QtMajorVersion isDependetOfQt() const;
|
QtMajorVersion isDependetOfQt() const;
|
||||||
|
|
||||||
|
QString toString() const;
|
||||||
|
|
||||||
friend class DependenciesScanner;
|
friend class DependenciesScanner;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -27,46 +27,15 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) {
|
|||||||
QFileInfo targetInfo(target);
|
QFileInfo targetInfo(target);
|
||||||
|
|
||||||
QString content;
|
QString content;
|
||||||
auto runScript = cnf->getRunScript(targetInfo.fileName());
|
auto runScript = targetinfo.getRunScript();
|
||||||
if (runScript.size()) {
|
|
||||||
QFile script(runScript);
|
QFile script(runScript);
|
||||||
if (!script.open(QIODevice::ReadOnly)) {
|
if (!script.open(QIODevice::ReadOnly)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
content = script.readAll();
|
content = script.readAll();
|
||||||
script.close();
|
script.close();
|
||||||
|
replace(toReplace(target, distro), content);
|
||||||
} else {
|
|
||||||
|
|
||||||
bool fGui = DeployCore::isGui(_mudulesMap.value(target));
|
|
||||||
auto systemLibsDir = distro.getLibOutDir() + DeployCore::systemLibsFolderName();
|
|
||||||
|
|
||||||
content =
|
|
||||||
"@echo off \n"
|
|
||||||
"SET BASE_DIR=%~dp0\n"
|
|
||||||
"SET PATH=%BASE_DIR%" + distro.getLibOutDir() + ";%PATH%;" + systemLibsDir + "\n"
|
|
||||||
"SET CQT_PKG_ROOT=%BASE_DIR%\n"
|
|
||||||
"SET CQT_RUN_FILE=%BASE_DIR%%0.bat\n"
|
|
||||||
|
|
||||||
"%3\n";
|
|
||||||
|
|
||||||
// Run application as invoke of the console for consle applications
|
|
||||||
// And run gui applciation in the detached mode.
|
|
||||||
if (fGui) {
|
|
||||||
content += "start \"%0\" %4 \"%BASE_DIR%" + distro.getBinOutDir() + "%1\" %2 \n";
|
|
||||||
} else {
|
|
||||||
content += "call \"%BASE_DIR%" + distro.getBinOutDir() + "%1\" %2 \n";
|
|
||||||
}
|
|
||||||
|
|
||||||
content = content.arg(targetInfo.baseName(), targetInfo.fileName(), "%*",
|
|
||||||
generateCustoScriptBlok(true)); // %0 %1 %2 %3
|
|
||||||
|
|
||||||
content = QDir::toNativeSeparators(content);
|
|
||||||
|
|
||||||
if (fGui) {
|
|
||||||
content = content.arg("/B"); // %4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".bat";
|
QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".bat";
|
||||||
|
|
||||||
@ -90,6 +59,7 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) {
|
|||||||
|
|
||||||
bool MetaFileManager::createRunScriptLinux(const QString &target) {
|
bool MetaFileManager::createRunScriptLinux(const QString &target) {
|
||||||
auto cnf = DeployCore::_config;
|
auto cnf = DeployCore::_config;
|
||||||
|
auto targetinfo = cnf->targets().value(target);
|
||||||
|
|
||||||
if (!cnf->targets().contains(target)) {
|
if (!cnf->targets().contains(target)) {
|
||||||
return false;
|
return false;
|
||||||
@ -99,48 +69,15 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) {
|
|||||||
QFileInfo targetInfo(target);
|
QFileInfo targetInfo(target);
|
||||||
|
|
||||||
QString content;
|
QString content;
|
||||||
auto runScript = cnf->getRunScript(targetInfo.fileName());
|
auto runScript = targetinfo.getRunScript();
|
||||||
if (runScript.size()) {
|
|
||||||
QFile script(runScript);
|
QFile script(runScript);
|
||||||
if (!script.open(QIODevice::ReadOnly)) {
|
if (!script.open(QIODevice::ReadOnly)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
content = script.readAll();
|
content = script.readAll();
|
||||||
script.close();
|
script.close();
|
||||||
|
replace(toReplace(target, distro), content);
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
auto systemLibsDir = distro.getLibOutDir() + DeployCore::systemLibsFolderName();
|
|
||||||
|
|
||||||
content =
|
|
||||||
"#!/bin/sh\n"
|
|
||||||
"BASE_DIR=$(dirname \"$(readlink -f \"$0\")\")\n"
|
|
||||||
"export "
|
|
||||||
"LD_LIBRARY_PATH=\"$BASE_DIR\"" + distro.getLibOutDir() +
|
|
||||||
":\"$BASE_DIR\":$LD_LIBRARY_PATH:\"$BASE_DIR\"" + systemLibsDir + "\n"
|
|
||||||
"export QML_IMPORT_PATH=\"$BASE_DIR\"" + distro.getQmlOutDir() + ":$QML_IMPORT_PATH\n"
|
|
||||||
"export QML2_IMPORT_PATH=\"$BASE_DIR\"" + distro.getQmlOutDir() + ":$QML2_IMPORT_PATH\n"
|
|
||||||
"export QT_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + ":$QT_PLUGIN_PATH\n"
|
|
||||||
"export QTWEBENGINEPROCESS_PATH=\"$BASE_DIR\"" + distro.getBinOutDir() + "QtWebEngineProcess\n"
|
|
||||||
"export QTDIR=\"$BASE_DIR\"\n"
|
|
||||||
"export CQT_PKG_ROOT=\"$BASE_DIR\"\n"
|
|
||||||
"export CQT_RUN_FILE=\"$BASE_DIR/%2\"\n"
|
|
||||||
|
|
||||||
"export "
|
|
||||||
"QT_QPA_PLATFORM_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() +
|
|
||||||
"platforms:$QT_QPA_PLATFORM_PLUGIN_PATH\n"
|
|
||||||
""
|
|
||||||
"%1\n"
|
|
||||||
"\"$BASE_DIR" + distro.getBinOutDir() + "%0\" \"$@\"\n";
|
|
||||||
|
|
||||||
content = content.arg(targetInfo.fileName()); // %0
|
|
||||||
|
|
||||||
content = content.arg(generateCustoScriptBlok(false),
|
|
||||||
targetInfo.baseName()+ ".sh"); // %1 %2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".sh";
|
QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".sh";
|
||||||
|
|
||||||
@ -163,6 +100,7 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString MetaFileManager::generateCustoScriptBlok(bool bat) const {
|
QString MetaFileManager::generateCustoScriptBlok(bool bat) const {
|
||||||
|
|
||||||
QString res = "";
|
QString res = "";
|
||||||
|
|
||||||
QString commentMarker = "# ";
|
QString commentMarker = "# ";
|
||||||
@ -172,6 +110,7 @@ QString MetaFileManager::generateCustoScriptBlok(bool bat) const {
|
|||||||
|
|
||||||
auto cstSh = QuasarAppUtils::Params::getArg("customScript", "");
|
auto cstSh = QuasarAppUtils::Params::getArg("customScript", "");
|
||||||
if (cstSh.size()) {
|
if (cstSh.size()) {
|
||||||
|
|
||||||
res = "\n" +
|
res = "\n" +
|
||||||
commentMarker + "Begin Custom Script (generated by customScript flag)\n"
|
commentMarker + "Begin Custom Script (generated by customScript flag)\n"
|
||||||
"%0\n" +
|
"%0\n" +
|
||||||
@ -248,12 +187,64 @@ bool MetaFileManager::createQConf(const QString &target) {
|
|||||||
QFileDevice::ReadOwner);
|
QFileDevice::ReadOwner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QHash<QString, QString> MetaFileManager::toReplace(const QString& target,
|
||||||
|
const DistroModule& distro) const {
|
||||||
|
QFileInfo targetInfo(target);
|
||||||
|
|
||||||
|
QHash<QString, QString> result = {
|
||||||
|
{"CQT_BIN_PATH", QDir::toNativeSeparators(distro.getBinOutDir())},
|
||||||
|
{"CQT_LIB_PATH", QDir::toNativeSeparators(distro.getLibOutDir())},
|
||||||
|
{"CQT_QML_PATH", QDir::toNativeSeparators(distro.getQmlOutDir())},
|
||||||
|
{"CQT_PLUGIN_PATH", QDir::toNativeSeparators(distro.getPluginsOutDir())},
|
||||||
|
{"CQT_SYSTEM_LIB_PATH", QDir::toNativeSeparators(distro.getLibOutDir() + DeployCore::systemLibsFolderName())},
|
||||||
|
{"CQT_BASE_NAME", QDir::toNativeSeparators(targetInfo.baseName())}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool fGui = DeployCore::isGui(_mudulesMap.value(target));
|
||||||
|
|
||||||
|
|
||||||
|
if (targetInfo.completeSuffix().compare("exe", Qt::CaseInsensitive) == 0) {
|
||||||
|
result.insert("CQT_CUSTOM_SCRIPT_BLOCK", generateCustoScriptBlok(true));
|
||||||
|
|
||||||
|
// Run application as invoke of the console for consle applications
|
||||||
|
// And run gui applciation in the detached mode.
|
||||||
|
QString runCmd;
|
||||||
|
if (fGui) {
|
||||||
|
runCmd = "start \"" + targetInfo.baseName() + "\" %0 " +
|
||||||
|
"\"%BASE_DIR%" + distro.getBinOutDir() + targetInfo.fileName() + "\" %*";
|
||||||
|
runCmd = QDir::toNativeSeparators(runCmd).arg("/B");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
runCmd = "call \"%BASE_DIR%" + distro.getBinOutDir() + targetInfo.fileName() + "\" %*";
|
||||||
|
runCmd = QDir::toNativeSeparators(runCmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
result.insert("CQT_RUN_COMMAND", runCmd);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
result.insert("CQT_CUSTOM_SCRIPT_BLOCK", generateCustoScriptBlok(false));
|
||||||
|
|
||||||
|
QString runCmd = "\"$BASE_DIR" + distro.getBinOutDir() + targetInfo.fileName() + "\" \"$@\" ";
|
||||||
|
|
||||||
|
result.insert("CQT_RUN_COMMAND", QDir::toNativeSeparators(runCmd));
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MetaFileManager::replace(const QHash<QString, QString> &map, QString &content) {
|
||||||
|
for (auto it = map.begin(); it != map.end(); ++it) {
|
||||||
|
content = content.replace(it.key(), it.value());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void MetaFileManager::createRunMetaFiles(const QHash<QString, DeployCore::QtModule>& modulesMap) {
|
void MetaFileManager::createRunMetaFiles(const QHash<QString, DeployCore::QtModule>& modulesMap) {
|
||||||
|
|
||||||
_mudulesMap = modulesMap;
|
_mudulesMap = modulesMap;
|
||||||
for (auto i = DeployCore::_config->targets().cbegin(); i != DeployCore::_config->targets().cend(); ++i) {
|
for (auto i = DeployCore::_config->targets().cbegin(); i != DeployCore::_config->targets().cend(); ++i) {
|
||||||
|
|
||||||
if (!createRunScript(i.key())) {
|
if (i.value().fEnableRunScript() && !createRunScript(i.key())) {
|
||||||
QuasarAppUtils::Params::log("Failed to create a run script: " + i.key(),
|
QuasarAppUtils::Params::log("Failed to create a run script: " + i.key(),
|
||||||
QuasarAppUtils::Error);
|
QuasarAppUtils::Error);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -12,6 +12,8 @@
|
|||||||
#include <deploycore.h>
|
#include <deploycore.h>
|
||||||
|
|
||||||
class FileManager;
|
class FileManager;
|
||||||
|
class DistroModule;
|
||||||
|
class TargetInfo;
|
||||||
|
|
||||||
class MetaFileManager
|
class MetaFileManager
|
||||||
{
|
{
|
||||||
@ -32,6 +34,11 @@ private:
|
|||||||
|
|
||||||
bool createQConf(const QString &target);
|
bool createQConf(const QString &target);
|
||||||
|
|
||||||
|
QHash<QString, QString> toReplace(const QString &target,
|
||||||
|
const DistroModule &distro) const;
|
||||||
|
|
||||||
|
void replace(const QHash<QString, QString>& map, QString& content);
|
||||||
|
|
||||||
FileManager* _fileManager = nullptr;
|
FileManager* _fileManager = nullptr;
|
||||||
QHash<QString, DeployCore::QtModule> _mudulesMap;
|
QHash<QString, DeployCore::QtModule> _mudulesMap;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -306,5 +306,5 @@ void Packing::handleOutputUpdate() {
|
|||||||
|
|
||||||
if (erroutLog.size())
|
if (erroutLog.size())
|
||||||
QuasarAppUtils::Params::log(erroutLog,
|
QuasarAppUtils::Params::log(erroutLog,
|
||||||
QuasarAppUtils::Info);
|
QuasarAppUtils::Error);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -11,15 +11,18 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <pe-parse/parse.h>
|
|
||||||
#include <quasarapp.h>
|
#include <quasarapp.h>
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#ifndef DISABLE_PE
|
||||||
|
#include <pe-parse/parse.h>
|
||||||
|
|
||||||
namespace peparse {
|
namespace peparse {
|
||||||
|
|
||||||
class section;
|
class section;
|
||||||
|
|
||||||
|
|
||||||
struct importent {
|
struct importent {
|
||||||
VA addr;
|
VA addr;
|
||||||
std::string symbolName;
|
std::string symbolName;
|
||||||
@ -63,6 +66,7 @@ bool PE::getDep(peparse::parsed_pe_internal * internal, LibInfo &res) const {
|
|||||||
|
|
||||||
return res.getDependncies().size() || !imports.size();
|
return res.getDependncies().size() || !imports.size();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QHash<WinAPI, QSet<QString> > PE::getWinAPI() const {
|
QHash<WinAPI, QSet<QString> > PE::getWinAPI() const {
|
||||||
return _winAPI;
|
return _winAPI;
|
||||||
@ -110,6 +114,7 @@ PE::PE(): IGetLibInfo () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
||||||
|
#ifndef DISABLE_PE
|
||||||
auto parsedPeLib = peparse::ParsePEFromFile(lib.toLatin1());
|
auto parsedPeLib = peparse::ParsePEFromFile(lib.toLatin1());
|
||||||
|
|
||||||
if (!parsedPeLib)
|
if (!parsedPeLib)
|
||||||
@ -155,6 +160,11 @@ bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
|||||||
|
|
||||||
|
|
||||||
return info.isValid();
|
return info.isValid();
|
||||||
|
#else
|
||||||
|
Q_UNUSED(lib)
|
||||||
|
Q_UNUSED(info)
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PE::~PE(){
|
PE::~PE(){
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -37,6 +37,7 @@ static const PluginModuleMapping pluginModuleMappings[] =
|
|||||||
{"mediaservice", DeployCore::QtModule::QtMultimediaModule},
|
{"mediaservice", DeployCore::QtModule::QtMultimediaModule},
|
||||||
{"playlistformats", DeployCore::QtModule::QtMultimediaModule},
|
{"playlistformats", DeployCore::QtModule::QtMultimediaModule},
|
||||||
{"bearer", DeployCore::QtModule::QtNetworkModule},
|
{"bearer", DeployCore::QtModule::QtNetworkModule},
|
||||||
|
{"tls", DeployCore::QtModule::QtNetworkModule},
|
||||||
{"position", DeployCore::QtModule::QtPositioningModule},
|
{"position", DeployCore::QtModule::QtPositioningModule},
|
||||||
{"printsupport", DeployCore::QtModule::QtPrintSupportModule},
|
{"printsupport", DeployCore::QtModule::QtPrintSupportModule},
|
||||||
{"scenegraph", DeployCore::QtModule::QtQuickModule},
|
{"scenegraph", DeployCore::QtModule::QtQuickModule},
|
||||||
@ -162,7 +163,7 @@ void PluginsParser::addPlugins(const QStringList& list, const QString& package,
|
|||||||
QHash<QString, QSet<QString>>& container) {
|
QHash<QString, QSet<QString>>& container) {
|
||||||
const DeployConfig* cnf = DeployCore::_config;
|
const DeployConfig* cnf = DeployCore::_config;
|
||||||
|
|
||||||
for (const auto plugin: list) {
|
for (const auto &plugin: qAsConst(list)) {
|
||||||
if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) {
|
if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) {
|
||||||
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -86,11 +86,11 @@ bool QtDir::isQt(QString path) const {
|
|||||||
path = PathUtils::fixPath(path);
|
path = PathUtils::fixPath(path);
|
||||||
|
|
||||||
return
|
return
|
||||||
(!libs.isEmpty() && path.contains(libs, ONLY_WIN_CASE_INSENSIATIVE)) ||
|
(!libs.isEmpty() && path.contains(libs, DeployCore::getCaseSensitivity())) ||
|
||||||
(!bins.isEmpty() && path.contains(bins, ONLY_WIN_CASE_INSENSIATIVE)) ||
|
(!bins.isEmpty() && path.contains(bins, DeployCore::getCaseSensitivity())) ||
|
||||||
(!libexecs.isEmpty() && path.contains(libexecs, ONLY_WIN_CASE_INSENSIATIVE)) ||
|
(!libexecs.isEmpty() && path.contains(libexecs, DeployCore::getCaseSensitivity())) ||
|
||||||
(!plugins.isEmpty() && path.contains(plugins, ONLY_WIN_CASE_INSENSIATIVE)) ||
|
(!plugins.isEmpty() && path.contains(plugins, DeployCore::getCaseSensitivity())) ||
|
||||||
(!qmls.isEmpty() && path.contains(qmls, ONLY_WIN_CASE_INSENSIATIVE)) ||
|
(!qmls.isEmpty() && path.contains(qmls, DeployCore::getCaseSensitivity())) ||
|
||||||
(!translations.isEmpty() && path.contains(translations, ONLY_WIN_CASE_INSENSIATIVE)) ||
|
(!translations.isEmpty() && path.contains(translations, DeployCore::getCaseSensitivity())) ||
|
||||||
(!resources.isEmpty() && path.contains(resources, ONLY_WIN_CASE_INSENSIATIVE));
|
(!resources.isEmpty() && path.contains(resources, DeployCore::getCaseSensitivity()));
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,26 +1,28 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
//#
|
//#
|
||||||
|
|
||||||
#include "targetinfo.h"
|
#include "targetinfo.h"
|
||||||
|
#include "deploycore.h"
|
||||||
|
#include "deployconfig.h"
|
||||||
|
|
||||||
TargetInfo::TargetInfo() {
|
TargetInfo::TargetInfo() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TargetInfo::getPackage() const {
|
const QString & TargetInfo::getPackage() const {
|
||||||
return package;
|
return _package;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TargetInfo::setPackage(const QString &value) {
|
void TargetInfo::setPackage(const QString &value) {
|
||||||
package = value;
|
_package = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TargetInfo::getIcon() const {
|
QString TargetInfo::getIcon() const {
|
||||||
if (icon.isEmpty()) {
|
if (_icon.isEmpty()) {
|
||||||
QFileInfo info(getName());
|
QFileInfo info(getName());
|
||||||
if (info.suffix() == "exe") {
|
if (info.suffix() == "exe") {
|
||||||
return ":/shared/Distributions/Templates/Icon.ico";
|
return ":/shared/Distributions/Templates/Icon.ico";
|
||||||
@ -30,11 +32,74 @@ QString TargetInfo::getIcon() const {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return icon;
|
return _icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TargetInfo::setIcon(const QString &value) {
|
void TargetInfo::setIcon(const QString &value) {
|
||||||
icon = value;
|
_icon = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TargetInfo::getShortCut() const {
|
||||||
|
QFileInfo info(fullPath());
|
||||||
|
QString compleSufix = info.completeSuffix();
|
||||||
|
|
||||||
|
bool defaultRule = compleSufix.compare("exe", Qt::CaseInsensitive) == 0 || compleSufix.isEmpty();
|
||||||
|
|
||||||
|
return _fEnableShortCut && defaultRule;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TargetInfo::setShortCut(bool shortcut) {
|
||||||
|
_fEnableShortCut = shortcut;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TargetInfo::disableShortCut() {
|
||||||
|
setShortCut(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString TargetInfo::getRunScript() const {
|
||||||
|
if (_runScript.isEmpty()) {
|
||||||
|
QFileInfo info(getName());
|
||||||
|
if (info.suffix() == "exe") {
|
||||||
|
return ":/Scripts/ScriptsTemplates/windows.bat";
|
||||||
|
}
|
||||||
|
|
||||||
|
return ":/Scripts/ScriptsTemplates/linux.sh";
|
||||||
|
}
|
||||||
|
|
||||||
|
return _runScript;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TargetInfo::setRunScript(const QString &newRunScript) {
|
||||||
|
_runScript = newRunScript;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString TargetInfo::getRunScriptFile() const {
|
||||||
|
|
||||||
|
if (fEnableRunScript()) {
|
||||||
|
QFileInfo runscriptInfo(getRunScript());
|
||||||
|
QFileInfo info(getName());
|
||||||
|
|
||||||
|
return info.baseName() + "." + runscriptInfo.completeSuffix();
|
||||||
|
}
|
||||||
|
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TargetInfo::fEnableRunScript() const {
|
||||||
|
QFileInfo info(fullPath());
|
||||||
|
QString compleSufix = info.completeSuffix();
|
||||||
|
|
||||||
|
bool defaultRule = compleSufix.compare("exe", Qt::CaseInsensitive) == 0 || compleSufix.isEmpty();
|
||||||
|
|
||||||
|
return _fEnableRunScript && defaultRule;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TargetInfo::setFEnableRunScript(bool newFEnableRunScript) {
|
||||||
|
_fEnableRunScript = newFEnableRunScript;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TargetInfo::disableRunScript() {
|
||||||
|
setFEnableRunScript(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//#
|
//#
|
||||||
//# Copyright (C) 2018-2021 QuasarApp.
|
//# Copyright (C) 2018-2022 QuasarApp.
|
||||||
//# Distributed under the lgplv3 software license, see the accompanying
|
//# Distributed under the lgplv3 software license, see the accompanying
|
||||||
//# Everyone is permitted to copy and distribute verbatim copies
|
//# Everyone is permitted to copy and distribute verbatim copies
|
||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
@ -11,20 +11,101 @@
|
|||||||
#include "distrostruct.h"
|
#include "distrostruct.h"
|
||||||
#include "libinfo.h"
|
#include "libinfo.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The TargetInfo class This clas scontains information about target object. (executable or another files marked in a bin option)
|
||||||
|
*/
|
||||||
class DEPLOYSHARED_EXPORT TargetInfo: public LibInfo
|
class DEPLOYSHARED_EXPORT TargetInfo: public LibInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TargetInfo();
|
TargetInfo();
|
||||||
|
|
||||||
QString getPackage() const;
|
/**
|
||||||
|
* @brief getPackage This method return name of the package in that contains this target.
|
||||||
|
* @return name of the package in that contains this target.
|
||||||
|
*/
|
||||||
|
const QString & getPackage() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setPackage This method sets new value for pacakge name in that contains this target.
|
||||||
|
* @param value new This is new value of the pacakge.
|
||||||
|
*/
|
||||||
void setPackage(const QString &value);
|
void setPackage(const QString &value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getIcon This method return path to default icon of the target.
|
||||||
|
* @return icon path.
|
||||||
|
* @note if the icon not set then return default icon.
|
||||||
|
*/
|
||||||
QString getIcon() const;
|
QString getIcon() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setIcon This method sets new iconf for target.
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
void setIcon(const QString &value);
|
void setIcon(const QString &value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getShortCut This method return true if the target need to create shortcut.
|
||||||
|
* @return true if shortcut needed for this target.
|
||||||
|
*/
|
||||||
|
bool getShortCut() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setShortCut This method sets new status of the creating shortcut.
|
||||||
|
* @param shortcut This is new value of the shortcut
|
||||||
|
*/
|
||||||
|
void setShortCut(bool shortcut);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief disableShortCut This method disable shortcut for this target.
|
||||||
|
*/
|
||||||
|
void disableShortCut();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getRunScript This method return path to run script.
|
||||||
|
* @return path to run script
|
||||||
|
* @note By Default return path to default run scrip file from cqtdeployer resources.
|
||||||
|
*/
|
||||||
|
QString getRunScript() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setRunScript sets New path of the run script.
|
||||||
|
* @param newRunScript This is new path of the run sscript.
|
||||||
|
*/
|
||||||
|
void setRunScript(const QString &newRunScript);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getRunScriptFile This method return name fo the run script file or executable file if the run script are not needed
|
||||||
|
* @return runscript name
|
||||||
|
*/
|
||||||
|
QString getRunScriptFile() const;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief fEnableRunScript This return true if the run script will be generateed for this target else false.
|
||||||
|
* @return true if the run script will be generateed for this target else false.
|
||||||
|
*/
|
||||||
|
bool fEnableRunScript() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief setFEnableRunScript This method enable or disable generation runScript.
|
||||||
|
* @param newFEnableRunScript New value.
|
||||||
|
*/
|
||||||
|
void setFEnableRunScript(bool newFEnableRunScript);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief disableRunScript This method disable run script for this target.
|
||||||
|
*/
|
||||||
|
void disableRunScript();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString package = "";
|
QString _package = "";
|
||||||
QString icon = "";
|
QString _icon = "";
|
||||||
};
|
bool _fEnableShortCut = true;
|
||||||
|
bool _fEnableRunScript = true;
|
||||||
|
|
||||||
|
QString _runScript = "";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
#endif // TARGETINFO_H
|
#endif // TARGETINFO_H
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -30,7 +30,7 @@ message(DEPLOYER = $$DEPLOYER)
|
|||||||
BINARY_LIST
|
BINARY_LIST
|
||||||
REPO_LIST
|
REPO_LIST
|
||||||
|
|
||||||
sopprted_versions = 4.1 4.0 3.2 3.1 3.0
|
sopprted_versions = 4.5 4.4 4.3 4.2 4.1 4.0 3.2 3.1 3.0
|
||||||
for(val, sopprted_versions) {
|
for(val, sopprted_versions) {
|
||||||
|
|
||||||
exists( $$QT_DIR/../../../Tools/QtInstallerFramework/$$val/bin/ ) {
|
exists( $$QT_DIR/../../../Tools/QtInstallerFramework/$$val/bin/ ) {
|
||||||
@ -41,19 +41,24 @@ for(val, sopprted_versions) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isEmpty (BINARY_LIST) {
|
isEmpty (BINARY_LIST) {
|
||||||
error( "QtInstallerFramework not found!" )
|
warning( "QtInstallerFramework not found! use binaries from PATH." )
|
||||||
}
|
EXEC=binarycreator
|
||||||
|
REPOGEN=repogen
|
||||||
|
|
||||||
win32:EXEC=$$first(BINARY_LIST).exe
|
} else: {
|
||||||
win32:REPOGEN=$$first(REPO_LIST).exe
|
win32:EXEC=$$first(BINARY_LIST).exe
|
||||||
|
win32:REPOGEN=$$first(REPO_LIST).exe
|
||||||
|
|
||||||
contains(QMAKE_HOST.os, Linux):{
|
contains(QMAKE_HOST.os, Linux):{
|
||||||
unix:EXEC=$$first(BINARY_LIST)
|
unix:EXEC=$$first(BINARY_LIST)
|
||||||
win32:EXEC=wine $$first(BINARY_LIST).exe
|
win32:EXEC=wine $$first(BINARY_LIST).exe
|
||||||
|
|
||||||
REPOGEN=$$first(REPO_LIST)
|
REPOGEN=$$first(REPO_LIST)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
message( selected $$EXEC and $$REPOGEN)
|
message( selected $$EXEC and $$REPOGEN)
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ unix: PLATFORM = linux
|
|||||||
win32:PY = python
|
win32:PY = python
|
||||||
unix: PY = python3
|
unix: PY = python3
|
||||||
|
|
||||||
qif.commands= $$PY $$PWD/scripts/QIF.py $$PLATFORM 4.1 $$PWD/packages/QIF/data
|
qif.commands= $$PY $$PWD/scripts/QIF.py $$PLATFORM 4.4 $$PWD/packages/QIF/data
|
||||||
alias.commands= $$PY $$PWD/scripts/alias.py
|
alias.commands= $$PY $$PWD/scripts/alias.py
|
||||||
|
|
||||||
!isEmpty( ONLINE ) {
|
!isEmpty( ONLINE ) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
||||||
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
||||||
<Name>CQtDeployer</Name>
|
<Name>CQtDeployer</Name>
|
||||||
<Version>1.5.0.36</Version>
|
<Version>1.5.4.17</Version>
|
||||||
<Title>CQtDeployer</Title>
|
<Title>CQtDeployer</Title>
|
||||||
<Publisher>QuasarApp</Publisher>
|
<Publisher>QuasarApp</Publisher>
|
||||||
<StartMenuDir>CQtDeployer</StartMenuDir>
|
<StartMenuDir>CQtDeployer</StartMenuDir>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
||||||
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
||||||
<Name>CQtDeployer</Name>
|
<Name>CQtDeployer</Name>
|
||||||
<Version>1.5.0.36</Version>
|
<Version>1.5.4.17</Version>
|
||||||
<Title>CQtDeployer</Title>
|
<Title>CQtDeployer</Title>
|
||||||
<Publisher>QuasarApp</Publisher>
|
<Publisher>QuasarApp</Publisher>
|
||||||
<StartMenuDir>CQtDeployer</StartMenuDir>
|
<StartMenuDir>CQtDeployer</StartMenuDir>
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
|
VERSION = 1.5.4.17
|
||||||
|
|
||||||
include($$PWD/InstallerBase.pri);
|
include($$PWD/InstallerBase.pri);
|
||||||
mkpath( $$PWD/../Distro)
|
mkpath( $$PWD/../Distro)
|
||||||
win32:OUT_FILE = CQtDeployerInstaller.exe
|
|
||||||
unix:OUT_FILE = CQtDeployerInstaller.run
|
|
||||||
|
|
||||||
win32:OUT_FILE_OFF = CQtDeployerOfflineInstaller.exe
|
message(QMAKE_HOST.arch = $$QMAKE_HOST.arch)
|
||||||
unix:OUT_FILE_OFF = CQtDeployerOfflineInstaller.run
|
|
||||||
|
win32:OUT_FILE = CQtDeployer_'$$VERSION'_Installer_Win'_$$QMAKE_HOST.arch'.exe
|
||||||
|
unix:OUT_FILE = CQtDeployer_'$$VERSION'_Installer_Linux'_$$QMAKE_HOST.arch'.run
|
||||||
|
|
||||||
|
win32:OUT_FILE_OFF = CQtDeployer_'$$VERSION'_OfflineInstaller_Win'_$$QMAKE_HOST.arch'.exe
|
||||||
|
unix:OUT_FILE_OFF = CQtDeployer_'$$VERSION'_OfflineInstaller_Linux'_$$QMAKE_HOST.arch'.run
|
||||||
|
|
||||||
DEPLOY_TARGET = $$PWD/../CQtDeployer/build/release
|
DEPLOY_TARGET = $$PWD/../CQtDeployer/build/release
|
||||||
|
|
||||||
@ -14,13 +19,13 @@ META_DIR = $$PWD/packages/cqtdeployer.1_5/meta/
|
|||||||
win32:OUT_LIB= -libOut lib
|
win32:OUT_LIB= -libOut lib
|
||||||
win32:OUT_BIN= -binOut bin
|
win32:OUT_BIN= -binOut bin
|
||||||
|
|
||||||
BASE_DEPLOY_FLAGS = clear -qmake $$QMAKE_BIN -libDir $$PWD/../ -recursiveDepth 4 -ignoreEnv $$DEPLOY_TARGET
|
BASE_DEPLOY_FLAGS = clear -qmake $$QMAKE_BIN -libDir $$PWD/../ -recursiveDepth 4 -ignoreEnv $$DEPLOY_TARGET -extraLibs icu
|
||||||
BASE_DEPLOY_FLAGS_CQT = $$BASE_DEPLOY_FLAGS -targetDir $$DATA_DIR $$OUT_LIB $$OUT_BIN
|
BASE_DEPLOY_FLAGS_CQT = $$BASE_DEPLOY_FLAGS -targetDir $$DATA_DIR $$OUT_LIB $$OUT_BIN
|
||||||
|
|
||||||
|
|
||||||
win32:CQT_ICON = -icon $$PWD/config/icon.ico
|
win32:CQT_ICON = -icon $$PWD/config/icon.ico
|
||||||
unix:CQT_ICON = -icon $$PWD/config/logo.png
|
unix:CQT_ICON = -icon $$PWD/config/logo.png
|
||||||
BASE_DEPLOY_FLAGS_DEB = $$BASE_DEPLOY_FLAGS -targetDir $$PWD/../Distro $$OUT_LIB $$OUT_BIN deb zip -name CQtDeployer -publisher QuasarApp $$CQT_ICON -deployVersion 1.5.0.34
|
BASE_DEPLOY_FLAGS_DEB = $$BASE_DEPLOY_FLAGS -targetDir $$PWD/../Distro $$OUT_LIB $$OUT_BIN deb zip -name CQtDeployer -publisher QuasarApp $$CQT_ICON -deployVersion 1.5.4.17 -debOut CQtDeployer_'$$VERSION'_Linux'_$$QMAKE_HOST.arch'.deb -zipOut CQtDeployer_'$$VERSION'_Linux'_$$QMAKE_HOST.arch'.zip
|
||||||
|
|
||||||
DEPLOY_TARGET_DEB = $$DEPLOY_TARGET,$$PWD/packages/QIF/data/QIF
|
DEPLOY_TARGET_DEB = $$DEPLOY_TARGET,$$PWD/packages/QIF/data/QIF
|
||||||
deploy_dep.commands += $$DEPLOYER -bin $$DEPLOY_TARGET $$BASE_DEPLOY_FLAGS_CQT
|
deploy_dep.commands += $$DEPLOYER -bin $$DEPLOY_TARGET $$BASE_DEPLOY_FLAGS_CQT
|
||||||
@ -35,9 +40,13 @@ deployOffline.commands = $$EXEC \
|
|||||||
-p $$PWD/packages \
|
-p $$PWD/packages \
|
||||||
$$PWD/../Distro/$$OUT_FILE_OFF
|
$$PWD/../Distro/$$OUT_FILE_OFF
|
||||||
|
|
||||||
deploy.depends = deploy_dep
|
|
||||||
|
|
||||||
deploy.depends += deployOffline
|
!contains(QMAKE_HOST.arch, arm.*):{
|
||||||
|
deploy.depends = deploy_dep
|
||||||
|
deploy.depends += deployOffline
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
unix:deploy.depends += deploy_deb
|
unix:deploy.depends += deploy_deb
|
||||||
|
|
||||||
win32:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Windows
|
win32:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Windows
|
||||||
@ -77,12 +86,15 @@ releaseSnap.commands = snapcraft push *.snap # bad patern
|
|||||||
|
|
||||||
!isEmpty( ONLINE ) {
|
!isEmpty( ONLINE ) {
|
||||||
|
|
||||||
|
!contains(QMAKE_HOST.arch, arm.*):{
|
||||||
|
|
||||||
message(Snap)
|
message(Snap)
|
||||||
unix:deploy.depends += clearSnap
|
unix:deploy.depends += clearSnap
|
||||||
unix:deploy.depends += buildSnap
|
unix:deploy.depends += buildSnap
|
||||||
unix:deploy.depends += deploySnap
|
unix:deploy.depends += deploySnap
|
||||||
unix:deploy.depends += clearSnap2
|
unix:deploy.depends += clearSnap2
|
||||||
unix:release.depends += releaseSnap
|
unix:release.depends += releaseSnap
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
@ -106,10 +118,12 @@ QMAKE_EXTRA_TARGETS += \
|
|||||||
chmodSnap
|
chmodSnap
|
||||||
|
|
||||||
|
|
||||||
# Translations
|
!contains(DEFINES, WITHOUT_TR) {
|
||||||
SUPPORT_LANGS = ru
|
|
||||||
|
|
||||||
defineReplace(findFiles) {
|
# Translations
|
||||||
|
SUPPORT_LANGS = ru
|
||||||
|
|
||||||
|
defineReplace(findFiles) {
|
||||||
patern = $$1
|
patern = $$1
|
||||||
path = $$2
|
path = $$2
|
||||||
|
|
||||||
@ -122,11 +136,11 @@ defineReplace(findFiles) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return($$result)
|
return($$result)
|
||||||
}
|
}
|
||||||
|
|
||||||
XML_FILES = $$files(*.xml, true)
|
XML_FILES = $$files(*.xml, true)
|
||||||
|
|
||||||
for(LANG, SUPPORT_LANGS) {
|
for(LANG, SUPPORT_LANGS) {
|
||||||
for(XML, XML_FILES) {
|
for(XML, XML_FILES) {
|
||||||
FILE_PATH = $$dirname(XML)
|
FILE_PATH = $$dirname(XML)
|
||||||
|
|
||||||
@ -141,8 +155,9 @@ for(LANG, SUPPORT_LANGS) {
|
|||||||
for(TS, TS_FILES) {
|
for(TS, TS_FILES) {
|
||||||
commands += "$$LRELEASE $$TS"
|
commands += "$$LRELEASE $$TS"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(command, commands) {
|
for(command, commands) {
|
||||||
system($$command)|error("Failed to run: $$command")
|
system($$command)|error("Failed to run: $$command")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<Package>
|
<Package>
|
||||||
<DisplayName>Qt Installer Framework</DisplayName>
|
<DisplayName>Qt Installer Framework</DisplayName>
|
||||||
<Description>Qt Installer Framework for CQtDeployer</Description>
|
<Description>Qt Installer Framework for CQtDeployer</Description>
|
||||||
<Version>4.1.0.2</Version>
|
<Version>4.4.0.0</Version>
|
||||||
<ReleaseDate>2021-04-20</ReleaseDate>
|
<ReleaseDate>2022-07-25</ReleaseDate>
|
||||||
<Default>true</Default>
|
<Default>true</Default>
|
||||||
</Package>
|
</Package>
|
||||||
|
@ -87,26 +87,19 @@ function systemIntegration() {
|
|||||||
console.log("hometDir " + homeDir)
|
console.log("hometDir " + homeDir)
|
||||||
|
|
||||||
if (systemInfo.kernelType === "winnt") {
|
if (systemInfo.kernelType === "winnt") {
|
||||||
component.addOperation('EnvironmentVariable',
|
|
||||||
[
|
|
||||||
"cqtdeployer",
|
|
||||||
targetDir + "\\" + VERSION + "\\cqtdeployer.bat"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
component.addOperation('EnvironmentVariable',
|
component.addOperation('Execute', ["SETX", "cqtdeployer", targetDir + "\\" + VERSION + "\\cqtdeployer.bat"],
|
||||||
[
|
"UNDOEXECUTE", ["SETX", "cqtdeployer", ""])
|
||||||
"cqtDir",
|
component.addOperation('Execute', ["SETX", "cqtDir", targetDir + "\\" + VERSION + "\\"],
|
||||||
targetDir + "\\" + VERSION + "\\"
|
"UNDOEXECUTE", ["SETX", "cqtDir", ""])
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
let PATH = installer.environmentVariable("PATH");
|
let PATH = installer.environmentVariable("PATH");
|
||||||
const cqtDir = installer.environmentVariable("cqtDir");
|
const cqtDir = installer.environmentVariable("cqtDir");
|
||||||
|
|
||||||
console.log("path befor strip : " + PATH);
|
console.log("path befor strip : " + PATH);
|
||||||
|
|
||||||
if (!PATH.includes(cqtDir) || !cqtDir.length) {
|
if (!PATH.includes(cqtDir) && cqtDir.length) {
|
||||||
PATH = stripWinPath(PATH);
|
PATH = stripWinPath(PATH);
|
||||||
console.log("path after strip : " + PATH);
|
console.log("path after strip : " + PATH);
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
<Package>
|
<Package>
|
||||||
<DisplayName>CQtDeployer 1.5</DisplayName>
|
<DisplayName>CQtDeployer 1.5</DisplayName>
|
||||||
<Description>CQtDeployer 1.5</Description>
|
<Description>CQtDeployer 1.5</Description>
|
||||||
<Version>1.5.0.36</Version>
|
<Version>1.5.4.17</Version>
|
||||||
<Default>true</Default>
|
<Default>true</Default>
|
||||||
<ForcedInstallation>false</ForcedInstallation>
|
<ForcedInstallation>false</ForcedInstallation>
|
||||||
<Script>installscript.js</Script>
|
<Script>installscript.js</Script>
|
||||||
<ReleaseDate>2021-05-23</ReleaseDate>
|
<ReleaseDate>2022-03-03</ReleaseDate>
|
||||||
<SortingPriority>201</SortingPriority>
|
<SortingPriority>201</SortingPriority>
|
||||||
<Translations>
|
<Translations>
|
||||||
<Translation>ru.qm</Translation>
|
<Translation>ru.qm</Translation>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<Package>
|
<Package>
|
||||||
<DisplayName>CQtDeployer</DisplayName>
|
<DisplayName>CQtDeployer</DisplayName>
|
||||||
<Description>CQtDeployer</Description>
|
<Description>CQtDeployer</Description>
|
||||||
<Version>1.4</Version>
|
<Version>1.5</Version>
|
||||||
<Default>true</Default>
|
<Default>true</Default>
|
||||||
<ForcedInstallation>false</ForcedInstallation>
|
<ForcedInstallation>false</ForcedInstallation>
|
||||||
<ReleaseDate>2020-09-06</ReleaseDate>
|
<ReleaseDate>2021-05-25</ReleaseDate>
|
||||||
<SortingPriority>100</SortingPriority>
|
<SortingPriority>100</SortingPriority>
|
||||||
</Package>
|
</Package>
|
||||||
|
@ -20,8 +20,8 @@ print("VERSION=" + VERSION)
|
|||||||
# Command Example : aqt tool linux tools_ifw 4.0 qt.tools.ifw.40
|
# Command Example : aqt tool linux tools_ifw 4.0 qt.tools.ifw.40
|
||||||
command = ["aqt",
|
command = ["aqt",
|
||||||
"tool",
|
"tool",
|
||||||
"-b",
|
# "-b",
|
||||||
"https://mirrors.ocf.berkeley.edu/qt/",
|
# "https://mirrors.ocf.berkeley.edu/qt/",
|
||||||
"--outputdir",
|
"--outputdir",
|
||||||
PATHQIF,
|
PATHQIF,
|
||||||
PLATFORM,
|
PLATFORM,
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 553e337e6a956534d34dbbfcec42359117aa35d4
|
Subproject commit d69306c1210fe6def35cf0ff7323e3e82f9ae8f4
|
251
README.md
251
README.md
@ -1,25 +1,46 @@
|
|||||||
# CQtDeployer [](https://snapcraft.io/cqtdeployer)
|
# CQtDeployer
|
||||||
|
|
||||||
|
[](https://snapcraft.io/cqtdeployer)
|
||||||
[](https://snapcraft.io/cqtdeployer)
|
[](https://snapcraft.io/cqtdeployer)
|
||||||
|
|
||||||
# 
|
# 
|
||||||
|
|
||||||
****************************
|
****************************
|
||||||
|
## Support the project
|
||||||
|

|
||||||
|
|
||||||
|
We have a cqtdeployer extended support [subscription](https://www.patreon.com/QuasarApp)
|
||||||
|
on the Patrion service.
|
||||||
|
* We'll help you solve your deployment issues personality.
|
||||||
|
* All your tasks needed to solve your issues will have top priority.
|
||||||
|
|
||||||
|
Also, if you just want to support the project, you can subscribe to the general subscription plan on patrion
|
||||||
|
|
||||||
|
If you can't use Patreon, you can send **bitcoin** to support us and our work.
|
||||||
|
If you want to get support for bitcoin payment, write to me in [telegramm](https://t.me/Endrll)
|
||||||
|
|
||||||
|
## bitcoin address
|
||||||
|

|
||||||
|
|
||||||
|
**bc1q3jnx7pleh7rxg6nm6navvuwwpd9znxvd4lye62**
|
||||||
|
|
||||||
|
|
||||||
## What is CQtDeployer
|
## What is CQtDeployer
|
||||||
The CQtDeployer is application for extract all depends library of executable and create launch script for your application.
|
|
||||||
|
|
||||||
|
CQtDeployer helps you to extract all libraries your executable depends on and to create a launch script for your application.
|
||||||
|
|
||||||
Key differences of this program:
|
Key differences of this program:
|
||||||
* Performance: this program deploys the application several times faster (up to 10 seconds)
|
* Performance: this program deploys the application several times faster (up to 10 seconds)
|
||||||
* Flexibility: this application's got flags that help you to configure the deployment for your or your project's needs
|
* Flexibility: this application has flags that help you to configure the deployment for your or your project's needs
|
||||||
* Crossdeploy: this application's support windows and linux distrebutives, This means that you can use it not only to deploy a project for your platform, but also to deploy a project on Linux for Windows and vice versa.
|
* Cross-deployment: this application supports Windows and Linux distributions. This means that you can deploy a project not only for the host platform, but also deploy a project for Windows target on Linux host and vice versa.
|
||||||
* Fast create installers : Upon completion of the deployment, you will receive a self-contained installer of your distribution.
|
* Fast installers creation: Once the deployment is complete, you will receive a standalone installer for your distribution.
|
||||||
|
|
||||||
## Supported platforms:
|
## Supported platforms:
|
||||||
|
|
||||||
* <img src="https://user-images.githubusercontent.com/12465465/67766480-929b5000-fa5f-11e9-8ae7-377d9ddb7c65.png" height="100">
|
* <img src="https://user-images.githubusercontent.com/12465465/67766480-929b5000-fa5f-11e9-8ae7-377d9ddb7c65.png" height="100">
|
||||||
* <img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="100">
|
* <img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="100">
|
||||||
|
|
||||||
## Support processors architectures:
|
## Supported processors architectures:
|
||||||
* x86
|
* x86
|
||||||
* x86-64
|
* x86-64
|
||||||
* ARM
|
* ARM
|
||||||
@ -27,15 +48,15 @@ Key differences of this program:
|
|||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
#### Example: cqtdeployer <-bin [params]> [options]
|
#### Example: `cqtdeployer <-bin [params]> [options]`
|
||||||
|
|
||||||
See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Options)
|
See the list of all options [here](md/en/Options.md)
|
||||||
|
|
||||||
|
|
||||||
#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear
|
#### Example: `cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/6.3.1/gcc_64/bin/qmake clear`
|
||||||
|
|
||||||
## More examples
|
## More examples
|
||||||
#### Project structure after deploy:
|
#### Deployed project structure:
|
||||||
``` bash
|
``` bash
|
||||||
#linux
|
#linux
|
||||||
cqtdeployer -bin Guitar
|
cqtdeployer -bin Guitar
|
||||||
@ -44,9 +65,9 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt
|
|||||||
cqtdeployer -bin Guitar.exe -qmake /path/to/qmake.exe
|
cqtdeployer -bin Guitar.exe -qmake /path/to/qmake.exe
|
||||||
|
|
||||||
```
|
```
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/81007195-7ab2e780-8e59-11ea-9793-1eeeb0025b96.png" height="400">
|
<p align="center"><img src="https://user-images.githubusercontent.com/12465465/81007195-7ab2e780-8e59-11ea-9793-1eeeb0025b96.png" height="400"></p>
|
||||||
|
|
||||||
#### Project installer after deploy with the qif option.
|
#### Project installer after deployment with the `qif` option.
|
||||||
``` bash
|
``` bash
|
||||||
#linux
|
#linux
|
||||||
cqtdeployer -bin Application qif
|
cqtdeployer -bin Application qif
|
||||||
@ -55,9 +76,10 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt
|
|||||||
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif
|
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif
|
||||||
|
|
||||||
```
|
```
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/78639719-197a1180-78b7-11ea-9e82-a03dd43f4bd2.png" height="400">
|
<p align="center"><img src="https://user-images.githubusercontent.com/12465465/78639719-197a1180-78b7-11ea-9e82-a03dd43f4bd2.png" height="400"></p>
|
||||||
|
|
||||||
|
#### Project installer after deployment with the `qif` and `qifStyle` options.
|
||||||
|
|
||||||
#### Project installer after deploy with the qif and qifStyle option.
|
|
||||||
``` bash
|
``` bash
|
||||||
#linux
|
#linux
|
||||||
cqtdeployer -bin Application qif -qifStyle quasar
|
cqtdeployer -bin Application qif -qifStyle quasar
|
||||||
@ -66,7 +88,8 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt
|
|||||||
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle quasar
|
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle quasar
|
||||||
|
|
||||||
```
|
```
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/78639720-1aab3e80-78b7-11ea-9604-3dcdd7c78482.png" height="400">
|
|
||||||
|
<p align="center"><img src="https://user-images.githubusercontent.com/12465465/78639720-1aab3e80-78b7-11ea-9604-3dcdd7c78482.png" height="400"></p>
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
#linux
|
#linux
|
||||||
@ -76,197 +99,33 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt
|
|||||||
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle path/to/myStyle.css
|
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle path/to/myStyle.css
|
||||||
|
|
||||||
```
|
```
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/78639716-17b04e00-78b7-11ea-9002-a8b45a43807f.png" height="400">
|
|
||||||
|
|
||||||
## Build for Linux
|
<p align="center"><img src="https://user-images.githubusercontent.com/12465465/78639716-17b04e00-78b7-11ea-9002-a8b45a43807f.png" height="400"></p>
|
||||||
- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4)
|
|
||||||
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
|
||||||
- cd CQtDeployer
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
- qmake -r
|
|
||||||
- Here you must definitely call the qmake that was loaded from the 1st item.
|
|
||||||
- Example: ~/Qt/5.14.0/gcc_64/bin/qmake -r
|
|
||||||
- make -j$(nproc)
|
|
||||||
- make deploy
|
|
||||||
- #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
|
||||||
- ##### If you are building cqtdeployer using qt from your OS repository, use only the cqtdeployer installed from the github installer. The fact is that the snap package does not have access to system libraryes.
|
|
||||||
- ./Distro/CQtDeployerInstaller.run
|
|
||||||
|
|
||||||
## Build for Windows (CMD)
|
## Build and install
|
||||||
- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4)
|
See building and installation instructions on wiki [page](md/en/Build-and-Install.md)
|
||||||
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
|
||||||
- cd CQtDeployer
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
- SET PATH=C:/Qt/Tools/mingw730_64/bin;%PATH%
|
|
||||||
- It is important to set up the qt environment.
|
|
||||||
- qmake.exe -r
|
|
||||||
- Here you must definitely call the qmake that was loaded from the 1st item.
|
|
||||||
- Example: C:/Qt/5.14.0/mingw73_64/bin/qmake.exe -r
|
|
||||||
- migw32-make -j8
|
|
||||||
- migw32-make deploy
|
|
||||||
- #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
|
||||||
- ./Distro/CQtDeployerInstaller.exe
|
|
||||||
|
|
||||||
## Install
|
|
||||||
You can download the latest version of the application [here](https://github.com/QuasarApp/CQtDeployer/releases).
|
|
||||||
|
|
||||||
### Snap
|
|
||||||
[](https://snapcraft.io/cqtdeployer)
|
|
||||||
|
|
||||||
#### Features of the snap version
|
|
||||||
The snap package does not have access to system libraries. This means deploySystem options will not work. This also means that if you manually specify libDir or extraLib, then libraries that are not in home will not be found.
|
|
||||||
If these restrictions bother you, use the [Installer](https://github.com/QuasarApp/CQtDeployer/releases) classic version of the application.
|
|
||||||
|
|
||||||
If you are using the snap version of the application. Enable all permissions for cqtdeployer.
|
|
||||||
this can be done in the snap-store
|
|
||||||
Or starting with ubuntu 20.04 in the ubuntu application settings manager.
|
|
||||||
|
|
||||||
## Projects using CQtDeployer:
|
## Projects using CQtDeployer:
|
||||||
|
|
||||||
- [QAmigo](https://github.com/QAmigo/QAmigo)
|
- [QAmigo](https://github.com/QAmigo/QAmigo) - Qt cross-platform serial port socket assistant for visualizing data.
|
||||||
- [QtSecret](https://github.com/QuasarApp/Qt-Secret)
|
- [QtSecret](https://github.com/QuasarApp/Qt-Secret) - Simple encryption library supporting RSA and AES algorithms.
|
||||||
- [Hanoi-Towers](https://github.com/QuasarApp/Hanoi-Towers)
|
- [Hanoi-Towers](https://github.com/QuasarApp/Hanoi-Towers) - Hanoi Towers Game
|
||||||
- [distbuilder](https://github.com/BuvinJT/distbuilder)
|
- [distbuilder](https://github.com/BuvinJT/distbuilder) - Distribution Builder
|
||||||
- [Manager_v2](https://github.com/dimkatsi91/Manager_v2)
|
- [Manager_v2](https://github.com/dimkatsi91/Manager_v2) - Qt Quick Controls 2 - Linux Manager Desktop Application
|
||||||
|
- [IDE65XX](https://github.com/emartisoft/IDE65XX) - IDE 65XX is one of the open source IDE options available for developers working with Kick Assembler.
|
||||||
|
- [Tanks](https://github.com/anevero/tanks) - 2D game written in C++ & Qt for Windows, Linux and Android
|
||||||
|
- [stegano](https://github.com/taskmaster9001/stegano) - Bit-level Image Manipulation Software with Qt Framework - Steganography Pet Project
|
||||||
|
- [Online_Board](https://github.com/MaxMalts/Online_Board) - This is a board that you can share with others.
|
||||||
|
|
||||||
## Donate
|
|
||||||
If you want to support the project,you can donate into our bitcoin wallet.
|
|
||||||
|
|
||||||
### Bitcoin address - 1NJNbDKmezcUcHRfzpBeq2fHeG21oEKX8Q
|
***
|
||||||
|
|
||||||
|
### Check out our documentation for more information: [here](md/index.md)
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
* many thanks [Trail of Bits](https://github.com/trailofbits) for their library [pe-parser](https://github.com/trailofbits/pe-parse). Everything works perfectly.
|
* many thanks [Trail of Bits](https://github.com/trailofbits) for their library [pe-parser](https://github.com/trailofbits/pe-parse). Everything works perfectly.
|
||||||
|
|
||||||
***************************
|
***************************
|
||||||
***************************
|
|
||||||
***************************
|
|
||||||
|
|
||||||
**CQtDeployer** - это приложение преднознаена для извлечения всех зависимых библиотек исполняемого файла и создания сценария запуска для вашего приложения.
|
|
||||||
|
|
||||||
Основные отличия этой программы:
|
|
||||||
* Производительность - эта программа развертывает приложение в несколько раз быстрее (до 10 секунд)
|
|
||||||
* Гибкость - это приложение имеет флаги, которые помогут вам настроить деплоинг под ваши нужды и нужды вашего проекта
|
|
||||||
* Crossdeploy: приложение поддерживает Windows и дистрибутивы Linux, это означает, что вы можете использовать его не только для развертывания проекта для вашей платформы, но и для развертывания проекта в Linux для Windows и наоборот.
|
|
||||||
* Быстрое создание установщиков. По завершении развертывания вы получите автономный установщик вашего дистрибутива.
|
|
||||||
|
|
||||||
|
|
||||||
## Поддерживаемые платформы:
|
|
||||||
* <img src="https://user-images.githubusercontent.com/12465465/67766480-929b5000-fa5f-11e9-8ae7-377d9ddb7c65.png" height="100">
|
|
||||||
* <img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="100">
|
|
||||||
|
|
||||||
## Поддержка архитектур процессоров:
|
|
||||||
* x86
|
|
||||||
* x86-64
|
|
||||||
* ARM
|
|
||||||
* ARM64
|
|
||||||
|
|
||||||
## Как использовать
|
|
||||||
#### пример : cqtdeployer <-bin [params]> [options]
|
|
||||||
Смотрите список всех опций [здесь](https://github.com/QuasarApp/CQtDeployer/wiki/%D0%9F%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D1%8B
|
|
||||||
)
|
|
||||||
|
|
||||||
#### пример: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear
|
|
||||||
|
|
||||||
## Еще примеры
|
|
||||||
#### Стуктура проекта после развертывания:
|
|
||||||
``` bash
|
|
||||||
#linux
|
|
||||||
cqtdeployer -bin Guitar
|
|
||||||
|
|
||||||
#windows
|
|
||||||
cqtdeployer -bin Guitar.exe -qmake /path/to/qmake.exe
|
|
||||||
|
|
||||||
```
|
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/81007195-7ab2e780-8e59-11ea-9793-1eeeb0025b96.png" height="400">
|
|
||||||
|
|
||||||
#### Установщик проекта после использования опции qif.
|
|
||||||
``` bash
|
|
||||||
#linux
|
|
||||||
cqtdeployer -bin Application qif
|
|
||||||
|
|
||||||
#windows
|
|
||||||
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif
|
|
||||||
|
|
||||||
```
|
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/78639719-197a1180-78b7-11ea-9e82-a03dd43f4bd2.png" height="400">
|
|
||||||
|
|
||||||
#### Установщик проекта после использования опции qif c пользовательским стилем.
|
|
||||||
``` bash
|
|
||||||
#linux
|
|
||||||
cqtdeployer -bin Application qif -qifStyle quasar
|
|
||||||
|
|
||||||
#windows
|
|
||||||
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle quasar
|
|
||||||
|
|
||||||
```
|
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/78639720-1aab3e80-78b7-11ea-9604-3dcdd7c78482.png" height="400">
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
#linux
|
|
||||||
cqtdeployer -bin Application qif -qifStyle path/to/myStyle.css
|
|
||||||
|
|
||||||
#windows
|
|
||||||
cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle path/to/myStyle.css
|
|
||||||
|
|
||||||
```
|
|
||||||
<img src="https://user-images.githubusercontent.com/12465465/78639716-17b04e00-78b7-11ea-9002-a8b45a43807f.png" height="400">
|
|
||||||
|
|
||||||
|
|
||||||
## Build для Linux
|
|
||||||
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
|
||||||
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
|
||||||
- cd CQtDeployer
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
- qmake -r
|
|
||||||
- Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта.
|
|
||||||
- Пример: ~/Qt/5.14.0/gcc_64/bin/qmake -r
|
|
||||||
- make -j$(nproc)
|
|
||||||
- make deploy
|
|
||||||
- эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
|
||||||
- ##### Если вы собираете cqtdeployer, используя qt из своего репозитория ОС, используйте только cqtdeployer, установленный из установщика github. Дело в том, что пакет моментальных снимков не имеет доступа к системным библиотекам.
|
|
||||||
- ./Distro/CQtDeployerInstaller.run
|
|
||||||
|
|
||||||
## Build для Windows (CMD)
|
|
||||||
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
|
||||||
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
|
||||||
- cd CQtDeployer
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
- SET PATH=C:/Qt/Tools/mingw730_64/bin;%PATH%
|
|
||||||
- Здесь важно настроить окружение qt.
|
|
||||||
- qmake.exe -r
|
|
||||||
- Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта.
|
|
||||||
- Пример: C:/Qt/5.14.0/mingw73_64/bin/qmake.exe -r
|
|
||||||
- migw32-make -j8
|
|
||||||
- migw32-make deploy
|
|
||||||
- эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
|
||||||
- ./Distro/CQtDeployerInstaller.exe
|
|
||||||
|
|
||||||
### Snap
|
|
||||||
[](https://snapcraft.io/cqtdeployer)
|
|
||||||
|
|
||||||
#### Особенности snap версии
|
|
||||||
В snap пакет не имеет доступ к системным библиотекам. Это значит что опции deploySystem не будут работать. Так же это значит что нсли вы в ручную укажите libDir или extraLib, то библиотеки находящиеся не в home не будут найдены.
|
|
||||||
Если вам мешают эти ограничения используйте [Установщик](https://github.com/QuasarApp/CQtDeployer/releases) класической версии приложения.
|
|
||||||
|
|
||||||
Если вы используете snap версию приложения. Включите все разрешения для cqtdeployer.
|
|
||||||
это можно сделать в snap-store
|
|
||||||
Или начиная с ubuntu 20.04 в менеджере натроек приложений ubuntu.
|
|
||||||
|
|
||||||
## Установить
|
|
||||||
Вы можете загрузить последнюю версию приложения [здесь](https://github.com/QuasarApp/CQtDeployer/releases).
|
|
||||||
|
|
||||||
## Проекты использующие CQtDeployer :
|
|
||||||
|
|
||||||
- [QAmigo](https://github.com/QAmigo/QAmigo)
|
|
||||||
- [QtSecret](https://github.com/QuasarApp/Qt-Secret)
|
|
||||||
- [Hanoi-Towers](https://github.com/QuasarApp/Hanoi-Towers)
|
|
||||||
- [distbuilder](https://github.com/BuvinJT/distbuilder)
|
|
||||||
- [Manager_v2](https://github.com/dimkatsi91/Manager_v2)
|
|
||||||
|
|
||||||
## Пожертвовать
|
|
||||||
Если вы хотите помочь проекту, то вы можете пожертвовать небольшую сумму на наш биткойн-кошелек.
|
|
||||||
|
|
||||||
### Биткойн-адрес - 1NJNbDKmezcUcHRfzpBeq2fHeG21oEKX8Q
|
|
||||||
|
|
||||||
## Благодарность
|
|
||||||
* Большое спасибо [Trail of Bits](https://github.com/trailofbits) за их библиотеку [pe-parser](https://github.com/trailofbits/pe-parse). Все работает отлично.
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2021 QuasarApp.
|
# Copyright (C) 2018-2022 QuasarApp.
|
||||||
# Distributed under the lgplv3 software license, see the accompanying
|
# Distributed under the lgplv3 software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
@ -20,7 +20,7 @@ ModulesQt513::~ModulesQt513() {
|
|||||||
QSet<QString> ModulesQt513::ignoreFilter(const QSet<QString> &input, const QString &filter) const {
|
QSet<QString> ModulesQt513::ignoreFilter(const QSet<QString> &input, const QString &filter) const {
|
||||||
QSet<QString> res;
|
QSet<QString> res;
|
||||||
for (auto& val : input) {
|
for (auto& val : input) {
|
||||||
if (!val.contains(filter, ONLY_WIN_CASE_INSENSIATIVE)) {
|
if (!val.contains(filter, DeployCore::getCaseSensitivity())) {
|
||||||
res.insert(val);
|
res.insert(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2021 QuasarApp.
|
* Copyright (C) 2018-2022 QuasarApp.
|
||||||
* Distributed under the lgplv3 software license, see the accompanying
|
* Distributed under the lgplv3 software license, see the accompanying
|
||||||
* Everyone is permitted to copy and distribute verbatim copies
|
* Everyone is permitted to copy and distribute verbatim copies
|
||||||
* of this license document, but changing it is not allowed.
|
* of this license document, but changing it is not allowed.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user