diff --git a/CMakeLists.txt b/CMakeLists.txt index be3722e..5b3502c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,67 @@ # -# Copyright (C) 2018-2021 QuasarApp. -# Distributed under the lgplv3 software license, see the accompanying +# Copyright (C) 2020-2022 QuasarApp. +# Distributed under the GPLv3 software license, see the accompanying # Everyone is permitted to copy and distribute verbatim copies # of this license document, but changing it is not allowed. # -# This is a stub for the cmake build system. - - +cmake_minimum_required(VERSION 3.18) project(CQtDeployer LANGUAGES CXX) +if(TARGET ${PROJECT_NAME}) + message("The ${PROJECT_NAME} arledy included in main Project") + return() +endif() -cmake_minimum_required(VERSION 3.1) -include(QuasarAppLib/CMake/QuasarAppCITargets.cmake) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if (ANDROID OR IOS) + set(BUILD_SHARED_LIBS ON) +endif() + +if (NOT QT_VERSION_MAJOR) + find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Test QUIET) +endif() +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET) + +include(submodules/CMake/QuasarApp.cmake) + +updateGitVars() +set(CQtDeployer_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}") +set(CQtDeployer_PACKAGE_ID "quasarapp.core.CQtDeployer") + +option(CQtDeployer_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ON) +option(CQtDeployer_EXAMPLE "This option disables or enables example app of the ${PROJECT_NAME} project" ON) + +if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32) + set(CQtDeployer_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE) +endif() + +if (NOT QT_VERSION_MAJOR) + set(CQtDeployer_EXAMPLE OFF CACHE BOOL "This option force disbled for Not Qt projects" FORCE) +endif() + +make_directory(Distro) initAll() + +add_subdirectory(src/Library) + +if (DEFINED CQtDeployer_EXAMPLE) + add_subdirectory(src/Example) +endif() + +if (CQtDeployer_TESTS) + add_subdirectory(tests) +else() + message("The ${PROJECT_NAME} tests is disabled.") +endif() + + addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf) +addDeployFromCustomFile("CQtDeployer" "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployer.json") diff --git a/CQtDeployer.pro b/CQtDeployer.pro deleted file mode 100644 index da35d8a..0000000 --- a/CQtDeployer.pro +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (C) 2018-2022 QuasarApp. -# Distributed under the lgplv3 software license, see the accompanying -# Everyone is permitted to copy and distribute verbatim copies -# of this license document, but changing it is not allowed. -# - -TEMPLATE = subdirs -CONFIG += ordered - -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].") - 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 { - SUBDIRS += QuasarAppLib \ - Pe \ - zip \ - Deploy \ - CQtDeployer \ - UnitTests \ - tests/TestOnlyC \ - tests/TestCPPOnly \ - tests/TestQtWidgets \ - tests/TestQMLWidgets \ - tests/virtualkeyboard - - unix:SUBDIRS += tests/quicknanobrowser - unix:SUBDIRS += tests/webui - - contains(DEFINES, DISABLE_PE) { - SUBDIRS -= Pe - DEFINES += WITHOUT_TESTS - } - - contains(DEFINES, WITHOUT_TESTS) { - SUBDIRS -= UnitTests \ - tests/TestOnlyC \ - tests/TestCPPOnly \ - tests/TestQtWidgets \ - tests/TestQMLWidgets \ - tests/quicknanobrowser \ - tests/webui - } - - CQtDeployer.depends=QuasarAppLib - CQtDeployer.depends=Deploy - - QuasarAppLib.file = $$PWD/QuasarAppLib/QuasarApp.pro - Pe.file = $$PWD/pe/pe-parser-library/pe-parser-library.pro - - include('$$PWD/QIFData/installerCQtDeployer.pri') - !contains(QMAKE_HOST.arch, arm.*):{ - include($$PWD/test.pri) - } - - DISTFILES += \ - snap/snapcraft.yaml \ - snap/gui/cqtdeployer.desktop \ - README.md \ - - -} - diff --git a/CQtDeployer/CQtDeployer.pro b/CQtDeployer/CQtDeployer.pro deleted file mode 100644 index d26c484..0000000 --- a/CQtDeployer/CQtDeployer.pro +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (C) 2018-2022 QuasarApp. -# Distributed under the lgplv3 software license, see the accompanying -# Everyone is permitted to copy and distribute verbatim copies -# of this license document, but changing it is not allowed. -# - -QT -= gui - -CONFIG += c++17 console -CONFIG -= app_bundle - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG(release, debug|release): { - DESTDIR="$$PWD/build/release" -} else { - DESTDIR="$$PWD/build/debug" -} - -include('$$PWD/../QuasarAppLib/QuasarLib.pri') -include('$$PWD/../Deploy/Deploy.pri') -include('$$PWD/../zip/zip.pri') - -!contains(DEFINES, DISABLE_PE) { - include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') -} - -TARGET = cqtdeployer - -SOURCES += \ - main.cpp \ - - -win32: RC_ICONS = $$PWD/../res/icon.ico diff --git a/Deploy/Deploy.pri b/Deploy/Deploy.pri deleted file mode 100644 index 740c1b4..0000000 --- a/Deploy/Deploy.pri +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (C) 2018-2022 QuasarApp. -# Distributed under the lgplv3 software license, see the accompanying -# Everyone is permitted to copy and distribute verbatim copies -# of this license document, but changing it is not allowed. -# - -!isEmpty(DEPLOY_LIB):error("Deploy.pri already included") -DEPLOY_LIB = 1 - -#DEPENDS -CONFIG(release, debug|release): { - DEPLOY_LIB_OUTPUT_DIR="$$PWD/build/release" -} else { - DEPLOY_LIB_OUTPUT_DIR="$$PWD/build/debug" -} - -unix:LIBS += -L$$DEPLOY_LIB_OUTPUT_DIR -lDeploy -win32:LIBS += -L$$DEPLOY_LIB_OUTPUT_DIR -lDeploy1 - - -INCLUDEPATH += "$$PWD/" - - - diff --git a/Deploy/Deploy.pro b/Deploy/Deploy.pro deleted file mode 100644 index 7591bf9..0000000 --- a/Deploy/Deploy.pro +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (C) 2018-2022 QuasarApp. -# Distributed under the lgplv3 software license, see the accompanying -# Everyone is permitted to copy and distribute verbatim copies -# of this license document, but changing it is not allowed. -# - - -#------------------------------------------------- -# -# Project created by QtCreator 2019-01-26T13:55:47 -# -#------------------------------------------------- - -QT -= gui -CONFIG += c++17 -TARGET = Deploy -TEMPLATE = lib - -DEFINES += DEPLOY_LIBRARY - -VERSION = 1.5.4.17 - -DEFINES += APP_VERSION='\\"$$VERSION\\"' - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG(release, debug|release): { - DESTDIR="$$PWD/build/release" -} else { - DESTDIR="$$PWD/build/debug" -} - -include('$$PWD/../QuasarAppLib/QuasarLib.pri') -!contains(DEFINES, DISABLE_PE) { - include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') -} -include('$$PWD/../zip/zip.pri') - - -SOURCES += \ - Distributions/deb.cpp \ - Distributions/defaultdistro.cpp \ - Distributions/templateinfo.cpp \ - Distributions/ziparhive.cpp \ - dependencymap.cpp \ - deployconfig.cpp \ - distromodule.cpp \ - distrostruct.cpp \ - configparser.cpp \ - deploy.cpp \ - deploycore.cpp \ - elf_type.cpp \ - envirement.cpp \ - extra.cpp \ - extracter.cpp \ - filemanager.cpp \ - Distributions/idistribution.cpp \ - generalfiles_type.cpp \ - ignorerule.cpp \ - metafilemanager.cpp \ - packagecontrol.cpp \ - packing.cpp \ - pathutils.cpp \ - igetlibinfo.cpp \ - dependenciesscanner.cpp \ - ../qtTools/src/shared/winutils/elfreader.cpp \ - pe_type.cpp \ - pluginsparser.cpp \ - Distributions/qif.cpp \ - qml.cpp \ - libinfo.cpp \ - qtdir.cpp \ - targetdata.cpp \ - targetinfo.cpp \ - zipcompresser.cpp - -HEADERS += \ - Distributions/deb.h \ - Distributions/defaultdistro.h \ - Distributions/templateinfo.h \ - Distributions/ziparhive.h \ - defines.h \ - dependencymap.h \ - deployconfig.h \ - distromodule.h \ - distrostruct.h \ - configparser.h \ - deploy.h \ - deploy_global.h \ - deploycore.h \ - elf_type.h \ - envirement.h \ - extra.h \ - extracter.h \ - filemanager.h \ - Distributions/idistribution.h \ - generalfiles_type.h \ - ignorerule.h \ - metafilemanager.h \ - packagecontrol.h \ - packing.h \ - pathutils.h \ - igetlibinfo.h \ - dependenciesscanner.h \ - ../qtTools/src/shared/winutils/elfreader.h \ - pe_type.h \ - pluginsparser.h \ - Distributions/qif.h \ - qml.h \ - libinfo.h \ - qtdir.h \ - targetdata.h \ - targetinfo.h \ - zipcompresser.h - -STATECHARTS += - -RESOURCES += \ - DeployResources.qrc diff --git a/QIFData/InstallerBase.pri b/QIFData/InstallerBase.pri deleted file mode 100644 index fbd60c6..0000000 --- a/QIFData/InstallerBase.pri +++ /dev/null @@ -1,64 +0,0 @@ - -QT_DIR= $$[QT_HOST_BINS] - -win32:QMAKE_BIN= $$QT_DIR/qmake.exe -win32:LUPDATE = $$QT_DIR/lupdate.exe -win32:LRELEASE = $$QT_DIR/lrelease.exe -win32:DEPLOYER=cqtdeployer - - -contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake - LUPDATE = $$QT_DIR/lupdate - LRELEASE = $$QT_DIR/lrelease - DEPLOYER = cqtdeployer -} - -android { - DEPLOYER = $$QT_DIR/androiddeployqt -} - -message( PWD :$$PWD) - -message( Configuration variables :) -message(QT_DIR = $$QT_DIR) -message(QMAKE_BIN = $$QMAKE_BIN) -message(LUPDATE = $$LUPDATE) -message(LRELEASE = $$LRELEASE) -message(DEPLOYER = $$DEPLOYER) - -BINARY_LIST -REPO_LIST - -sopprted_versions = 4.5 4.4 4.3 4.2 4.1 4.0 3.2 3.1 3.0 -for(val, sopprted_versions) { - - exists( $$QT_DIR/../../../Tools/QtInstallerFramework/$$val/bin/ ) { - message( "QtInstallerFramework v$$val: yes" ) - BINARY_LIST += $$QT_DIR/../../../Tools/QtInstallerFramework/$$val/bin/binarycreator - REPO_LIST += $$QT_DIR/../../../Tools/QtInstallerFramework/$$val/bin/repogen - } -} - -isEmpty (BINARY_LIST) { - warning( "QtInstallerFramework not found! use binaries from PATH." ) - EXEC=binarycreator - REPOGEN=repogen - -} else: { - win32:EXEC=$$first(BINARY_LIST).exe - win32:REPOGEN=$$first(REPO_LIST).exe - - contains(QMAKE_HOST.os, Linux):{ - unix:EXEC=$$first(BINARY_LIST) - win32:EXEC=wine $$first(BINARY_LIST).exe - - REPOGEN=$$first(REPO_LIST) - } -} - - - -message( selected $$EXEC and $$REPOGEN) - - diff --git a/QIFData/QIF.pri b/QIFData/QIF.pri deleted file mode 100644 index 6cbeed0..0000000 --- a/QIFData/QIF.pri +++ /dev/null @@ -1,27 +0,0 @@ -OTHER_FILES += \ - $$PWD/*.md \ - $$PWD/*.sh \ - $$PWD/scripts/*.py \ - $$PWD/packages/QIF/meta/*.xml - -win32:PLATFORM = windows -unix: PLATFORM = linux - -win32:PY = python -unix: PY = python3 - -qif.commands= $$PY $$PWD/scripts/QIF.py $$PLATFORM 4.4 $$PWD/packages/QIF/data -alias.commands= $$PY $$PWD/scripts/alias.py - -!isEmpty( ONLINE ) { - - message(prepare release QIF) - deployOffline.depends += qif - buildSnap.depends += qif -} - -unix:deployOffline.depends += alias - -QMAKE_EXTRA_TARGETS += \ - qif \ - alias diff --git a/QIFData/config/banner.png b/QIFData/config/banner.png deleted file mode 100644 index ccd40d4..0000000 Binary files a/QIFData/config/banner.png and /dev/null differ diff --git a/QIFData/config/configLinux.xml b/QIFData/config/configLinux.xml deleted file mode 100644 index a114868..0000000 --- a/QIFData/config/configLinux.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Installer> - <WizardDefaultWidth>640px</WizardDefaultWidth> - <WizardDefaultHeight>400px</WizardDefaultHeight> - <Name>CQtDeployer</Name> - <Version>1.5.4.17</Version> - <Title>CQtDeployer</Title> - <Publisher>QuasarApp</Publisher> - <StartMenuDir>CQtDeployer</StartMenuDir> - <TargetDir>@HomeDir@/CQtDeployer</TargetDir> - <InstallActionColumnVisible>true</InstallActionColumnVisible> - <RemoveTargetDir>true</RemoveTargetDir> - <ControlScript>controlScript.js</ControlScript> - <MaintenanceToolName>CQtDeployerTool</MaintenanceToolName> - <WizardStyle>Modern</WizardStyle> - <StyleSheet>style.css</StyleSheet> - <Logo>logo.png</Logo> - - <RemoteRepositories> - <Repository> - <Url>http://quasarapp.ddns.net:3030/CQtDeployer/Linux</Url> - <Enabled>1</Enabled> - <DisplayName>QuasarApp</DisplayName> - </Repository> - </RemoteRepositories> -</Installer> diff --git a/QIFData/config/configWin.xml b/QIFData/config/configWin.xml deleted file mode 100644 index adfbc53..0000000 --- a/QIFData/config/configWin.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Installer> - <WizardDefaultWidth>640px</WizardDefaultWidth> - <WizardDefaultHeight>400px</WizardDefaultHeight> - <Name>CQtDeployer</Name> - <Version>1.5.4.17</Version> - <Title>CQtDeployer</Title> - <Publisher>QuasarApp</Publisher> - <StartMenuDir>CQtDeployer</StartMenuDir> - <TargetDir>@ApplicationsDir@/CQtDeployer</TargetDir> - <InstallActionColumnVisible>true</InstallActionColumnVisible> - <RemoveTargetDir>true</RemoveTargetDir> - <ControlScript>controlScript.js</ControlScript> - <MaintenanceToolName>CQtDeployerTool</MaintenanceToolName> - <WizardStyle>Modern</WizardStyle> - <StyleSheet>style.css</StyleSheet> - <Logo>logo.png</Logo> - - <RemoteRepositories> - <Repository> - <Url>http://quasarapp.ddns.net:3030/CQtDeployer/Windows</Url> - <Enabled>1</Enabled> - <DisplayName>QuasarApp</DisplayName> - </Repository> - </RemoteRepositories> -</Installer> diff --git a/QIFData/config/controlScript.js b/QIFData/config/controlScript.js deleted file mode 100644 index a09553a..0000000 --- a/QIFData/config/controlScript.js +++ /dev/null @@ -1,53 +0,0 @@ -function Controller() -{ - generateTr(); - - installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); - installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished); - installer.installationFinished.connect(this, Controller.prototype.installationFinished); - - -} - -Controller.prototype.ComponentSelectionPageCallback = function() -{ - var widget = gui.currentPageWidget(); // get the current wizard page - if (widget !== null && installer.isInstaller()) { - widget.deselectAll(); - widget.selectComponent('cqtdeployer.1_5'); - widget.selectComponent('QIF'); - - } -} - -function generateTr() { - console.log("generate tr start ") - - installer.setValue("Name", qsTr("CQtDeployer")); - installer.setValue("Title", qsTr("Install CQtDeployer")); -} - -Controller.prototype.uninstallationFinished = function() -{ - -} - - -Controller.prototype.installationFinished = function() -{ - - if (systemInfo.kernelType === "winnt") { - - QMessageBox["information"](qsTr("install in system"), qsTr("Installer"), - qsTr("CQtDeployer successfully installed on your computer to use the call \"cqtdeployer\"."), - QMessageBox.Ok); - - } else { - - QMessageBox["information"](qsTr("install in system"), qsTr("Installer"), - qsTr("CQtDeployer successfully installed on your computer to use the call \"cqtdeployer\", cqt or cqtdeployer.cqt."), - QMessageBox.Ok); - } - - -} diff --git a/QIFData/config/icon.ico b/QIFData/config/icon.ico deleted file mode 100644 index e39643d..0000000 Binary files a/QIFData/config/icon.ico and /dev/null differ diff --git a/QIFData/config/logo.png b/QIFData/config/logo.png deleted file mode 100644 index 6f91278..0000000 Binary files a/QIFData/config/logo.png and /dev/null differ diff --git a/QIFData/config/ru.ts b/QIFData/config/ru.ts deleted file mode 100644 index 1b284c0..0000000 --- a/QIFData/config/ru.ts +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ru_RU"> -<context> - <name>controlScript</name> - <message> - <location filename="controlScript.js" line="26"/> - <source>CQtDeployer</source> - <translation>CQtDeployer</translation> - </message> - <message> - <location filename="controlScript.js" line="27"/> - <source>Install CQtDeployer</source> - <oldsource>Install Snake</oldsource> - <translation>Установка CQtDeployer</translation> - </message> - <message> - <location filename="controlScript.js" line="41"/> - <location filename="controlScript.js" line="47"/> - <source>install in system</source> - <translation>Установка в систему</translation> - </message> - <message> - <location filename="controlScript.js" line="41"/> - <location filename="controlScript.js" line="47"/> - <source>Installer</source> - <translation>Установщик</translation> - </message> - <message> - <location filename="controlScript.js" line="42"/> - <source>CQtDeployer successfully installed on your computer to use the call "cqtdeployer".</source> - <oldsource>To uninstall cqtdeployer on your system, you need administrator rights!. </oldsource> - <translation type="unfinished">Чтобы удалить cqtdeployer в вашей системе, вам нужны права администратора !. </translation> - </message> - <message> - <location filename="controlScript.js" line="48"/> - <source>CQtDeployer successfully installed on your computer to use the call "cqtdeployer", cqt or cqtdeployer.cqt.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>To install cqtdeployer on your system, you need administrator rights!. </source> - <translation type="vanished">Чтобы установить cqtdeployer в вашей системе, вам нужны права администратора!. </translation> - </message> - <message> - <source>The installation was successful, but cqtdeployer will not be available from the console. </source> - <translation type="vanished">Установка прошла успешно, но cqtdeployer не будет доступен из консоли. </translation> - </message> - <message> - <source>Example: </source> - <translation type="vanished">Пример: </translation> - </message> -</context> -</TS> diff --git a/QIFData/config/style.css b/QIFData/config/style.css deleted file mode 100644 index 7ff14bd..0000000 --- a/QIFData/config/style.css +++ /dev/null @@ -1,61 +0,0 @@ -.QWidget { - background-color: rgb(255, 255, 255); -} - -.QLabel { - color: #000000; -} - -.QPushButton { - background-color: transparent; - border: 2px solid #ffffff; - border-radius: 3px; - height: 30px; - min-width: 100px; - padding: 0 15px; -} - -.QPushButton:pressed, -.QPushButton:checked { - background-color: #2ed3ed; -} - -.QPushButton:focus { - background-color: #aaf2ff; -} - -.QPushButton:hover { - border: 2px solid #2ed3ed; -} - - -.QProgressBar { - background: #b1dbcc; - border: 1px solid #cdcdcd; - border-radius: 2px; - padding: 0; - margin: 0; - color: #ffffff; - height: 30px; - text-align: center; -} - -.QProgressBar::chunk { - background: #16dbcc; - border-radius: 2px; - margin: 0; -} - -.QProgressBar:hover { - border-color: #2ed3ed; -} - -.QLineEdit { - background-color: transparent; - border-color: #cdcdcd; - height: 30px; -} - -.QLineEdit:hover { - border-color: #2ed3ed; -} diff --git a/QIFData/installerCQtDeployer.pri b/QIFData/installerCQtDeployer.pri deleted file mode 100644 index 1afb186..0000000 --- a/QIFData/installerCQtDeployer.pri +++ /dev/null @@ -1,163 +0,0 @@ -VERSION = 1.5.4.17 - -include($$PWD/InstallerBase.pri); -mkpath( $$PWD/../Distro) - -message(QMAKE_HOST.arch = $$QMAKE_HOST.arch) - -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 - -DATA_DIR = $$PWD/packages/cqtdeployer.1_5/data/1.5 -META_DIR = $$PWD/packages/cqtdeployer.1_5/meta/ - -win32:OUT_LIB= -libOut lib -win32:OUT_BIN= -binOut bin - -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 - - -win32:CQT_ICON = -icon $$PWD/config/icon.ico -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.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_dep.commands += $$DEPLOYER -bin $$DEPLOY_TARGET $$BASE_DEPLOY_FLAGS_CQT -deploy_deb.commands += $$DEPLOYER -bin $$DEPLOY_TARGET_DEB $$BASE_DEPLOY_FLAGS_DEB - -win32:CONFIG_FILE = $$PWD/config/configWin.xml -unix:CONFIG_FILE = $$PWD/config/configLinux.xml - -deployOffline.commands = $$EXEC \ - --offline-only \ - -c $$CONFIG_FILE \ - -p $$PWD/packages \ - $$PWD/../Distro/$$OUT_FILE_OFF - - -!contains(QMAKE_HOST.arch, arm.*):{ - deploy.depends = deploy_dep - deploy.depends += deployOffline - -} - -unix:deploy.depends += deploy_deb - -win32:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Windows -unix:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Linux - -win32:PY = python -unix: PY = python3 - -create_repo.commands = $$PY $$PWD/../QuasarAppScripts/cp.py $$PWD/packages/ $$PWD/../Repo - -chmodSnap.commands = chmod 777 -R $$DATA_DIR -unix:deploy.depends += chmodSnap - - -message( ONLINE_REPO_DIR $$ONLINE_REPO_DIR) -!isEmpty( ONLINE ) { - - message(online) - - release.depends = create_repo - - deploy.commands = $$EXEC \ - --online-only \ - -c $$CONFIG_FILE \ - -p $$PWD/packages \ - $$PWD/../Distro/$$OUT_FILE -} - -buildSnap.commands = snapcraft -clearSnap.commands = rm parts prime stage *.snap -rdf -clearSnap2.commands = rm parts prime stage -rdf - -deploySnap.commands = rm *.snap -rdf && chmod 777 -R $$PWD/../prime && snapcraft && cp *.snap $$PWD/../Distro/ -releaseSnap.commands = snapcraft push *.snap # bad patern - - - -!isEmpty( ONLINE ) { - - !contains(QMAKE_HOST.arch, arm.*):{ - - message(Snap) - unix:deploy.depends += clearSnap - unix:deploy.depends += buildSnap - unix:deploy.depends += deploySnap - unix:deploy.depends += clearSnap2 - unix:release.depends += releaseSnap - } -} - -OTHER_FILES += \ - $$META_DIR/* \ - $$PWD/config/*.* - -include(QIF.pri) - -QMAKE_EXTRA_TARGETS += \ - deploy_dep \ - deploy_deb \ - deployOffline \ - deploy \ - create_repo \ - release \ - clearSnap \ - clearSnap2 \ - deploySnap \ - releaseSnap \ - buildSnap \ - chmodSnap - - -!contains(DEFINES, WITHOUT_TR) { - - # Translations - SUPPORT_LANGS = ru - - defineReplace(findFiles) { - patern = $$1 - path = $$2 - - all_files = $$files(*$${patern}, true) - win32:all_files ~= s|\\\\|/|g - win32:path ~= s|\\\\|/|g - - for(file, all_files) { - result += $$find(file, $$path) - } - - return($$result) - } - - XML_FILES = $$files(*.xml, true) - - for(LANG, SUPPORT_LANGS) { - for(XML, XML_FILES) { - FILE_PATH = $$dirname(XML) - - JS_FILES = $$findFiles(".js", $$FILE_PATH) - UI_FILES = $$findFiles(".ui", $$FILE_PATH) - - commands += "$$LUPDATE $$JS_FILES $$UI_FILES -ts $$FILE_PATH/$${LANG}.ts" - TS_FILES += $$FILE_PATH/$${LANG}.ts - - } - - for(TS, TS_FILES) { - commands += "$$LRELEASE $$TS" - } - } - - for(command, commands) { - system($$command)|error("Failed to run: $$command") - } -} diff --git a/QIFData/packages/QIF/meta/package.xml b/QIFData/packages/QIF/meta/package.xml deleted file mode 100644 index f3b3f05..0000000 --- a/QIFData/packages/QIF/meta/package.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Package> - <DisplayName>Qt Installer Framework</DisplayName> - <Description>Qt Installer Framework for CQtDeployer</Description> - <Version>4.4.0.0</Version> - <ReleaseDate>2022-07-25</ReleaseDate> - <Default>true</Default> -</Package> diff --git a/QIFData/packages/cqtdeployer.1_5/data/1.5/icon.png b/QIFData/packages/cqtdeployer.1_5/data/1.5/icon.png deleted file mode 100644 index 6c282fe..0000000 Binary files a/QIFData/packages/cqtdeployer.1_5/data/1.5/icon.png and /dev/null differ diff --git a/QIFData/packages/cqtdeployer.1_5/meta/installscript.js b/QIFData/packages/cqtdeployer.1_5/meta/installscript.js deleted file mode 100644 index cbc7df4..0000000 --- a/QIFData/packages/cqtdeployer.1_5/meta/installscript.js +++ /dev/null @@ -1,152 +0,0 @@ -const VERSION = "1.5" - -function Component() -{ - generateTr(); -} - -function generateTr() { - component.setValue("DisplayName", qsTr("CQtDeployer " + VERSION )); - component.setValue("Description", qsTr("This package contains CQtDeployer version " + VERSION)); -} - -Component.prototype.createOperations = function() { -// // call default implementation to actually install README.txt! - component.createOperations(); - systemIntegration(); - -} - -function stripPath(path, separator) { - const array = path.split(separator); - - let newPath = []; - - array.forEach(function (item) { - if (!newPath.includes(item)) { - newPath.push(item); - } - }); - - return newPath.join(separator); -} - -function stripWinPath(path) { - return stripPath(path, ';'); -} - -function stripUnixPath(path) { - return stripPath(path, ':'); -} - -function extractFileName(path) { - const fullName = path.substring(path.lastIndexOf('/') + 1); - - const index = fullName.lastIndexOf('.'); - if (index >= 0) { - return fullName.substring(0, index) - } - - return fullName; -} - -function generateShortCutCmd(cmd, icon) { - if (systemInfo.kernelType === "winnt") { - - console.log("create icons!!! on Windows"); - component.addOperation("CreateShortcut", - "@TargetDir@/" + cmd, - "@DesktopDir@/" + extractFileName(cmd) + ".lnk"); - - } - - - if (systemInfo.kernelType === "linux") { - console.log("create icons!!! on LINUX"); - const name = extractFileName(cmd); - component.addOperation("CreateDesktopEntry", - "@HomeDir@/.local/share/applications/" + name + ".desktop", - "Version=@Version@\n - Type=Application\n - Terminal=true\n - Exec=@TargetDir@/" + cmd + ".sh\n - Name=" + name + "\n - Icon=@TargetDir@/" + icon + "\n - Name[en_US]=" + name); - - console.log("create icons!!! on LINUX done"); - } -} - -function systemIntegration() { - targetDir = installer.value("TargetDir", ""); - homeDir = installer.value("HomeDir", ""); - - console.log("install component") - console.log("targetDir " + targetDir) - console.log("hometDir " + homeDir) - - if (systemInfo.kernelType === "winnt") { - - component.addOperation('Execute', ["SETX", "cqtdeployer", targetDir + "\\" + VERSION + "\\cqtdeployer.bat"], - "UNDOEXECUTE", ["SETX", "cqtdeployer", ""]) - component.addOperation('Execute', ["SETX", "cqtDir", targetDir + "\\" + VERSION + "\\"], - "UNDOEXECUTE", ["SETX", "cqtDir", ""]) - - - let PATH = installer.environmentVariable("PATH"); - const cqtDir = installer.environmentVariable("cqtDir"); - - console.log("path befor strip : " + PATH); - - if (!PATH.includes(cqtDir) && cqtDir.length) { - PATH = stripWinPath(PATH); - console.log("path after strip : " + PATH); - - component.addOperation('Execute', ["SETX", "PATH", PATH + ";%cqtDir%"]) - } - - } else { - - if (!installer.fileExists(homeDir + "/.local/bin")) { - - component.addOperation('Execute', ["mkdir", "-p", homeDir + "/.local/bin"]) - - QMessageBox["warning"](qsTr("install in system"), qsTr("Installer"), - qsTr("The \"~/local/bin\" folder was not initialized, you may need to reboot to work correctly!"), - QMessageBox.Ok); - - const ansver = installer.execute('cat', [homeDir + "/.profile"]); - let result; - if (ansver.length >= 2) { - result = ansver[0]; - } - - if (!result.includes("/.local/bin")) { - - const script = '\n# set PATH so it includes users private bin if it exists (generated by cqtdeployer installer) \n' + - 'if [ -d "$HOME/.local/bin" ] ; then \n' + - ' PATH="$HOME/.local/bin:$PATH" \n' + - 'fi \n'; - - component.addOperation('AppendFile', [homeDir + "/.profile", script]) - } - - } - component.addOperation('Execute', ["ln", "-sf", targetDir + "/" + VERSION + "/cqtdeployer.sh", - homeDir + "/.local/bin/cqtdeployer"], - "UNDOEXECUTE", ["rm", "-f", homeDir + "/.local/bin/cqtdeployer"] ) - - component.addOperation('Execute', ["ln", "-sf", targetDir + "/" + VERSION + "/cqt.sh", - homeDir + "/.local/bin/cqt"], - "UNDOEXECUTE", ["rm", "-f", homeDir + "/.local/bin/cqt"] ) - - component.addOperation('Execute', ["ln", "-sf", targetDir + "/" + VERSION + "/cqt.sh", - homeDir + "/.local/bin/cqtdeployer.cqt"], - "UNDOEXECUTE", ["rm", "-f", homeDir + "/.local/bin/cqtdeployer.cqt"] ) - - generateShortCutCmd(VERSION + "/cqtdeployer", VERSION + "/icon.png"); - - } - -} diff --git a/QIFData/packages/cqtdeployer.1_5/meta/package.xml b/QIFData/packages/cqtdeployer.1_5/meta/package.xml deleted file mode 100644 index 476df75..0000000 --- a/QIFData/packages/cqtdeployer.1_5/meta/package.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0"?> -<Package> - <DisplayName>CQtDeployer 1.5</DisplayName> - <Description>CQtDeployer 1.5</Description> - <Version>1.5.4.17</Version> - <Default>true</Default> - <ForcedInstallation>false</ForcedInstallation> - <Script>installscript.js</Script> - <ReleaseDate>2022-03-03</ReleaseDate> - <SortingPriority>201</SortingPriority> - <Translations> - <Translation>ru.qm</Translation> - </Translations> -</Package> diff --git a/QIFData/packages/cqtdeployer.1_5/meta/ru.ts b/QIFData/packages/cqtdeployer.1_5/meta/ru.ts deleted file mode 100644 index 1a671e4..0000000 --- a/QIFData/packages/cqtdeployer.1_5/meta/ru.ts +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ru_RU"> -<context> - <name>installscript</name> - <message> - <source>CQtDeployer 1.3</source> - <oldsource>CQtDeployer</oldsource> - <translation type="obsolete">CQtDeployer</translation> - </message> - <message> - <source>This package contains CQtDeployer version 1.3</source> - <oldsource>This package contains CQtDeployer</oldsource> - <translation type="obsolete">Этот пакет содержит CQtDeployer</translation> - </message> - <message> - <source>install in system</source> - <translation>Установка в систему</translation> - </message> - <message> - <source>Installer</source> - <translation>Установщик</translation> - </message> - <message> - <source>To uninstall cqtdeployer on your system, you need administrator rights!. </source> - <translation type="vanished">Чтобы удалить cqtdeployer в вашей системе, вам нужны права администратора !. </translation> - </message> - <message> - <source>To install cqtdeployer on your system, you need administrator rights!. </source> - <translation type="vanished">Чтобы установить cqtdeployer в вашей системе, вам нужны права администратора!. </translation> - </message> - <message> - <source>The installation was successful, but cqtdeployer will not be available from the console. </source> - <translation type="vanished">Установка прошла успешно, но cqtdeployer не будет доступен из консоли. </translation> - </message> - <message> - <source>To take advantage of this program you will need to enter the full path to it. </source> - <translation type="vanished">Чтобы воспользоваться этой программой, вам нужно будет ввести полный путь к ней. </translation> - </message> - <message> - <source>Example: </source> - <translation type="vanished">Пример: </translation> - </message> - <message> - <source>CQtDeployer successfully installed on your computer to use the call "cqtdeployer".</source> - <translation type="vanished">CQtDeployer успешно установлен на вашем компьютере, чтобы использоваться введите в консоле "cqtdeployer".</translation> - </message> - <message> - <source>The "~/local/bin" folder was not initialized, you may need to reboot to work correctly!</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/QIFData/packages/cqtdeployer/meta/package.xml b/QIFData/packages/cqtdeployer/meta/package.xml deleted file mode 100644 index 35d0c06..0000000 --- a/QIFData/packages/cqtdeployer/meta/package.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0"?> -<Package> - <DisplayName>CQtDeployer</DisplayName> - <Description>CQtDeployer</Description> - <Version>1.5</Version> - <Default>true</Default> - <ForcedInstallation>false</ForcedInstallation> - <ReleaseDate>2021-05-25</ReleaseDate> - <SortingPriority>100</SortingPriority> -</Package> diff --git a/QIFData/scripts/QIF.py b/QIFData/scripts/QIF.py deleted file mode 100755 index 8908651..0000000 --- a/QIFData/scripts/QIF.py +++ /dev/null @@ -1,39 +0,0 @@ -import sys -import os -import subprocess -import shutil - -PLATFORM = sys.argv[1] -VERSION = sys.argv[2] -PATHQIF = sys.argv[3] - -if len(PLATFORM) <= 0: - PLATFORM = "linux" - -if os.path.isdir(PATHQIF + "/QIF"): - print("if target already executed") - exit(0) - -print("PLATFORM=" + PLATFORM) -print("VERSION=" + VERSION) - -# Command Example : aqt tool linux tools_ifw 4.0 qt.tools.ifw.40 -command = ["aqt", - "tool", -# "-b", -# "https://mirrors.ocf.berkeley.edu/qt/", - "--outputdir", - PATHQIF, - PLATFORM, - "tools_ifw", - VERSION, - "qt.tools.ifw." + VERSION.replace('.', '')] - -print("command=" + " ".join(command)) - -subprocess.call(command) - -os.rename(PATHQIF + "/Tools/QtInstallerFramework/" + VERSION[0:3] + "/bin/", - PATHQIF + "/QIF") -shutil.rmtree(PATHQIF + "/Tools") -os.remove("aqtinstall.log") diff --git a/QIFData/scripts/alias.py b/QIFData/scripts/alias.py deleted file mode 100755 index 3d34156..0000000 --- a/QIFData/scripts/alias.py +++ /dev/null @@ -1,12 +0,0 @@ -import os -import shutil -import subprocess - -dir_path = os.path.dirname(os.path.realpath(__file__)) -dest = dir_path + "/../packages/cqtdeployer.1_5/data/1.5/" -if not os.path.isdir(dest): - os.makedirs(dest) - - -shutil.copyfile(dir_path + "/alias/cqt.sh", dest + "/cqt.sh") -subprocess.run(["chmod", "777", dest + "/cqt.sh"]) diff --git a/QIFData/scripts/alias/cqt.sh b/QIFData/scripts/alias/cqt.sh deleted file mode 100755 index 46dcf9f..0000000 --- a/QIFData/scripts/alias/cqt.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -function join_by { local IFS="$1"; shift; echo "$*"; } - -var=$(join_by , $@) -cqtdeployer $var -bin $var - diff --git a/UnitTests/.gitignore b/UnitTests/.gitignore deleted file mode 100644 index fab7372..0000000 --- a/UnitTests/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# This file is used to ignore files which are generated -# ---------------------------------------------------------------------------- - -*~ -*.autosave -*.a -*.core -*.moc -*.o -*.obj -*.orig -*.rej -*.so -*.so.* -*_pch.h.cpp -*_resource.rc -*.qm -.#* -*.*# -core -!core/ -tags -.DS_Store -.directory -*.debug -Makefile* -*.prl -*.app -moc_*.cpp -ui_*.h -qrc_*.cpp -Thumbs.db -*.res -*.rc -/.qmake.cache -/.qmake.stash - -# qtcreator generated files -*.pro.user* - -# xemacs temporary files -*.flc - -# Vim temporary files -.*.swp - -# Visual Studio generated files -*.ib_pdb_index -*.idb -*.ilk -*.pdb -*.sln -*.suo -*.vcproj -*vcproj.*.*.user -*.ncb -*.sdf -*.opensdf -*.vcxproj -*vcxproj.* - -# MinGW generated files -*.Debug -*.Release - -# Python byte code -*.pyc - -# Binaries -# -------- -*.dll -*.exe - diff --git a/UnitTests/UnitTests.pro b/UnitTests/UnitTests.pro deleted file mode 100644 index fd44e60..0000000 --- a/UnitTests/UnitTests.pro +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2018-2022 QuasarApp. -# Distributed under the lgplv3 software license, see the accompanying -# Everyone is permitted to copy and distribute verbatim copies -# of this license document, but changing it is not allowed. -# - - -QT += testlib -QT -= gui - -CONFIG(release, debug|release): { - DESTDIR="$$PWD/build/release" -} else { - DESTDIR="$$PWD/build/debug" -} - -include('$$PWD/../QuasarAppLib/QuasarLib.pri') -include('$$PWD/../Deploy/Deploy.pri') -include('$$PWD/../zip/zip.pri') - -include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') - - -QT_DIR = $$[QT_HOST_BINS]/../ -DEFINES+=QT_BASE_DIR='\\"$$QT_DIR\\"' -DEFINES+=TEST_BIN_DIR='\\"$$PWD/../tests/build/\\"' -DEFINES+=QTEST_FUNCTION_TIMEOUT=900000 - -CONFIG += qt console warn_on depend_includepath testcase -CONFIG -= app_bundle - -TEMPLATE = app - -SOURCES += tst_deploytest.cpp \ - libcreator.cpp \ - modules.cpp \ - modulesqt513.cpp \ - modulesqt514.cpp \ - modulesqt515.cpp \ - modulesqt5152.cpp \ - qmlcreator.cpp \ - testutils.cpp - -RESOURCES += \ - res.qrc - -HEADERS += \ - backward-cpp/backward.hpp \ - libcreator.h \ - modules.h \ - modulesqt513.h \ - modulesqt514.h \ - modulesqt515.h \ - modulesqt5152.h \ - qmlcreator.h \ - testutils.h - diff --git a/UnitTests/res.qrc b/UnitTests/res.qrc deleted file mode 100644 index 9d01e3e..0000000 --- a/UnitTests/res.qrc +++ /dev/null @@ -1,25 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file alias="debugLib">testRes/debugLibData</file> - <file alias="linux64.so">testRes/Unix/lib.so.1</file> - <file alias="linux64">testRes/Unix/Start</file> - <file alias="win32mingw.exe">testRes/win32/mingw/hanoi-towers.exe</file> - <file alias="win32mingw.dll">testRes/win32/mingw/libEGL.dll</file> - <file alias="win32msvc.dll">testRes/win32/msvc/qtaudio_windows.dll</file> - <file alias="win32msvc.exe">testRes/win32/msvc/TestStart.exe</file> - <file alias="win64mingw.exe">testRes/win64/mingw/cqtdeployer.exe</file> - <file alias="win64mingw.dll">testRes/win64/mingw/Deploy.dll</file> - <file alias="win64msvc.exe">testRes/win64/msvc/exe.exe</file> - <file alias="win64msvc.dll">testRes/win64/msvc/lib.dll</file> - <file alias="qmlFile.qml">testRes/qml/Scene</file> - <file alias="qmlFileQt6.qml">testRes/qml/SceneQt6</file> - <file alias="qmlDir">testRes/qml/qmldir</file> - </qresource> - <qresource prefix="/testResurces"> - <file>testRes/TestQMLWidgets.sh</file> - <file>testRes/testMultiPackageConfig.json</file> - <file>testRes/customRunScript.sh</file> - <file>testRes/TestTr.qm</file> - <file>testRes/TestIcon.png</file> - </qresource> -</RCC> diff --git a/UnitTests/testRes/TestTr.qm b/UnitTests/testRes/TestTr.qm deleted file mode 100755 index 5027904..0000000 --- a/UnitTests/testRes/TestTr.qm +++ /dev/null @@ -1 +0,0 @@ -TEST TR diff --git a/UnitTests/testRes/win32/mingw/libEGL.dll b/UnitTests/testRes/win32/mingw/libEGL.dll deleted file mode 100644 index 8aaf710..0000000 Binary files a/UnitTests/testRes/win32/mingw/libEGL.dll and /dev/null differ diff --git a/UnitTests/testRes/win32/msvc/qtaudio_windows.dll b/UnitTests/testRes/win32/msvc/qtaudio_windows.dll deleted file mode 100644 index 9c284fa..0000000 Binary files a/UnitTests/testRes/win32/msvc/qtaudio_windows.dll and /dev/null differ diff --git a/UnitTests/testRes/win64/mingw/Deploy.dll b/UnitTests/testRes/win64/mingw/Deploy.dll deleted file mode 100644 index 885536f..0000000 Binary files a/UnitTests/testRes/win64/mingw/Deploy.dll and /dev/null differ diff --git a/UnitTests/testRes/win64/msvc/lib.dll b/UnitTests/testRes/win64/msvc/lib.dll deleted file mode 100644 index d33efe0..0000000 Binary files a/UnitTests/testRes/win64/msvc/lib.dll and /dev/null differ diff --git a/_config.yml b/_config.yml deleted file mode 100644 index ddeb671..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-time-machine \ No newline at end of file diff --git a/doxygen.conf b/doxygen.conf index 2d9a0e4..d7da7d5 100644 --- a/doxygen.conf +++ b/doxygen.conf @@ -32,7 +32,8 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = CQtDeployer official documentation page +PROJECT_NAME = CQtDeployer + # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. @@ -50,7 +51,8 @@ PROJECT_BRIEF = # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = "res/CQtDeployer logo_web.png" +PROJECT_LOGO = + # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If @@ -701,7 +703,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = QuasarAppLib/CMake/DoxyStyle/DoxygenLayout.xml +LAYOUT_FILE = submodules/CMake/DoxyStyle/DoxygenLayout.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -788,10 +790,8 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ./md \ - - - +INPUT = ./src/Library/src \ + ./README.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -874,7 +874,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = ./submodules # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -927,7 +927,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = ./res +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -983,7 +983,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = md/README.md +USE_MDFILE_AS_MAINPAGE = ./README.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1193,7 +1193,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = QuasarAppLib/CMake/DoxyStyle/doxygenStyles.css +HTML_EXTRA_STYLESHEET = submodules/CMake/DoxyStyle/doxygenStyles.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1392,7 +1392,7 @@ QCH_FILE = # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_NAMESPACE = QuasarApp +QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual @@ -1496,7 +1496,7 @@ ENUM_VALUES_PER_LINE = 4 # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. -TREEVIEW_WIDTH = 300 +TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. @@ -1621,7 +1621,7 @@ SERVER_BASED_SEARCH = NO # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH = NO +EXTERNAL_SEARCH = YES # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. diff --git a/examples/TestQMLWidgets/.qmake.stash b/examples/TestQMLWidgets/.qmake.stash deleted file mode 100644 index 17a7f33..0000000 --- a/examples/TestQMLWidgets/.qmake.stash +++ /dev/null @@ -1,24 +0,0 @@ -QMAKE_CXX.INCDIRS = \ - /usr/include/c++/7 \ - /usr/include/x86_64-linux-gnu/c++/7 \ - /usr/include/c++/7/backward \ - /usr/lib/gcc/x86_64-linux-gnu/7/include \ - /usr/local/include \ - /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed \ - /usr/include/x86_64-linux-gnu \ - /usr/include -QMAKE_CXX.LIBDIRS = \ - /usr/lib/gcc/x86_64-linux-gnu/7 \ - /usr/lib/x86_64-linux-gnu \ - /usr/lib \ - /lib/x86_64-linux-gnu \ - /lib -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION diff --git a/examples/TestQMLWidgets/HomeForm.ui.qml b/examples/TestQMLWidgets/HomeForm.ui.qml deleted file mode 100644 index 6474fad..0000000 --- a/examples/TestQMLWidgets/HomeForm.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -Page { - width: 600 - height: 400 - - title: qsTr("Home") - - Label { - text: qsTr("You are on the home page.") - anchors.centerIn: parent - } -} diff --git a/examples/TestQMLWidgets/Page1Form.ui.qml b/examples/TestQMLWidgets/Page1Form.ui.qml deleted file mode 100644 index a25e78a..0000000 --- a/examples/TestQMLWidgets/Page1Form.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -Page { - width: 600 - height: 400 - - title: qsTr("Page 1") - - Label { - text: qsTr("You are on Page 1.") - anchors.centerIn: parent - } -} diff --git a/examples/TestQMLWidgets/Page2Form.ui.qml b/examples/TestQMLWidgets/Page2Form.ui.qml deleted file mode 100644 index c34bb98..0000000 --- a/examples/TestQMLWidgets/Page2Form.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -Page { - width: 600 - height: 400 - - title: qsTr("Page 2") - - Label { - text: qsTr("You are on Page 2.") - anchors.centerIn: parent - } -} diff --git a/examples/TestQMLWidgets/README.md b/examples/TestQMLWidgets/README.md deleted file mode 100644 index 9c1b75f..0000000 --- a/examples/TestQMLWidgets/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# This example for packing apps to snap -You need to build your project with your own Qt version. - -1. cd ~/ # go to home dir -2. snap install cqtdeployer # install cqtdeployer from snap store -3. git clone https://github.com/QuasarApp/CQtDeployer.git # clone this project -4. cd Console-QtDeployer/examples/TestQMLWidgets # go to folder with example -5. /path/to/your/qmake/bin/qmake TestQMLWidgets.pro # run your qmake for this example -6. make # build example -7. cqtdeployer -bin ./build/TestQMLWidgets -qmake /path/to/your/qmake/bin/qmake -qmlDir ./ -targetDir ./distro - # run cqtdeployer for deploy example project -8. snapcraft # create snapcraft build -9. snap install cqtdeployerexample_0.1_amd64.snap --dangerous # install this example -10. cqtdeployerexample # check - -Done! diff --git a/examples/TestQMLWidgets/TestQMLWidgets.pro b/examples/TestQMLWidgets/TestQMLWidgets.pro deleted file mode 100644 index 762b55d..0000000 --- a/examples/TestQMLWidgets/TestQMLWidgets.pro +++ /dev/null @@ -1,27 +0,0 @@ -QT += quick -CONFIG += c++11 - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Refer to the documentation for the -# deprecated API to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = - -DESTDIR="$$PWD/build" - diff --git a/examples/TestQMLWidgets/main.cpp b/examples/TestQMLWidgets/main.cpp deleted file mode 100644 index 6333b85..0000000 --- a/examples/TestQMLWidgets/main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include <QGuiApplication> -#include <QQmlApplicationEngine> - -int main(int argc, char *argv[]) -{ - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - QGuiApplication app(argc, argv); - - QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - if (engine.rootObjects().isEmpty()) - return -1; - - return app.exec(); -} diff --git a/examples/TestQMLWidgets/main.qml b/examples/TestQMLWidgets/main.qml deleted file mode 100644 index d5d621a..0000000 --- a/examples/TestQMLWidgets/main.qml +++ /dev/null @@ -1,65 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -ApplicationWindow { - id: window - visible: true - width: 640 - height: 480 - title: qsTr("Stack") - - header: ToolBar { - contentHeight: toolButton.implicitHeight - - ToolButton { - id: toolButton - text: stackView.depth > 1 ? "\u25C0" : "\u2630" - font.pixelSize: Qt.application.font.pixelSize * 1.6 - onClicked: { - if (stackView.depth > 1) { - stackView.pop() - } else { - drawer.open() - } - } - } - - Label { - text: stackView.currentItem.title - anchors.centerIn: parent - } - } - - Drawer { - id: drawer - width: window.width * 0.66 - height: window.height - - Column { - anchors.fill: parent - - ItemDelegate { - text: qsTr("Page 1") - width: parent.width - onClicked: { - stackView.push("Page1Form.ui.qml") - drawer.close() - } - } - ItemDelegate { - text: qsTr("Page 2") - width: parent.width - onClicked: { - stackView.push("Page2Form.ui.qml") - drawer.close() - } - } - } - } - - StackView { - id: stackView - initialItem: "HomeForm.ui.qml" - anchors.fill: parent - } -} diff --git a/examples/TestQMLWidgets/qml.qrc b/examples/TestQMLWidgets/qml.qrc deleted file mode 100644 index 7725989..0000000 --- a/examples/TestQMLWidgets/qml.qrc +++ /dev/null @@ -1,9 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - <file>HomeForm.ui.qml</file> - <file>Page1Form.ui.qml</file> - <file>Page2Form.ui.qml</file> - <file>qtquickcontrols2.conf</file> - </qresource> -</RCC> diff --git a/examples/TestQMLWidgets/qtquickcontrols2.conf b/examples/TestQMLWidgets/qtquickcontrols2.conf deleted file mode 100644 index 08109fe..0000000 --- a/examples/TestQMLWidgets/qtquickcontrols2.conf +++ /dev/null @@ -1,6 +0,0 @@ -; This file can be edited to change the style of the application -; Read "Qt Quick Controls 2 Configuration File" for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html - -[Controls] -Style=Imagine diff --git a/examples/TestQMLWidgets/snap/snapcraft.yaml b/examples/TestQMLWidgets/snap/snapcraft.yaml deleted file mode 100644 index 078e124..0000000 --- a/examples/TestQMLWidgets/snap/snapcraft.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: cqtdeployerexample # you probably want to 'snapcraft register <name>' -base: core18 # the base snap is the execution environment for this snap -version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' -summary: simple example for packing with cqtdeployer # 79 char long summary -description: | - simple example for packing with cqtdeployer - -grade: stable # must be 'stable' to release into candidate/stable channels -confinement: strict # use 'strict' once you have the right plugs and slots - - -apps: - cqtdeployerexample: - command: desktop-launch $SNAP/TestQMLWidgets.sh - - plugs: [desktop, unity7, home, opengl, x11, wayland] - - -parts: - cqtdeployerexample: - # See 'snapcraft plugins' - plugin: dump - source: distro - after: [wrapper, libsgl] - - wrapper: - plugin: dump - source: wrapper - - libsgl: - plugin: nil - stage-packages: - # Here for the plugins-- they're not linked in automatically. - - libx11-xcb1 - - libglu1-mesa - - libxrender1 - - libxi6 - - libegl1-mesa - - fontconfig - - libgl1-mesa-dri - - libxkbcommon0 - - ttf-ubuntu-font-family - - dmz-cursor-theme - - adwaita-icon-theme - - gnome-themes-standard - - shared-mime-info - - libgdk-pixbuf2.0-0 - - libgtk2.0-0 - - xdg-user-dirs - - libxrandr2 - - libwayland-cursor0 - - libwayland-egl1 - - libpq5 diff --git a/examples/TestQMLWidgets/wrapper/bin/desktop-launch b/examples/TestQMLWidgets/wrapper/bin/desktop-launch deleted file mode 100755 index 2a6d60c..0000000 --- a/examples/TestQMLWidgets/wrapper/bin/desktop-launch +++ /dev/null @@ -1,442 +0,0 @@ -#!/bin/bash -################# -# Launcher init # -################# - -START=$(date +%s.%N) - -# On Fedora $SNAP is under /var and there is some magic to map it to /snap. -# # We need to handle that case and reset $SNAP -SNAP=`echo $SNAP | sed -e "s|/var/lib/snapd||g"` - -needs_update=true - -. $SNAP_USER_DATA/.last_revision 2>/dev/null || true -if [ "$SNAP_DESKTOP_LAST_REVISION" = "$SNAP_REVISION" ]; then - needs_update=false -fi - -# Set $REALHOME to the users real home directory -REALHOME=`getent passwd $UID | cut -d ':' -f 6` - -# If the user has modified their user-dirs settings, force an update -if [[ -f $HOME/.config/user-dirs.dirs.md5sum && -f $HOME/.config/user-dirs.locale.md5sum ]]; then - if [[ "$(md5sum < $REALHOME/.config/user-dirs.dirs)" != "$(cat $HOME/.config/user-dirs.dirs.md5sum)" || - "$(md5sum < $REALHOME/.config/user-dirs.locale)" != "$(cat $HOME/.config/user-dirs.locale.md5sum)" ]]; then - needs_update=true - fi -fi - -if [ "$SNAP_ARCH" == "amd64" ]; then - ARCH="x86_64-linux-gnu" -elif [ "$SNAP_ARCH" == "armhf" ]; then - ARCH="arm-linux-gnueabihf" -elif [ "$SNAP_ARCH" == "arm64" ]; then - ARCH="aarch64-linux-gnu" -else - ARCH="$SNAP_ARCH-linux-gnu" -fi - -export SNAP_LAUNCHER_ARCH_TRIPLET=$ARCH - -# Don't LD_PRELOAD bindtextdomain for classic snaps -if ! grep -qs "^\s*confinement:\s*classic\s*" $SNAP/meta/snap.yaml; then - if [ -f $SNAP/lib/bindtextdomain.so ]; then - export LD_PRELOAD=$LD_PRELOAD:$SNAP/lib/bindtextdomain.so - fi -fi -############################################### -# Launcher common exports for any desktop app # -############################################### - -function prepend_dir() { - local var="$1" - local dir="$2" - if [ -d "$dir" ]; then - eval "export $var=\"\$dir\${$var:+:\$$var}\"" - fi -} - -function append_dir() { - local var="$1" - local dir="$2" - if [ -d "$dir" ]; then - eval "export $var=\"\${$var:+\$$var:}\$dir\"" - fi -} - -function can_open_file() { - return `head -c0 "$1" &> /dev/null`; -} - -WITH_RUNTIME=no -if [ -z "$RUNTIME" ]; then - RUNTIME=$SNAP -else - # add general paths not added by snapcraft due to runtime snap - append_dir LD_LIBRARY_PATH $RUNTIME/lib/$ARCH - append_dir LD_LIBRARY_PATH $RUNTIME/usr/lib/$ARCH - append_dir PATH $RUNTIME/usr/bin - WITH_RUNTIME=yes -fi - -# XKB config -export XKB_CONFIG_ROOT=$RUNTIME/usr/share/X11/xkb - -# Give XOpenIM a chance to locate locale data. -# This is required for text input to work in SDL2 games. -export XLOCALEDIR=$RUNTIME/usr/share/X11/locale - -# Set XCursors path -export XCURSOR_PATH=$RUNTIME/usr/share/icons - -# Mesa Libs for OpenGL support -append_dir LD_LIBRARY_PATH $RUNTIME/usr/lib/$ARCH/mesa -append_dir LD_LIBRARY_PATH $RUNTIME/usr/lib/$ARCH/mesa-egl - -# Tell libGL where to find the drivers -export LIBGL_DRIVERS_PATH=$RUNTIME/usr/lib/$ARCH/dri -append_dir LD_LIBRARY_PATH $LIBGL_DRIVERS_PATH - -# Workaround in snapd for proprietary nVidia drivers mounts the drivers in -# /var/lib/snapd/lib/gl that needs to be in LD_LIBRARY_PATH -# Without that OpenGL using apps do not work with the nVidia drivers. -# Ref.: https://bugs.launchpad.net/snappy/+bug/1588192 -append_dir LD_LIBRARY_PATH /var/lib/snapd/lib/gl - -# Unity7 export (workaround for https://launchpad.net/bugs/1638405) -append_dir LD_LIBRARY_PATH $RUNTIME/usr/lib/$ARCH/libunity - -# Pulseaudio export -append_dir LD_LIBRARY_PATH $RUNTIME/usr/lib/$ARCH/pulseaudio - -# EGL vendor files on glvnd enabled systems -[ -d /var/lib/snapd/lib/glvnd/egl_vendor.d ] && \ - append_dir __EGL_VENDOR_LIBRARY_DIRS /var/lib/snapd/lib/glvnd/egl_vendor.d - -# Tell GStreamer where to find its plugins -export GST_PLUGIN_PATH=$SNAP/usr/lib/$ARCH/gstreamer-1.0 -export GST_PLUGIN_SYSTEM_PATH=$RUNTIME/usr/lib/$ARCH/gstreamer-1.0 -# gst plugin scanner doesn't install in the correct path: https://github.com/ubuntu/snapcraft-desktop-helpers/issues/43 -export GST_PLUGIN_SCANNER=$RUNTIME/usr/lib/$ARCH/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner - -# XDG Config -[ "$WITH_RUNTIME" = yes ] && prepend_dir XDG_CONFIG_DIRS $RUNTIME/etc/xdg -prepend_dir XDG_CONFIG_DIRS $SNAP/etc/xdg - -# Define snaps' own data dir -[ "$WITH_RUNTIME" = yes ] && prepend_dir XDG_DATA_DIRS $RUNTIME/usr/share -prepend_dir XDG_DATA_DIRS $SNAP/usr/share -prepend_dir XDG_DATA_DIRS $SNAP/share -prepend_dir XDG_DATA_DIRS $SNAP/data-dir -prepend_dir XDG_DATA_DIRS $SNAP_USER_DATA - -# Set XDG_DATA_HOME to local path -export XDG_DATA_HOME=$SNAP_USER_DATA/.local/share -mkdir -p $XDG_DATA_HOME - -# Workaround for GLib < 2.53.2 not searching for schemas in $XDG_DATA_HOME: -# https://bugzilla.gnome.org/show_bug.cgi?id=741335 -prepend_dir XDG_DATA_DIRS $XDG_DATA_HOME - -# Set cache folder to local path -export XDG_CACHE_HOME=$SNAP_USER_COMMON/.cache -if [[ -d $SNAP_USER_DATA/.cache && ! -e $XDG_CACHE_HOME ]]; then - # the .cache directory used to be stored under $SNAP_USER_DATA, migrate it - mv $SNAP_USER_DATA/.cache $SNAP_USER_COMMON/ -fi -mkdir -p $XDG_CACHE_HOME - -# Set config folder to local path -export XDG_CONFIG_HOME=$SNAP_USER_DATA/.config -mkdir -p $XDG_CONFIG_HOME - -# Create $XDG_RUNTIME_DIR if not exists (to be removed when LP: #1656340 is fixed) -[ -n "$XDG_RUNTIME_DIR" ] && mkdir -p $XDG_RUNTIME_DIR -m 700 - -# Ensure the app finds locale definitions (requires locales-all to be installed) -append_dir LOCPATH $RUNTIME/usr/lib/locale - -# If any, keep track of where XDG dirs were so we can potentially migrate the content later -test -f ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs && . ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs -for d in DOCUMENTS DESKTOP DOWNLOAD MUSIC PICTURES VIDEOS PUBLICSHARE TEMPLATES; do - eval $(echo "OLD_XDG_${d}_DIR")=`eval "$(echo "echo \\$XDG_${d}_DIR")"` -done - -# Setup user-dirs.* or run xdg-user-dirs-update if needed -needs_xdg_update=false -needs_xdg_links=false -if can_open_file "$REALHOME/.config/user-dirs.dirs" && can_open_file "$REALHOME/.config/user-dirs.locale"; then - mkdir -p $HOME/.config -m 700 - sed /^#/!s#\$HOME#${REALHOME}#g $REALHOME/.config/user-dirs.dirs > $HOME/.config/user-dirs.dirs - cp -a $REALHOME/.config/user-dirs.locale $HOME/.config/ - for f in user-dirs.dirs user-dirs.locale; do - md5sum < $REALHOME/.config/$f > $HOME/.config/$f.md5sum - done -else - needs_xdg_update=true - needs_xdg_links=true -fi - -# Check if we can actually read the contents of each xdg dir -test -f ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs && . ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs -XDG_SPECIAL_DIRS=($XDG_DOCUMENTS_DIR $XDG_DESKTOP_DIR $XDG_DOWNLOAD_DIR $XDG_MUSIC_DIR $XDG_PICTURES_DIR $XDG_VIDEOS_DIR $XDG_PUBLIC_DIR $XDG_TEMPLATES_DIR) -for d in ${XDG_SPECIAL_DIRS[@]}; do - if ! can_open_file $d; then - needs_xdg_update=true - fi -done - -# If needs XDG update and xdg-user-dirs-update exists in $PATH, run it -if [ $needs_xdg_update = true ] && command -v xdg-user-dirs-update >/dev/null; then - xdg-user-dirs-update -fi - -# Create links for user-dirs.dirs -if [ $needs_xdg_links = true ]; then - test -f ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs && . ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs - XDG_SPECIAL_DIRS=($XDG_DOCUMENTS_DIR $XDG_DESKTOP_DIR $XDG_DOWNLOAD_DIR $XDG_MUSIC_DIR $XDG_PICTURES_DIR $XDG_VIDEOS_DIR $XDG_PUBLIC_DIR $XDG_TEMPLATES_DIR) - for d in ${XDG_SPECIAL_DIRS[@]}; do - b=$(realpath "$d" --relative-to="$REALHOME") - if [ -e $REALHOME/$b ] && [ ! -e $HOME/$b ]; then - ln -s $REALHOME/$b $HOME/$b - fi - done -else - # If we aren't creating new links, check if we have content saved in old locations and move it - for d in DOCUMENTS DESKTOP DOWNLOAD MUSIC PICTURES VIDEOS PUBLICSHARE TEMPLATES; do - old=`eval "$(echo "echo \\$OLD_XDG_${d}_DIR")"` - new=`eval "$(echo "echo \\$XDG_${d}_DIR")"` - if [ -L "$old" ] && [ -d "$new" ] && [ `readlink "$old"` != "$new" ]; then - mv "$old"/* "$new"/ 2>/dev/null - elif [ -d "$old" ] && [ -d "$new" ] && [ "$old" != "$new" ]; then - mv "$old"/* "$new"/ 2>/dev/null - fi - done -fi - -# If detect wayland server socket, then set environment so applications prefer -# wayland, and setup compat symlink (until we use user mounts. Remember, -# XDG_RUNTIME_DIR is /run/user/<uid>/snap.$SNAP so look in the parent directory -# for the socket. For details: -# https://forum.snapcraft.io/t/wayland-dconf-and-xdg-runtime-dir/186/10 -# Applications that don't support wayland natively may define DISABLE_WAYLAND -# (to any non-empty value) to skip that logic entirely. -wayland_available=false -if [[ -n "$XDG_RUNTIME_DIR" && -z "$DISABLE_WAYLAND" ]]; then - wdisplay="wayland-0" - if [ -n "$WAYLAND_DISPLAY" ]; then - wdisplay="$WAYLAND_DISPLAY" - fi - wayland_sockpath="$XDG_RUNTIME_DIR/../$wdisplay" - wayland_snappath="$XDG_RUNTIME_DIR/$wdisplay" - if [ -S "$wayland_sockpath" ]; then - # if running under wayland, use it - #export WAYLAND_DEBUG=1 - wayland_available=true - # create the compat symlink for now - if [ ! -e "$wayland_snappath" ]; then - ln -s "$wayland_sockpath" "$wayland_snappath" - fi - fi -fi - -# Make PulseAudio socket available inside the snap-specific $XDG_RUNTIME_DIR -if [ -n "$XDG_RUNTIME_DIR" ]; then - pulsenative="pulse/native" - pulseaudio_sockpath="$XDG_RUNTIME_DIR/../$pulsenative" - if [ -S "$pulseaudio_sockpath" ]; then - export PULSE_SERVER="unix:${pulseaudio_sockpath}" - fi -fi - -# GI repository -[ "$WITH_RUNTIME" = yes ] && prepend_dir GI_TYPELIB_PATH $RUNTIME/usr/lib/$ARCH/girepository-1.0 -[ "$WITH_RUNTIME" = yes ] && prepend_dir GI_TYPELIB_PATH $RUNTIME/usr/lib/girepository-1.0 -prepend_dir GI_TYPELIB_PATH $SNAP/usr/lib/$ARCH/girepository-1.0 -prepend_dir GI_TYPELIB_PATH $SNAP/usr/lib/girepository-1.0 -prepend_dir GI_TYPELIB_PATH $SNAP/usr/lib/gjs/girepository-1.0 - -# Keep an array of data dirs, for looping through them -IFS=':' read -r -a data_dirs_array <<< "$XDG_DATA_DIRS" - -# Font Config and themes -export FONTCONFIG_PATH=$RUNTIME/etc/fonts -export FONTCONFIG_FILE=$RUNTIME/etc/fonts/fonts.conf - -function make_user_fontconfig { - echo "<fontconfig>" - if [ -d $REALHOME/.local/share/fonts ]; then - echo " <dir>$REALHOME/.local/share/fonts</dir>" - fi - if [ -d $REALHOME/.fonts ]; then - echo " <dir>$REALHOME/.fonts</dir>" - fi - for d in "${data_dirs_array[@]}"; do - if [ -d "$d/fonts" ]; then - echo " <dir>$d/fonts</dir>" - fi - done - echo ' <include ignore_missing="yes">conf.d</include>' - # We need to include this default cachedir first so that caching - # works: without it, fontconfig will try to write to the real user home - # cachedir and be blocked by AppArmor. - echo ' <cachedir prefix="xdg">fontconfig</cachedir>' - if [ -d $REALHOME/.cache/fontconfig ]; then - echo " <cachedir>$REALHOME/.cache/fontconfig</cachedir>" - fi - echo "</fontconfig>" -} - -if [ $needs_update = true ]; then - rm -rf $XDG_DATA_HOME/{fontconfig,fonts,fonts-*,themes,.themes} - - # This fontconfig fragment is installed in a location that is - # included by the system fontconfig configuration: namely the - # etc/fonts/conf.d/50-user.conf file. - mkdir -p $XDG_CONFIG_HOME/fontconfig - make_user_fontconfig > $XDG_CONFIG_HOME/fontconfig/fonts.conf - - # the themes symlink are needed for GTK 3.18 when the prefix isn't changed - # GTK 3.20 looks into XDG_DATA_DIR which has connected themes. - ln -sf $RUNTIME/usr/share/themes $XDG_DATA_HOME - ln -sfn $RUNTIME/usr/share/themes $SNAP_USER_DATA/.themes -fi - -# Build mime.cache -# needed for gtk and qt icon -if [ $needs_update = true ]; then - rm -rf $XDG_DATA_HOME/mime - if [ ! -f $RUNTIME/usr/share/mime/mime.cache ]; then - if command -v update-mime-database >/dev/null; then - cp --preserve=timestamps -dR $RUNTIME/usr/share/mime $XDG_DATA_HOME - update-mime-database $XDG_DATA_HOME/mime - fi - fi -fi - -# Gio modules and cache (including gsettings module) -export GIO_MODULE_DIR=$XDG_CACHE_HOME/gio-modules -function compile_giomodules { - if [ -f $1/glib-2.0/gio-querymodules ]; then - rm -rf $GIO_MODULE_DIR - mkdir -p $GIO_MODULE_DIR - ln -s $1/gio/modules/*.so $GIO_MODULE_DIR - $1/glib-2.0/gio-querymodules $GIO_MODULE_DIR - fi -} -if [ $needs_update = true ]; then - compile_giomodules $RUNTIME/usr/lib/$ARCH -fi - -# Setup compiled gsettings schema -GS_SCHEMA_DIR=$XDG_DATA_HOME/glib-2.0/schemas -function compile_schemas { - if [ -f "$1" ]; then - rm -rf $GS_SCHEMA_DIR - mkdir -p $GS_SCHEMA_DIR - for d in "${data_dirs_array[@]}"; do - schema_dir=$d/glib-2.0/schemas - if [ -f "$schema_dir/gschemas.compiled" ]; then - # This directory already has compiled schemas - continue - fi - if [ -n "$(ls -A $schema_dir/*.xml 2>/dev/null)" ]; then - ln -s $schema_dir/*.xml $GS_SCHEMA_DIR - fi - if [ -n "$(ls -A $schema_dir/*.override 2>/dev/null)" ]; then - ln -s $schema_dir/*.override $GS_SCHEMA_DIR - fi - done - # Only compile schemas if we copied anyting - if [ -n "$(ls -A $GS_SCHEMA_DIR/*.xml $GS_SCHEMA_DIR/*.override 2>/dev/null)" ]; then - "$1" $GS_SCHEMA_DIR - fi - fi -} -if [ $needs_update = true ]; then - compile_schemas $RUNTIME/usr/lib/$ARCH/glib-2.0/glib-compile-schemas -fi - -# Enable gsettings user changes -# symlink the dconf file if home plug is connected for read -DCONF_DEST_USER_DIR=$SNAP_USER_DATA/.config/dconf -if [ ! -f $DCONF_DEST_USER_DIR/user ]; then - if [ -f $REALHOME/.config/dconf/user ]; then - mkdir -p $DCONF_DEST_USER_DIR - ln -s $REALHOME/.config/dconf/user $DCONF_DEST_USER_DIR - fi -fi - -# Testability support -append_dir LD_LIBRARY_PATH $SNAP/testability -append_dir LD_LIBRARY_PATH $SNAP/testability/$ARCH -append_dir LD_LIBRARY_PATH $SNAP/testability/$ARCH/mesa - -# Gdk-pixbuf loaders -export GDK_PIXBUF_MODULE_FILE=$XDG_CACHE_HOME/gdk-pixbuf-loaders.cache -export GDK_PIXBUF_MODULEDIR=$RUNTIME/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders -if [ $needs_update = true ]; then - rm -f $GDK_PIXBUF_MODULE_FILE - if [ -f $RUNTIME/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders ]; then - $RUNTIME/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders > $GDK_PIXBUF_MODULE_FILE - fi -fi - -# Icon themes cache -if [ $needs_update = true ]; then - rm -rf $XDG_DATA_HOME/icons - mkdir -p $XDG_DATA_HOME/icons - for d in "${data_dirs_array[@]}"; do - for i in $d/icons/*; do - if [ -f "$i/index.theme" -a ! -f "$i/icon-theme.cache" ]; then - theme_dir=$XDG_DATA_HOME/icons/$(basename "$i") - if [ ! -d "$theme_dir" ]; then - mkdir -p "$theme_dir" - ln -s $i/* "$theme_dir" - if [ -f $RUNTIME/usr/sbin/update-icon-caches ]; then - $RUNTIME/usr/sbin/update-icon-caches "$theme_dir" - elif [ -f $RUNTIME/usr/sbin/update-icon-cache.gtk2 ]; then - $RUNTIME/usr/sbin/update-icon-cache.gtk2 "$theme_dir" - fi - fi - fi - done - done -fi - -# GTK theme and behavior modifier -# Those can impact the theme engine used by Qt as well -gtk_configs=(.config/gtk-3.0/settings.ini .config/gtk-3.0/bookmarks .config/gtk-2.0/gtkfilechooser.ini) -for f in ${gtk_configs[@]}; do - dest="$SNAP_USER_DATA/$f" - if [ ! -L "$dest" ] - then - mkdir -p `dirname $dest` - ln -s $REALHOME/$f $dest - fi -done - -# create symbolic link to ibus socket path for ibus to look up its socket files -# (see comments #3 and #6 on https://launchpad.net/bugs/1580463) -IBUS_CONFIG_PATH=$XDG_CONFIG_HOME/ibus -mkdir -p $IBUS_CONFIG_PATH -[ -d $IBUS_CONFIG_PATH/bus ] && rm -rf $IBUS_CONFIG_PATH/bus -ln -sfn $REALHOME/.config/ibus/bus $IBUS_CONFIG_PATH - -############################## -# Glib minimum specific part # -############################## - -############################### -# Mark update and exec binary # -############################### - -[ $needs_update = true ] && echo "SNAP_DESKTOP_LAST_REVISION=$SNAP_REVISION" > $SNAP_USER_DATA/.last_revision - -if [ -n "$SNAP_DESKTOP_DEBUG" ]; then - echo "desktop-launch elapsed time: " $(date +%s.%N --date="$START seconds ago") - echo "Now running: exec $@" -fi - -exec "$@" diff --git a/md/Marketplace/CqtDeployer-Manifest.json b/md/Marketplace/CqtDeployer-Manifest.json deleted file mode 100644 index 55a63b9..0000000 --- a/md/Marketplace/CqtDeployer-Manifest.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "http://qt.io/schema/extension-schema-v1#", - "title": "CQtDeployer", - "extensionType": [ - "tool" - ], - "version": "1.3.2", - "vendor": { - "name": "QuasarApp group", - "url": "https://github.com/QuasarApp" - }, - "contact": " QuasarApp@yandex.by", - "copyright": [ "QuasarApp" ], - "author": "QuasarApp team", - "icon": "https://github.com/QuasarApp/CQtDeployer/blob/master/res/icon%20(snapAlpha).png", - "licenses": [ - { "licenseType": "lGPLv3", - "licenseUrl": "https://github.com/QuasarApp/CQtDeployer/blob/master/LICENSE" } - ], - "created": "2018-08-19", - "lastUpdate": "2019-11-15", - "platforms": [ - "Linux (libc 2.27 or later)", "Windows 7 or later" - ], - "qtVersions": [ - "5.12", "5.13", "5.14" - ], - "tags": [ - "Deploy", "Deployment" ], - "price": { - "listprice": 0 - }, - "support": "https://github.com/QuasarApp/CQtDeployer/issues", - "bugUrl": "https://github.com/QuasarApp/CQtDeployer/issues", - "sourceRepoUrl": "https://github.com/QuasarApp/CQtDeployer", - "dependencies": [ - "Core" - ] -} - diff --git a/md/Marketplace/Marketplace.md b/md/Marketplace/Marketplace.md deleted file mode 100644 index 7bb31f7..0000000 --- a/md/Marketplace/Marketplace.md +++ /dev/null @@ -1,33 +0,0 @@ -## What is CQtDeployer -The CQtDeployer is application for extract all depends library of executable and create launch script for your application. - -Key differences of this program: -* 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 -* 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. - -## How to use -Deploying a Qt or QML application is easy! -To do this, simply install cqtdeployer on your computer and enter the following line: - -#### Linux: -``` bash -cqtdeployer -bin myApp -qmake /media/D/Qt/5.12.3/gcc_64/bin/qmake -qmlDir ./ -``` - -#### Windows: -``` bash -%cqtdeployer% -bin myApp.exe -qmake /media/D/Qt/5.12.3/gcc_64/bin/qmake.exe -qmlDir ./ -``` - - -#### Discription -* -bin - this is option for set the path to executable files. -* -qmake - this is option for set the path to qmake with which the application was created. -* -qmlDir - this is option for set the path to folder with qml files of application. - -## Install -You can download the latest version of the CQtDeployer [here](https://github.com/QuasarApp/CQtDeployer/releases) for Windows and linux platforms. -Or use the snap version for servers without gui. - -[](https://snapcraft.io/cqtdeployer) diff --git a/md/README.md b/md/README.md deleted file mode 100644 index c07e95f..0000000 --- a/md/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# CQtDeployer - -Here you can find documentation for the CQtDeployer in different languages. It describes: - -* Information on how to use this deployment Tool. (How to create installers with cqtdeployer) -* Main description (description of the functionality and capabilities of the program) -* Description of recent changes (changelog) - - -## Сhoose your language to read the CQtDeployer documentation: - -* [Документация на русском языке](ru/Home.md) -* [English language documentation](en/Home.md) diff --git a/md/_config.yml b/md/_config.yml deleted file mode 100644 index 9da9a02..0000000 --- a/md/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-dinky \ No newline at end of file diff --git a/md/en/1_4.md b/md/en/1_4.md deleted file mode 100755 index 866a1ad..0000000 --- a/md/en/1_4.md +++ /dev/null @@ -1,422 +0,0 @@ -# Release of CQtDeployer v1.4.0 (Binary Box) - -Release of C++/Qt and QML application deployment utility CQtDeployer v1.4.0 (Binary Box) - -Almost half a year later, a major update of the CQtDeployer deployment utility was released. -This update has many new futures, but the main emphasis is on creating packages. - -## CQtDeployer 1.4.0 -### Fixes -- Fixed The help output in the console, now the actual size of the console is recounted before the output, which allows you to correctly transfer text. -- Fixed work with the deployment of Qt plugins. Now plug-ins do not extract all system dependencies, but only qt. Extract system dependencies caused applications to crash due to incompatible plugin libraries. -- Minor bug fixes and improvements. - -### New features -- Added support for qmake search from the system environment. -- Added the ability to initialize the repository for further packaging, similar to git init. -- Added support for Qt Install Framework packages. Now you can pack the distribution into the installer. -- Added the ability to split the final distribution into several packages. -- Added the ability to unify the creation of packages for the final distribution. -- Added support for adding custom scripts to application launch scripts. -- Added support for extracting system dependencies for Windows. -- Added support for RPATH for Linux. Now cqtdeployer can independently determine the necessary qmake to deploy the application. -- Added support for finding the required dependency by library name. -- Added support for Qt libraries from Linux distributions repositories. -- Added new alias for the run command (cqt and cqtdeployer.cqt) for fast deploy of applications. -- Added support the native name of command for windows. Now you can run a cqtdeployer from cqtdeployer commnad in cmd and powershell. - -### New options -- init - will initialize cqtdeployer.json file (configuration file). For example: "cqtdeployer init" - to initialize the configuration of a base package. "cqtdeployer -init multi" - to initialize the configuration of several packages. -- noCheckRPATH - disables the automatic search for paths to qmake in executable files (Linux only). -- noCheckPATH - disables the automatic search for paths to qmake in the system environment. -- extractPlugins - forces to extract all plug-in dependencies. -- qif - creates an installer at the end of the deployment. -- extraLibs - adds a template for an additional library, which should be included in the distribution. -- customScript - adds a custom script to the startup script of the application. -- -targetPackage [package; tar1, package; tar2] - used to form packages, denotes lists of target files for specific packages. -- recOut - indicates in which folder the resources will be added after deployment. -- name - sets the name of the package. -- description - sets the package description -- deployVersion - sets the package version -- releaseDate - sets the release date of the package. -- icon - sets the package icon. -- publisher - sets the publisher of the package. -- qifStyle - Sets the path to the CSS style file or sets the default style. Available styles: quasar -- qifBanner - Sets path to the banner png file. -- qifLogo - Sets path to the logo png file. - -## A detailed analysis of the most interesting changes. - -The first thing you should pay attention to is that CQtDeployer has learned to work with RPATH (Linux only) and PATH. This means that if your application is built with RPATH support (and RPATH in qt is enabled by default) or your qmake is registered in PATH, then you do not need to specify the path to qmake. CQtDeployer will find qmake for itself. - -Let's test it in practice. -I created a simple console application using Qt. - -``` cpp -#include <QString> -#include <QDebug> -int main(int, char *[]) -{ - QString str = "hello CQtDeployer 1.4"; - qInfo() << str; - return 0; -} -``` - -I will use the cmake build system, as it is more relevant than qmake. - -``` bash -andrei@HP:~/Hello$ tree -. -├── CMakeLists.txt -├── CMakeLists.txt.user -└── main.cpp - -0 directories, 3 files -``` - -Create a folder for the assembly. - -``` bash -andrei@HP:~/Hello$ mkdir build -``` - -Run the cmake in the created folder. - -``` bash -andrei@HP:~/Hello/build$ cmake .. -DCMAKE_PREFIX_PATH=~/Qt/5.14.1/gcc_64 --- Configuring done --- Generating done --- Build files have been written to: /home/andrei/Hello/build -``` - -building a project - -``` bash -andrei@HP:~/Hello/build$ make -Scanning dependencies of target Hello_autogen -[ 25%] Automatic MOC and UIC for target Hello -[ 25%] Built target Hello_autogen -Scanning dependencies of target Hello -[ 50%] Building CXX object CMakeFiles/Hello.dir/Hello_autogen/mocs_compilation.cpp.o -[ 75%] Building CXX object CMakeFiles/Hello.dir/main.cpp.o -[100%] Linking CXX executable Hello -[100%] Built target Hello -``` - -Checking our program. - -``` bash -andrei@HP:~/Hello/build$ ls -CMakeCache.txt CMakeFiles cmake_install.cmake Hello Hello_autogen Makefile -``` -And we start cqtdeployer passing it the program without qmake. -``` bash -andrei@HP:~/Hello/build$ cqtdeployer -bin Hello -Deploy ... -flag targetDir not used. use default target dir : "/home/andrei/Hello/build/DistributionKit" -target deploy started!! -copy : "/home/andrei/Hello/build/Hello" -extract lib : "/home/andrei/Hello/build/DistributionKit//bin//Hello" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libQt5Core.so.5" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libicuuc.so.56" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libicui18n.so.56" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libicudata.so.56" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ar.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_bg.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ca.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_cs.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_da.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_de.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_en.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_es.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_fi.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_fr.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_gd.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_he.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_hu.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_it.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ja.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ko.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_lv.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_pl.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ru.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_sk.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_uk.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_zh_TW.qm" -try deploy msvc -deploy done! -``` - -Oh miracle, now our application is completely autonomous. -Check it out. - -``` bash -andrei@HP:~/Hello/build$ cd DistributionKit/ -andrei@HP:~/Hello/build/DistributionKit$ tree -. -├── bin -│ ├── Hello -│ └── qt.conf -├── Hello.sh -├── lib -│ ├── libicudata.so.56 -│ ├── libicui18n.so.56 -│ ├── libicuuc.so.56 -│ └── libQt5Core.so.5 -└── translations - ├── qtbase_ar.qm - ├── qtbase_bg.qm - ├── qtbase_ca.qm - ├── qtbase_cs.qm - ├── qtbase_da.qm - ├── qtbase_de.qm - ├── qtbase_en.qm - ├── qtbase_es.qm - ├── qtbase_fi.qm - ├── qtbase_fr.qm - ├── qtbase_gd.qm - ├── qtbase_he.qm - ├── qtbase_hu.qm - ├── qtbase_it.qm - ├── qtbase_ja.qm - ├── qtbase_ko.qm - ├── qtbase_lv.qm - ├── qtbase_pl.qm - ├── qtbase_ru.qm - ├── qtbase_sk.qm - ├── qtbase_uk.qm - └── qtbase_zh_TW.qm - -3 directories, 29 files -andrei@HP:~/Hello/build/DistributionKit$ -``` -The root of the program: - - - -Libraries needed for the program to work: - - - - -As you can see from the example, the application is fully assembled. - -## Qt Installer Framework -The second innovation worth knowing is the ability to form QIF installers out of the box. All that is needed for our example is to add the qif option to the packaging command. - -Usage example. - - -``` -andrei@HP:~/Hello/build$ cqtdeployer -bin Hello qif -``` - -Just one simple command and the program gets a presentable look. - - - -This installer supports minimal integration of Linux distributions and Windows. Namely: creating shortcuts, and registering the application in the OS. -If for some reason you are not satisfied with the appearance of this installer, you can change it using the qifStyle flag. At the time of version 1.4, cqtdeployer supports only 2 styles (native and quasar). - -Example quasar style: - - - -You can also use your own qss stylesheet. To do this, pass the path to your qss or css file instead of the style name. -For example, consider the following qss stylesheet. - - -Style.qss: -``` css -QWidget -{ - color: white; - background-color: rgb(65, 65, 65); -} - -QPushButton -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(150, 150, 150, 60%), stop:1 rgba(50, 50, 50, 60%)); - border-color: rgb(60, 60, 60); - border-style: solid; - border-width: 2px; - border-radius: 9px; - min-height: 20px; - max-height: 20px; - min-width: 60px; - max-width: 60px; - padding-left: 15px; - padding-right: 15px; -} - -QPushButton:pressed, QPushButton:checked -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(50, 50, 50, 60%), stop:1 rgba(150, 150, 150, 60%)); -} - -``` - -Let's check what we get in this case. - -``` bash -cqtdeployer -bin Hello qif -qifStyle ./../style.qss -``` - - - -Here, in fact, is the dark theme of the installer. - -## Splitting into packages -And, probably, the last important update worth knowing is the ability to split a large multi-binar project into subprojects. - -This feature is the most difficult of all listed, since it requires a lot of text to use it. So I recommend using the configuration file. - -To begin with, we will complicate our project by adding 2 more executable files to it. I did not bother and just made 2 copies of my Hello utility. - -To simplify working with packages, you need to initialize the directory. - -``` bash -cqtdeployer init -``` - -This is another new function that creates a CQtDeployer.json file, in which we will write our configurations, instead of passing options to the utility. - -``` js -{ - "binDir": ".", - "clear": true, - "libDir": "./", - "recursiveDepth": 5 -} -``` - -Now let's make 2 packages of 3 of our programs. To do this, specify: -```js -{ - "binDir": ".", - "clear": true, - "libDir": "./", - "recursiveDepth": 5, - "targetPackage": [ - ["Dstro1", "Hello1"], - ["Dstro2", "Hello2"], - ["Dstro2", "Hello3"] - ] -} -``` - -Please note that I had to explicitly specify the binding for Dstro2 to Hello2 Hello3. Unfortunately, at the time of version 1.4 cqtdeployer was not able to parse target enumerations. Please note that if I write Hello1 Hello instead, then the selection will be made for all matches and all 3 programs will be selected. -So, let's see what happened. - - -``` bash -cqtdeployer - -. -├── Dstro1 -│ ├── bin -│ │ ├── Hello1 -│ │ └── qt.conf -│ ├── Hello1.sh -│ ├── lib -│ │ ├── libicudata.so.56 -│ │ ├── libicui18n.so.56 -│ │ ├── libicuuc.so.56 -│ │ └── libQt5Core.so.5 -│ └── translations -│ ├── qtbase_ar.qm -│ ├── qtbase_bg.qm -│ ├── qtbase_ca.qm -│ ├── qtbase_cs.qm -│ ├── qtbase_da.qm -│ ├── qtbase_de.qm -│ ├── qtbase_en.qm -│ ├── qtbase_es.qm -│ ├── qtbase_fi.qm -│ ├── qtbase_fr.qm -│ ├── qtbase_gd.qm -│ ├── qtbase_he.qm -│ ├── qtbase_hu.qm -│ ├── qtbase_it.qm -│ ├── qtbase_ja.qm -│ ├── qtbase_ko.qm -│ ├── qtbase_lv.qm -│ ├── qtbase_pl.qm -│ ├── qtbase_ru.qm -│ ├── qtbase_sk.qm -│ ├── qtbase_uk.qm -│ └── qtbase_zh_TW.qm -└── Dstro2 - ├── bin - │ ├── Hello2 - │ ├── Hello3 - │ └── qt.conf - ├── Hello2.sh - ├── Hello3.sh - ├── lib - │ ├── libicudata.so.56 - │ ├── libicui18n.so.56 - │ ├── libicuuc.so.56 - │ └── libQt5Core.so.5 - └── translations - ├── qtbase_ar.qm - ├── qtbase_bg.qm - ├── qtbase_ca.qm - ├── qtbase_cs.qm - ├── qtbase_da.qm - ├── qtbase_de.qm - ├── qtbase_en.qm - ├── qtbase_es.qm - ├── qtbase_fi.qm - ├── qtbase_fr.qm - ├── qtbase_gd.qm - ├── qtbase_he.qm - ├── qtbase_hu.qm - ├── qtbase_it.qm - ├── qtbase_ja.qm - ├── qtbase_ko.qm - ├── qtbase_lv.qm - ├── qtbase_pl.qm - ├── qtbase_ru.qm - ├── qtbase_sk.qm - ├── qtbase_uk.qm - └── qtbase_zh_TW.qm - -8 directories, 60 files -``` - -As you can see from the result tree, we got 2 distributions. -1. Dstro1 - contains the application Hello1 -2. Dstro2 - contains the remaining 2. - -Now let's check what happens if all this is packaged by the installer. Add the qif option to true in CQtDeployer.json: ** qif: true, **. - -``` js -{ - "binDir": ".", - "clear": true, - "qif": true, - "libDir": "./", - "recursiveDepth": 5, - "targetPackage": [ - ["Dstro1", "Hello1"], - ["Dstro2", "Hello2"], - ["Dstro2", "Hello3"] - ] -``` - - - -As can be seen from the screenshot, now we have 2 packages during installation. - -## New aliases - -And the last small but nice addition: now new commands have been added to cqtdeployer. -* сqt — is a quick way to deploy your application. It simplifies the deployment call. - * Example: - **cqt myApp** — this is the same as **cqtdeployer -bin myApp**. -* cqtdeployer.cqt - same as cqt but for snap package. -* В windows-версии теперь не нужно добовлять знак % для вызова утилиты. -* In the windows version, now there is no need to add the% sign to call the utility. -Now the call looks like in Linux. (cqtdeployer) diff --git a/md/en/1_5.md b/md/en/1_5.md deleted file mode 100755 index 3a0e7b4..0000000 --- a/md/en/1_5.md +++ /dev/null @@ -1,158 +0,0 @@ -# Release of CQtDeployer v1.5.0 - -Release of the C++/Qt and QML application deployment utility CQtDeployer v1.5.0 - -This is the first major update in 2021. CQtDeployer 1.5 contains many useful improvements. The biggest improvements are the addition of the ability to package deb packages, and the ability to use your own packaging template for the qt install framework. - -## Complete list of all changes - -## CQtDeployer 1.5.0 - -### New features - -- Added new theme of qif installer "quasarDark". -- Added support of work with custom template for qif option. -- Added support of debian packages. -- Added support of targets icons. now the icon option work with targets but not packages. -- Added support of the control custom translation files. -- Added support the deploy nonexecutable data. (extraData option) -- Added envirement variables for deployed applications. -- Added support of the generate deb packages. -- Added support of the generate zip arrhives. -- Added support create a qif installer using custom template -- Added command for init default qif and deb templates (getDefaulttemplate) -- Added support of import custom launch scripts -- Added support of md5 packages hashes -- Added support of Qt6.1 - -### Fixes - -- Fixed stability for the deploySystem option on windows -- Fixed verbose log. -- Fixed general output log. -- Fixed typo errors in log. -- Fixed cross-deployment for ARM platform . -- Fixed deploy Qt6 qml -- Fixed powershell commands on Windows -- bug fixes and improvements. - - -### New Envirement Variables - -- CQT_RUN_FILE - This variable contains path to the run script of the using application. -- CQT_PKG_ROOT - This variable contains path to root of the current package. - -### New parameters - -- zip - create a ZIP archive for deployable programm -- deb - Create the deb package for deployable programm -- homepage - Sets the homepage url for a package -- 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. -- tr - Adds qm files into the translations folder. -- extraData - Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure. -- extraDataOut - Sets path to extra data files out directory. -- prefix - Sets the prefix for the package relatively a target directory -- homePage - Sets the homepage url for a package -- binPrefix - Sets prefix for bin option. -- noHashSum - Disables campute hashes of packages - -### Deprecated and removed options - -- deploySystem-with-libc - instead of this option use the deploySystem option. -- allQmlDependes - instead of this option use the qmlDir option. - - -## Detailed analysis of the most interesting changes. - -### Debian pacakges -This feature is very conveniently if you want to create server application. -For example i need to create simple server for my simple game. -And my steps: -* build my application in the release mode. -* run cqtdeployer with deb option. - -```bash -cqtdeployer -bin mySimpleServer deb -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -``` -The SimpleServer depends only on qt, so it was enough for me to specify only the path to qmake for my application. - -It is all!!!. And i get the workly deb package. -By Default CQtDeployer create an independet debian packages. - - -### Zip arrhives -This feature allow compress your distribution pacakges to zip arrhive. - -Example: -```bash -cqtdeployer -bin mySimpleServer zip -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -``` - -### Custom Qt Installer Framework tempaltes. - -Now you can override default template of the cqtdeployer. To do this, you must pass the path to your template to the qif parameter. - -``` -cqtdeployer ... -qif /path/to/my/custom/qif/template -``` - -### Template -The qif template should contain 2 folders: -* packages -* config - -### Attention -The name of the packages in the packages folder must match the names of the packages during deployment. - -For example: -``` json -"targetPackage": [ - [ - "myCustomInstaller", - "tar1" - ] -], -``` - -``` bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` - -If the folder names do not match the package names then CQtDeployer will use the standard QIF package. - -If you have only one package then you can use the **name** option for set name the application. - -```bash -cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller -``` - -#### Do not forget to rename the your package folder to the packaga name of the name option. - - -```bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller << "This is folder of the your package" - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` diff --git a/md/en/Build-and-Install.md b/md/en/Build-and-Install.md deleted file mode 100644 index abc4ea3..0000000 --- a/md/en/Build-and-Install.md +++ /dev/null @@ -1,90 +0,0 @@ -# Install CQtDeployer - -You can download the latest version of the application [here](https://github.com/QuasarApp/CQtDeployer/releases). - -### Installer - -- [Download](https://github.com/QuasarApp/CQtDeployer/releases) CQtDeployer_X.X.X.X_Installer_Linux64.run or CQtDeployer_X.X.X.X_Installer_Win64.exe - -#### Install without gui - -##### Linux - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Linux64.run -chmod +x CQtDeployer_1.5.3.0_Installer_Linux64.run -./CQtDeployer_1.5.3.0_Installer_Linux64.run install -``` - -##### Windows - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Win64.exe -CQtDeployer_1.5.3.0_Installer_Win64.exe install -``` - -### Deb - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Linux64.deb -sudo dpkg -i CQtDeployer_1.5.3.0_Linux64.deb -``` - -**Note** the package name and links can be changed, please check [Download](https://github.com/QuasarApp/CQtDeployer/releases) page before installation. - -### Snap - -[](https://snapcraft.io/cqtdeployer) - -``` bash -sudo snap install cqtdeployer -``` - -#### Features of the snap version - -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. - -If you do not have the GUI then you can enable all permissions using next commands: - -``` bash -sudo snap connect cqtdeployer:process-control -sudo snap connect cqtdeployer:removable-media -sudo snap connect cqtdeployer:system-backup -``` - ---- - -# Build from sources - -## Build for Linux - -- 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.15.0/gcc_64/bin/qmake -r -- make -j$(nproc) -- make deploy - - this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) -- ./Distro/CQtDeployerInstaller.run - -## Build for Windows (CMD) - -- 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 -- SET PATH=C:/Qt/Tools/mingw810_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.15.0/mingw81_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 - diff --git a/md/en/Changelog.md b/md/en/Changelog.md deleted file mode 100755 index 18394ea..0000000 --- a/md/en/Changelog.md +++ /dev/null @@ -1,363 +0,0 @@ -# Change log - -## CQtDeployer 1.5.4 - - -### New options - -* qifConfig - Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml #653 -* qifPackages - Sets a custom path to the packages directories. By default it is qif/packages #653 -* qifResources - Sets a custom path to the resources files. By default this option is skipped #653 -* debOut - Sets name of the output debian file. This option can be work with multiple packages -* zipOut - Sets name of the output zip arrhive. This option can be work with multiple packages - -### Bug fixes : - -* fixed crossdeploy linux -> windows #652 - - -## CQtDeployer 1.5.3 - -### New options - -* installDirDeb - Sets install target directory for debian package (by default it is /opt path) #640 -* installDirQIFW - Sets install target directory for installers (by default it is /home path) #640 - -### Bug fixes - -* Fix warning on installer fix #628 -* Added support validation input options of the command line fix #421 -* Added Error message for conflict between libDir and targetDir options #629 - -## CQtDeployer 1.5.2 - -### New parameters - -* Added **qifOut** option for set name of the output installer -* Added **disableRunScript** option for disabling the generation of run script for selected targets -* Added **disableShortCut** option for disabling the generation of shortcut for selected targets - -### Fixes - -* Fix documentation -* Fix deploy openssl libraries - -## CQtDeployer 1.5.1 - -### Fixes - -* Fix deploy multi target Debian packages -* Fix deploy qt6 qml applications - - -Change log for all versions of the CQtDeployer. - -## CQtDeployer 1.5.0 - -### New features - -- Added new theme of qif installer "quasarDark". -- Added support of work with custom template for qif option. -- Added support of debian packages. -- Added support icons for targets. now the icon option work with targets but not packages. -- Added support of the control custom translation files. -- Added support the deploy nonexecutable data. (extraData option) -- Added envirement variables for deployed applications. -- Added support of the generate deb packages. -- Added support of the generate zip arrhives. -- Added support create a qif installer using custom template -- Added command of init default qif of deb template (getDefaulttemplate) -- Added support of import custom launch scripts -- Added support of md5 packages hashes -- Added support of Qt6.1 - -### Fixes - -- Fixed stability for the deploySystem option on windows -- Fixed verbose log. -- Fixed general output log. -- Fixed typo errors in log. -- Fixed crossdeploy of the arm distributions. -- Fixed deploy Qt6 qml -- Fixed powershell commands on Windows -- bug fixes and improvements. - - -### New Envirement Variables - -- CQT_RUN_FILE - This variable contains path to the run script of the using application. -- CQT_PKG_ROOT - This variable contains path to root of the current package. - -### New parameters - -- zip - create a ZIP archive for deployable programs -- deb - Create the deb package for deployment programm -- homepage - Sets the homepage url for a package -- 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. -- tr - Adds qm files into the translations folder. -- extraData - Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure. -- extraDataOut - Sets path to extra data files out directory. -- prefix - Sets the prefix for the package relatively a target directory -- homePage - Sets the homepage url for a package -- binPrefix - Sets prefix for bin option. -- noHashSum - Disables campute hashes of packages - -### Deprecated and removed options - -- deploySystem-with-libc - instead of this option use the deploySystem option. -- allQmlDependes - instead of this option use the qmlDir option. - -## CQtDeployer 1.5.0 Alpha - -### Corrections - -- bug fixes and improvements. - -### New Features - -- Added a new Theme for qif installer "quasarDark". - -### New options - -- zip - create the ZIP arhive for deployement programm - - -## CQtDeployer 1.4.7 - -### Corrections - -- Fixed deploy the qxcb plugin. #438 -- Fixed deploy the qtGui module. #446 - -### New Features - -- Added support of Qt6 #437 -- Added support of Qt installer Framework 4 (with improved command line interface experience) #436 - -## CQtDeployer 1.4.6 - -### Corrections - -- Fixed deploy sql drivers #367 -- Fixed algorithm of deploy libraryes. #423 #371 -- Fixed working with a qt from the linux system repository. (classic instaler only) #422 -- Fixed snap version of cqtdeployer, added support for qmake search by RPATH #424 #420 -- Fixed help message. -- Minor bug fixes and improvements. -- Removed deprecated option extractPlugins. #371 - -### New options - -- noQt - Ignore the error of initialize of a qmake. Use only if your application does not use the qt framework. - -## CQtDeployer 1.4.5 - -### Corrections - -- Optimized project deployment performance. 60% faster. -- Optimized output size of distributions. Size reduced by 25%. -- Fixed display of shortcuts after installing deployed applications. -- Fixed launching applications with spaces in the name. Thanks ahndee (#384) -- Fixed deployment of the Renderer plugin. -- Minor bug fixes and improvements. - -### New Features - -- Added a new deployment plugin management system. - -### New options - -- extraPlugin - sets an additional path to third-party application plug-in -- enablePlugins - enables additional plugins for distribution. -- disablePlugins - disables plugins for distribution. - -## CQtDeployer 1.4.4 - -### New options -- qifFromSystem - force use system binarycreator tool of qif from path or qt. - - -## CQtDeployer 1.4.3 -### Fixes -- Fixed display of the application downloaded from the snap store and installers in the ubuntu 20.04 application settings menu - -### New features -- added support recursive ignore for ignoreEnvirement #356 - -### New options -- noRecursiveiIgnoreEnv - Disables recursive ignore for ignoreEnv option. - - - -## CQtDeployer 1.4.2 -### Fixes - -- fixed #337 (error generate installer with custom name) -- fixed #338 (windows version collect pdb files) -- fixed #339 (error of show all help messages) -- fixed #340 (cqdeployer don't added a targets dirs into "ignore") -- fixed #341 (The clear option don't delete old installer) - - -## CQtDeployer 1.4.1 - -### Fixes -- Fixed Not deploying platformthemes (#324) -- Fixed create shortcuts on windows (#322) -- Minor improvements and fixes - - -## CQtDeployer 1.4.0 -### Fixes -- Fixed The help output in the console, now the actual size of the console is recounted before the output, which allows you to correctly transfer text. -- Fixed work with the deployment of Qt plugins. Now plug-ins do not extract all system dependencies, but only qt. Extract system dependencies caused applications to crash due to incompatible plugin libraries. -- Minor bug fixes and improvements. - -### New features -- Added support for qmake search from the system environment. -- Added the ability to initialize the repository for further packaging, similar to git init. -- Added support for Qt Install Framework packages. Now you can pack the distribution into the installer. -- Added the ability to split the final distribution into several packages. -- Added the ability to unify the creation of packages for the final distribution. -- Added support for adding custom scripts to application launch scripts. -- Added support for extracting system dependencies for Windows. -- Added support for RPATH for Linux. Now cqtdeployer can independently determine the necessary qmake to deploy the application. -- Added support for finding the required dependency by library name. -- Added support for Qt libraries from Linux distributions repositories. -- Added new alias for the run command (cqt and cqtdeployer.cqt) for fast deploy of applications. -- Added support the native name of command for windows. Now you can run a cqtdeployer from cqtdeployer commnad in cmd and powershell. - -### New options -- init - will initialize cqtdeployer.json file (configuration file). For example: "cqtdeployer init" - to initialize the configuration of a base package. "cqtdeployer -init multi" - to initialize the configuration of several packages. -- noCheckRPATH - disables the automatic search for paths to qmake in executable files (Linux only). -- noCheckPATH - disables the automatic search for paths to qmake in the system environment. -- extractPlugins - forces to extract all plug-in dependencies. -- qif - creates an installer at the end of the deployment. -- extraLibs - adds a template for an additional library, which should be included in the distribution. -- customScript - adds a custom script to the startup script of the application. -- -targetPackage [package; tar1, package; tar2] - used to form packages, denotes lists of target files for specific packages. -- recOut - indicates in which folder the resources will be added after deployment. -- name - sets the name of the package. -- description - sets the package description -- deployVersion - sets the package version -- releaseDate - sets the release date of the package. -- icon - sets the package icon. -- publisher - sets the publisher of the package. -- qifStyle - Sets the path to the CSS style file or sets the default style. Available styles: quasar -- qifBanner - Sets path to the banner png file. -- qifLogo - Sets path to the logo png file. - -## CQtDeployer 1.3.2 -- Fixed #218 (The CQtDeployer adding sh scripts for target libraries.) -- Fixed #217 (The Qmake option did not work with the configuration file.) ---- - -## CQtDeployer 1.3.1 -- Fixed a task #191 (ignore command for plugins) -- Fixed a task #192 (invalid paths when creating) -- Fixed absalute pathes of deployement file (see [confFile](DeployConfigFile)) ---- - -## CQtDeployer 1.3.0 -- Added support of qt.conf for Linux -- Added support of config file for project (deploy.json) with all rules of deployment, for create deploy.json use flag -confFile [./path/to/file.json], -- Added support of output dirs for all deployement files #145, -- Added support of deploy WebEngine #146 -- Added support multi package in cqtdeployer installer -- Renamed project from Console-QtDeployer to CQtDeployer #139 -- Fixed deployment of system libs in linux #172 -- Added new tests of application -- Removed flag noLibC and added flag deploySystem-with-libc. If you need libc in the program, use the deploySystem-with-libc flag, and if not, use deploySystem. -- The always-overwrite flag has been replaced with noOverwrite, now all files are overwritten by default, use noOverwrite to disable overwriting. ---- - -## CQtDeployer 1.2.3 -- Added support of qt.conf for Windows builds #130 -- Fixed bug #129 now the 'clear' flag remove only copied files. -- Fixed ignoreEnv flag -- Fixed deploySystem flag ---- - -## CQtDeployer 1.2.2 -- Added new flag noLibc for ignore libc and li-linux libs -- Fixed bug #125 Deployed system lib (working with simple projects, for big projects no recommended) -- Fixed ignoreEnv flag ---- - -## CQtDeployer 1.2.1 -- Added new ignore flag (ignoreEnv). This flag disables unnecessary environment -- Added support QIFW (online installer for windows and Other Linux distributives) -- Added support update for windows and Other Linux distributives (not snap) -- Fixed bug #116 (copy files from removable media) -- Fixed bug #115 (create target in folder with russean name) -- Fixed big size of msvc version -- FIxed crossdeploy Linux >> Windows -- Removeв old build scripts ---- - -## CQtDeployer 1.2.0 -- Added own qml dependecies scaner. -- Moved to used a new [PE-Lib scaner](https://github.com/QuasarApp/pe-parse/tree/7138bb218a05c81d825728ba8a0a6f6a56c4fdbc). -- Moved to used a new [ELF-lib scaner](https://github.com/qt/qttools/blob/b0147a5d79ce7a7e77a24f36aaddfacb1a1517c8/src/shared/winutils/elfreader.h). -- Added a new unit tests. -- Added support of snap version (home dir only). -- Added new flag qmlExtern - for use qt qml import scaner. -- Added support a levels of verbose log (0-3). -- Fixed log of deploy app. -- Fixed deploy the app on snap version. ---- - -## CQtDeployer 1.1.2 -- Added support of translations -- Added a flag for disable deploy translations -- Added the strip flag on linux version -- Added unit tests -- Fixed deploy with shared version -- Fixed bug deploy on current dir with snap and static versions ---- - -## CQtDeployer 1.1.1 -- Fixed qml build in dinomisc version -- Fixed -recursiveDepth flag -- Fixed -libDir flag operation -- The output of the application has been cleaned, a part of the log has been moved to verbose ---- - -## CQtDeployer 1.1.0 -- Added windows support (dynamic linking only) -- Added support for snap (now available in the snapstore) -- Added snap build scripts -- Added flag binDir allowing recursively to capture exe dll and so -- Changed the logic of the bin flag now, if you select a folder in the file location, then all its contents will be captured -- Changed and corrected the logic of the clear flag now it cleans all the expanded content on a specific target. -- Added flag targetDir which defines the place where the expanded project will lie -- The structure of the deployed project has been changed, now all the launch shells are in the root and the binaries are in the bin folder, a launch script of the same name is created for each binary. -- Removed old runScript flag due to change of deployment logic -- Added verbose flag for debugging by -- Fixed performance bugs ---- - -## CQtDeployer 1.0.2 -- Added a script to build (dynamic and static release) -- Added flag -libDir to install additional path for additional libraries of the application -- Added flag -extraPlugin to install an additional path for additional application plugins -- Added build for C libraries only -- Fixed deployment -- Fixed startup script -- Fixed static build ---- - -## CQtDeployer 1.0.1 -- fix qml deploy (redundancy) -- fix run script ---- - -## CQtDeployer 1.0.0 -- Added a flag runScript -- Added a flag allQmlDependes -- Fixed bug of deploy qml -- Fixed bug of deploy plugins -- Added support static build - diff --git a/md/en/CompareFeatures.md b/md/en/CompareFeatures.md deleted file mode 100644 index 2099211..0000000 --- a/md/en/CompareFeatures.md +++ /dev/null @@ -1,17 +0,0 @@ -# Compare Features - -Compare Features of Distributions of the CQtDeployer - -### snap vs installer vs windows installer - -| Feature name | Classic linux version (Installer) | Snap Version | Windows version | -|---|---|---|----| -| Automatic updates | NO | YES | NO | -| Online updates | YES | YES | YES | -| Deploy system libraries | YES | YES | YES | -| Create installers | YES | YES | YES | -| Create archives | YES | YES | YES | -| Search of libraries and cmake from environment | YES | NO | YES | -| Search of the qmake from a RPATH | YES | YES | NO | -| Support of the 'strip' command | YES | NO | NO | -| Support work with the qmake from a system repository of OS| YES| NO| NO | diff --git a/md/en/CustomScripts.md b/md/en/CustomScripts.md deleted file mode 100644 index 77a49d1..0000000 --- a/md/en/CustomScripts.md +++ /dev/null @@ -1,69 +0,0 @@ -# Custom Scripts - -After version 1.5.1 cqtdeployer support self variables in the custom scripts. -For using custom scripts use the **runScript option** - -### Exmaples : - -```bash -cqtdeployer -bin MyExecutable.exe -runScript MyExecutable,path/to/my/custom/script.bat -``` - -```bash -cqtdeployer -bin MyExecutable -runScript MyExecutable,path/to/my/custom/script.sh -``` - -## Suported variables list: - -* CQT_LIB_PATH - are releative path to libraryes of a deployed distribution. -* CQT_QML_PATH - are releative path to qml libraryes of a deployed distribution. -* CQT_PLUGIN_PATH - are releative path to qt plugins of a deployed distribution. -* CQT_BIN_PATH - are releative path to targets of a deployed distribution. - -* CQT_SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution. -* CQT_BASE_NAME - are base name of the executable that will be launched after run this script. -* CQT_CUSTOM_SCRIPT_BLOCK - This is code from the customScript option -* CQT_RUN_COMMAND - This is command for run application. Require BASEDIR variable. Note: This variable already contains symbols for redirect input script arguments to executable. - - -## The Scripts tempalte - -### Linux - -```bash -#!/bin/sh - -BASE_DIR=$(dirname "$(readlink -f "$0")") -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 -``` - -### Windows - -```bash - -@echo off -SET BASE_DIR=%~dp0 -SET 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 -``` - - -Or you can get last version of this scripts from the github [repository](https://github.com/QuasarApp/CQtDeployer/tree/main/Deploy/ScriptsTemplates). diff --git a/md/en/DEB.md b/md/en/DEB.md deleted file mode 100644 index 119d0c4..0000000 --- a/md/en/DEB.md +++ /dev/null @@ -1,101 +0,0 @@ -# DEB using - -General rules for using DEB - -#### Available from version CQtDeployer 1.5 - -### How to use deb option - -Just add to cqtdeployer option "deb". - -#### For example: - -``` bash - cqtdeployer ... deb -``` - -Where: -* **...** - is list of other options. -* **deb** - option for create the deb package. - - -By default, cqtdeployer will create one deb package. -If you want create multi package destribution, you should use [Controll of packages options](Options.md) -To create a new package, use the -targetPackage [package; tar1] option - -cqtdeployer create deb package for each packages. - -Where: - -* **package** - it is package name -* **tar1** - it is name of the target that should be included in this package. - -Or you can describe packages in [configuration file](DeployConfigFile.md) - - -```json -{ -"targetPackage": [ - [ - "package", - "tar1" - ], -], -"deb": true -} -``` - - -## Custom Template for DEB - -You can create a own Template fo the debian pacakges. - -### The debian pacakge structure: - - -```bash -└── Debian templates - ├── debPacakge1 - │ └── DEBIAN - │ ├── control - │ ├── postinst - │ └── prerm - └── debPacakge2 - └── DEBIAN - ├── control - ├── postinst - └── prerm - -``` - -For include your templates into your destribution you need to add path of the Debian templates folder into deployConfig.json - -```json -{ -"targetPackage": [ - [ - "debPacakge1", - "tar1" - ], - [ - "debPacakge2", - "tar2" - ], -], -"deb": "./Debian templates" -} -``` - - -## Initialization of the debian template - -For initialize default templates you can use the getDefaultTemplate option. -The getDefaultTemplate option extract default template of the cqtdeployer. This is can be very convinion if you want override default behavior of the installer or anothe distribution package. - -### Example - -### Getting default debian template. - -```bash -cqtdeployer getDefaultTemplate deb -``` diff --git a/md/en/DeployConfigFile.md b/md/en/DeployConfigFile.md deleted file mode 100644 index 106e235..0000000 --- a/md/en/DeployConfigFile.md +++ /dev/null @@ -1,228 +0,0 @@ -# Deployment file - -**Deployment file** - it's a json file containing the parameters for cqtdeployer. This file supports all parameters except confFile, since this parameter is responsible for connecting and initializing the file itself. - -### Configuration file structure - -```json -{ - "Bool option": true/false, - "Option": "Value", - "Enumeration-enabled option": [ - "Value 1", - "Value 2", - "Value 3", - ], - "Option with support for multilevel enumerations": [ - [ - "Value A1", - "Value A2" - ], - [ - "Value B1", - "Value B2" - ], - [ - "Value C1", - "Value C2" - ], - ] - -} -``` - -Read more about cqtdeployer options in the [options](Options.md) section. - -Examples of the contents of this file: - -File without using enumerated parameters -```json -{ - "noOverwrite": false, - "bin": "./", - "binDir": "./", - "qmlDir": "./", - "deploySystem": false, - "deploySystem-with-libc": false, - "qmake": "my/custom/path/to/qmake", - "ignore": "ignoreLib.dll", - "ignoreEnv": "/my/ignore/path", - "clear": true, - "force-clear": false, - "allQmlDependes": false, - "libDir": "./", - "recursiveDepth": 3, - "extraLibs": "myExtraLib (libssl)", - "extraPlugin": "myExtraPulgin (platforms)", - "targetDir": "./Distro", - "targetPackage": "", - "noStrip": false, - "extractPlugins": false, - "noTranslations": false, - "qmlOut": "qml", - "libOut": "lib", - "trOut": "tr", - "pluginOut": "plug", - "binOut": "bin", - "recOut": "rec", - "verbose": 3, - "qif": false, - "noCheckRPATH": false, - "noCheckPATH": false, - "name": "mainApplication", - "description": "this is description for default package", - "deployVersion": "1.0.0", - "releaseDate": "yyyy-MM-dd", - "icon": "/path/main/icon.png", - "publisher": "main team", - "customScript": "echo 'I am use custom script!!!'" -} - -``` - -File Using Enumerated Parameters -``` json -{ - "noOverwrite": false, - "bin": "./", - "binDir": "./", - "qmlDir": [ - [ - "package2", - "./TestQMLWidgets/" - ], - [ - "./qml/for/All" - ] - ], - - "deploySystem": false, - "deploySystem-with-libc": false, - "qmake": "this parameter should contain the path to your qmake, for Windows this field is required. On Linux, you can remove it, then qmake will be found by rpath.", - "ignore": "ignoreLib.dll", - "ignoreEnv": "/my/ignore/path", - "clear": true, - "force-clear": false, - "allQmlDependes": false, - "libDir": "./", - "recursiveDepth": 3, - "extraLibs": "myExtraLib (libssl)", - "extraPlugin": "myExtraPulgin (platforms)", - "targetDir": "./Distro", - "targetPackage": [ - [ - "/package1/", - "TestOnlyC" - ], - [ - "/package2/", - "TestQMLWidgets" - ] - ], - "noStrip": false, - "extractPlugins": false, - "noTranslations": false, - "qmlOut": "qml", - "libOut": "lib", - "trOut": "tr", - "pluginOut": "plug", - "binOut": "bin", - "recOut": "rec", - "verbose": 3, - "qif": false, - "noCheckRPATH": false, - "noCheckPATH": false, - "name": [ - [ - "package2", - "package2Application" - ], - [ - "mainApplication" - ] - ], - "description": [ - [ - "package2", - "this is description for package 'package2'" - ], - [ - "this is description for default package" - ] - ], - "deployVersion": [ - [ - "package2", - "1.0.0" - ], - [ - "1.0.0" - ] - ], - "releaseDate": [ - [ - "package2", - "yyyy-MM-dd" - ], - [ - "yyyy-MM-dd" - ] - ], - "icon": [ - [ - "package2", - "/path/icon.png" - ], - [ - "/path/main/icon.png" - ] - ], - "publisher": [ - [ - "package2", - "team of package2" - ], - [ - "main team" - ] - ], - "customScript": "echo 'I am use custom script!!!'" -} - -``` - -The purpose of file is to simplify the cqtdeployer's call and move some of the parameters into a file. The parameters specified in the file have a lower priority than the parameters added to the console at the run. - -### Creating of the file - -#### The first method - -1. Call `cqtdeployer init` to initialize the file for a single-package application. - Or `cqtdeployer -init multi` to initialize the file for a project with multiple packages. -2. Open CQtDeployer.json and edit it to fit your needs. -3. Call 'cqtdeployer' in the directory with the file 'CQtDeployer.json', or specify the path to it using the flag '-confFile path/to/my/CQtDeployer.json' - - -#### The second method -Call the cqtdeployer with a set of parameters you need and specify the path to the file using -confFile flag (the file should be absent). If the file exists, cqtdeployer will start unloading the parameters from it. - -An example: -``` bash -cqtdeployer -confFile deploy.json -bin CQtDeployerInstaller -targetDir ./test -qmlOut myqml -binOut mybin -libOut mylib -pluginOut myplugins noStrip noTranslations -recursiveDepth 5 -extraPlugin sqldrivers,audio,mediaservice force-clear deploySystem noOverwrite -``` - -Where: - -* cqtdeployer - the call of cqtdeployer -* -confFile deploy.json - the path to the file,that should be created -* "-bin CQtDeployerInstaller -targetDir ./test -qmlOut myqml -binOut mybin -libOut mylib -pluginOut myplugins noStrip noTranslations -recursiveDepth 5 -extraPlugin sqldrivers,audio,mediaservice force-clear deploySystem noOverwrite" - necessary parameters. - - -### Using of the deployment file. - - Use the flag -confFile [path to the file] to make cqtdeployer start reading the parameters from the file - -#### Example: - -cqtdeployer -qmake ~/Qt/bin/qmake -confFile ./deploy.json - diff --git a/md/en/Description.md b/md/en/Description.md deleted file mode 100644 index 25f5a85..0000000 --- a/md/en/Description.md +++ /dev/null @@ -1,9 +0,0 @@ -# What is CQtDeployer - -The CQtDeployer is application for extract all depends library of executable and create launch script for your application. - -Key differences of this program: -* Performance: this program deploys the application several times faster (up to 10 seconds) -* Flexibility: this utility got flags that help you to configure the deployment for your or your project's needs -* Crossdeploy: this utility 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. -* Packaging - this utility can create installation files and packages for your application. diff --git a/md/en/DisableShortcats.md b/md/en/DisableShortcats.md deleted file mode 100644 index 3787bc3..0000000 --- a/md/en/DisableShortcats.md +++ /dev/null @@ -1,19 +0,0 @@ -# Disabling shortcuts - -Disabling shortcuts for multi targets distribution Kit in the Qt Installer framework. - -Some times we need to disable creating automaticly shortcuts for some applications. -For solve this problem i recomendet override the default qt installer framework template. - -# Note -Starting from CQtDeployer 1.5.1, you can use the -disableShortcuts option to disable the automatic creation of shortcuts. - -### Example: - -```bash -cqtdeployer -disableShortCut targetName,target2Name -``` - -```bash -cqtdeployer -bin myProgramm.exe -disableShortCut myProgramm -``` diff --git a/md/en/EnvironmentVariables.md b/md/en/EnvironmentVariables.md deleted file mode 100644 index b88084e..0000000 --- a/md/en/EnvironmentVariables.md +++ /dev/null @@ -1,50 +0,0 @@ -# Environment variables - -Environment variables of the CQtDeployer - -This page contains information about environment variables of the default launcher script. - -## Initialization - -All environment variables initialized in the default launcher script. So if you use the runScript option then you must be reunited all needed variables manually. - - -## Variables list - -| Variable name | Description | -|---|---| -| CQT_PKG_ROOT | This variable contains path to root of the current package.| -| CQT_RUN_FILE | This variable contains path to the run script of the using application.| - -## Description of definitions - -**Root of the current package** - This root is local root for any separate packages. - - -Example : - -```bash -. -├── pakcage1 << This is local root of the package1 -│ ├── bin -│ ├── lib -│ ├── plugins -│ ├── qml -│ └── translations -├── package2 << This is local root of the package2 -│ ├── bin -│ ├── lib -│ ├── plugins -│ ├── qml -│ └── translations -└── pakcage3 << This is local root of the package3 - ├── bin - ├── lib - ├── plugins - ├── qml - └── translations - -``` - - - diff --git a/md/en/ExtraFiles.md b/md/en/ExtraFiles.md deleted file mode 100644 index 5de95ec..0000000 --- a/md/en/ExtraFiles.md +++ /dev/null @@ -1,107 +0,0 @@ -# Adding extraData - -Adding extraData into distributive. - -CQtDeployer has support to work with extra data files. - -For this you should use the -extraData and -extraDataOut options. - -## Examples: - -### Add custom file into root directory of the your distribution. - -``` -cqtdeployer -extraData path/to/my/customFile -``` - -Or in configFile.json - -```json -{ - ... - "extraData": "./path/to/my/customFile" - ... -} -``` - -This command support list of arguments. - - -```bash -cqtdeployer -extraData path/to/my/customFile,path/to/my/customFile2,path/to/my/customFile3 -``` - -Or in configFile.json - -```json -{ - ... - "extraData": [ - "./path/to/my/customFile", - "./path/to/my/customFile2", - "./path/to/my/customFile3" - ] - ... -} -``` - -### Changing location of extra data files. - -For change location you should use the extraDataOut options. This option change destination path based on the root of the distributive. - -### Example. Add custom scripts into scripts folder in the Distribution. - -```bash -cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extraDataOut scripts -``` - -Or in configFile.json - -```json -{ - ... - "extraData": [ - "./path/to/myScripts.sh", - "./another/path/to/myScripts.sh" - ], - "extraDataOut": "scripts" - ... -} -``` - -## Packages - -extraData and extraDataOut options have support to work with packages. See the packaging [page](Packing.md) to get more information about packages. - -Sometimes we need to create a multipackages application. For example create a installer for client-server application with the client and server applications. The client and server have a own default configuration files. We add config files using the extraData option. - -For create a big distribution i recommend use the [confFile](DeployConfigFile.md). - -## Example multipacking application. - - -```json -{ - - "bin": [ - "myClientExecutable", - "myServerExecutable" - ], - - "targetPackage" : [ - ["Client", "myClientExecutable"], - ["Server", "myServerExecutable"] - ], - - "extraData": [ - ["Client", "./path/to/clientConfig.conf"], - ["Server", "./path/to/serverConfig.conf"] - ], - "extraDataOut": [ - ["Client", "defaultConfigurations"], - ["Server", "defaultConfigurations"] - ] -} -``` - -This config create a distribution with two appications (client and server). Each application have a own configuration file in the defaultConfigurations folder. diff --git a/md/en/ExtractDefaultsTemplates.md b/md/en/ExtractDefaultsTemplates.md deleted file mode 100644 index 35ed666..0000000 --- a/md/en/ExtractDefaultsTemplates.md +++ /dev/null @@ -1,49 +0,0 @@ -# Extracting default templates - -Sometimes you need to create your own templates for installers or deb packages. -Fot this you can use the getDefaultTemplate option. This option extracts your distribution's default template to the target directory. This option will generate a template according to your settings. If you use the targetPackage option then a template will be generated for each package you configured. - -### Example: - -``` bash -cqtdeployer -bin myExecutable getDefaultTemplate qif -``` -This command generate template for qt installer framework into DistributionKit folder for your "myExecutable" programm. - -If you want change target location just add the targetDir option -``` bash -cqtdeployer -bin myExecutable getDefaultTemplate qif -targetDir "/distanation/Dir" - -``` - -## Work With multipackage distribution. - -This option support the configFile.json - -### Example : - -#### configFile.json - -```json -{ - - "bin": [ - "myClientExecutable", - "myServerExecutable" - ], - - "targetPackage" : [ - ["Client", "myClientExecutable"], - ["Server", "myServerExecutable"] - ], -} -``` - -```bash -cqtdeployer getDefaultTemplate qif -confFile "path/to/configFile.json" -``` - - -## Note -This option support work with all packages except of zip. -If you want get more information about available packages see the packing [page](Packing.md). diff --git a/md/en/Guide.md b/md/en/Guide.md deleted file mode 100644 index 6885443..0000000 --- a/md/en/Guide.md +++ /dev/null @@ -1,550 +0,0 @@ -# How to deploy - -How to deploy C++ Application - - -In this article i describe deploy processes of c++/qt application with cqtdeployer. - -## Recommendation -If you want maximum stability of your distribution and you want to run your application on different Distributions with a different versions then you need to use Qt from official [build](https://www.qt.io/download-open-source?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5). - -## Case -In this case we deploy Qt GUI Application for Ubuntu 16.04,Ubuntu 18.04 and Ubuntu 20.04 ++. - -**If you want support all distributions begin from Ubuntu 16.04 you need build and deploy you application on the older distribution (in my case it is 16.04)** - -## Install CQtDeployer -If you want use system qt from your OS then install [classic](https://github.com/QuasarApp/CQtDeployer/releases/download/1.4.7/LinuxInstaller.run) version of the cqtdeployer. - -```bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.4.7/LinuxInstaller.run -``` - -``` -chmod +x LinuxInstaller.run -./LinuxInstaller.run -``` - - -Select latest stable version (1.4) - - - -Done. - -If You use official qt build then you can use snap version of the cqtdeployer. - -``` -sudo snap install cqtdeployer -``` - -After install add requirement permissions. - -``` -sudo snap connect cqtdeployer:process-control -sudo snap connect cqtdeployer:removable-media -sudo snap connect cqtdeployer:system-backup -``` - -Done!!! - -## Deploy Qt GUI Application - -### Deploy your executable file. - -* For Linux systems: - -```bash -cqtdeployer -bin myexecutable -``` - -* For Windows systems: - -```bash -cqtdeployer -bin myexecutable.exe -qmake C:/Qt/5.15.0/min_gw/bin/qmake.exe -``` - -* For crossplatform build (Linux -> Windows) - -```bash -cqtdeployer -bin myexecutable.exe -qmake ~/crossbuildet-Qt/5.15.0/min_gw/bin/qmake -``` - -## Extra options - -If you use extra libraries, just add path for cqtdeployer to used libs. - -```bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -``` - -If you want find libraries recursively from libDir path, just add recursive Depth option. - -```bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -``` - -If you application use qml, just add qmlDir option - -```bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources -``` - -If you want create simple installer for your application just add gif option. -``` -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -``` - -If cqtdeployer not found qmake then add the -qmake option to an invoke command. - -``` -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -qmake /path/to/my/qmake - -``` - - -# Using a live animation example from [Qt Examples](https://doc.qt.io/qt-5/qtquick-animation-example.html) - -## Build the project as a release - -Run qmake with the -r option for release build - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.152/quick/animation$ ~/Qt/5.15.2/gcc_64/binqmake -r . -``` - -Call your make command. - -For Linux: - -```bash -make -j${nproc} -``` - -For Windows - -```bash -Qt/Tools/QtCreator/bin/jom.exe -``` - -Build log: - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc} -g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o main.o main.cpp -/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name shared ../shared/shared.qrc -o qrc_shared.cpp -/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name animation animation.qrc -o qrc_animation.cpp -g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_animation.o qrc_animation.cpp -g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_shared.o qrc_shared.cpp -g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread -``` - -## Find our resulting executable file - -If you built the project using qtCreator, your executable file will be found one level higher in the **build-animations-Desktop_Qt_5_15_2_GCC_64bit-Release** folder. In my case, the executable file is located in the root directory of the project. - -```bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ tree -. -├── animation # Here it is. -├── animation.pro -├── animation.qml -├── animation.qmlproject -├── animation.qrc -├── basics -│ ├── animators.qml -│ ├── color-animation.qml -│ ├── images -│ │ ├── face-smile.png -│ │ ├── moon.png -│ │ ├── shadow.png -│ │ ├── star.png -│ │ └── sun.png -│ └── property-animation.qml -├── behaviors -│ ├── behavior-example.qml -│ ├── FocusRect.qml -│ ├── SideRect.qml -│ ├── tvtennis.qml -│ └── wigglytext.qml -├── doc -│ ├── images -│ │ └── qml-animations-example.png -│ └── src -│ └── animation.qdoc -├── easing -│ └── easing.qml -├── main.cpp -├── main.o -├── Makefile -├── pathanimation -│ └── pathanimation.qml -├── pathinterpolator -│ └── pathinterpolator.qml -├── qrc_animation.cpp -├── qrc_animation.o -├── qrc_shared.cpp -├── qrc_shared.o -└── states - ├── qt-logo.png - ├── states.qml - └── transitions.qml - -10 directories, 33 files -``` - -## Call cqtdeployer to form the base distribution - -For Linux: - -```bash -cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -``` - -For Windows: - -```bash -cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe -``` - -Deploy log: - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -Info: Deploy ... -Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit -Info: target deploy started!! -Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir -Info: platform : libqvnc is disabled -Info: platform : libqvnc is disabled -Info: platform : libqwebgl is disabled -Info: platform : libqwebgl is disabled -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5 -Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56 -Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5 -Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56 -Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm -Info: try deploy msvc -Info: deploy done! -Info: copy ::/shared/Distributions/Templates/Icon.png -Error: not exits -Info: [0] Parsed arguments, ok. -Info: [2] Collecting information about available packages... -Info: [4] Found subdirectory "Application" -Info: [4] - it provides the package "Application" - "1.0" -Info: [4] Copying component data for "Application" -Info: [5] Compressing data directory "bin" -Info: [21] Compressing data directory "icons" -Info: [31] Compressing data directory "lib" -Info: [11111] Compressing data directory "plugins" -Info: [11740] Compressing data directory "qml" -Info: [11786] Compressing data directory "translations" -Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh") -Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" -[12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" -Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb" -Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" -[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" -Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22" -Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" -[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" -Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313" -Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" -[12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" -Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a" -Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" -Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" -Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43" -Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" -[12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" -Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1" -Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" -Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" -Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f" -Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml" -Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data" -Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs" -Info: [12360] done. -Info: [12360] Begin to copy configuration file and data. -Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml" -Info: [12360] done. -Info: [12360] Read dom element: <Name>animation</Name>. -Info: [12360] Read dom element: <Version>1.0</Version>. -Info: [12360] Read dom element: <Title>animation</Title>. -Info: [12360] Read dom element: <Publisher>Company</Publisher>. -[12360] Read dom element: <StartMenuDir>animation</StartMenuDir>. -[12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>. -Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>. -[12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>. -Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>. -Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs" -Info: [12360] done. -Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>. -[12360] Read dom element: <ProductUrl></ProductUrl>. -Info: [12360] done. -Info: [12362] Creating the binary -Info: [12407] Creating resource archive for "Application" -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB") -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes") -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes") -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes") -Info: [12449] Cleaning up... -``` - -Done. The distribution has been saved to the **DistributionKit** folder - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ./DistributionKit/Installeranimation.run -``` - - -After installation, all the necessary shortcuts will be created. - - - - - - -## Integration with QtCreator - -Unfortunately, there is currently no integration with qtcreator. -The only way is to enable build target for ** qmake ** or ** cmake ** - -### qmake - -```qmake -QT_DIR= $$[QT_HOST_BINS] -win32:QMAKE_BIN= $$QT_DIR/qmake.exe -contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake -} - -deploy.commands= cqtdeployer -bin $$DESTDIR/$$TARGET -qmake $$QMAKE_BIN -libDir $$PWD -qmlDir $$PWD -recursiveDepth 5 qif - -QMAKE_EXTRA_TARGETS += deploy - -``` - -### cmake - -```cmake - find_program(Q_MAKE_EXE qmake) - - find_program(CQT_EXE cqtdeployer) - - IF(NOT EXISTS ${CQT_EXE}) - message("the cqtdeployer not exits please install the cqtdeployer and run cmake again!") - return() - endif(NOT EXISTS ${CQT_EXE}) - - ADD_CUSTOM_TARGET( - deploy - COMMAND cqtdeployer clear -bin ${CURENT_PROJECT} -qmake ${Q_MAKE_EXE} -libDir ${PROJECT_SOURCE_DIR} -qmlDir ${PROJECT_SOURCE_DIR} -recursiveDepth 5 - COMMENT "Deploy: cqtdeployer clear -bin ${CURENT_PROJECT} -qmake ${Q_MAKE_EXE} -libDir ${PROJECT_SOURCE_DIR} -qmlDir ${PROJECT_SOURCE_DIR} -recursiveDepth 5" - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - ) -``` - -The **libDir** parameter is used to set the paths to the directory paths contain dependencies of your application, and the **qmlDir** parameter is used to set the directory paths contain the qml files required by your application. In this example, the application source code root is selected by these two options. -The **recursiveDepth** parameter is used to set the search depth of **libDir** and **qmlDir**. -The **qif** parameter is used to create a installer using Qt Installer Framework. - - -## Integration example -Create a test project - -```qmake - -QT += quick - -CONFIG += c++11 - -# You can make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target - - -QT_DIR= $$[QT_HOST_BINS] -win32:QMAKE_BIN= $$QT_DIR/qmake.exe -contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake -} - -DESTDIR=$$PWD/Build - -deploy.commands= cqtdeployer -bin $$DESTDIR/$$TARGET -qmake $$QMAKE_BIN -libDir $$PWD -qmlDir $$PWD -recursiveDepth 5 qif - -QMAKE_EXTRA_TARGETS += deploy - -``` - -2. Open the project control panel -  - -3. Choose a release build -  - - -3. Add "Custom build step" -  - -4. In the "Make arguments" field, add our "deploy" deployment step -  - -5. Save -6. Start the building - -#### As a result, you will receive a DistributionKit folder with the installer of your application. diff --git a/md/en/Home.md b/md/en/Home.md deleted file mode 100644 index 3953aa3..0000000 --- a/md/en/Home.md +++ /dev/null @@ -1,26 +0,0 @@ -# Welcome to the "C Qt Deployer"! -#  - -*************************** - -# Main sections - -* [Description CQtDeployer](Description.md) -* [Options](Options.md) -* [Guide](Guide.md) -* [Quick guide](QuickGuide.md) -* [Build and Install](Build-and-Install.md) -* [Deploy file](DeployConfigFile.md) -* [Packing](Packing.md) -* [Change log page](Changelog.md) -* [Reviews](ReleaseReviews.md) -* [Compare Features](CompareFeatures.md) -* [Adding extra files](ExtraFiles.md) -* [Retrieving packaging templates](ExtractDefaultsTemplates.md) -* [Default Environment Variables](EnvironmentVariables.md) -* [Disable standard shortcuts ](DisableShortcats.md) -* [Custom scripts](CustomScripts.md) - - -## Support the project -If you like what we do and it benefits you, you can support the project on the official page [QuasarApp in Patreon](https://www.patreon.com/QuasarApp) diff --git a/md/en/Options.md b/md/en/Options.md deleted file mode 100644 index 6407e14..0000000 --- a/md/en/Options.md +++ /dev/null @@ -1,174 +0,0 @@ -# Options general rules - -General rules for using options - -``` -cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 -``` - -* All options must begin with a '-' sign. -* After specifying the desired option, you must specify the value. -* Some options support enumerations (arrays of values). When initializing such options, specify the list of values through ',' without spaces. If you use any programming language and call the cqtdeployer process, then the array of values must be passed as 1 parameter. -* Some options support redistributions with the ability to select the target for which the flag will be applied. Target and values are separated using the ';' sign. Example -libOut target1;value1,target2;value2,defaultValue. -* To include a flag, simply include the flag name in the list of options. - -## Description of values in the table - -* **-binDir [params]** - option without array support. -* **-bin [params,list]** - option with support for arrays. The delimiter used is ','. -* **-libOut [package;path,path]** - parameter with support for selecting the package for which the flag value is set. As a separator, use ';'. Please note that the rule described above is used to enumerate parameter values. The last parameter does not have a package value, this means that this value will be set for all non-configured packages by default. -* **clear** - boolean option - -## Definitions in description - -**System environments** - paths of directories containing the system libraries. - * Windows: - * Paths defined in the PATH variable. - * C:/Windows/System32 - * C:/Windows/SysWOW64 - * Linux: - * Paths defined in the LD_LIBRARY_PATH and PATH variables. - * /usr/lib - * /lib - -**Deployable files** - all file that will be copied into distribution (include executable files) - -**Targets** - all executable files marked by bin option. - -**Executable files** - all files with PE, ELF and Mach-O formats. - -## Options: - -### Boolean options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| 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 single 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 and inside a snap package | -| 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" | -| | Example: cqtdeployer qif" }, | -| | Starting with CQtDeployer 1.5 you can specify the path to your own installer template. | -| | Examples: cqtdeployer -qif path/to/myCustom/qif. More details can be found [here](QIF.md) | -| deb | Create the deb package for deployment programm" | -| | Example: cqtdeployer deb" }, | -| | you can specify the path to your own DEBIAN template. | -| | Examples: cqtdeployer -deb path/to/myCustom/DEBIAN. More details can be found [here](DEB.md) | -| deploySystem | Deploys all libraries not recomendet because there may be conflicts with system libraries | -| 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. For more information see the extracting default templates [page](ExtractDefaultsTemplates.md) | -| noHashSum | Disable computation of a packages hash sum | - - -### Deploy options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -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: CQtDeployer 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.| -| -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 in the command invocation the console. | -| | However, the parameters in Kansol have a higher priority than in the file.| -| | For more info about this flag see [wiki](DeployConfigFile) | -| -qmlDir [params] | Qml data dir. For example -qmlDir ~/my/project/qml | -| -qmake [params] | Qmake path. For example | -| | -qmake ~/Qt/5.14.0/gcc_64/bin/qmake | -| -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. **Attention** the libDir option should not be children of the targetDir directory. The targetDir option is forbidden for library searches, as it may contain outdated project libraries, which in turn may lead to unwanted crashes. | -| -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. | -| -extraPlugin [list,params]| Sets an additional path to extraPlugin of an app | -| -recursiveDepth [params] | Sets the Depth of recursive search of libs and ignoreEnv (default 0) | -| -targetDir [params] | Sets target directory(by default it is the path to the first deployable file)| -| -installDirDeb [params] | Sets install target directory fordebian package (by default it is /opt path) | -| -installDirQIFW [params] | Sets install target directory for installers (by default it is /home path) | -| -verbose [0-3] | Shows debug log. By default it is 2 | -| -platform [list] | 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] | - -### Controll of packages options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -targetPackage [package;tar1,package;tar2]| Creates a new package and adds 'tar1 and tar2' to it | -| -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 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 package | -| -deployVersion [package;val,val] | Sets version for package | -| -releaseDate [package;val,val] | Sets release date for package | -| -publisher [package;val,val]| Sets publisher for package | -| -homePage [package;val,val] | Sets the homepage 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. | - -### Controll of targets options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -icon [target;val,val] | Sets path to icon for a targets. This option support only png (Linux) and ico (Windows) files. | -| -disableRunScript [target,target2,target3] | Disables the generation of run script for selected targets| -| -disableShortCut [target,target2,target3] | Disables the generation of shortcut for selected targets | -| -runScript [target;val,val] | 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" For get more information about customScript see the documentation [page](CustomScripts.md)| - -### Plugins Controll Options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -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. | -| -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.| - -### QtInstallFramework options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -qifStyle [path/to/style.css]| Sets the path to the CSS style file or sets the default style. Available styles: quasar | -| -qifBanner [path/to/banner.png]| Sets path to the banner png file. | -| -qifLogo [path/to/logo.png]| Sets path to the logo png file. | -| -qifOut [nameOfOutputInstallerFile] | Sets name of output qifw installer. Note: on Windows, the exe suffix will be added to the installer automatically. | -| -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). | -| -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). | -| -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). | -| -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. | -| -binarycreator [binarycreator command] | Sets new binarycreator command. Example : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'| - -### Deb package options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -debOut [package;nameOfOutputDebFile,nameOfOutputDebFile]| Sets name of the output debian file. This option can be work with multiple packages | - -### Zip pacakge options - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -zipOut [package;nameOfOutputZipFile,nameOfOutputZipFile]| Sets name of the output zip arrhive. This option can be work with multiple packages | - -#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.15.4/gcc_64/bin/qmake clear diff --git a/md/en/Packing.md b/md/en/Packing.md deleted file mode 100644 index 20ed6fb..0000000 --- a/md/en/Packing.md +++ /dev/null @@ -1,139 +0,0 @@ -# Packaging distributions - -General information on packaging your distributions in packages. - -## Packaging Types - -* Automatic -* Manual - -## Automatic Packages - -Packages with this type creates automaticly. -By default the distribution have a one main package. You can configure it using [Controll of packages options](Options.md). - -#### Example (Set new name for pacakge) - -``` -ctdeployer ... -name "MyPackage" -``` - -If your distribution have a multiple executable files then you can be create a distribution with multiple package. - -One package can contain from 1 to infinity of executable files. - -For configure a package you must be use the targetPackage option. - -Example of using: - -``` -cqtdeployer ... -targetPackage myPacage;target1,myPacage2;target2 -``` - -Where myPacage is a name of package and target1 is a name of executable file. -so This example create 2 packages from 2 targets. - -The Next example create a 2 packages from 3 targets. -``` -cqtdeployer ... -targetPackage myPacage;target1,myPacage;target2,myPacage2;target3 -``` - - -You can also do the same in the config file - -``` -{ -"targetPackage": [ - [ - "myPacage", - "target1" - ], - [ - "myPacage2", - "target2" - ] - ] -} -``` - -``` -{ -"targetPackage": [ - [ - "myPacage", - "target1" - ], - [ - "myPacage", - "target2" - ], - [ - "myPacage2", - "target3" - ] - ] -} -``` - - -## Manual Packages - -Manual packages is packages created by user template. -For example you have a aplication that must be execute a complex script on the debian package or the installer. -So you need to create your template and add tehe path to you template for a package option. - -Example - -``` -cqtdeployer ... -qif /path/to/my/template/installer -``` - -The /path/to/my/template/installer folder must be contains a folder with the package name. -for example i am deploy application with the "MyExample" name, so my custom template must be locate in the -/path/to/my/template/installer/MyExample path. - -For multi-package distributions, the same rules apply. - -Your folder with the templates must be contains folders with same names as packages. - -Example: - -``` -{ -"targetPackage": [ - [ - "myPacage", - "target1" - ], - [ - "myPacage", - "target2" - ], - [ - "myPacage2", - "target3" - ] - ] -} -``` - -``` -~/path/to/my/template/installer$ tree -. -├── myPacage -│ └── ... -└── myPacage2 - └── ... - -``` - -### Note - -You can also extract the standard package template in order to override it if for some reason you are not satisfied with the standard implementation. See this [page](ExtractDefaultsTemplates.md) for details on how to do this - - -## Available packages - -* [Qt Install Framework](QIF.md) -* [ZIP Arhive](ZIP.md) -* [DEB Package](DEB.md) diff --git a/md/en/QIF.md b/md/en/QIF.md deleted file mode 100644 index 622774e..0000000 --- a/md/en/QIF.md +++ /dev/null @@ -1,176 +0,0 @@ -# Qt Installer Framwork - -General rules for using Qt Installer Framwork - -### What is Qt Installer Framwork - -The **Qt Installer Framework** (QIF) provides a set of tools and utilities to create installers for the supported desktop Qt platforms: Linux, Microsoft Windows, and OS X. -In **CQtDeployer** QIF availabel in qif option. - -### How to use qif option - -The qif option invoke with path to custo qt installer template or with default installer template. - -#### For example: - -```bash - cqtdeployer ... qif -``` - -Where: -* **...** - is list of other options. -* **qif** - option for use qt installer framework with default template. - - -By default, cqtdeployer will create an installation file with one package in which your entire distribution kit will lie. -If you want to configure it, you should use [Controll of packages options](Options.md) -To create a new package, use the -targetPackage [package; tar1] option - - -Where: - -* **package** - it is package name -* **tar1** - it is name of the target that should be included in this package. - -Or you can describe packages in [configuration file](DeployConfigFile.md) - - -```json -{ -"targetPackage": [ - [ - "package", - "tar1" - ] -], -} -``` - -# Custom Template for QIF - -Starting with CQtDeployer Version 1.5 you can use your own installer template. To do this, you must pass the path to your template to the qif parameter. - -```bash -cqtdeployer ... -qif /path/to/my/custom/qif/template -``` - -### Template - -The qif template should contain 2 folders: -* packages -* config - -### Attention - -The name of the packages in the packages folder must match the names of the packages during deployment. - -For example: - -```json -"targetPackage": [ - [ - "myCustomInstaller", - "tar1" - ] -], -``` - -```bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` - -If the folder names do not match the package names then CQtDeployer will use the standard QIF package. - -If you have only one package then you can use the **name** option for set name the application. - -```bash -cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller -``` - -#### Do not forget to rename the your package folder to the packaga name of the name option. - - -```bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller << "This is folder of the your package" - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` - -## Initialization of the qifw template - -For initialize default templates you can use the getDefaultTemplate option. -The getDefaultTemplate option extract default template of the cqtdeployer. This is can be very convinion if you want override default behavior of the installer or anothe distribution package. - -### Example - -### Getting default qt installer framwork template. - -```bash -cqtdeployer getDefaultTemplate qif -``` - - -### Note - -CQtDeployer will skip create a packages directory for the template because this commmnad do not contains any deploying data. -If you want to prepare template with packages configurations then you should add deployed data to your command or your config.json file using bin or extraData options. -If you create multi pacakges distribution then you need to configure your packages in your deploying commnad. - - -#### Example: - -Extracting template with pacakges: - -```bash -cqtdeployer getDefaultTemplate qif -bin myExecutable -``` - -Extracting template for multi packages distribution - -```bash -cqtdeployer getDefaultTemplate qif -bin myExecutable1,myExecutable2 -targetPackage p1;myExecutable1,p2;myExecutable2 -``` - -You also can use the config file for configure templates. - -Config.json - -```json -{ - "qif": true, - "bin": [ - "myExecutable1", - "myExecutable2" - ], - "targetPackage": [ - ["p1", "myExecutable1"], - ["p2", "myExecutable2"] - ] -} -``` - -Run CQtDeployer for generate template: - -```bash -cqtdeployer -confFile Config.json getDefaultTemplate -``` diff --git a/md/en/QuickGuide.md b/md/en/QuickGuide.md deleted file mode 100644 index f6137d4..0000000 --- a/md/en/QuickGuide.md +++ /dev/null @@ -1,81 +0,0 @@ -# Quick Guide - -How to deploy project with cqtdeployer. - -1. First one you need to install cqtdeployer into your platform - - * Snap (14 more linux destributions): - ``` - sudo snap install cqtdeployer - ``` - Or - - Install from snap store and add all requirement permissions. - - [](https://snapcraft.io/cqtdeployer) - - * Other linux [LinuxInstaller.run][1]. - ``` - chmod +x LinuxInstaller.run - ./LinuxInstaller.run - ``` - - * Windows [installer][1] - -2. Build your project on release mode. -3. Deploy yor executable file. - - * For Linux systems: - ``` bash - cqtdeployer -bin myexecutable - ``` - - * For Windows systems: - ``` bash - cqtdeployer -bin myexecutable.exe -qmake C:/Qt/5.15.0/min_gw/bin/qmake.exe - ``` - - * For crossplatform build (Linux -> Windows) - ``` bash - cqtdeployer -bin myexecutable.exe -qmake ~/crossbuildet-Qt/5.15.0/min_gw/bin/qmake - ``` - -## Extra options - -If you use extra libraries, just add path for cqtdeployer to used libs. -``` bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -``` - -If you want find libraries recursively from libDir path, just add recursive Depth option. -``` bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -``` - -If you application use qml, just add qmlDir option -``` bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources -``` - -If you want create simple installer for your application just add gif option. -``` -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -``` - -If you use system libraries from system PATH, just add deploySystem option. - -#### Warning: snap version do not have permision to system files. To deploy system libraries use the cqtdeployer version from the [installer][1] - -``` -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif deploySystem -``` - - -### If you have any problems with use cqtdeployer then ask you questions on the official github issues [page][2]. - -### For more options of CQtDeploye see oficial [documentation][3]. - -[1]: https://github.com/QuasarApp/CQtDeployer/releases -[2]: https://github.com/QuasarApp/CQtDeployer/issues -[3]: https://github.com/QuasarApp/CQtDeployer/blob/main/md/en/Options.md - diff --git a/md/en/ReleaseReviews.md b/md/en/ReleaseReviews.md deleted file mode 100755 index a0b5f9a..0000000 --- a/md/en/ReleaseReviews.md +++ /dev/null @@ -1,4 +0,0 @@ -# Release Reviews - -* [Review v1.5](1_5.md) -* [Review v1.4 (Binary Box)](1_4.md) diff --git a/md/en/ZIP.md b/md/en/ZIP.md deleted file mode 100644 index d837802..0000000 --- a/md/en/ZIP.md +++ /dev/null @@ -1,47 +0,0 @@ -# ZIP Using - -General rules for using ZIP - - -Available from version CQtDeployer 1.5 - -### How to use zip option - -Just add to cqtdeployer option "zip". - -### For example: - -```bash -cqtdeployer ... zip -``` - -Where: -* **...** - is list of other options. -* **zip** - option for use zip arhives. - - -By default, cqtdeployer will create one zip arhive. -If you want create multi package destribution, you should use [Controll of packages options](Options.md) -To create a new package, use the -targetPackage [package; tar1] option - -cqtdeployer create zip arhive for each packages. - -Where: - -* **package** - it is package name -* **tar1** - it is name of the target that should be included in this package. - -Or you can describe packages in [configuration file](DeployConfigFile.md) - - -```json -{ -"targetPackage": [ - [ - "package", - "tar1" - ], -], -"zip": true -} -``` diff --git a/md/ru/1_4.md b/md/ru/1_4.md deleted file mode 100755 index adaeef7..0000000 --- a/md/ru/1_4.md +++ /dev/null @@ -1,409 +0,0 @@ -# Релиз CQtDeployer v1.4.0 (Binary Box) - -Релиз утилиты развертывания С++/Qt и QML приложений CQtDeployer v1.4.0 (Binary Box) - -Спустя почти полгода, вышло мажорное обновление утилиты развёртывания CQtDeployer. -В данном обновлении множество нововведений, но основной упор в сделан на создание пакетов. - -## Полный список всех изменений - -### Исправления -- Исправлен вывод справки в консоли, теперь перед выводом пересчитывается реальный размер консоли, что позволяет выполнять переносы текста правильно. -- Исправлена работа с развертыванием плагинов Qt. Теперь плагины не тянут за собой все системные зависимости, а только qt. Захват системных зависимостей приводил к падению приложений из-за несовместимости библиотек плагинов. -- Мелкие исправления и улучшения. -### Нововведения -- Добавлена поддержка поиска qmake из системного окружения. -- Добавлена возможность инициализировать репозиторий для дальнейшей упаковки аналогично git init. -- Добавлена поддержка Qt Install Framework пакетов. Теперь можно запаковать дистрибутив в инсталлятор. -- Добавлена возможность разбивать конечный дистрибутив на несколько пакетов. -- Добавлен механизм, позволяющий унифицировать создание пакетов для конечного дистрибутива. -- Добавлена поддержка добавления пользовательских скриптов в скрипты запуска приложений. -- Добавлена поддержка сборки системных зависимостей для Windows. -- Добавлена поддержка RPATH для Linux. Теперь cqtdeployer может самостоятельно определить нужный qmake для развертывания приложения. -- Добавлена поддержка поиска необходимой зависимости по имени библиотеки. -- Добавлена поддержка Qt библиотек из репозиториев Linux дистрибутивов. -### Новые опции -- init - инициализирует файл cqtdeployer.json (файл конфигурации). Например: «cqtdeployer init» - для инициализации конфигурации одного пакета. "cqtdeployer -init multiPackage" - для инициализации конфигурации нескольких пакетов. -- noCheckRPATH - отключает автоматический поиск путей к qmake в исполняемых файлах (Только Linux). -- noCheckPATH - отключает автоматический поиск путей к qmake в системном окружении. -- extractPlugins - заставляет извлекать все зависимости плагинов. -- qif - создает инсталлятор в конце развертывания. -- extraLibs - добавляет шаблон дополнительной библиотеки, которая должна будет попасть в дистрибутив. -- customScript - добавляет пользовательский скрипт в скрип запуска приложения. -- -targetPackage [package;tar1,package;tar2] - используется для формирования пакетов, обозначает списки целевых файлов для определенных пакетов. -- recOut - указывает в какую папку будут складываться ресурсы после развертывания. -- name - устанавливает имя пакета. -- description - устанавливает описание пакета -- deployVersion - устанавливает версию пакета -- releaseDate - дата релиза пакета. -- icon - иконка пакета. -- publisher - издатель пакета. -- qifStyle - Устанавливает путь к CSS файлу стиля или устанавливает стиль по умолчанию. Доступные стили: quasar -- qifBanner - Устанавливает путь к png-файлу баннера. -- qifLogo - Устанавливает путь к файлу логотипа png. - -## Подробный разбор самых интересных изменений. - -Первое, на что стоит обратить внимание, это то что CQtDeployer научился работать с RPATH (Только Linux) и PATH. Это значит, что если ваше приложение собранно с поддержкой RPATH (а RPATH в qt включен по молчанию) или ваш qmake прописан в PATH, то вам не нужно указывать путь к qmakе. CQtDeployer сам найдет нужный ему qmake. -Давайте проверим это на практике. -Я написал простое консольное приложение с использованием Qt. -``` cpp -#include <QString> -#include <QDebug> -int main(int, char *[]) -{ - QString str = "hello CQtDeployer 1.4"; - qInfo() << str; - return 0; -} -``` - -Я буду использовать сборочную систему cmake, так как она более актуальная чем qmake. - -``` bash -andrei@HP:~/Hello$ tree -. -├── CMakeLists.txt -├── CMakeLists.txt.user -└── main.cpp - -0 directories, 3 files -``` - -Создадим папку для сборки. -``` bash -andrei@HP:~/Hello$ mkdir build -``` - -Выполним в созданной папке cmake. - -``` bash -andrei@HP:~/Hello/build$ cmake .. -DCMAKE_PREFIX_PATH=~/Qt/5.14.1/gcc_64 --- Configuring done --- Generating done --- Build files have been written to: /home/andrei/Hello/build -``` - -Выполняем сборку. - -``` bash -andrei@HP:~/Hello/build$ make -Scanning dependencies of target Hello_autogen -[ 25%] Automatic MOC and UIC for target Hello -[ 25%] Built target Hello_autogen -Scanning dependencies of target Hello -[ 50%] Building CXX object CMakeFiles/Hello.dir/Hello_autogen/mocs_compilation.cpp.o -[ 75%] Building CXX object CMakeFiles/Hello.dir/main.cpp.o -[100%] Linking CXX executable Hello -[100%] Built target Hello -``` - -Проверяем нашу программу. -``` bash -andrei@HP:~/Hello/build$ ls -CMakeCache.txt CMakeFiles cmake_install.cmake Hello Hello_autogen Makefile -``` -И запускаем cqtdeployer передав ему программу без qmake. -``` bash -andrei@HP:~/Hello/build$ cqtdeployer -bin Hello -Deploy ... -flag targetDir not used. use default target dir : "/home/andrei/Hello/build/DistributionKit" -target deploy started!! -copy : "/home/andrei/Hello/build/Hello" -extract lib : "/home/andrei/Hello/build/DistributionKit//bin//Hello" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libQt5Core.so.5" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libicuuc.so.56" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libicui18n.so.56" -copy : "/home/andrei/Qt/5.14.1/gcc_64/lib/libicudata.so.56" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ar.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_bg.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ca.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_cs.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_da.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_de.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_en.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_es.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_fi.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_fr.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_gd.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_he.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_hu.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_it.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ja.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ko.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_lv.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_pl.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_ru.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_sk.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_uk.qm" -copy : "/home/andrei/Qt/5.14.1/gcc_64/translations/qtbase_zh_TW.qm" -try deploy msvc -deploy done! -``` - -О чудо, теперь наше приложение полностью автономно. -Проверяем это. - -``` bash -andrei@HP:~/Hello/build$ cd DistributionKit/ -andrei@HP:~/Hello/build/DistributionKit$ tree -. -├── bin -│ ├── Hello -│ └── qt.conf -├── Hello.sh -├── lib -│ ├── libicudata.so.56 -│ ├── libicui18n.so.56 -│ ├── libicuuc.so.56 -│ └── libQt5Core.so.5 -└── translations - ├── qtbase_ar.qm - ├── qtbase_bg.qm - ├── qtbase_ca.qm - ├── qtbase_cs.qm - ├── qtbase_da.qm - ├── qtbase_de.qm - ├── qtbase_en.qm - ├── qtbase_es.qm - ├── qtbase_fi.qm - ├── qtbase_fr.qm - ├── qtbase_gd.qm - ├── qtbase_he.qm - ├── qtbase_hu.qm - ├── qtbase_it.qm - ├── qtbase_ja.qm - ├── qtbase_ko.qm - ├── qtbase_lv.qm - ├── qtbase_pl.qm - ├── qtbase_ru.qm - ├── qtbase_sk.qm - ├── qtbase_uk.qm - └── qtbase_zh_TW.qm - -3 directories, 29 files -andrei@HP:~/Hello/build/DistributionKit$ -``` -Корень программы: - - - -Библиотеки,нужные для работы программы: - - - - -Как видно из примера, приложение полностью собрано. - -## Qt Installer Framework -Второе нововведение, о котором стоит знать, это возможность из коробки формировать установщики QIF. Все, что нужно для нашего примера, это добавить в команду на упаковку опцию qif. - -Пример использования. - -``` -andrei@HP:~/Hello/build$ cqtdeployer -bin Hello qif -``` - -Всего одна простая команда и программа получает презентабельный вид. - - - -Этот установщик поддерживает минимальную интеграцию Linux дистрибутивами и Windows. А именно: создание ярлыков, и регистрация приложения в OС. -Если по каким то причинам вас не устраивает внешний вид данного установщика, его можно изменить при помощи флага qifStyle . На момент версии 1.4 cqtdeployer поддерживает всего 2 стиля (native и quasar). - -Пример стиля quasar: - - - -Вы также можете использовать свою собственную таблицу стилей qss. Для этого вместо названия стиля передайте путь к вашему qss или css файлу. -Для примера можно рассмотреть следующую таблицу стилей qss. - -Style.qss: -``` css -QWidget -{ - color: white; - background-color: rgb(65, 65, 65); -} - -QPushButton -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(150, 150, 150, 60%), stop:1 rgba(50, 50, 50, 60%)); - border-color: rgb(60, 60, 60); - border-style: solid; - border-width: 2px; - border-radius: 9px; - min-height: 20px; - max-height: 20px; - min-width: 60px; - max-width: 60px; - padding-left: 15px; - padding-right: 15px; -} - -QPushButton:pressed, QPushButton:checked -{ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(50, 50, 50, 60%), stop:1 rgba(150, 150, 150, 60%)); -} -``` - -Давайте проверим, что у нас получится в таком случае. -``` bash -cqtdeployer -bin Hello qif -qifStyle ./../style.qss -``` - - - -Вот,собственно, и тёмная тема установщика. - -## Разбиение на пакеты -И,наверное, последнее важное обновление, о котором стоит знать — это возможность разделять большой многобинарный проект на подпроекты. - -Эта возможность самая сложная из всех перечисленных, так как требует много текста для ее использования. Так что я рекоммендую использовать файл конфигураций. - -Для начала усложним наш проект, добавив в него ещё 2 исполняемого файла. Я не стал заморачиваться и просто сделал 2 копии моей Hello утилиты. - -Для упрощения работы с пакетами нужно инициализировать директорию. - -``` bash -cqtdeployer init -``` - -Это еще одна новая функция, которая создаёт CQtDeployer.json файл, в котором мы и будем писать наши конфигурации, вместо передачи опций в утилиту. - -``` js -{ - "binDir": ".", - "clear": true, - "libDir": "./", - "recursiveDepth": 5 -} -``` - -Теперь давайте сделаем 2 пакета из 3х наших программ. Для этого нужно указать: -```js -{ - "binDir": ".", - "clear": true, - "libDir": "./", - "recursiveDepth": 5, - "targetPackage": [ - ["Dstro1", "Hello1"], - ["Dstro2", "Hello2"], - ["Dstro2", "Hello3"] - ] -} -``` - -Обратите внимание на то, что мне пришлось явно указать привязку для Dstro2 к Hello2 Hello3, К сожалению, на момент версии 1.4 cqtdeployer не умеет парсить перечисления целей. Обратите внимание, что если я напишу вместо Hello1 Hello, то выборка будет сделана по всем совпадениям и будут выбраны все 3 программы. -Итак, смотрим что получилось. - -``` bash -cqtdeployer - -. -├── Dstro1 -│ ├── bin -│ │ ├── Hello1 -│ │ └── qt.conf -│ ├── Hello1.sh -│ ├── lib -│ │ ├── libicudata.so.56 -│ │ ├── libicui18n.so.56 -│ │ ├── libicuuc.so.56 -│ │ └── libQt5Core.so.5 -│ └── translations -│ ├── qtbase_ar.qm -│ ├── qtbase_bg.qm -│ ├── qtbase_ca.qm -│ ├── qtbase_cs.qm -│ ├── qtbase_da.qm -│ ├── qtbase_de.qm -│ ├── qtbase_en.qm -│ ├── qtbase_es.qm -│ ├── qtbase_fi.qm -│ ├── qtbase_fr.qm -│ ├── qtbase_gd.qm -│ ├── qtbase_he.qm -│ ├── qtbase_hu.qm -│ ├── qtbase_it.qm -│ ├── qtbase_ja.qm -│ ├── qtbase_ko.qm -│ ├── qtbase_lv.qm -│ ├── qtbase_pl.qm -│ ├── qtbase_ru.qm -│ ├── qtbase_sk.qm -│ ├── qtbase_uk.qm -│ └── qtbase_zh_TW.qm -└── Dstro2 - ├── bin - │ ├── Hello2 - │ ├── Hello3 - │ └── qt.conf - ├── Hello2.sh - ├── Hello3.sh - ├── lib - │ ├── libicudata.so.56 - │ ├── libicui18n.so.56 - │ ├── libicuuc.so.56 - │ └── libQt5Core.so.5 - └── translations - ├── qtbase_ar.qm - ├── qtbase_bg.qm - ├── qtbase_ca.qm - ├── qtbase_cs.qm - ├── qtbase_da.qm - ├── qtbase_de.qm - ├── qtbase_en.qm - ├── qtbase_es.qm - ├── qtbase_fi.qm - ├── qtbase_fr.qm - ├── qtbase_gd.qm - ├── qtbase_he.qm - ├── qtbase_hu.qm - ├── qtbase_it.qm - ├── qtbase_ja.qm - ├── qtbase_ko.qm - ├── qtbase_lv.qm - ├── qtbase_pl.qm - ├── qtbase_ru.qm - ├── qtbase_sk.qm - ├── qtbase_uk.qm - └── qtbase_zh_TW.qm - -8 directories, 60 files -``` - -Как видно из дерева результата, у нас получилось 2 дистрибутива. -1. Dstro1 — содержит в себе приложение Hello1 -2. Distro2 — содержит оставшиеся 2. - -А теперь давайте проверим, что будет, если все это запаковать а установщик. Добавим в CQtDeployer.json опцию qif **"qif": true,**. - -``` js -{ - "binDir": ".", - "clear": true, - "qif": true, - "libDir": "./", - "recursiveDepth": 5, - "targetPackage": [ - ["Dstro1", "Hello1"], - ["Dstro2", "Hello2"], - ["Dstro2", "Hello3"] - ] -``` - - - -Кака видно из скриншота, теперь у нас 2 пакета при установке. - -## Новые алиасы - -И последнее небольшое но приятное дополнение: теперь в cqtdeployer добавлены новые команды. -* сqt — бывстрый способ задеплоить ваше приложение. Он упрощает вызов развертывания. - * Пример: - **cqt myApp** — это тоже самое что и **cqtdeployer -bin myApp**. -* cqtdeployer.cqt — тоже что и cqt но для snap пакета. -* В windows-версии теперь не нужно добовлять знак % для вызова утилиты. -Теперь вызов выглядит так, как и в Linux. (cqtdeployer) diff --git a/md/ru/1_5.md b/md/ru/1_5.md deleted file mode 100755 index 2122580..0000000 --- a/md/ru/1_5.md +++ /dev/null @@ -1,157 +0,0 @@ -# Выпуск CQtDeployer v1.5.0 - -Выпуск утилиты развертывания приложений C ++ / Qt и QML CQtDeployer v1.5.0 - -Это первое крупное обновление в 2021 году. CQtDeployer 1.5 содержит множество полезных улучшений. Самыми большими улучшениями являются добавление возможности упаковывать пакеты deb и возможность использовать собственный шаблон упаковки для среды установки qt. - -## Полный список всех изменений - -## CQtDeployer 1.5.0 - -### Новые возможности - -- Добавлена новая тема установщика qif "quasarDark". -- Добавлена поддержка работы с кастомным шаблоном для опции qif. -- Добавлена поддержка пакетов debian. -- Добавлены поддержка иконок целей. Теперь опция icon работает с целями, но не с пакетами. -- Добавлена поддержка управления файлами пользовательского перевода. -- Добавлена поддержка развертывания неисполняемых файлов. (опция extraData) -- Добавлены переменные окружения для развернутых приложений. -- Добавлена поддержка создания пакетов deb. -- Добавлена поддержка создания архивов zip. -- Добавлена поддержка создания установщика qif с использованием настраиваемого шаблона. -- Добавлена команда для инициализации шаблонов qif и deb по умолчанию (getDefaulttemplate) -- Добавлена поддержка импорта пользовательских скриптов запуска. -- Добавлена поддержка хэшей md5 пакетов. -- Добавлена поддержка Qt6.1. - -### Исправления - -- Исправлена стабильность для опции deploySystem в Windows. -- Исправлен подробный журнал. -- Исправлен общий журнал вывода. -- Исправлены опечатки в логе. -- Исправлено кросс-развертывание под платформу ARM -- Исправлено развертывание Qt6 qml -- Исправлены команды PowerShell в Windows. -- исправления ошибок и улучшения. - - -### Новые переменные окружения - -- CQT_RUN_FILE - Эта переменная содержит путь к сценарию выполнения используемого приложения. -- CQT_PKG_ROOT - эта переменная содержит путь к корню текущего пакета. - -### Новые параметры - -- zip - создать ZIP-архив для развертываемой программы -- deb - Создать пакет deb для развертываемой программы -- homepage - Устанавливает URL-адрес домашней страницы для пакета -- noQt - игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует фреймворк qt -- allowEmptyPackages - позволяет настраивать пустые пакеты. -- getDefaultTemplate - Извлекает шаблоны deb или qif по умолчанию. -- tr - Добавляет qm файлы в папку переводов. -- extraData - добавляет дополнительные файлы или каталоги как цель. Выбранный каталог будет скопирован в папку extraDataOut с сохранением собственной структуры. -- extraDataOut - Устанавливает путь к каталогу с дополнительными файлами данных. -- prefix - Устанавливает префикс для пакета относительно целевого каталога -- homePage - Устанавливает URL-адрес домашней страницы для пакета -- binPrefix - устанавливает префикс для опции bin. -- noHashSum - отключает хэши кампутных пакетов - -### Устаревшие и удаленные параметры - -- deploySystem-with-libc - вместо этого параметра используйте параметр deploySystem. -- allQmlDependes - вместо этого параметра используйте параметр qmlDir. - - -## Подробный разбор наиболее интересных изменений. - -### Пакеты Debian -Эта функция очень удобна, если вы хотите создать серверное приложение. -Например, мне нужно создать простой сервер для простой игры. -Мои шаги: -* собрать мое приложение в режиме релиза. -* запустите cqtdeployer с опцией deb. - -```bash -cqtdeployer -bin mySimpleServer deb -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -``` -SimpleServer зависит только от qt, поэтому мне было достаточно указать только путь к qmake для моего приложения. - -Это все!!!. И я получаю рабочий пакет deb. -По умолчанию CQtDeployer создает независимые пакеты debian. - - -### Почтовые архивы -Эта функция позволяет сжать пакеты вашего дистрибутива в zip-архив. - -Пример: - -```bash -cqtdeployer -bin mySimpleServer zip -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -``` - -# Пользовательский Шаблон для QIF -Начиная с Версии CQtDeployer 1.5 вы можете использовать свой собственный шаблон установщика. Для этого вы должны передать в параметр qif путь к вашему шаблону. - -``` -cqtdeployer ... -qif /path/to/my/custom/qif/template -``` - -### Шаблон -Шаблон qif долже содержать 2 папки: -* packages -* config - -### Внимание -Название пакетов в папке packages должны совподать с названием пакетов при развертывание. -Например: -``` json -"targetPackage": [ - [ - "myCustomInstaller", - "tar1" - ] -], -``` - -``` bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` - -Если имена папок не совподут с именами пакетов то CQtDeployer будет использовать стандартный пакет для QIF. - -Если у вас только один пакет, вы можете использовать опцию **name** для установки имени приложения. - -``` -cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller -``` - -#### Не забудьте переименовать папку вашего пакета в имя пакета из опции имени. - - -``` bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller << "This is folder of the your package" - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` \ No newline at end of file diff --git a/md/ru/Build-and-Install.md b/md/ru/Build-and-Install.md deleted file mode 100644 index 7059c9b..0000000 --- a/md/ru/Build-and-Install.md +++ /dev/null @@ -1,86 +0,0 @@ -# Установка CQtDeployer - -Вы можете загрузить последнее подготовленные сборки [здесь](https://github.com/QuasarApp/CQtDeployer/releases). - -### Установщик - -- [Загрузить](https://github.com/QuasarApp/CQtDeployer/releases) CQtDeployer_X.X.X.X_Installer_Linux64.run или CQtDeployer_X.X.X.X_Installer_Win64.exe - -#### Установка в консоли (CMD) без GUI - -##### Linux - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Linux64.run -chmod +x CQtDeployer_1.5.3.0_Installer_Linux64.run -./CQtDeployer_1.5.3.0_Installer_Linux64.run install -``` - -##### Windows - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Win64.exe -CQtDeployer_1.5.3.0_Installer_Win64.exe install -``` - -### Deb - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Linux64.deb -sudo dpkg -i CQtDeployer_1.5.3.0_Linux64.deb -``` - -**Примечание** имя пакета и ссылки могут быть изменены, пожалуйста, проверьте страницу [Загрузки](https://github.com/QuasarApp/CQtDeployer/releases) перед установкой. - -### Snap - -[](https://snapcraft.io/cqtdeployer) - - -#### Особенности snap версии - -Если вы используете snap версию приложения. Включите все разрешения для cqtdeployer. -это можно сделать в snap-store -Или начиная с ubuntu 20.04 в менеджере настроек приложений ubuntu. - -Если у вас нет графического интерфейса, вы можете включить все разрешения, используя следующие команды: - -``` bash -sudo snap connect cqtdeployer:process-control -sudo snap connect cqtdeployer:removable-media -sudo snap connect cqtdeployer:system-backup -``` - ---- - -# Сборка из исходников - -## 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.15.0/gcc_64/bin/qmake -r -- make -j$(nproc) -- make deploy - - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) - -## 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/mingw810_64/bin;%PATH% - - Здесь важно настроить окружение qt. -- qmake.exe -r - - Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта. - - Пример: C:/Qt/5.15.0/mingw81_64/bin/qmake.exe -r -- migw32-make -j8 -- migw32-make deploy - - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) -- ./Distro/CQtDeployerInstaller.exe - diff --git a/md/ru/Changelog.md b/md/ru/Changelog.md deleted file mode 100755 index 3836333..0000000 --- a/md/ru/Changelog.md +++ /dev/null @@ -1,346 +0,0 @@ -# Журнал изменений - -Журнал изменений для всех версий CQtDeployer. - - -## CQtDeployer 1.5.4 - -### Новые параметры -* qifConfig - Устанавливает собственный путь к файлу конфигурации установщика qt ifw. По умолчанию это qif/config/config.xml #653. -* qifPackages - Устанавливает собственный путь к каталогам пакетов. По умолчанию это qif/packages #653. -* qifResources - Устанавливает собственный путь к файлам ресурсов. По умолчанию эта опция пропущена #653 -* debOut - Устанавливает имя выходного файла debian. Эта опция может работать с несколькими пакетами -* zipOut - Устанавливает имя выходного zip-архива. Эта опция может работать с несколькими пакетами - -### Исправление ошибок : - -* исправлено crossdeploy linux -> windows # 652 - - -## CQtDeployer 1.5.3 - -### Новые параметры - -* installDirDeb - Устанавливает целевой каталог установки для пакета debian (по умолчанию это / opt путь) -* installDirQIFW - Устанавливает целевой каталог установки для установщиков (по умолчанию это / home путь) - -### Исправления -* Исправлено предупреждение при установке В windows -* Добавлена пороверка параметров ввода -* Добавлено сообщение об ошибке из-за конфликта между опциями libDir и targetDir - -## CQtDeployer 1.5.2 - -### Новые параметры - -* Добавлена опция **qifOut** для установки имени установщика -* Добавлена опция **disableRunScript** для отключения генерации сценария запуска для выбранных целей -* Добавлена опция **disableShortCut** для отключения генерации ярлыка для выбранных целей - -### Исправления - -* Фикс документации -* Фикс развертывания библиотек openssl - -## CQtDeployer 1.5.1 - -### Исправления - -* Исправлено развертывание многоцелевых пакетов Debian -* Фикс развертывания qt6 qml приложений - -## CQtDeployer 1.5.0 - -### Нововведения - -- Добавлена новая тема установщика qif "quasarDark". -- Добавлена поддержка работы с кастомным шаблоном для опции qif. -- Добавлена поддержка пакетов debian. -- Добавлена поддержка иконок для целей. теперь опция icon работает с целями, а не с пакетами. -- Добавлена поддержка управления файлами пользовательского перевода. -- Добавлена поддержка развертывания дополнительных файлов. (опция extraData) -- Добавлены переменные окружения для развернутых приложений. -- Добавлена поддержка создания пакетов deb. -- Добавлена поддержка создания zip-архивов. -- Добавлена поддержка создания установщика qif с использованием настраиваемого шаблона. -- Добавлена команда инициализации qif по умолчанию шаблона deb (getDefaulttemplate) -- Добавлена поддержка импорта пользовательских скриптов запуска. -- Добавлена поддержка хэш сумм md5 для всех пакетов. -- Добавлена поддержка Qt6.1. - -### Исправления - -- Исправлена стабильность для опции deploySystem в Windows. -- Исправлен подробный журнал. -- Исправлен общий журнал вывода. -- Исправлены опечатки в логе. -- Исправлено кросс-развертывание arm дистрибутива. -- Исправлено развертывание Qt6 qml -- Исправлены команды PowerShell в Windows. -- исправления ошибок и улучшения. - -### Новые переменные среды - -- CQT_RUN_FILE - эта переменная содержит путь к сценарию выполнения используемого приложения. -- CQT_PKG_ROOT - эта переменная содержит путь к корню текущего пакета. - -### Новые параметры - -- zip - создать ZIP-архив для развертываемых программ -- deb - Создаст deb пакет для развертываемой программы -- homepage - Установит URL-адрес домашней страницы для пакета -- noQt - Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt -- allowEmptyPackages - разрешает настраивать пустые пакеты. -- getDefaultTemplate - Извлекает шаблоны deb или qif по умолчанию. -- tr - Добавляет qm файлы в папку переводов. -- extraData - Добавляет дополнительные файлы или каталоги как цель. Выбранный каталог будет скопирован в расположение extraDataOut с сохранением собственной структуры. -- extraDataOut - Устанавливает путь к каталогу с дополнительными файлами данных. По умолчанию это корневой каталог дистрибутива. -- prefix - Устанавливает префикс для пакета относительно целевого каталога -- homePage - Установит URL-адрес домашней страницы для пакета -- binPrefix - Устанавливает путь префикса для опции bin -- noHashSum - Отключить вычисление хеш-суммы пакетов - -### Устаревшие и удаленные параметры - -- deploySystem-with-libc - вместо этого параметра используйте параметр deploySystem. -- allQmlDependes - вместо этого параметра используйте параметр qmlDir. - -## CQtDeployer 1.5.0 Alpha - -### Исправления -- исправления ошибок и улучшения. - -### Новые особенности -- Добавлена новая тема для установщика qif "quasarDark". - -### Новые параметры -- zip - создать ZIP-архив для развертываемых программ - -## CQtDeployer 1.4.7 -### Исправления -- Исправлено развертывание плагина qxcb. #438 -- Исправлено развертывание модуля qtGui. #446 - -### Новые возможности -- Добавлена поддержка Qt6. #437 -- Добавлена поддержка Qt installer Framework 4 (с улучшенным интерфейсом командной строки)ю #436 - -## CQtDeployer 1.4.6 -### Исправления -- Исправлено развертывание драйверов sql #367. -- Исправлен алгоритм развертывания библиотек. #423 #371 -- Исправлена работа с qt из системного репозитория linux. (только классический установщик) #422 -- Исправлена snap версия cqtdeployer, добавлена поддержка поиска qmake по RPATH #424 #420 -- Исправлен хелп. -- Мелкие исправления и улучшения. -- Удалена устаревшая опция extractPlugins. #371 - -### Новые параметры -- noQt - игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt. - -## CQtDeployer 1.4.5 -### Исправления -- Оптимизирована производительность развертывания проектов. На 60% быстрее. -- Оптимизирован выходной размер дистрибутивов. Размер уменьшен на 25%. -- Исправлено отображение ярлыков после установки развернутых приложений. -- Исправлен запуск приложений с пробелами в имени. спасибо ahndee (#384) -- Исправлено развертывание плагина Renderer. -- Незначительные исправления и улучшения. - -### Новые особенности -- Добавлена новая система управления плагинами развертывания. - -### Новые опции - -- extraPlugin - устанавливает дополнительный путь к сторонним плагина приложения -- enablePlugins - включает дополнительные плагины для распространения. -- disablePlugins - отключает плагины для распространения. - -## CQtDeployer 1.4.4 - -### New options -- qifFromSystem - Принудительно использовать системный инструмент binarycreator из path или qt - -## CQtDeployer 1.4.3 -### Исправления -- Исправленно отображение приложения скаченого из snap store и установщика в меню настроек приложений ubuntu 20.04 - -### Нововведения -- Добавленна поддержка рекурсивного добовления для флага ignoreEnv #356 - -### Новые опции -- noRecursiveiIgnoreEnv - Отключает рекурсивное игнорирование переменной среды для флага ignoreEnv. - - -## CQtDeployer 1.4.2 -### Исправления - -- исправлено #337 (ошибка генерации установщика с произвольным именем) -- исправлено #338 (версия Windows собирает pdb файлы) -- исправлено #339 (ошибка показа всех справочных сообщений) -- исправлено #340 (cqdeployer не добавлял каталоги целей в "ignore") -- исправлено #341 (опция очистки не удаляет старый установщик) - - -## CQtDeployer 1.4.1 - -### Исправления -- Исправлено не развертывание тем платформ (#324) -- Исправлено создание ярлыков на Windows (#322) -- Незначительные улучшения и исправления - -## CQtDeployer 1.4.0 -### Исправления -- Исправлен вывод справки в консоли, теперь перед выводом пересчитывается реальный размер консоли, что позволяет выполнять правильно переносы текста. -- Исправлена работа с развертыванием плагинов Qt. Теперь плагины не тянут за собой все системные зависимости, а только qt. Захват системных зависимостей приводил к падению приложений из-за несовместимости библиотек плагинов. -- Мелкие исправления и улучшения. - -### Нововведения -- Добавлена поддержка поиска qmake из системного окружения. -- Добавлена возможность инициализировать репозиторий для дальнейшей упаковки аналогично git init. -- Добавлена поддержка Qt Install Framework пакетов. Теперь можно запаковать дистрибутив в инсталлятор. -- Добавлена возможность разбивать конечный дистрибутив на несколько пакетов. -- Добавлен механизм позволяющий унифицировать создание пакетов для конечного дистрибутива. -- Добавлена поддержка добавления пользовательских скриптов в скрипты запуска приложений. -- Добавлена поддержка сборки системных зависимостей для Windows. -- Добавлена поддержка RPATH для Linux. Теперь cqtdeployer может самостоятельно определить нужный qmake для развертывания приложения. -- Добавлена поддержка поиска необходимой зависимости по имени библиотеки. -- Добавлена поддержка Qt библиотек из репозиториев Linux дистрибутивов. -- Добавлены новые псевдонимы для команды запуска (cqt и cqtdeployer.cqt) для быстрого развертывания приложений. -- Добавлена поддержка собственного имени команды для windows. Теперь вы можете запустить cqtdeployer написав cqtdeployer в cmd и powershell. - -### Новые опции -- init - инициализирует файл cqtdeployer.json (файл конфигурации). Например: «cqtdeployer init» - для инициализации конфигурации одного пакета. "cqtdeployer -init multi" - для инициализации конфигурации нескольких пакетов. -- noCheckRPATH - отключает автоматический поиск путей к qmake в исполняемых файлах (Только Linux). -- noCheckPATH - отключает автоматический поиск путей к qmake в системном окружении. -- extractPlugins - заставляет извлекать все зависимости плагинов. -- qif - создает инсталлятор в конце развертывания. -- extraLibs - добавляет шаблон дополнительной библиотеки, которая должна будет попасть в дистрибутив. -- customScript - добавляет пользовательский скрипт в скрип запуска приложения. -- -targetPackage [package;tar1,package;tar2] - используется для формирования пакетов, обозначает списки целевых файлов для определенных пакетов. -- recOut - указывает в какую папку будут складываться ресурсы после развертывания. -- name - устанавливает имя пакета. -- description - устанавливает описание пакета -- deployVersion - устанавливает версию пакета -- releaseDate - дата релиза пакета. -- icon - иконка пакета. -- publisher - издатель пакета. -- qifStyle - Устанавливает путь к CSS файлу стиля или устанавливает стиль по умолчанию. Доступные стили: quasar -- qifBanner - Устанавливает путь к png-файлу баннера. -- qifLogo - Устанавливает путь к файлу логотипа png. - ---- - -## CQtDeployer 1.3.2 -- Исправлено #218 (CQtDeployer добавлял sh-скрипты для целевых библиотек.) -- Исправлено #217 (опция qmake не работала с файлом конфигурации.) ---- - -## CQtDeployer 1.3.1 -- Исправлена задача #191 (команда игнорирования для плагинов) -- Исправлена задача #192 (неверный путь при создании файла развертывания) -- Исправлены абсолютные пути к файлу conf ---- - -## CQtDeployer 1.3.0 -- Добавлена поддержка qt.conf для Linux -- Добавлена поддержка конфигурационного файла для проекта (deploy.json) со всеми правилами развертывания, для создания deploy.json используйте флаг -confFile [./path/to/file.json]. -- Добавлена поддержка выходных каталогов для всех файлов развертывания #145, -- Добавлена поддержка развертывания WebEngine #146. -- Добавлена поддержка нескольких пакетов в установщике cqtdeployer. -- Переименован проект из Console-QtDeployer в CQtDeployer #139 -- Исправлено развертывание системных библиотек в linux #172 -- Добавлены новые тесты приложения -- Удален флаг noLibC и добавлен флаг deploySystem-with-libc. Если вам нужен в программе libc используйте флаг deploySystem-with-libc, а если нет то пользуйтесь deploySystem. -- Заменен флаг always-overwrite на noOverwrite, теперь все файлы по умолчанию перезаписываются, используйте noOverwrite для отключения перезаписи. ---- - -## CQtDeployer 1.2.3 -- Добавлена поддержка qt.conf для сборок Windows #130 -- Исправлена ошибка #129, теперь флаг «очистить» удаляет только скопированные файлы. -- Исправлен флаг ignoreEnv -- Исправлен флаг deploySystem ---- - -## CQtDeployer 1.2.2 -- Добавлен новый флаг noLibc для игнорирования библиотек libc и li-linux -- Исправлена #125 ошибка развертывания системных библиотек (работает с простыми проектами, для больших проектов не рекомендуется) -- Исправлен флаг ignoreEnv ---- - -## CQtDeployer 1.2.1 -- Добавлен новый флаг игнорирования (ignoreEnv). Этот флаг отключает ненужную среду -- Добавлена поддержка QIFW (онлайн-установщик для Windows и других дистрибутивов Linux) -- Добавлено обновление утилиты для Windows и других дистрибутивов Linux (не Snap) -- Исправлена ошибка № 116 (копирование файлов со съемного носителя) -- Исправлена ошибка № 115 (создание цели в папке с русским именем) -- Исправлен большой размер версии msvc -- Исправлено кросс-развертывание Linux >> Windows -- Удалены старые скрипты сборки ---- - -## CQtDeployer 1.2.0 -- Добавлен собственный сканер зависимостей qml. -- Перешел на новый [сканер PE-Lib](https://github.com/QuasarApp/pe-parse/tree/7138bb218a05c81d825728ba8a0a6f6a56c4fdbc). -- Перешел на новый [ELF-lib сканер](https://github.com/qt/qttools/blob/b0147a5d79ce7a7e77a24f36aaddfacb1a1517c8/src/shared/winutils/elfreader.h). -- Добавлены новые юнит-тесты. -- Добавлена поддержка версии Snap (только домашний каталог). -- Добавлен новый флаг qmlExtern - для использования сканера импорта qt qml. -- Добавлена поддержка уровней подробного журнала (0-3). -- Исправлен журнал развертывания приложения. -- Исправлено развертывание приложения в версии Snap. ---- - -## CQtDeployer 1.1.2 -- Добавлена поддержка переводов -- Добавлен флаг для отключения развертывания переводов -- Добавлена strip для Linux -- Добавлены юнит-тесты -- Исправлено развертывание в динамической версией -- Исправлена ошибка развертывания на текущем каталоге с привязкой и статической версией. ---- - -## CQtDeployer 1.1.1 -- Исправлена сборка qml в диномисечкой версии -- Исправленна работа флага -recursiveDepth -- Исправленна работа флага -libDir -- Исправленно копирование библиотек по ссылке -- Почищен вывод приложения, часть лога перенесенна в verbose ---- - -## CQtDeployer 1.1.0 -- Добавлена поддержка windows (только динамическая линковка) -- Добавлена поддержка snap (теперь доступно в snapstore) -- Добавлены сборочные скрипты для snap -- Добавлен флаг binDir позволяющий рекурсивно захватывать exe dll и so -- Изменена логика работы флага bin теперь если выбрать в место файла папку то будет захвачено все ее содержимое -- Изменена и исправлена логика работы флага clear теперь он чистит все развернутое содержимое по определенному таргету. -- Добавлен флаг targetDir который определяет место где будет лежать развернутый проект -- Изменена структура развернутого проекта, теперь все оболочки запуска лежат в корне а бинарники в папке bin, для каждого бинарника создается одноименный скрипт запуска. -- Удален старый флаг runScript из-за смены логики развертывания -- Добавлен флаг verbose для отладки по -- Исправлены ошибки производительности ---- - -## CQtDeployer 1.0.2 -- Добавлен скрипт для сборки (динамический и статический выпуск) -- Добавлен флаг -libDir для установки дополнительного пути для дополнительных библиотек приложения -- Добавлен флаг -extraPlugin для установки дополнительного пути для дополнительных плагинов приложения -- Добавлена сборка только для С библиотек -- Исправленно развертывание -- Исправлен сценарий запуска -- Исправлена статическая сборка ---- - -## CQtDeployer 1.0.1 -- Исправлена ошибка развертывания qml (избыточность) -- Исправлен скрипт запуска приложения - ---- - -## CQtDeployer 1.0.0 -- Добавлен флаг runScript -- Добавлен флаг allQmlDependes -- Исправлена ошибка развертывания qml -- Исправлена ошибка развертывания плагинов -- Добавлена поддержка статической сборки diff --git a/md/ru/CompareFeatures.md b/md/ru/CompareFeatures.md deleted file mode 100644 index 58a3624..0000000 --- a/md/ru/CompareFeatures.md +++ /dev/null @@ -1,15 +0,0 @@ -# Сравнение особенностей - -Сравните особенности дистрибутивов CQtDeployer - -| Название функции | Классическая версия linux (установщик) | Snap версия | Windows версия | -|---|---|---|----| -| Автоматические обновляется | Нет | Да | Нет | -| Онлайн-обновления | Да | Да | Да | -| Поддержка системных библиотек | Да | Да | Да | -| Поддержка создания установщиков | Да | Да | Да | -| Поддержка создания архивов | Да | Да | Да | -| Поддержка поиска библиотек и cmake из среды | Да | Нет | Да | -| Поддержка поиска qmake из RPATH | Да | Да | Нет -| Поддержка команды 'strip' | Да | Нет | Нет | -| Поддержка работы с qmake из системного репозитория ОС| Да| Нет | Нет | diff --git a/md/ru/CustomScripts.md b/md/ru/CustomScripts.md deleted file mode 100644 index 96d823f..0000000 --- a/md/ru/CustomScripts.md +++ /dev/null @@ -1,68 +0,0 @@ -# Пользовательские скрипты - -После версии 1.5.1 cqtdeployer поддерживает собственные переменные в пользовательских скриптах. -Для использования пользовательских сценариев используйте параметр **runScript**. - -### Примеры: - -```bash -cqtdeployer -bin MyExecutable.exe -runScript MyExecutable,path/to/my/custom/script.bat -``` - -```bash -cqtdeployer -bin MyExecutable -runScript MyExecutable,path/to/my/custom/script.sh -``` - -## Список поддерживаемых переменных: - -* CQT_LIB_PATH - это относительный путь к библиотекам развернутого дистрибутива. -* CQT_QML_PATH - это относительный путь к библиотекам qml развернутого дистрибутива. -* CQT_PLUGIN_PATH - это относительный путь к плагинам qt развернутого дистрибутива. -* CQT_BIN_PATH - это относительный путь к целям развернутого дистрибутива. - -* CQT_SYSTEM_LIB_PATH - это относительный путь к системным библиотекам развернутого дистрибутива. -* CQT_BASE_NAME - это базовое имя исполняемого файла, который будет запущен после запуска этого скрипта. -* CQT_CUSTOM_SCRIPT_BLOCK - это код из опции customScript -* CQT_RUN_COMMAND - это команда для запуска приложения. Требуется переменная BASE_DIR. Важно: Эта переменная уже содержит символы перенапровления аргументов скрипта в исполняемый файл. - -## Шаблоны скриптов запуска - -### Linux - -```bash -#!/bin/sh - -BASE_DIR=$(dirname "$(readlink -f "$0")") -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 -``` - -### Windows - -```bash - -@echo off -SET BASE_DIR=%~dp0 -SET 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 -``` - - -Или вы можете получить последнюю версию этих скриптов из github [репозитория](https://github.com/QuasarApp/CQtDeployer/tree/main/Deploy/ScriptsTemplates). diff --git a/md/ru/DEB.md b/md/ru/DEB.md deleted file mode 100644 index 9048f6b..0000000 --- a/md/ru/DEB.md +++ /dev/null @@ -1,100 +0,0 @@ -# Использование DEB - -Общие правила использования DEB - -#### Доступно с версии CQtDeployer 1.5 - -### Как использовать опцию DEB - -Просто добавьте в cqtdeployer опцию «deb». - -#### Например: - -``` bash - cqtdeployer ... deb -``` - -Где: -* **...** - список других опций. -* **deb** - опция для создания deb пакетов. - - -По умолчанию cqtdeployer создает один deb пакет . -Если вы хотите создать несколько пакетов, вы должны использовать [Параметры управления пакетами](Options.md) -Чтобы создать новый пакет, используйте -targetPackage [package; tar1] - -cqtdeployer создает вуи пакет для каждого пакета. - -Где: - -* **package** - это название пакета -* **tar1** - это имя цели, которая должна быть включена в этот пакет. - -Или вы можете описать пакеты в [файле конфигурации](DeployConfigFile.md) - - -```JSON -{ -"targetPackage": [ - [ - "package", - "Tar1" - ], -], -"deb": true -} -``` - -# Использование собственных шаблонов для создания деб пакетов - -Вы можете создать собственный шаблон для пакетов debian. - -### Структура пакета debian: - - -```bash -└── Debian templates - ├── debPacakge1 - │ └── DEBIAN - │ ├── control - │ ├── postinst - │ └── prerm - └── debPacakge2 - └── DEBIAN - ├── control - ├── postinst - └── prerm - -``` - -Для включения ваших шаблонов в дистрибутив вам необходимо добавить путь к папке шаблонов Debian в deploy Config.json. - -```json -{ -"targetPackage": [ - [ - "debPacakge1", - "tar1" - ], - [ - "debPacakge2", - "tar2" - ], -], -"deb": "./Debian templates" -} -``` - - -## Инициализация шаблона debian - -Для инициализации шаблонов по умолчанию вы можете использовать параметр getDefaultTemplate. -Параметр getDefaultTemplate извлекает шаблон по умолчанию для cqtdeployer. Это может быть очень удобно, если вы хотите переопределить поведение установщика или другого пакета распространения по умолчанию. - -### Пример - -### Получение шаблона debian по умолчанию. - -```bash -cqtdeployer getDefaultTemplate deb -``` diff --git a/md/ru/DeployConfigFile.md b/md/ru/DeployConfigFile.md deleted file mode 100644 index 050845e..0000000 --- a/md/ru/DeployConfigFile.md +++ /dev/null @@ -1,226 +0,0 @@ -# Файл развертывания - -**Файл развертывания** - это json файл, содержащий в себе параметры для cqtdeployer. Данный файл поддерживает все параметры кроме confFile, так как данный параметр отвечает за подключение и инициализацию самого файла. - -### Структура файла конфигурации -```json -{ - "Флаг": true/false, - "Параметр": "Значение", - "Параметер с поддержкой перечислений": [ - "Значение 1", - "Значение 2", - "Значение 3", - ], - "Параметр с поддержкой многоуровневых перечислений": [ - [ - "Значение A1", - "Значение A2" - ], - [ - "Значение B1", - "Значение B2" - ], - [ - "Значение C1", - "Значение C2" - ], - ] - -} -``` - -Подробно о параметрах cqtdeployer читайте в разделе [Параметры](Options.md). - -Примеры содержимого данного файла: - -Файл без использования параметров с перечислениями -```json -{ - "noOverwrite": false, - "bin": "./", - "binDir": "./", - "qmlDir": "./", - "deploySystem": false, - "deploySystem-with-libc": false, - "qmake": "my/custom/path/to/qmake", - "ignore": "ignoreLib.dll", - "ignoreEnv": "/my/ignore/path", - "clear": true, - "force-clear": false, - "allQmlDependes": false, - "libDir": "./", - "recursiveDepth": 3, - "extraLibs": "myExtraLib (libssl)", - "extraPlugin": "myExtraPulgin (platforms)", - "targetDir": "./Distro", - "targetPackage": "", - "noStrip": false, - "extractPlugins": false, - "noTranslations": false, - "qmlOut": "qml", - "libOut": "lib", - "trOut": "tr", - "pluginOut": "plug", - "binOut": "bin", - "recOut": "rec", - "verbose": 3, - "qif": false, - "noCheckRPATH": false, - "noCheckPATH": false, - "name": "mainApplication", - "description": "this is description for default package", - "deployVersion": "1.0.0", - "releaseDate": "yyyy-MM-dd", - "icon": "/path/main/icon.png", - "publisher": "main team", - "customScript": "echo 'I am use custom script!!!'" -} - -``` - -Файл с использованием параметров с перечислениями -``` json -{ - "noOverwrite": false, - "bin": "./", - "binDir": "./", - "qmlDir": [ - [ - "package2", - "./TestQMLWidgets/" - ], - [ - "./qml/for/All" - ] - ], - - "deploySystem": false, - "deploySystem-with-libc": false, - "qmake": "this parameter should contain the path to your qmake, for Windows this field is required. On Linux, you can remove it, then qmake will be found by rpath.", - "ignore": "ignoreLib.dll", - "ignoreEnv": "/my/ignore/path", - "clear": true, - "force-clear": false, - "allQmlDependes": false, - "libDir": "./", - "recursiveDepth": 3, - "extraLibs": "myExtraLib (libssl)", - "extraPlugin": "myExtraPulgin (platforms)", - "targetDir": "./Distro", - "targetPackage": [ - [ - "/package1/", - "TestOnlyC" - ], - [ - "/package2/", - "TestQMLWidgets" - ] - ], - "noStrip": false, - "extractPlugins": false, - "noTranslations": false, - "qmlOut": "qml", - "libOut": "lib", - "trOut": "tr", - "pluginOut": "plug", - "binOut": "bin", - "recOut": "rec", - "verbose": 3, - "qif": false, - "noCheckRPATH": false, - "noCheckPATH": false, - "name": [ - [ - "package2", - "package2Application" - ], - [ - "mainApplication" - ] - ], - "description": [ - [ - "package2", - "this is description for package 'package2'" - ], - [ - "this is description for default package" - ] - ], - "deployVersion": [ - [ - "package2", - "1.0.0" - ], - [ - "1.0.0" - ] - ], - "releaseDate": [ - [ - "package2", - "yyyy-MM-dd" - ], - [ - "yyyy-MM-dd" - ] - ], - "icon": [ - [ - "package2", - "/path/icon.png" - ], - [ - "/path/main/icon.png" - ] - ], - "publisher": [ - [ - "package2", - "team of package2" - ], - [ - "main team" - ] - ], - "customScript": "echo 'I am use custom script!!!'" -} - -``` - -Цель файла- упростить вызов cqtdeployer и переместить часть или все параметры в файл. Все параметры, указанные в файле, имеют более низкий приоритет, чем параметры, добавленные в консоль при запуске. - -### Создание файла - -#### Способ 1 - -1. Вызовите `cqtdeployer init` Для инициализации файла для приложения состоящего из одного пакета. - Или `cqtdeployer -init multi` Для инициализации файла для проекта с несколькими пакетами. -2. Откройте CQtDeployer.json и отредактируйте его под свои нужды. -3. Вызовите cqtdeployer в дериктории с файлом CQtDeployer.json, или укажите путь к нему используя флаг -confFile path/to/my/CQtDeployer.json - -#### Способ 2 - -Вызовите cqtdeployer с нужным вам набором параметров и укажите путь к файлу при помощи флага -confFile (файл должен отсутствовать). Если файл будет существовать, то cqtdeployer начнет выгружать из него параметры. - -Пример: -``` bash -cqtdeployer -confFile deploy.json -bin CQtDeployerInstaller -targetDir ./test -qmlOut myqml -binOut mybin -libOut mylib -pluginOut myplugins noStrip noTranslations -recursiveDepth 5 -extraPlugin sqldrivers,audio,mediaservice force-clear deploySystem noOverwrite -``` -Где: - -* cqtdeployer - вызов cqtdeployer -* -confFile deploy.json - путь к файлу, который нужно создать -* "-bin CQtDeployerInstaller -targetDir ./test -qmlOut myqml -binOut mybin -libOut mylib -pluginOut myplugins noStrip noTranslations -recursiveDepth 5 -extraPlugin sqldrivers,audio,mediaservice force-clear deploySystem noOverwrite" - необходимые параметры. - - -### Использование файла развертывания. - -Чтобы cqtdeployer начал читать параметры из файла, используйте флаг -confFile [путь к файлу] - -#### Пример: - -cqtdeployer -qmake ~/Qt/bin/qmake -confFile ./deploy.json - diff --git a/md/ru/Description.md b/md/ru/Description.md deleted file mode 100644 index fe7a80d..0000000 --- a/md/ru/Description.md +++ /dev/null @@ -1,9 +0,0 @@ -# Что такое CQtDeployer - -CQtDeployer - это утилита для извлечения всех зависимых библиотек исполняемых файлов и создания сценария запуска для вашего приложения. - -Основные отличия этой программы: -* Производительность - эта программа развертывает приложение в несколько раз быстрее (до 10 секунд) -* Гибкость - эта утилита имеет флаги, которые помогут вам настроить деплоинг под ваши нужды и нужды вашего проекта -* Crossdeploy - приложение поддерживает Windows и дистрибутивы Linux, это означает, что вы можете использовать его не только для развертывания проекта для вашей платформы, но и для развертывания проекта в Linux для Windows и наоборот. -* Упаковка - эта утилита может создавать установочные файлы и пакеты, для вашего приложения. diff --git a/md/ru/DisableShortcats.md b/md/ru/DisableShortcats.md deleted file mode 100644 index e4d76fa..0000000 --- a/md/ru/DisableShortcats.md +++ /dev/null @@ -1,19 +0,0 @@ -# Отключение ярлыков для Qt Installer. - - Отключение ярлыков для многоцелевого дистрибутива в структуре Qt Installer. - -Иногда нам нужно отключить автоматическое создание ярлыков для некоторых приложений. -Для решения этой проблемы я рекомендую переопределить шаблон фреймворка установщика qt по умолчанию. - -# Примечание -В CQtDeployer 1.5.1 вы можете добавить опцию -disableShortcuts для отключения автоматизации создания ярлыков. - -### Пример: - -```bash -cqtdeployer -disableShortCut targetName,target2Name -``` - -```bash -cqtdeployer -bin myProgramm.exe -disableShortCut myProgramm -``` diff --git a/md/ru/EnvironmentVariables.md b/md/ru/EnvironmentVariables.md deleted file mode 100644 index 4c02be6..0000000 --- a/md/ru/EnvironmentVariables.md +++ /dev/null @@ -1,46 +0,0 @@ -# Переменные окружения CQtDeployer - -Эта страница содержит информацию о переменных содержащихся в скрипте запуска по умолчанию. - -## Инициализация - -Все переменные окружения инициализируются в скрипте запуска по умолчанию. Поэтому, если вы используете опцию runScript, вам необходимо вручную воссоздать все необходимые переменные. - - -## Список стандартных переменных - -| Имя переменной | Описание | -| --- | --- | -| CQT_PKG_ROOT | Эта переменная содержит путь к корню текущего пакета. -| CQT_RUN_FILE | Эта переменная содержит путь к скрипту запуска используемого приложения. | - - -## Описания определений - -**корень текущего пакета** - Этот корень является локальным корнем для любых отдельных пакетов. - - -Пример : - -```bash -. -├── pakcage1 << Это локальный корень пакета package1 -│ ├── bin -│ ├── lib -│ ├── plugins -│ ├── qml -│ └── translations -├── package2 << Это локальный корень пакета package2 -│ ├── bin -│ ├── lib -│ ├── plugins -│ ├── qml -│ └── translations -└── pakcage3 << Это локальный корень пакета package3 - ├── bin - ├── lib - ├── plugins - ├── qml - └── translations - -``` diff --git a/md/ru/ExtraFiles.md b/md/ru/ExtraFiles.md deleted file mode 100644 index 99d071f..0000000 --- a/md/ru/ExtraFiles.md +++ /dev/null @@ -1,107 +0,0 @@ -# Добавление дополнительных данных - -Добавление дополнительных данных в дистрибутив. - - -CQtDeployer поддерживает работу с дополнительными файлами данных. - -Для этого используйте параметры -extraData и -extraDataOut. - -## Примеры: - -### Добавление собственных файлов в корневой каталог дистрибутива. - -``` -cqtdeployer -extraData путь / к / my / customFile -``` - -Или в configFile.json - -```json -{ - ... - "extraData": "./path/to/my/customFile" - ... -} -``` - -Эта команда поддерживает список аргументов. - - -```bash -cqtdeployer -extraData path/to/my/customFile,path/to/my/customFile2,path/to/my/customFile3 -``` - -Или в configFile.json - -```json -{ - ... - "extraData": [ - "./path/to/my/customFile", - "./path/to/my/customFile2", - "./path/to/my/customFile3" - ] - ... -} -``` - -### Изменение расположения дополнительных файлов данных. - -Для изменения местоположения используйте параметры extraDataOut. Эта опция меняет путь назначения относительно корня дистрибутива. - -### Пример. Добавьте пользовательские скрипты в папку скриптов в Distribution. - -```bash -cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extraDataOut scripts -``` - -Или в configFile.json - -```json -{ - ... - "extraData": [ - "./path/to/myScripts.sh", - "./another/path/to/myScripts.sh" - ], - "extraDataOut": "скрипты" - ... -} -``` - -## Пакеты -Опции extraData и extraDataOut поддерживают работу с пакетами. Дополнительную информацию о пакетах см. На [странице](Packing.md) упаковки. - -Иногда нам нужно создать многопакетное приложение. Например, создайте установщик для приложения client-server с клиентскими и серверными приложениями. Клиент и сервер имеют собственные файлы конфигурации по умолчанию. Мы добавляем файлы config с помощью опции extraData. - -Для создания большого дистрибьютора я рекомендую использовать [confFile](DeployConfigFile.md). - -## Пример применения мультиупаковки. - - -```json -{ - - "корзина": [ - "myClientExecutable", - "myServerExecutable" - ], - - "targetPackage": [ - ["Клиент", "myClientExecutable"], - ["Сервер", "myServerExecutable"] - ], - - "extraData": [ - ["Клиент", "./path/to/clientConfig.conf"], - ["Сервер", "./path/to/serverConfig.conf"] - ], - "extraDataOut": [ - ["Клиент", "defaultConfigurations"], - ["Сервер", "defaultConfigurations"] - ] -} -``` - -Эта конфигурация создает дистрибутив с двумя приложениями (клиент и сервер). Каждое приложение имеет собственный файл конфигурации в папке defaultConfigurations. diff --git a/md/ru/ExtractDefaultsTemplates.md b/md/ru/ExtractDefaultsTemplates.md deleted file mode 100644 index 6c53254..0000000 --- a/md/ru/ExtractDefaultsTemplates.md +++ /dev/null @@ -1,56 +0,0 @@ -# Извлечение шаблонов - -Извлечение шаблонов по умолчанию - -Иногда вам нужно создать свои собственные шаблоны для установщиков или пакетов deb. -Для этого вы можете использовать опцию getDefaultTemplate. - -Эта опция извлекает шаблон вашего дистрибутива по умолчанию в целевой каталог. - -Эта опция создаст шаблон в соответствии с вашими настройками. Если вы используете опцию targetPackage, то для каждого настроенного вами пакета будет создан шаблон. - -### Пример: - -```bash -cqtdeployer -bin myExecutable getDefaultTemplate qif -``` -Эта команда создает шаблон для среды установки qt в папке DistributionKit для вашей программы "myExecutable". - -Если вы хотите изменить целевое местоположение, просто добавьте параметр targetDir -```bash -cqtdeployer -bin myExecutable getDefaultTemplate qif -targetDir "/distanation/Dir" - -``` - -## Работа с мультипакетной раздачей. - -Эта опция поддерживает configFile.json - -### Пример: - -#### configFile.json - -```json -{ - - "корзина": [ - "myClientExecutable", - "myServerExecutable" - ], - - "targetPackage": [ - ["Клиент", "myClientExecutable"], - ["Сервер", "myServerExecutable"] - ], -} -``` - -```bash -cqtdeployer getDefaultTemplate qif -confFile "path/to/configFile.json" -``` - - -## Запись - -Эта опция поддерживает работу со всеми пакетами, кроме zip. -Если вы хотите получить больше информации о доступных пакетах, смотрите упаковку [страница](Packing.md). \ No newline at end of file diff --git a/md/ru/Guide.md b/md/ru/Guide.md deleted file mode 100644 index fb16ff5..0000000 --- a/md/ru/Guide.md +++ /dev/null @@ -1,536 +0,0 @@ -# Как развернуть приложение - -В этой статье я описываю процессы развертывания приложения c++/qt с помощью cqtdeployer. - -## Рекомендация -Если вам нужна максимальная стабильность вашего дистрибутива и вы хотите запускать свое приложение в разных дистрибутивах с разными версиями, вам необходимо использовать Qt из официального [build](https://www.qt.io/download-open-source?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5). - -## Кейс -В этом случае мы развертываем приложение Qt GUI для Ubuntu 16.04, Ubuntu 18.04 и Ubuntu 20.04++. - -**Если вы хотите поддерживать все дистрибутивы, начиная с Ubuntu 16.04, вам необходимо собрать и развернуть приложение в более старом дистрибутиве (в моем случае это 16.04)** - -## Установить CQtDeployer -Если вы хотите использовать системный qt из своей ОС, установите [классическую](https://github.com/QuasarApp/CQtDeployer/releases/download/1.4.7/LinuxInstaller.run) версию cqtdeployer. - -``` bash -wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.4.7/LinuxInstaller.run -``` - -``` -chmod + x LinuxInstaller.run -./LinuxInstaller.run -``` - - -Выберите последнюю стабильную версию (1.4) - - - -Выполнено. - -Если вы используете официальную сборку qt, вы можете использовать snap-версию cqtdeployer. - -``` -sudo snap install cqtdeployer -``` - -После установки добавьте необходимые разрешения. - -``` -sudo snap connect cqtdeployer:process-control -sudo snap connect cqtdeployer:removable-media -sudo snap connect cqtdeployer:system-backup -``` - -Выполнено!!! - -## Развертывание приложения Qt GUI - -### Разверните исполняемый файл. - -* Для систем Linux: - -```bash -cqtdeployer -bin myexecutable -``` - -* Для систем Windows: - -```bash -cqtdeployer -bin myexecutable.exe -qmake C: /Qt/5.15.0/min_gw/bin/qmake.exe -``` - -* Для кроссплатформенной сборки (Linux -> Windows) - -```bash -cqtdeployer -bin myexecutable.exe -qmake ~/crossbuildet-Qt/5.15.0/min_gw/ bin / qmake -``` - -## Дополнительные параметры - -Если вы используете дополнительные библиотеки, просто добавьте путь для cqtdeployer к используемым библиотекам. - -```bash -cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -``` - -Если вы хотите найти библиотеки рекурсивно из пути libDir, просто добавьте параметр рекурсивной глубины. - -```bash -cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -recursiveDepth 5 -``` - -Если ваше приложение использует qml, просто добавьте опцию qmlDir - -```bash -cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources -``` - -Если вы хотите создать простой установщик для своего приложения, просто добавьте опцию gif. -``` -cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -``` - -Если cqtdeployer не нашел qmake, добавьте параметр -qmake в команду вызова. - -``` -cqtdeployer -bin myexecutable -libDir / PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -qmake/path/to/my/qmake - -``` - -# На живом примере animation из [Примеров Qt](https://doc.qt.io/qt-5/qtquick-animation-example.html) - - -## Собираем проект в релизную сборку - -Выполняем qmake с опцие -r для релизной сборки. - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ~/Qt/5.15.2/gcc_64/bin/qmake -r . -``` - -Вызываем ваш make generator - -Для Linux: - -```bash -make -j${nproc} -``` - -Для Windows - -```bash -Qt/Tools/QtCreator/bin/jom.exe -``` -Билд лог - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc} -g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o main.o main.cpp -/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name shared ../shared/shared.qrc -o qrc_shared.cpp -/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name animation animation.qrc -o qrc_animation.cpp -g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_animation.o qrc_animation.cpp -g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_shared.o qrc_shared.cpp -g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread -``` - -## Находим наш получившийся исполняемый файл - -Если вы собирали проект с помощью qtCreator ваш исполняемый файл будет находиться на уровень выше в папке **build-Animations-Desktop_Qt_5_15_2_GCC_64bit-Release** -В моем случае исполняемый файл лежит в корневом катологе проекта. - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ tree -. -├── animation # Вот он. -├── animation.pro -├── animation.qml -├── animation.qmlproject -├── animation.qrc -├── basics -│ ├── animators.qml -│ ├── color-animation.qml -│ ├── images -│ │ ├── face-smile.png -│ │ ├── moon.png -│ │ ├── shadow.png -│ │ ├── star.png -│ │ └── sun.png -│ └── property-animation.qml -├── behaviors -│ ├── behavior-example.qml -│ ├── FocusRect.qml -│ ├── SideRect.qml -│ ├── tvtennis.qml -│ └── wigglytext.qml -├── doc -│ ├── images -│ │ └── qml-animations-example.png -│ └── src -│ └── animation.qdoc -├── easing -│ └── easing.qml -├── main.cpp -├── main.o -├── Makefile -├── pathanimation -│ └── pathanimation.qml -├── pathinterpolator -│ └── pathinterpolator.qml -├── qrc_animation.cpp -├── qrc_animation.o -├── qrc_shared.cpp -├── qrc_shared.o -└── states - ├── qt-logo.png - ├── states.qml - └── transitions.qml -10 directories, 33 files -``` - -## Вызываем cqtdeployer для формирования Базового Дистрибутива - -Для Linux: - -```bash -cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -``` -Для Windows: - -```bash -cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe -``` - -Лог развёртывания - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake -Info: Deploy ... -Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit -Info: target deploy started!! -Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir -Info: platform : libqvnc is disabled -Info: platform : libqvnc is disabled -Info: platform : libqwebgl is disabled -Info: platform : libqwebgl is disabled -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5 -Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56 -Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5 -Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56 -Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5 -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm -Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm -Info: try deploy msvc -Info: deploy done! -Info: copy ::/shared/Distributions/Templates/Icon.png -Error: not exits -Info: [0] Parsed arguments, ok. -Info: [2] Collecting information about available packages... -Info: [4] Found subdirectory "Application" -Info: [4] - it provides the package "Application" - "1.0" -Info: [4] Copying component data for "Application" -Info: [5] Compressing data directory "bin" -Info: [21] Compressing data directory "icons" -Info: [31] Compressing data directory "lib" -Info: [11111] Compressing data directory "plugins" -Info: [11740] Compressing data directory "qml" -Info: [11786] Compressing data directory "translations" -Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh") -Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" -[12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" -Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb" -Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" -[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" -Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22" -Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" -[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" -Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313" -Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" -[12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" -Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a" -Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" -Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" -Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43" -Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" -[12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" -Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1" -Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" -Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" -Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f" -Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml" -Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data" -Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs" -Info: [12360] done. -Info: [12360] Begin to copy configuration file and data. -Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml" -Info: [12360] done. -Info: [12360] Read dom element: <Name>animation</Name>. -Info: [12360] Read dom element: <Version>1.0</Version>. -Info: [12360] Read dom element: <Title>animation</Title>. -Info: [12360] Read dom element: <Publisher>Company</Publisher>. -[12360] Read dom element: <StartMenuDir>animation</StartMenuDir>. -[12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>. -Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>. -[12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>. -Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>. -Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs" -Info: [12360] done. -Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>. -[12360] Read dom element: <ProductUrl></ProductUrl>. -Info: [12360] done. -Info: [12362] Creating the binary -Info: [12407] Creating resource archive for "Application" -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB") -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes") -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes") -[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes") -Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes") -Info: [12449] Cleaning up... -``` - -Готово. дистрибутив был сохранен в папку **DistributionKit** - -```bash -andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ./DistributionKit/Installeranimation.run -``` - - - -После установки буду созданы все необходимые ярлыки. - - - - - - -## Интеграция с QtCreator - -К сожалению, на данный момент нет интеграции с qtcreator. -Единственный способ - включить цель сборки для **qmake** или **cmake** - -### qmake - -```qmake -QT_DIR= $$[QT_HOST_BINS] -win32:QMAKE_BIN= $$QT_DIR/qmake.exe -contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake -} - -deploy.commands= cqtdeployer -bin $$DESTDIR/$$TARGET -qmake $$QMAKE_BIN -libDir $$PWD -qmlDir $$PWD -recursiveDepth 5 qif - -QMAKE_EXTRA_TARGETS += deploy - -``` - -### cmake - -```cmake - find_program(Q_MAKE_EXE qmake) - - find_program(CQT_EXE cqtdeployer) - - IF(NOT EXISTS ${CQT_EXE}) - message("the cqtdeployer not exits please install the cqtdeployer and run cmake again!") - return() - endif(NOT EXISTS ${CQT_EXE}) - - ADD_CUSTOM_TARGET( - deploy - COMMAND cqtdeployer clear -bin ${CURENT_PROJECT} -qmake ${Q_MAKE_EXE} -libDir ${PROJECT_SOURCE_DIR} -qmlDir ${PROJECT_SOURCE_DIR} -recursiveDepth 5 - COMMENT "Deploy: cqtdeployer clear -bin ${CURENT_PROJECT} -qmake ${Q_MAKE_EXE} -libDir ${PROJECT_SOURCE_DIR} -qmlDir ${PROJECT_SOURCE_DIR} -recursiveDepth 5" - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - ) -``` - -Параметр **libDir** используется для установки путей к каталогам, в которых пути содержат зависимости вашего приложения, а параметр **qmlDir** используется для установки путей к каталогам, содержащих файлы qml, необходимые вашему приложению. В этом примере корень исходного кода приложения выбирается этими двумя параметрами. - -Параметр **recursiveDepth** используется для установки глубины поиска **libDir** и **qmlDir**. - -Параметр **qif** используется для создания установщика с использованием Qt Installer Framework. - - - -## Пример интеграции - -Создаем тестовый проект - -```qmake -QT += quick -CONFIG += c++11 -# You can make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -SOURCES += \ - main.cpp -RESOURCES += qml.qrc -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target -QT_DIR= $$[QT_HOST_BINS] -win32:QMAKE_BIN= $$QT_DIR/qmake.exe -contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake -} -DESTDIR=$$PWD/Build -deploy.commands= cqtdeployer -bin $$DESTDIR/$$TARGET -qmake $$QMAKE_BIN -libDir $$PWD -qmlDir $$PWD -recursiveDepth 5 qif -QMAKE_EXTRA_TARGETS += deploy -``` - -2. Открываем панель управления проектом -  - -3. Выбираем релизную сборку. -  - - -3. Добавляем "Особый этап сборки" -  - -4. В поле "Make arguments" добавляем наш этап развертывания "Deploy" -  - -5. Сохраняем -6. Запускаем сборку. - -#### На выходе вы получите папку DistributionKit с установщиком вашего приложения. diff --git a/md/ru/Home.md b/md/ru/Home.md deleted file mode 100644 index e636b75..0000000 --- a/md/ru/Home.md +++ /dev/null @@ -1,26 +0,0 @@ -# Добро пожаловать в "C Qt Deployer"! -#  - -*************************** - -# Основные разделы - -* [Описание CQtDeployer](Description.md) -* [Параметры](Options.md) -* [Руководство](Guide.md) -* [Краткое Руководство](QuickGuide.md) -* [Сборка и установка](Build-and-Install.md) -* [Файл развертывания](DeployConfigFile.md) -* [Упаковка](Packing.md) -* [Список изменений](Changelog.md) -* [Обзоры](ReleaseReviews.md) -* [Сравнение возможностей](CompareFeatures.md) -* [Добавление дополнительных файлов](ExtraFiles.md) -* [Получение шаблонов упаковки](ExtractDefaultsTemplates.md) -* [Стандартные переменные окружения](EnvironmentVariables.md) -* [Отключение стандартных ярлыков](DisableShortcats.md) -* [Пользовательские скрипты](CustomScripts.md) - - -## Поддержите проект -Если вам нравится то, что мы делаем, и это приносит вам пользу, вы можете поддержать проект на официальной странице [QuasarApp в Patreon](https://www.patreon.com/QuasarApp) diff --git a/md/ru/Options.md b/md/ru/Options.md deleted file mode 100644 index 715c0c8..0000000 --- a/md/ru/Options.md +++ /dev/null @@ -1,171 +0,0 @@ -# Использование параметров - -Общие правила использования параметров - -``` -cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 -``` - -* Все параметры должны начинается с знака '-' за исключением параметров, из котегории "Флаги". -* После указания нужного параметра нужно в обязательном порядке указать значение -* Некоторые параметры поддерживают перечисления (массивы значений). При инициализации таких параметров укажите список значений через ',' без прабелов. Если вы используете какой либо язык программирования и вызываете процесс cqtdeployer то массив значений должен передаваться как 1 параметр. -* Некоторые параметры поддерживают пересисления с возможностью выбрать цель для которой будет применен флаг. Цель и значения разделяются при помощи знака ';'. Пример -libOut target1;value1,target2;value2,defaultValue. -* Для включения какого либо флага достаточно просто включить в список опций имя флага. - -## Обозначения в таблице - - * **-binDir [params]** - параметр без поддержки массивов. - * **-bin [params,list]** - параметр c поддержкой массивов. В качестве разделителя используется ','. - * **-libOut [package;path,path]** - параметр c поддержкой выбора пакета для которого бутет установленно значение флага. В качестве разделителя используется ';'. Обратитте внимание что для перечисления значений параметра используется правило описанное выше. Последний параметр не имеет значение пакета, это значит что это значение будет установленно для всех не настроенных пакетов по умолчанию. - * **clear** - флаг - -## Определения в описании - -**Системное окружение** - пути к системным библиотекам. - * Windows: - * Пути, определенные в переменной PATH. - * C:/Windows/System32 - * C:/Windows/SysWOW64 - - * Linux: - * Пути, определенные в переменных LD_LIBRARY_PATH и PATH. - * /usr/lib - * /lib - -**Развертываемые файлы** - это все файлы, которые будут скопированы в дистрибутив (включая исполняемые файлы) - -**Цели** - это все исполняемые файлы, отмеченные опцией bin. - -**Исполняемые файлы** - это все файлы в форматах PE, ELF и Mach-O. - -## Параметры: - -### Флаги - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| init | проинициализирует файл cqtdeployer.json (файл конфигурации)| -| | Например: «cqtdeployer init» - для инициализации базовой конфигурации пакета| -| | "cqtdeployer -init multi" - для инициализации конфигурации нескольких пакетов| -| | "cqtdeployer -init single" - для инициализации конфигурации одного пакета | -| help / h | Показывает справку | -| clear | Удаляет все старые файлы (с прошлого запуска) | -| force-clear | Удаляет целевую директорию перед развертыванием | -| noStrip | Пропускает шаг strip | -| noTranslations | Пропускает файлы переводов | -| noOverwrite | Запрещает замену уже существующих файлов. | -| noCheckRPATH | Отключает автоматический поиск путей к qmake в исполняемых файлах.| -| noCheckPATH | Отключает автоматический поиск путей к qmake в системном окружении.| -| noRecursiveiIgnoreEnv | Отключает рекурсивное игнорирование переменной среды для флага ignoreEnv. | -| v / version | Показывает версию приложения | -| qif | Создаст установщик QIF для развертываемой программы" | -| | Примеры: cqtdeployer qif | -| | Начиная с версии CQtDeployer 1.5 вы можете указать путь к своему собственному шаблону установщика. | -| | Примеры: cqtdeployer -qif path/to/myCustom/qif. Подробнее можно посмотреть [здесь](QIF.md) | -| deb | Создаст deb пакет для развертываемой программы" | -| | Примеры: cqtdeployer deb | -| | Вы можете указать путь к своему собственному шаблону пакета. | -| | Примеры: cqtdeployer -deb path/to/myCustom/DEBIAN. Подробнее можно посмотреть [здесь](DEB.md) | -| deploySystem | Копирует все библиотеки кроме libc | -| | (не рекомендуется, так как занимает много памяти, возможны конфликты библиотек) | -| noQt | Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt. | -| allowEmptyPackages | Разрешите настраивать пустые пакеты. | -| getDefaultTemplate | Извлекает deb или qif шаблоны по умолчанию. Для получения дополнительной информации см. [Страницу](ExtractDefaultsTemplates.md) извлечения шаблонов по умолчанию. | -| noHashSum | Отключить вычисление хеш-суммы пакетов | - -### Параметры развертывания: - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -bin [list,params] | Развертываемый файл или папка. пример -bin ~/my/project/bin/,~/my/project/bin.exe. Для файлов: эти файлы будут безоговорочно скопированы в целевой каталог, независимо от их формата или суффикса. Для папок: CQtDeployer войдет в эти папки и нерекурсивно скопирует все развертываемые файлы в целевой каталог. Затем CQtDeployer извлечет все зависимости скопированных файлов. CQtDeployer будет искать зависимости в системной среде и в путях libDir. **Примечание**. Если CQtDeployer не может найти требуемый файл, CQtDeployer попытается найти требуемый файл в системной среде PATH. | -| -binPrefix [prefixPath] | Устанавливает путь префикса для опции bin. Пример: **-bin path/MyExecutable** - это тоже что и **-bin MyExecutable -binPrefix path** | -| -confFile [params] | Путь к файлу json со всеми конфигурациями развертывания. С помощью этого файла можно добавить нужные опции, тем самым упрастить вызов комманды в консоле. Однако пораметры в кансоле имеют больший приоритет чем в файле. Для получения дополнительной информации об этом флаге см. [Вики](DeployConfigFile) | -| -qmlDir [params] | Папка qml. пример -qmlDir ~/my/project/qml | -| -qmake [params] | Путь к qmake. пример | -| | -qmake ~/Qt/5.14.0/gcc_64/bin/qmake | -| -ignore [list,params] | Список библиотек для игнорирования | -| | Пример -ignore libicudata.so.56,libicudata2.so.56 | -| -ignoreEnv [list,params] | Список путей для игнорирования. | -| | Пример -ignoreEnv /bad/dir,/my/bad/Dir | -| -libDir [list,params] | Устанавливает дополнительные пути к библиотекам | -| | Пример -libDir ~/myLib,~/newLibs. **Внимание** опция libDir не должна быть дочерней от каталога targetDir. Опция targetDir является запрещенной для поиска библиотек, так как может содержать устаревшие библиотеки проекта, что в свою очередь может привести к нежелательным крашам. | -| -extraLibs [list,params] | Пример: «-extraLib mySql» - заставляет скопировать все библиотеки, имена которых содержат mySql, в папку проекта. Этот параметр не чувствителен к регистру в Windows и чувствителен к регистру на других платформах. Эта опция будет искать библиотеки только в системных средах, подобных **deploySystem**. | -| -customScript [scriptCode] | Установит дополнительный код в скрипты запуска. | -| -extraPlugin [list,params] | Устанавливает дополнительный путь для extraPlugin приложения| -| -recursiveDepth [params] | Устанавливает глубину поиска библиотек и глубину игнорирования окружения для ignoreEnv (по умолчанию 0) | -| -targetDir [params] | Устанавливает целевой каталог (по умолчанию это путь к первому развертываемому файлу)| -| -installDirDeb [параметры] | Устанавливает целевой каталог для установки пакета Debian (по умолчанию это /opt путь) | -| -installDirQIFW [параметры]| Устанавливает целевой каталог установки для инсталляторов (по умолчанию это путь /home) | -| -verbose [0-3] | Показывает дебаг лог. По умолчанию равен 2 | -| -platform [list] | Если этот параметр включен, CQtDeployer будет развертывать только двоичные файлы указанной платформы. Поддерживоемые значения : [win_x86 win_x86_64 win_arm win_arm64 linux_x86 linux_x86_64 linux_ARM linux_ARM64] | - -### Параметры управлениями пакетами: - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -targetPackage [package;tar1,package;tar2]| Создает новый пакет и добавляет в него 'tar1 и tar2'| -| -qmlOut [package;path,path] | Установит путь к папке с qml | -| -libOut [package;path,path] | Установит путь к папке с зависимостями | -| -trOut [package;path,path] | Установит путь к папке с файламми переводов | -| -pluginOut [package;path,path]| Установит путь к папке с плагинами | -| -binOut [package;path,path] | Установит путь к папке с исполняемыми файлами | -| -recOut [package;path,path] | Установит путь к папке с ресурсами | -| -extraDataOut [package;path,path] | Устанавливает путь к каталогу с дополнительными файлами данных. По умолчанию это корневой каталог дистрибутива. | -| -name [package;val,val] | Установит имя пакету. Если указать значение без префикса, то значение будет установленно пакету по умолчанию. | -| -description [package;val,val] | Установит описание пакету | -| -deployVersion [package;val,val]| Установит версию пакету | -| -releaseDate [package;val,val] | Установит дату выпуска пакету | -| -icon [package;val,val] | Установит путь к иконке или логотипу пакету | -| -publisher [package;val,val]| Установит Издательство (автора) пакету | -| -homePage [package;val,val] | Установит URL-адрес домашней страницы для пакета | -| -prefix [package;val,val] | Устанавливает префикс для пакета относительно целевого каталога | -| -extraData [package;val,val]| Добавляет дополнительные файлы или каталоги как цель. Выбранный каталог будет скопирован в расположение extraDataOut с сохранением собственной структуры.| -| -tr [package;val,val] | Добавляет qm файлы в папку переводов. | - -### Параметры управлениями целями: - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -icon [target;val,val] | Установит путь к иконке или логотипу для целе. Эта комманда поддерживает только png файлы для Linux и ico файлы для Windows | -| -disableRunScript [target; val, val]| Отключает создание сценария выполнения для выбранных целей | -| -disableShortCut [target; val, val] | Отключает создание ярлыков для выбранных целей | -| -runScript [target; val, val] | заставляет cqtdeployer заменить сценарий запуска по умолчанию на новый из аргументов параметра. Эта опция копирует все содержимое из входного файла и вставляет весь код в runScript.sh или .bat. Пример использования: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh". Для получения дополнительной информации смотрите статью [Кастомные скрипты](CustomScripts.md)| - -### Параметры управления плагинами: - -| Option | Descriptiion | -| ----------------------------|---------------------------------------------------------- | -| -extraPlugin [пакет; val1; val2, SingeleVal] | Устанавливает дополнительный путь к стороннему плагину приложения | -| -enablePlugins [target,target2,target3] | Включает дополнительные плагины для распространения. | -| -disablePlugins [target,target2,target3] | Отключает плагины для распространения. | -| | Вы можете отключить любой плагин вашей сборки Qt, просто проверте список доступных плагинов в свой qlFolder/plugins папке. -| | Пример: Если вы хотите отключить плагин qxcb: -disablePlugins qxcb. Обратите внимание, что имя плагина указывается без его расширения. - -### Параметры QtInstallFramework: - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -qifStyle [path/to/style.css]| Устанавливает путь к CSS файлу стиля или устанавливает стиль по умолчанию. Доступные стили: quasar | -| -qifBanner [path/to/banner.png]| Устанавливает путь к png-файлу баннера. | -| -qifLogo [path/to/logo.png]| Устанавливает путь к файлу логотипа png. | -| -qifOut [nameOfOutputInstallerFile] | Устанавливает имя выходного установщика qifw. Примечание: для установщика Windows автоматически добавляется суффикс exe. | -| -qifConfig [path/to/config.xml] | Устанавливает пользовательский путь к файлу конфигурации установщика qt ifw. По умолчанию это qif/config/config.xml. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). | -| -qifPackages [path/to/packagesFodoler] | Устанавливает пользовательский путь к каталогам пакетов. По умолчанию это qif/packages. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). | -| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Устанавливает пользовательский путь к файлам ресурсов. По умолчанию эта опция пропущена. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). | -| -qifArchiveFormat [7z,zip,tar,tar.gz,tar.bz2,tar.xz] | Задает формат, используемый при упаковке новых архивов данных компонентов. Если вы опустите этот параметр, по умолчанию будет использоваться формат 7z. | -| -binarycreator [binarycreator command] | Установит новую команду вызова binarycreator. Пример : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'| - -### Deb package options: - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -debOut [package;nameOfOutputDebFile,nameOfOutputDebFile]| Устанавливает имя выходного файла debian. Эта опция может работать с несколькими пакетами | - -### Zip pacakge options: - -| Option | Descriptiion | -|-----------------------------|-----------------------------------------------------------| -| -zipOut [package;nameOfOutputZipFile,nameOfOutputZipFile]| Устанавливает имя выходного zip архива. Эта опция может работать с несколькими пакетами | - - -#### Пример: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.15.0/gcc_64/bin/qmake clear diff --git a/md/ru/Packing.md b/md/ru/Packing.md deleted file mode 100644 index 699022a..0000000 --- a/md/ru/Packing.md +++ /dev/null @@ -1,138 +0,0 @@ -# Упаковка дистрибутивов - -Общая информация об упаковке ваших дистрибутивов в пакеты. - -## Типы упаковки - -* Автоматически -* Вручную - -## Автоматические пакеты - -Пакеты с этим типом создаются автоматически. -По умолчанию в дистрибутиве есть один основной пакет. Вы можете настроить его, используя [Параметры управления пакетами](Options.md). - -#### Пример (Установить новое имя для pacakge) - -``` -ctdeployer ... -name "MyPackage" -``` - -Если в вашем дистрибутиве есть несколько исполняемых файлов, вы можете создать дистрибутив с несколькими пакетами. - -Один пакет может содержать от 1 до бесконечности исполняемых файлов. - -Для настройки пакета необходимо использовать параметр targetPackage. - -Пример использования: - -``` -cqtdeployer ... -targetPackage myPacage; target1, myPacage2; target2 -``` - -Где myPacage - это имя пакета, а target1 - имя исполняемого файла. -Итак, в этом примере создается 2 пакета из 2 целей. - -В следующем примере создается 2 пакета из 3 целей. -``` -cqtdeployer ... -targetPackage myPacage; target1, myPacage; target2, myPacage2; target3 -``` - - -Вы также можете сделать то же самое в файле конфигурации - -``` -{ -"targetPackage": [ - [ - "myPacage", - "target1" - ], - [ - "myPacage2", - "target2" - ] - ] -} -``` - -``` -{ -"targetPackage": [ - [ - "myPacage", - "target1" - ], - [ - "myPacage", - "target2" - ], - [ - "myPacage2", - "target3" - ] - ] -} -``` - - -## Ручные пакеты - -Ручные пакеты - это пакеты, созданные по шаблону пользователя. -Например, у вас есть приложение, которое должно выполнять сложный сценарий в пакете debian или программе установки. -Итак, вам нужно создать свой шаблон и добавить путь к вашему шаблону для варианта пакета. - -пример - -``` -cqtdeployer ... -qif /path/to/my/template/installer -``` - -Папка /path/to/my/template/installer должна содержать папку с именем пакета. -например, я развертываю приложение с именем "MyExample", поэтому мой настраиваемый шаблон должен быть расположен в - /path/to/my/template/installer/MyExample путь. - -Для многопакетных дистрибутивов применяются те же правила. - -Ваша папка с шаблонами должна содержать папки с такими же названиями, что и пакеты. - -Пример: - -``` -{ -"targetPackage": [ - [ - "myPacage", - "target1" - ], - [ - "myPacage", - "target2" - ], - [ - "myPacage2", - "target3" - ] - ] -} -``` - -``` -~/path/to/my/template/installer $ tree -. -├── myPacage -│ └── ... -└── myPacage2 - └── ... - -``` - -### Примечание - -Вы так же можете извлечь стандартный шаблон пакета для того что бы его переопределить если вас по каким то причинам не устраевает стандартная реализация. Подробнее как это сделать смотрите на этой [странице](ExtractDefaultsTemplates.md). - -## Доступные пакеты - -* [Qt Install Framework](QIF.md) -* [ZIP-архив](ZIP.md) -* [Пакет DEB](DEB.md) diff --git a/md/ru/QIF.md b/md/ru/QIF.md deleted file mode 100644 index 9a966eb..0000000 --- a/md/ru/QIF.md +++ /dev/null @@ -1,175 +0,0 @@ -# Использование Qt Installer Framwork - -Общие правила использования Qt Installer Framwork - -### Что такое Qt Installer Framwork - -**Qt Installer Framework** (QIF) предоставляет набор инструментов и утилит для создания установщиков для поддерживаемых настольных платформ Qt: Linux, Microsoft Windows и OS X. -В **CQtDeployer** QIF доступен в виде опции qif. - -### Как использовать опцию qif - -Опция qif является булевским параметром для создания Установочного файла. - -#### Пример: - -``` bash - cqtdeployer ... qif -``` - -Где: -* **...** - список других опций. -* **qif** - опция для использования qt installer framework с шаблоном по умолчанию. - - -По умолчанию cqtdeployer создаст установочный файл с одним пакетом в котором будет лежать весь ваш дистрибутив. -Если вы хотите его настроить вы должны использовать [параметр c поддержкой выбора пакета](Options.md) -Для создание нового пакета используйте флаг -targetPackage [package;tar1] - - -Где: - -* **package** - это имя пакета -* **tar1** - это название таргета который должен попасть в этот пакет. - -Или вы можете описать пакеты в [конфигурационном файле](DeployConfigFile.md) - -```json -{ -"targetPackage": [ - [ - "package", - "tar1" - ] -], -} -``` - -# Пользовательский Шаблон для QIF - -Начиная с Версии CQtDeployer 1.5 вы можете использовать свой собственный шаблон установщика. Для этого вы должны передать в параметр qif путь к вашему шаблону. - -``` -cqtdeployer ... -qif /path/to/my/custom/qif/template -``` - -### Шаблон - -Шаблон qif долже содержать 2 папки: -* packages -* config - -### Внимание - -Название пакетов в папке packages должны совподать с названием пакетов при развертывание. - -Например: - -```json -"targetPackage": [ - [ - "myCustomInstaller", - "tar1" - ] -], -``` - -```bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` - -Если имена папок не совподут с именами пакетов то CQtDeployer будет использовать стандартный пакет для QIF. - -Если у вас только один пакет, вы можете использовать опцию **name** для установки имени приложения. - -``` -cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller -``` - -#### Не забудьте переименовать папку вашего пакета в имя пакета из опции имени. - - -```bash -. -├── config -│ ├── config.xml -│ └── style.qss -└── packages - └── myCustomInstaller << "This is folder of the your package" - └── meta - ├── installscript.qs - └── package.xml - -4 directories, 4 files - -``` - - -## Инициализация шаблона qifw - -Для инициализации шаблонов по умолчанию вы можете использовать параметр getDefaultTemplate. -Параметр getDefaultTemplate извлекает шаблон по умолчанию для cqtdeployer. Это может быть очень удобно, если вы хотите переопределить поведение установщика или другого пакета распространения по умолчанию. - -### Пример - -### Получение шаблона фреймворка установщика qt по умолчанию. - -```bash -cqtdeployer getDefaultTemplate qif -``` - -### Примечание - -CQtDeployer пропустит создание каталога пакетов для шаблона, поскольку эта команда не содержит данных для развертывания. -Если вы хотите подготовить шаблон с конфигурациями пакетов, вам следует добавить развернутые данные в свою команду или в файл config.json, используя параметры bin или extraData. -Если вы создаете дистрибутив с несколькими пакетами, вам необходимо настроить свои пакеты в развертываемой команде. - - -#### Пример: - -Извлечение шаблона с пакетами: - -```bash -cqtdeployer getDefaultTemplate qif -bin myExecutable -``` - -Извлечение шаблона для распространения нескольких пакетов - -```bash -cqtdeployer getDefaultTemplate qif -bin myExecutable1,myExecutable2 -targetPackage p1;myExecutable1,p2;myExecutable2 -``` - -Вы также можете использовать файл конфигурации для настройки шаблонов. - -Config.json - -```json -{ - "qif": true, - "bin": [ - "myExecutable1", - "myExecutable2" - ], - "targetPackage": [ - ["p1", "myExecutable1"], - ["p2", "myExecutable2"] - ] -} -``` - -Запустите CQtDeployer для создания шаблона: - -```bash -cqtdeployer -confFile Config.json getDefaultTemplate -``` diff --git a/md/ru/QuickGuide.md b/md/ru/QuickGuide.md deleted file mode 100644 index 8247f89..0000000 --- a/md/ru/QuickGuide.md +++ /dev/null @@ -1,81 +0,0 @@ -# Быстрый гайд - -Как развернуть приложение с помощью CQtDeployer - -1. Прежде всего вам нужно установить CQtDeployer на вашу платформу - - * Snap (более 14 дистрибутивов Linux): - ``` - sudo snap install cqtdeployer - ``` - или - - Установите из магазина snap и включите все необходимые приложению разрешения. - - [](https://snapcraft.io/cqtdeployer) - - * Другие Linux дистрибутивы [LinuxInstaller.run][1]. - ``` - chmod +x LinuxInstaller.run - ./LinuxInstaller.run - ``` - - * Windows [installer][1] - -2. Скомпилируйте ваш проект в режиме релиза. -3. Разверните ваш исполняемый файл: - - * Для Linux систем: - ``` bash - cqtdeployer -bin myexecutable - ``` - - * Для Windows систем: - ``` bash - cqtdeployer -bin myexecutable.exe -qmake C:/Qt/5.15.0/min_gw/bin/qmake.exe - ``` - - * Для кросплатформенной сборки (Linux -> Windows) - ``` bash - cqtdeployer -bin myexecutable.exe -qmake ~/crossbuildet-Qt/5.15.0/min_gw/bin/qmake - ``` - -## Дополнительные опции - -Если вы используете дополнительные библиотеки, просто добавьте путь к cqtdeployer для используемых библиотек. -``` bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -``` - -Если вы хотите найти библиотеки рекурсивно по пути libDir, просто добавьте рекурсивный параметр Depth. -``` bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -``` - -Если ваше приложение использует qml, просто добавьте опцию qmlDir -``` bash -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources -``` - -Если вы хотите создать простой установщик для вашего приложения, просто добавьте опцию qif. -``` -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -``` - -Если вы используете системные библиотеки из системного PATH, просто добавьте опцию deploySystem. - -#### Предупреждение: версия Snap не имеет прав доступа к системным файлам. Для развертывания системных библиотек используйте версию cqtdeployer из [установщика][1] - -``` -cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif deploySystem -``` - - -### Если у вас есть какие-либо проблемы с использованием cqtdeployer, тогда задавайте вопросы на официальной github [странице][2]. - -### Дополнительные параметры CQtDeployer см. В официальной [документации][3]. - -[1]: https://github.com/QuasarApp/CQtDeployer/releases -[2]: https://github.com/QuasarApp/CQtDeployer/issues -[3]: https://github.com/QuasarApp/CQtDeployer/blob/main/md/ru/Options.md - diff --git a/md/ru/ReleaseReviews.md b/md/ru/ReleaseReviews.md deleted file mode 100755 index 69cc008..0000000 --- a/md/ru/ReleaseReviews.md +++ /dev/null @@ -1,4 +0,0 @@ -# Обзоры на релизы - -* [Обзор v1.5](1_5.md) -* [Обзор v1.4 (Бинарный ящик)](1_4.md) diff --git a/md/ru/ZIP.md b/md/ru/ZIP.md deleted file mode 100644 index 0dedaac..0000000 --- a/md/ru/ZIP.md +++ /dev/null @@ -1,47 +0,0 @@ -# Использование ZIP - -Общие правила использования ZIP - -Доступно с версии CQtDeployer 1.5 - -### Как использовать опцию zip - -Просто добавьте в cqtdeployer опцию «zip». - -### Например: - -```bash -cqtdeployer ... zip -``` - -Где: - -* **...** - список других опций. -* **zip** - опция использования zip архивов. - - -По умолчанию cqtdeployer создает один zip-архив. -Если вы хотите создать рассылку нескольких пакетов, вы должны использовать [Параметры управления пакетами](Options.md). -Чтобы создать новый пакет, используйте -targetPackage [package; tar1] вариант - -cqtdeployer создает zip-архив для каждого пакета. - -Где: - -* **package** - это название пакета -* **tar1** - это имя цели, которая должна быть включена в этот пакет. - -Или вы можете описать пакеты в [файле конфигурации](DeployConfigFile.md) - - -```json -{ -"targetPackage": [ - [ - "package", - "Tar1" - ], -], -"zip": true -} -``` diff --git a/md/screenshots/customStyle.png b/md/screenshots/customStyle.png deleted file mode 100644 index adc7d6b..0000000 Binary files a/md/screenshots/customStyle.png and /dev/null differ diff --git a/md/screenshots/defaultStyle.png b/md/screenshots/defaultStyle.png deleted file mode 100644 index 15a304f..0000000 Binary files a/md/screenshots/defaultStyle.png and /dev/null differ diff --git a/md/screenshots/quasaraStyle.png b/md/screenshots/quasaraStyle.png deleted file mode 100644 index 278b2fe..0000000 Binary files a/md/screenshots/quasaraStyle.png and /dev/null differ diff --git a/plug.pro b/plug.pro new file mode 100644 index 0000000..be04603 --- /dev/null +++ b/plug.pro @@ -0,0 +1,5 @@ + +TEMPLATE = subdirs + +QMAKE_EXTRA_TARGETS += \ + test diff --git a/src/CQtDeployer/CMakeLists.txt b/src/CQtDeployer/CMakeLists.txt new file mode 100644 index 0000000..9ab9beb --- /dev/null +++ b/src/CQtDeployer/CMakeLists.txt @@ -0,0 +1,147 @@ +# +# Copyright (C) 2021-2022 QuasarApp. +# Distributed under the GPLv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +cmake_minimum_required(VERSION 3.18) + +get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME) + +set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}") +option(SIGN_APP "This option enable od disabled sign apk and aab files" ON) + +file(GLOB_RECURSE SOURCE_CPP + "*.cpp" "*.h" +) + +if (${QT_VERSION_MAJOR}) + file(GLOB_RECURSE SOURCE_QRC + "*.qrc" + ) +endif() + +set(ALL_SOURCES ${SOURCE_CPP} ${SOURCE_QRC}) + +set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private") + +updateGitVars() + +if (${QT_VERSION_MAJOR} EQUAL 6) + + qt_add_executable(${CURRENT_PROJECT} MANUAL_FINALIZATION ${ALL_SOURCES}) + +else() + if (ANDROID) + add_library(${CURRENT_PROJECT} ${ALL_SOURCES}) + else () + add_executable(${CURRENT_PROJECT} ${ALL_SOURCES} ) + endif() + +endif() + +target_link_libraries(${CURRENT_PROJECT} PUBLIC ${PROJECT_NAME}Library) + +target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR}) +target_include_directories(${CURRENT_PROJECT} PRIVATE ${PRIVATE_INCUDE_DIR}) + +SET(TARGET_DIR "${CMAKE_SOURCE_DIR}/Distro") +file(MAKE_DIRECTORY ${TARGET_DIR}) + +if (ANDROID) + + set(ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android CACHE INTERNAL "") + set(ENV{ANDROID_API_VERSION} 31) + set(ANDROID_API_VERSION $ENV{ANDROID_API_VERSION}) + set(OPENSSL_ROOT_PATH "$ENV{OPENSSL_ROOT_DIR}") + + set(CQtDeployer_EXTRA_LIBS + ${PROJECT_NAME}Library +# libName + ) + +# find_package(Qt${QT_VERSION_MAJOR} COMPONENTS AndroidExtras REQUIRED) +# target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::AndroidExtras) + + if (SIGN_APP) + message("SIGN_APP") + addDeploySignedAPK(${CURRENT_PROJECT} + "${CMAKE_CURRENT_LIST_DIR}/android" + "QuasarAppProject" + "${SIGPATH}/quasarapp.keystore" + "${SIGPASS_QUASARAPP}" + "${TARGET_DIR}" + "${CQtDeployer_EXTRA_LIBS}") + + else() + message("NO_SIGN_APP") + + addDeployAPK(${CURRENT_PROJECT} + "${CMAKE_CURRENT_LIST_DIR}/android" + "${TARGET_DIR}" + "${CQtDeployer_EXTRA_LIBS}") + + endif() + set(manifest_file "${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml") + configure_file("${manifest_file}.in" ${manifest_file} @ONLY) + + set(gradle_file "${CMAKE_CURRENT_SOURCE_DIR}/android/build.gradle") + configure_file("${gradle_file}.in" ${gradle_file} @ONLY) + + file(GLOB java_files + "android/src/com/quasarapp/androidtools/*.java" + "android/*.xml" + "android/*.gradle" + "android/gradlew" + "android/gradle.*" + + ) + + add_custom_target(${name}Android + SOURCES ${java_files} + ) + +elseif(IOS) +# set_xcode_property(${CURRENT_PROJECT} PRODUCT_BUNDLE_IDENTIFIER ${CHEATCARD_PACKAGE_ID} All) + + set_target_properties(${CURRENT_PROJECT} PROPERTIES + MACOSX_BUNDLE_GUI_IDENTIFIER ${CQtDeployer_PACKAGE_ID} + MACOSX_BUNDLE_BUNDLE_VERSION ${CQtDeployer_VERSION} + MACOSX_BUNDLE_SHORT_VERSION_STRING ${CQtDeployer_VERSION} + ) +else() + # Desctop deploying + + message(GIT_COMMIT_COUNT = ${GIT_COMMIT_COUNT}) + + set(DeployFile "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployer.json") + configure_file("${DeployFile}.in" ${DeployFile} @ONLY) + + addDeployFromCustomFile("CQtDeployer" ${DeployFile}) + +endif() + +if(QT_VERSION_MAJOR EQUAL 6) + # Add This line if your project use the Quick module + # qt_import_qml_plugins(${CURRENT_PROJECT}) + qt_finalize_executable(${CURRENT_PROJECT}) +endif() + + +set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/languages/en.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/ru.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/uk.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/ja.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/tr.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/zh.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/de.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/fr.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/es.ts + ${CMAKE_CURRENT_SOURCE_DIR}/languages/pl.ts) + +prepareQM(${CURRENT_PROJECT} ${CMAKE_CURRENT_SOURCE_DIR}/../ "${LANGS}") + + diff --git a/src/CQtDeployer/Deploy/CQtDeployer.json b/src/CQtDeployer/Deploy/CQtDeployer.json new file mode 100644 index 0000000..1cd88b0 --- /dev/null +++ b/src/CQtDeployer/Deploy/CQtDeployer.json @@ -0,0 +1,27 @@ +{ + "bin": [ + "src/build/Debug/CQtDeployerEaxample", + "src/build/Debug/CQtDeployerEaxample.exe" + ], + "clear": true, + "binPrefix": "/media/D/builds/build-CMakeProject-Desktop_Qt_6_1_3_GCC_64bit-Debug", + "libDir": [ + "/media/D/builds/CMakeProject", + "/home/andrei/Qt/5.15.2/gcc_64", + "/media/D/builds/build-CMakeProject-Desktop_Qt_6_1_3_GCC_64bit-Debug" + ], + "recursiveDepth": "10", + "deploySystem": false, + "qmlDir": "../", + "deb": true, + "qif": true, + "zip": true, + "ignoreEnv": [ + "/media/D/builds/CMakeProject/Distro" + ], + "extraLib": "crypto", + "targetDir": "/media/D/builds/CMakeProject/Distro", + "deployVersion": "0.84.1a139e7", + +} + diff --git a/src/CQtDeployer/Deploy/CQtDeployer.json.in b/src/CQtDeployer/Deploy/CQtDeployer.json.in new file mode 100644 index 0000000..a607dc6 --- /dev/null +++ b/src/CQtDeployer/Deploy/CQtDeployer.json.in @@ -0,0 +1,27 @@ +{ + "bin": [ + "src/build/Debug/CQtDeployerEaxample", + "src/build/Debug/CQtDeployerEaxample.exe" + ], + "clear": true, + "binPrefix": "@CMAKE_BINARY_DIR@", + "libDir": [ + "@CMAKE_SOURCE_DIR@", + "@CMAKE_PREFIX_PATH@", + "@CMAKE_BINARY_DIR@" + ], + "recursiveDepth": "10", + "deploySystem": false, + "qmlDir": "../", + "deb": true, + "qif": true, + "zip": true, + "ignoreEnv": [ + "@CMAKE_SOURCE_DIR@/Distro" + ], + "extraLib": "crypto", + "targetDir": "@CMAKE_SOURCE_DIR@/Distro", + "deployVersion": "@CQtDeployer_VERSION@", + +} + diff --git a/QIFData/packages/QIF/meta/ru.ts b/src/CQtDeployer/languages/de.ts similarity index 100% rename from QIFData/packages/QIF/meta/ru.ts rename to src/CQtDeployer/languages/de.ts diff --git a/QIFData/packages/cqtdeployer/meta/ru.ts b/src/CQtDeployer/languages/en.ts similarity index 100% rename from QIFData/packages/cqtdeployer/meta/ru.ts rename to src/CQtDeployer/languages/en.ts diff --git a/src/CQtDeployer/languages/es.ts b/src/CQtDeployer/languages/es.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/es.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/fr.ts b/src/CQtDeployer/languages/fr.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/fr.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/ja.ts b/src/CQtDeployer/languages/ja.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/ja.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/pl.ts b/src/CQtDeployer/languages/pl.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/pl.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/ru.ts b/src/CQtDeployer/languages/ru.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/ru.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/tr.ts b/src/CQtDeployer/languages/tr.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/tr.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/uk.ts b/src/CQtDeployer/languages/uk.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/uk.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/src/CQtDeployer/languages/zh.ts b/src/CQtDeployer/languages/zh.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/CQtDeployer/languages/zh.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/CQtDeployer/main.cpp b/src/CQtDeployer/main.cpp similarity index 100% rename from CQtDeployer/main.cpp rename to src/CQtDeployer/main.cpp diff --git a/src/Deploy/CMakeLists.txt b/src/Deploy/CMakeLists.txt new file mode 100644 index 0000000..5f18653 --- /dev/null +++ b/src/Deploy/CMakeLists.txt @@ -0,0 +1,49 @@ +# +# Copyright (C) 2020-2022 QuasarApp. +# Distributed under the GPLv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +cmake_minimum_required(VERSION 3.18) + +get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME) + +set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}") +add_definitions(-DCQtDeployer_LIBRARY) + + +file(GLOB_RECURSE SOURCE_CPP + "src/*.cpp" + "src/*.h" +) + +if (${QT_VERSION_MAJOR}) + file(GLOB_RECURSE SOURCE_QRC + "*.qrc" + ) + +endif() + +set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/public") +set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/private") + + +add_library(${CURRENT_PROJECT} ${SOURCE_CPP} ${SOURCE_QRC}) + +if (${QT_VERSION_MAJOR}) + target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core ) +endif() + +target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR}) +target_include_directories(${CURRENT_PROJECT} PRIVATE ${PRIVATE_INCUDE_DIR}) + +set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/languages/en.ts) + + +prepareQM(${CURRENT_PROJECT} ${CMAKE_CURRENT_SOURCE_DIR} "${LANGS}") + +set(QML_IMPORT_PATH ${QML_IMPORT_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/src" CACHE STRING "" FORCE) + +set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/src/public/CQtDeployer/global.h") +configure_file("${global_file}.in" ${global_file} @ONLY) diff --git a/src/Deploy/CQtDeployer.qrc b/src/Deploy/CQtDeployer.qrc new file mode 100644 index 0000000..00c90b7 --- /dev/null +++ b/src/Deploy/CQtDeployer.qrc @@ -0,0 +1,9 @@ +<RCC> + <qresource prefix="/"> + <file>src/CQtDeployerModule/qmldir</file> + <file>src/CQtDeployerModule/CQtDeployer.qml</file> + </qresource> + <qresource prefix="/CQtDeployerTr"> + <file>languages/en.qm</file> + </qresource> +</RCC> diff --git a/src/Deploy/languages/en.ts b/src/Deploy/languages/en.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/src/Deploy/languages/en.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1"> +</TS> diff --git a/Deploy/DeployResources.qrc b/src/Deploy/src/DeployResources.qrc similarity index 100% rename from Deploy/DeployResources.qrc rename to src/Deploy/src/DeployResources.qrc diff --git a/Deploy/Distributions/Templates/Icon.ico b/src/Deploy/src/Distributions/Templates/Icon.ico similarity index 100% rename from Deploy/Distributions/Templates/Icon.ico rename to src/Deploy/src/Distributions/Templates/Icon.ico diff --git a/Deploy/Distributions/Templates/Icon.png b/src/Deploy/src/Distributions/Templates/Icon.png similarity index 100% rename from Deploy/Distributions/Templates/Icon.png rename to src/Deploy/src/Distributions/Templates/Icon.png diff --git a/Deploy/Distributions/Templates/deb/DEBIAN/control b/src/Deploy/src/Distributions/Templates/deb/DEBIAN/control similarity index 100% rename from Deploy/Distributions/Templates/deb/DEBIAN/control rename to src/Deploy/src/Distributions/Templates/deb/DEBIAN/control diff --git a/Deploy/Distributions/Templates/deb/DEBIAN/postinst b/src/Deploy/src/Distributions/Templates/deb/DEBIAN/postinst similarity index 100% rename from Deploy/Distributions/Templates/deb/DEBIAN/postinst rename to src/Deploy/src/Distributions/Templates/deb/DEBIAN/postinst diff --git a/Deploy/Distributions/Templates/deb/DEBIAN/prerm b/src/Deploy/src/Distributions/Templates/deb/DEBIAN/prerm similarity index 100% rename from Deploy/Distributions/Templates/deb/DEBIAN/prerm rename to src/Deploy/src/Distributions/Templates/deb/DEBIAN/prerm diff --git a/Deploy/Distributions/Templates/qif/Styles/quasar.css b/src/Deploy/src/Distributions/Templates/qif/Styles/quasar.css similarity index 100% rename from Deploy/Distributions/Templates/qif/Styles/quasar.css rename to src/Deploy/src/Distributions/Templates/qif/Styles/quasar.css diff --git a/Deploy/Distributions/Templates/qif/Styles/quasarDark.css b/src/Deploy/src/Distributions/Templates/qif/Styles/quasarDark.css similarity index 100% rename from Deploy/Distributions/Templates/qif/Styles/quasarDark.css rename to src/Deploy/src/Distributions/Templates/qif/Styles/quasarDark.css diff --git a/Deploy/Distributions/Templates/qif/config custom designe/config.xml b/src/Deploy/src/Distributions/Templates/qif/config custom designe/config.xml similarity index 100% rename from Deploy/Distributions/Templates/qif/config custom designe/config.xml rename to src/Deploy/src/Distributions/Templates/qif/config custom designe/config.xml diff --git a/Deploy/Distributions/Templates/qif/config custom designe/controlScript.qs b/src/Deploy/src/Distributions/Templates/qif/config custom designe/controlScript.qs similarity index 100% rename from Deploy/Distributions/Templates/qif/config custom designe/controlScript.qs rename to src/Deploy/src/Distributions/Templates/qif/config custom designe/controlScript.qs diff --git a/Deploy/Distributions/Templates/qif/config custom designe/style.css b/src/Deploy/src/Distributions/Templates/qif/config custom designe/style.css similarity index 100% rename from Deploy/Distributions/Templates/qif/config custom designe/style.css rename to src/Deploy/src/Distributions/Templates/qif/config custom designe/style.css diff --git a/Deploy/Distributions/Templates/qif/config/config.xml b/src/Deploy/src/Distributions/Templates/qif/config/config.xml similarity index 100% rename from Deploy/Distributions/Templates/qif/config/config.xml rename to src/Deploy/src/Distributions/Templates/qif/config/config.xml diff --git a/Deploy/Distributions/Templates/qif/config/controlScript.qs b/src/Deploy/src/Distributions/Templates/qif/config/controlScript.qs similarity index 100% rename from Deploy/Distributions/Templates/qif/config/controlScript.qs rename to src/Deploy/src/Distributions/Templates/qif/config/controlScript.qs diff --git a/Deploy/Distributions/Templates/qif/packages/default/meta/installscript.qs b/src/Deploy/src/Distributions/Templates/qif/packages/default/meta/installscript.qs similarity index 100% rename from Deploy/Distributions/Templates/qif/packages/default/meta/installscript.qs rename to src/Deploy/src/Distributions/Templates/qif/packages/default/meta/installscript.qs diff --git a/Deploy/Distributions/Templates/qif/packages/default/meta/package.xml b/src/Deploy/src/Distributions/Templates/qif/packages/default/meta/package.xml similarity index 100% rename from Deploy/Distributions/Templates/qif/packages/default/meta/package.xml rename to src/Deploy/src/Distributions/Templates/qif/packages/default/meta/package.xml diff --git a/Deploy/Distributions/configures/Init multiPackage configuration.json b/src/Deploy/src/Distributions/configures/Init multiPackage configuration.json similarity index 100% rename from Deploy/Distributions/configures/Init multiPackage configuration.json rename to src/Deploy/src/Distributions/configures/Init multiPackage configuration.json diff --git a/Deploy/Distributions/configures/Init single configuration.json b/src/Deploy/src/Distributions/configures/Init single configuration.json similarity index 100% rename from Deploy/Distributions/configures/Init single configuration.json rename to src/Deploy/src/Distributions/configures/Init single configuration.json diff --git a/Deploy/Distributions/configures/Init.json b/src/Deploy/src/Distributions/configures/Init.json similarity index 100% rename from Deploy/Distributions/configures/Init.json rename to src/Deploy/src/Distributions/configures/Init.json diff --git a/Deploy/Distributions/deb.cpp b/src/Deploy/src/Distributions/deb.cpp similarity index 100% rename from Deploy/Distributions/deb.cpp rename to src/Deploy/src/Distributions/deb.cpp diff --git a/Deploy/Distributions/deb.h b/src/Deploy/src/Distributions/deb.h similarity index 100% rename from Deploy/Distributions/deb.h rename to src/Deploy/src/Distributions/deb.h diff --git a/Deploy/Distributions/defaultdistro.cpp b/src/Deploy/src/Distributions/defaultdistro.cpp similarity index 100% rename from Deploy/Distributions/defaultdistro.cpp rename to src/Deploy/src/Distributions/defaultdistro.cpp diff --git a/Deploy/Distributions/defaultdistro.h b/src/Deploy/src/Distributions/defaultdistro.h similarity index 100% rename from Deploy/Distributions/defaultdistro.h rename to src/Deploy/src/Distributions/defaultdistro.h diff --git a/Deploy/Distributions/idistribution.cpp b/src/Deploy/src/Distributions/idistribution.cpp similarity index 100% rename from Deploy/Distributions/idistribution.cpp rename to src/Deploy/src/Distributions/idistribution.cpp diff --git a/Deploy/Distributions/idistribution.h b/src/Deploy/src/Distributions/idistribution.h similarity index 100% rename from Deploy/Distributions/idistribution.h rename to src/Deploy/src/Distributions/idistribution.h diff --git a/Deploy/Distributions/qif.cpp b/src/Deploy/src/Distributions/qif.cpp similarity index 100% rename from Deploy/Distributions/qif.cpp rename to src/Deploy/src/Distributions/qif.cpp diff --git a/Deploy/Distributions/qif.h b/src/Deploy/src/Distributions/qif.h similarity index 100% rename from Deploy/Distributions/qif.h rename to src/Deploy/src/Distributions/qif.h diff --git a/Deploy/Distributions/templateinfo.cpp b/src/Deploy/src/Distributions/templateinfo.cpp similarity index 100% rename from Deploy/Distributions/templateinfo.cpp rename to src/Deploy/src/Distributions/templateinfo.cpp diff --git a/Deploy/Distributions/templateinfo.h b/src/Deploy/src/Distributions/templateinfo.h similarity index 100% rename from Deploy/Distributions/templateinfo.h rename to src/Deploy/src/Distributions/templateinfo.h diff --git a/Deploy/Distributions/ziparhive.cpp b/src/Deploy/src/Distributions/ziparhive.cpp similarity index 100% rename from Deploy/Distributions/ziparhive.cpp rename to src/Deploy/src/Distributions/ziparhive.cpp diff --git a/Deploy/Distributions/ziparhive.h b/src/Deploy/src/Distributions/ziparhive.h similarity index 100% rename from Deploy/Distributions/ziparhive.h rename to src/Deploy/src/Distributions/ziparhive.h diff --git a/Deploy/ScriptsTemplates/linux.sh b/src/Deploy/src/ScriptsTemplates/linux.sh similarity index 100% rename from Deploy/ScriptsTemplates/linux.sh rename to src/Deploy/src/ScriptsTemplates/linux.sh diff --git a/Deploy/ScriptsTemplates/windows.bat b/src/Deploy/src/ScriptsTemplates/windows.bat similarity index 100% rename from Deploy/ScriptsTemplates/windows.bat rename to src/Deploy/src/ScriptsTemplates/windows.bat diff --git a/Deploy/configparser.cpp b/src/Deploy/src/configparser.cpp similarity index 100% rename from Deploy/configparser.cpp rename to src/Deploy/src/configparser.cpp diff --git a/Deploy/configparser.h b/src/Deploy/src/configparser.h similarity index 100% rename from Deploy/configparser.h rename to src/Deploy/src/configparser.h diff --git a/Deploy/defines.h b/src/Deploy/src/defines.h similarity index 100% rename from Deploy/defines.h rename to src/Deploy/src/defines.h diff --git a/Deploy/dependenciesscanner.cpp b/src/Deploy/src/dependenciesscanner.cpp similarity index 100% rename from Deploy/dependenciesscanner.cpp rename to src/Deploy/src/dependenciesscanner.cpp diff --git a/Deploy/dependenciesscanner.h b/src/Deploy/src/dependenciesscanner.h similarity index 100% rename from Deploy/dependenciesscanner.h rename to src/Deploy/src/dependenciesscanner.h diff --git a/Deploy/dependencymap.cpp b/src/Deploy/src/dependencymap.cpp similarity index 100% rename from Deploy/dependencymap.cpp rename to src/Deploy/src/dependencymap.cpp diff --git a/Deploy/dependencymap.h b/src/Deploy/src/dependencymap.h similarity index 100% rename from Deploy/dependencymap.h rename to src/Deploy/src/dependencymap.h diff --git a/Deploy/deploy.cpp b/src/Deploy/src/deploy.cpp similarity index 100% rename from Deploy/deploy.cpp rename to src/Deploy/src/deploy.cpp diff --git a/Deploy/deploy.h b/src/Deploy/src/deploy.h similarity index 100% rename from Deploy/deploy.h rename to src/Deploy/src/deploy.h diff --git a/Deploy/deploy_global.h b/src/Deploy/src/deploy_global.h similarity index 100% rename from Deploy/deploy_global.h rename to src/Deploy/src/deploy_global.h diff --git a/Deploy/deployconfig.cpp b/src/Deploy/src/deployconfig.cpp similarity index 100% rename from Deploy/deployconfig.cpp rename to src/Deploy/src/deployconfig.cpp diff --git a/Deploy/deployconfig.h b/src/Deploy/src/deployconfig.h similarity index 100% rename from Deploy/deployconfig.h rename to src/Deploy/src/deployconfig.h diff --git a/Deploy/deploycore.cpp b/src/Deploy/src/deploycore.cpp similarity index 100% rename from Deploy/deploycore.cpp rename to src/Deploy/src/deploycore.cpp diff --git a/Deploy/deploycore.h b/src/Deploy/src/deploycore.h similarity index 100% rename from Deploy/deploycore.h rename to src/Deploy/src/deploycore.h diff --git a/Deploy/distromodule.cpp b/src/Deploy/src/distromodule.cpp similarity index 100% rename from Deploy/distromodule.cpp rename to src/Deploy/src/distromodule.cpp diff --git a/Deploy/distromodule.h b/src/Deploy/src/distromodule.h similarity index 100% rename from Deploy/distromodule.h rename to src/Deploy/src/distromodule.h diff --git a/Deploy/distrostruct.cpp b/src/Deploy/src/distrostruct.cpp similarity index 100% rename from Deploy/distrostruct.cpp rename to src/Deploy/src/distrostruct.cpp diff --git a/Deploy/distrostruct.h b/src/Deploy/src/distrostruct.h similarity index 100% rename from Deploy/distrostruct.h rename to src/Deploy/src/distrostruct.h diff --git a/Deploy/elf_type.cpp b/src/Deploy/src/elf_type.cpp similarity index 100% rename from Deploy/elf_type.cpp rename to src/Deploy/src/elf_type.cpp diff --git a/Deploy/elf_type.h b/src/Deploy/src/elf_type.h similarity index 100% rename from Deploy/elf_type.h rename to src/Deploy/src/elf_type.h diff --git a/Deploy/envirement.cpp b/src/Deploy/src/envirement.cpp similarity index 100% rename from Deploy/envirement.cpp rename to src/Deploy/src/envirement.cpp diff --git a/Deploy/envirement.h b/src/Deploy/src/envirement.h similarity index 100% rename from Deploy/envirement.h rename to src/Deploy/src/envirement.h diff --git a/Deploy/extra.cpp b/src/Deploy/src/extra.cpp similarity index 100% rename from Deploy/extra.cpp rename to src/Deploy/src/extra.cpp diff --git a/Deploy/extra.h b/src/Deploy/src/extra.h similarity index 100% rename from Deploy/extra.h rename to src/Deploy/src/extra.h diff --git a/Deploy/extracter.cpp b/src/Deploy/src/extracter.cpp similarity index 100% rename from Deploy/extracter.cpp rename to src/Deploy/src/extracter.cpp diff --git a/Deploy/extracter.h b/src/Deploy/src/extracter.h similarity index 100% rename from Deploy/extracter.h rename to src/Deploy/src/extracter.h diff --git a/Deploy/filemanager.cpp b/src/Deploy/src/filemanager.cpp similarity index 100% rename from Deploy/filemanager.cpp rename to src/Deploy/src/filemanager.cpp diff --git a/Deploy/filemanager.h b/src/Deploy/src/filemanager.h similarity index 100% rename from Deploy/filemanager.h rename to src/Deploy/src/filemanager.h diff --git a/Deploy/generalfiles_type.cpp b/src/Deploy/src/generalfiles_type.cpp similarity index 100% rename from Deploy/generalfiles_type.cpp rename to src/Deploy/src/generalfiles_type.cpp diff --git a/Deploy/generalfiles_type.h b/src/Deploy/src/generalfiles_type.h similarity index 100% rename from Deploy/generalfiles_type.h rename to src/Deploy/src/generalfiles_type.h diff --git a/Deploy/igetlibinfo.cpp b/src/Deploy/src/igetlibinfo.cpp similarity index 100% rename from Deploy/igetlibinfo.cpp rename to src/Deploy/src/igetlibinfo.cpp diff --git a/Deploy/igetlibinfo.h b/src/Deploy/src/igetlibinfo.h similarity index 100% rename from Deploy/igetlibinfo.h rename to src/Deploy/src/igetlibinfo.h diff --git a/Deploy/ignorerule.cpp b/src/Deploy/src/ignorerule.cpp similarity index 100% rename from Deploy/ignorerule.cpp rename to src/Deploy/src/ignorerule.cpp diff --git a/Deploy/ignorerule.h b/src/Deploy/src/ignorerule.h similarity index 100% rename from Deploy/ignorerule.h rename to src/Deploy/src/ignorerule.h diff --git a/Deploy/libinfo.cpp b/src/Deploy/src/libinfo.cpp similarity index 100% rename from Deploy/libinfo.cpp rename to src/Deploy/src/libinfo.cpp diff --git a/Deploy/libinfo.h b/src/Deploy/src/libinfo.h similarity index 100% rename from Deploy/libinfo.h rename to src/Deploy/src/libinfo.h diff --git a/Deploy/metafilemanager.cpp b/src/Deploy/src/metafilemanager.cpp similarity index 100% rename from Deploy/metafilemanager.cpp rename to src/Deploy/src/metafilemanager.cpp diff --git a/Deploy/metafilemanager.h b/src/Deploy/src/metafilemanager.h similarity index 100% rename from Deploy/metafilemanager.h rename to src/Deploy/src/metafilemanager.h diff --git a/Deploy/packagecontrol.cpp b/src/Deploy/src/packagecontrol.cpp similarity index 100% rename from Deploy/packagecontrol.cpp rename to src/Deploy/src/packagecontrol.cpp diff --git a/Deploy/packagecontrol.h b/src/Deploy/src/packagecontrol.h similarity index 100% rename from Deploy/packagecontrol.h rename to src/Deploy/src/packagecontrol.h diff --git a/Deploy/packing.cpp b/src/Deploy/src/packing.cpp similarity index 100% rename from Deploy/packing.cpp rename to src/Deploy/src/packing.cpp diff --git a/Deploy/packing.h b/src/Deploy/src/packing.h similarity index 100% rename from Deploy/packing.h rename to src/Deploy/src/packing.h diff --git a/Deploy/pathutils.cpp b/src/Deploy/src/pathutils.cpp similarity index 100% rename from Deploy/pathutils.cpp rename to src/Deploy/src/pathutils.cpp diff --git a/Deploy/pathutils.h b/src/Deploy/src/pathutils.h similarity index 100% rename from Deploy/pathutils.h rename to src/Deploy/src/pathutils.h diff --git a/Deploy/pe_type.cpp b/src/Deploy/src/pe_type.cpp similarity index 100% rename from Deploy/pe_type.cpp rename to src/Deploy/src/pe_type.cpp diff --git a/Deploy/pe_type.h b/src/Deploy/src/pe_type.h similarity index 100% rename from Deploy/pe_type.h rename to src/Deploy/src/pe_type.h diff --git a/Deploy/pluginsparser.cpp b/src/Deploy/src/pluginsparser.cpp similarity index 100% rename from Deploy/pluginsparser.cpp rename to src/Deploy/src/pluginsparser.cpp diff --git a/Deploy/pluginsparser.h b/src/Deploy/src/pluginsparser.h similarity index 100% rename from Deploy/pluginsparser.h rename to src/Deploy/src/pluginsparser.h diff --git a/Deploy/qml.cpp b/src/Deploy/src/qml.cpp similarity index 100% rename from Deploy/qml.cpp rename to src/Deploy/src/qml.cpp diff --git a/Deploy/qml.h b/src/Deploy/src/qml.h similarity index 100% rename from Deploy/qml.h rename to src/Deploy/src/qml.h diff --git a/Deploy/qtdir.cpp b/src/Deploy/src/qtdir.cpp similarity index 100% rename from Deploy/qtdir.cpp rename to src/Deploy/src/qtdir.cpp diff --git a/Deploy/qtdir.h b/src/Deploy/src/qtdir.h similarity index 100% rename from Deploy/qtdir.h rename to src/Deploy/src/qtdir.h diff --git a/Deploy/targetdata.cpp b/src/Deploy/src/targetdata.cpp similarity index 100% rename from Deploy/targetdata.cpp rename to src/Deploy/src/targetdata.cpp diff --git a/Deploy/targetdata.h b/src/Deploy/src/targetdata.h similarity index 100% rename from Deploy/targetdata.h rename to src/Deploy/src/targetdata.h diff --git a/Deploy/targetinfo.cpp b/src/Deploy/src/targetinfo.cpp similarity index 100% rename from Deploy/targetinfo.cpp rename to src/Deploy/src/targetinfo.cpp diff --git a/Deploy/targetinfo.h b/src/Deploy/src/targetinfo.h similarity index 100% rename from Deploy/targetinfo.h rename to src/Deploy/src/targetinfo.h diff --git a/Deploy/zipcompresser.cpp b/src/Deploy/src/zipcompresser.cpp similarity index 100% rename from Deploy/zipcompresser.cpp rename to src/Deploy/src/zipcompresser.cpp diff --git a/Deploy/zipcompresser.h b/src/Deploy/src/zipcompresser.h similarity index 100% rename from Deploy/zipcompresser.h rename to src/Deploy/src/zipcompresser.h diff --git a/test.pri b/test.pri deleted file mode 100644 index 09d2f56..0000000 --- a/test.pri +++ /dev/null @@ -1,30 +0,0 @@ -unix:exec = $$PWD/UnitTests/build/release/UnitTests -win32:exec = $$PWD/UnitTests/build/release/UnitTests.exe - -QT_DIR= $$[QT_HOST_BINS] -win32:QMAKE_BIN= $$QT_DIR/qmake.exe -contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake -} - -DEPLOYER=cqtdeployer - -test.commands = -deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4 - -!contains(DEFINES, WITHOUT_TESTS) { - test.depends = deployTest - unix:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000 - win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o buildLog.log -} - -contains(QMAKE_HOST.os, Linux):{ - win32:test.commands = -} - - -QMAKE_EXTRA_TARGETS += \ - deployTest \ - test - - diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..0a2cbb0 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,29 @@ +# +# Copyright (C) 2020-2022 QuasarApp. +# Distributed under the GPLv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +cmake_minimum_required(VERSION 3.18) + +get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME) + +set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}") + +file(GLOB_RECURSE SOURCE_CPP + "*.cpp" "*.h" "*.qrc" +) + +set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(PUBLIC_INCUDE_DIR ${PUBLIC_INCUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/units") + + +add_executable(${CURRENT_PROJECT} ${SOURCE_CPP}) +target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Test ${PROJECT_NAME}Library) + +target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR}) + + +initTests() +addTests(${PROJECT_NAME} ${CURRENT_PROJECT}) diff --git a/tests/TestCPPOnly/TestCPPOnly.pro b/tests/TestCPPOnly/TestCPPOnly.pro deleted file mode 100644 index 25961d8..0000000 --- a/tests/TestCPPOnly/TestCPPOnly.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = app -CONFIG += console c++11 -CONFIG -= app_bundle -CONFIG -= qt -CONFIG += release - -SOURCES += \ - main.cpp - -DESTDIR="$$PWD/../build" diff --git a/tests/TestCPPOnly/conf.qrc b/tests/TestCPPOnly/conf.qrc deleted file mode 100644 index 03a1bfc..0000000 --- a/tests/TestCPPOnly/conf.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/qt/etc"> - <file>qt.conf</file> - </qresource> -</RCC> diff --git a/tests/TestCPPOnly/main.cpp b/tests/TestCPPOnly/main.cpp deleted file mode 100644 index fd0821c..0000000 --- a/tests/TestCPPOnly/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include <iostream> - -using namespace std; - -int main() -{ - cout << "TEST DONE (ONLY_C)" << endl; - return 0; -} diff --git a/tests/TestCPPOnly/qt.conf b/tests/TestCPPOnly/qt.conf deleted file mode 100644 index e69de29..0000000 diff --git a/tests/TestOnlyC/TestOnlyC.pro b/tests/TestOnlyC/TestOnlyC.pro deleted file mode 100644 index 25961d8..0000000 --- a/tests/TestOnlyC/TestOnlyC.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = app -CONFIG += console c++11 -CONFIG -= app_bundle -CONFIG -= qt -CONFIG += release - -SOURCES += \ - main.cpp - -DESTDIR="$$PWD/../build" diff --git a/tests/TestOnlyC/conf.qrc b/tests/TestOnlyC/conf.qrc deleted file mode 100644 index 03a1bfc..0000000 --- a/tests/TestOnlyC/conf.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/qt/etc"> - <file>qt.conf</file> - </qresource> -</RCC> diff --git a/tests/TestOnlyC/main.cpp b/tests/TestOnlyC/main.cpp deleted file mode 100644 index fd0821c..0000000 --- a/tests/TestOnlyC/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include <iostream> - -using namespace std; - -int main() -{ - cout << "TEST DONE (ONLY_C)" << endl; - return 0; -} diff --git a/tests/TestOnlyC/qt.conf b/tests/TestOnlyC/qt.conf deleted file mode 100644 index e69de29..0000000 diff --git a/tests/TestQMLWidgets/HomeForm.ui.qml b/tests/TestQMLWidgets/HomeForm.ui.qml deleted file mode 100644 index 6474fad..0000000 --- a/tests/TestQMLWidgets/HomeForm.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -Page { - width: 600 - height: 400 - - title: qsTr("Home") - - Label { - text: qsTr("You are on the home page.") - anchors.centerIn: parent - } -} diff --git a/tests/TestQMLWidgets/Page1Form.ui.qml b/tests/TestQMLWidgets/Page1Form.ui.qml deleted file mode 100644 index a25e78a..0000000 --- a/tests/TestQMLWidgets/Page1Form.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -Page { - width: 600 - height: 400 - - title: qsTr("Page 1") - - Label { - text: qsTr("You are on Page 1.") - anchors.centerIn: parent - } -} diff --git a/tests/TestQMLWidgets/Page2Form.ui.qml b/tests/TestQMLWidgets/Page2Form.ui.qml deleted file mode 100644 index c34bb98..0000000 --- a/tests/TestQMLWidgets/Page2Form.ui.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -Page { - width: 600 - height: 400 - - title: qsTr("Page 2") - - Label { - text: qsTr("You are on Page 2.") - anchors.centerIn: parent - } -} diff --git a/tests/TestQMLWidgets/TestQMLWidgets.pro b/tests/TestQMLWidgets/TestQMLWidgets.pro deleted file mode 100644 index f5b9d9f..0000000 --- a/tests/TestQMLWidgets/TestQMLWidgets.pro +++ /dev/null @@ -1,28 +0,0 @@ -QT += quick -CONFIG += c++17 -CONFIG += release - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Refer to the documentation for the -# deprecated API to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = - -DESTDIR="$$PWD/../build" - diff --git a/tests/TestQMLWidgets/conf.qrc b/tests/TestQMLWidgets/conf.qrc deleted file mode 100644 index 03a1bfc..0000000 --- a/tests/TestQMLWidgets/conf.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/qt/etc"> - <file>qt.conf</file> - </qresource> -</RCC> diff --git a/tests/TestQMLWidgets/main.cpp b/tests/TestQMLWidgets/main.cpp deleted file mode 100644 index b532603..0000000 --- a/tests/TestQMLWidgets/main.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include <QGuiApplication> -#include <QQmlApplicationEngine> -#include <QTimer> - -int main(int argc, char *argv[]) -{ - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - QGuiApplication app(argc, argv); - - QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - if (engine.rootObjects().isEmpty()) - return -1; - - QTimer::singleShot(200, [&app](){ app.exit(0);}); - - return app.exec(); -} diff --git a/tests/TestQMLWidgets/main.qml b/tests/TestQMLWidgets/main.qml deleted file mode 100644 index d5d621a..0000000 --- a/tests/TestQMLWidgets/main.qml +++ /dev/null @@ -1,65 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.3 - -ApplicationWindow { - id: window - visible: true - width: 640 - height: 480 - title: qsTr("Stack") - - header: ToolBar { - contentHeight: toolButton.implicitHeight - - ToolButton { - id: toolButton - text: stackView.depth > 1 ? "\u25C0" : "\u2630" - font.pixelSize: Qt.application.font.pixelSize * 1.6 - onClicked: { - if (stackView.depth > 1) { - stackView.pop() - } else { - drawer.open() - } - } - } - - Label { - text: stackView.currentItem.title - anchors.centerIn: parent - } - } - - Drawer { - id: drawer - width: window.width * 0.66 - height: window.height - - Column { - anchors.fill: parent - - ItemDelegate { - text: qsTr("Page 1") - width: parent.width - onClicked: { - stackView.push("Page1Form.ui.qml") - drawer.close() - } - } - ItemDelegate { - text: qsTr("Page 2") - width: parent.width - onClicked: { - stackView.push("Page2Form.ui.qml") - drawer.close() - } - } - } - } - - StackView { - id: stackView - initialItem: "HomeForm.ui.qml" - anchors.fill: parent - } -} diff --git a/tests/TestQMLWidgets/qml.qrc b/tests/TestQMLWidgets/qml.qrc deleted file mode 100644 index 7725989..0000000 --- a/tests/TestQMLWidgets/qml.qrc +++ /dev/null @@ -1,9 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - <file>HomeForm.ui.qml</file> - <file>Page1Form.ui.qml</file> - <file>Page2Form.ui.qml</file> - <file>qtquickcontrols2.conf</file> - </qresource> -</RCC> diff --git a/tests/TestQMLWidgets/qtquickcontrols2.conf b/tests/TestQMLWidgets/qtquickcontrols2.conf deleted file mode 100644 index 08109fe..0000000 --- a/tests/TestQMLWidgets/qtquickcontrols2.conf +++ /dev/null @@ -1,6 +0,0 @@ -; This file can be edited to change the style of the application -; Read "Qt Quick Controls 2 Configuration File" for details: -; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html - -[Controls] -Style=Imagine diff --git a/tests/TestQtWidgets/TestQtWidgets.pro b/tests/TestQtWidgets/TestQtWidgets.pro deleted file mode 100644 index 30c2ca0..0000000 --- a/tests/TestQtWidgets/TestQtWidgets.pro +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2018-12-23T16:21:23 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = QtWidgetsProject -TEMPLATE = app - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG += c++17 -CONFIG += release - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -FORMS += \ - mainwindow.ui - -DESTDIR="$$PWD/../build" - - - diff --git a/tests/TestQtWidgets/conf.qrc b/tests/TestQtWidgets/conf.qrc deleted file mode 100644 index 03a1bfc..0000000 --- a/tests/TestQtWidgets/conf.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/qt/etc"> - <file>qt.conf</file> - </qresource> -</RCC> diff --git a/tests/TestQtWidgets/main.cpp b/tests/TestQtWidgets/main.cpp deleted file mode 100644 index 79fe5e8..0000000 --- a/tests/TestQtWidgets/main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "mainwindow.h" -#include <QApplication> -#include <QTimer> - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - MainWindow w; - w.show(); - - - QTimer::singleShot(200, [&a](){ a.exit(0);}); - - - return a.exec(); -} diff --git a/tests/TestQtWidgets/mainwindow.cpp b/tests/TestQtWidgets/mainwindow.cpp deleted file mode 100644 index 49d64fc..0000000 --- a/tests/TestQtWidgets/mainwindow.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "mainwindow.h" -#include "ui_mainwindow.h" - -MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), - ui(new Ui::MainWindow) -{ - ui->setupUi(this); -} - -MainWindow::~MainWindow() -{ - delete ui; -} diff --git a/tests/TestQtWidgets/mainwindow.h b/tests/TestQtWidgets/mainwindow.h deleted file mode 100644 index 9353441..0000000 --- a/tests/TestQtWidgets/mainwindow.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include <QMainWindow> - -namespace Ui { -class MainWindow; -} - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - explicit MainWindow(QWidget *parent = nullptr); - ~MainWindow(); - -private: - Ui::MainWindow *ui; -}; - -#endif // MAINWINDOW_H diff --git a/tests/TestQtWidgets/mainwindow.ui b/tests/TestQtWidgets/mainwindow.ui deleted file mode 100644 index 6050363..0000000 --- a/tests/TestQtWidgets/mainwindow.ui +++ /dev/null @@ -1,24 +0,0 @@ -<ui version="4.0"> - <class>MainWindow</class> - <widget class="QMainWindow" name="MainWindow" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>400</width> - <height>300</height> - </rect> - </property> - <property name="windowTitle" > - <string>MainWindow</string> - </property> - <widget class="QMenuBar" name="menuBar" /> - <widget class="QToolBar" name="mainToolBar" /> - <widget class="QWidget" name="centralWidget" /> - <widget class="QStatusBar" name="statusBar" /> - </widget> - <layoutDefault spacing="6" margin="11" /> - <pixmapfunction></pixmapfunction> - <resources/> - <connections/> -</ui> diff --git a/tests/TestQtWidgets/qt.conf b/tests/TestQtWidgets/qt.conf deleted file mode 100644 index b19181a..0000000 --- a/tests/TestQtWidgets/qt.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Paths] -Prefix = /some/path diff --git a/tests/quicknanobrowser/ApplicationRoot.qml b/tests/quicknanobrowser/ApplicationRoot.qml deleted file mode 100644 index adae6f5..0000000 --- a/tests/quicknanobrowser/ApplicationRoot.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtWebEngine 1.9 - -QtObject { - id: root - - property QtObject defaultProfile: WebEngineProfile { - storageName: "Profile" - offTheRecord: false - useForGlobalCertificateVerification: true - } - - property QtObject otrProfile: WebEngineProfile { - offTheRecord: true - } - - property Component browserWindowComponent: BrowserWindow { - applicationRoot: root - onClosing: destroy() - } - property Component browserDialogComponent: BrowserDialog { - onClosing: destroy() - } - function createWindow(profile) { - var newWindow = browserWindowComponent.createObject(root); - newWindow.currentWebView.profile = profile; - profile.downloadRequested.connect(newWindow.onDownloadRequested); - return newWindow; - } - function createDialog(profile) { - var newDialog = browserDialogComponent.createObject(root); - newDialog.currentWebView.profile = profile; - return newDialog; - } - function load(url) { - var browserWindow = createWindow(defaultProfile); - browserWindow.currentWebView.url = url; - } -} diff --git a/tests/quicknanobrowser/BrowserDialog.qml b/tests/quicknanobrowser/BrowserDialog.qml deleted file mode 100644 index c2b6737..0000000 --- a/tests/quicknanobrowser/BrowserDialog.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Window 2.2 -import QtWebEngine 1.9 - -Window { - id: window - property alias currentWebView: webView - flags: Qt.Dialog | Qt.WindowStaysOnTopHint - width: 800 - height: 600 - visible: true - onClosing: destroy() - WebEngineView { - id: webView - anchors.fill: parent - - onGeometryChangeRequested: function(geometry) { - window.x = geometry.x - window.y = geometry.y - window.width = geometry.width - window.height = geometry.height - } - } -} diff --git a/tests/quicknanobrowser/BrowserWindow.qml b/tests/quicknanobrowser/BrowserWindow.qml deleted file mode 100644 index 7fb87a2..0000000 --- a/tests/quicknanobrowser/BrowserWindow.qml +++ /dev/null @@ -1,654 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.labs.settings 1.0 -import QtQml 2.2 -import QtQuick 2.2 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Private 1.0 as QQCPrivate -import QtQuick.Controls.Styles 1.0 -import QtQuick.Dialogs 1.2 -import QtQuick.Layouts 1.0 -import QtQuick.Window 2.1 -import QtWebEngine 1.9 - -ApplicationWindow { - id: browserWindow - property QtObject applicationRoot - property Item currentWebView: tabs.currentIndex < tabs.count ? tabs.getTab(tabs.currentIndex).item : null - property int previousVisibility: Window.Windowed - - width: 1300 - height: 900 - visible: true - title: currentWebView && currentWebView.title - - // Make sure the Qt.WindowFullscreenButtonHint is set on OS X. - Component.onCompleted: flags = flags | Qt.WindowFullscreenButtonHint - - // Create a styleItem to determine the platform. - // When using style "mac", ToolButtons are not supposed to accept focus. - QQCPrivate.StyleItem { id: styleItem } - property bool platformIsMac: styleItem.style == "mac" - - Settings { - id : appSettings - property alias autoLoadImages: loadImages.checked - property alias javaScriptEnabled: javaScriptEnabled.checked - property alias errorPageEnabled: errorPageEnabled.checked - property alias pluginsEnabled: pluginsEnabled.checked - property alias fullScreenSupportEnabled: fullScreenSupportEnabled.checked - property alias autoLoadIconsForPage: autoLoadIconsForPage.checked - property alias touchIconsEnabled: touchIconsEnabled.checked - property alias webRTCPublicInterfacesOnly : webRTCPublicInterfacesOnly.checked - property alias devToolsEnabled: devToolsEnabled.checked - property alias pdfViewerEnabled: pdfViewerEnabled.checked - } - - Action { - shortcut: "Ctrl+D" - onTriggered: { - downloadView.visible = !downloadView.visible; - } - } - Action { - id: focus - shortcut: "Ctrl+L" - onTriggered: { - addressBar.forceActiveFocus(); - addressBar.selectAll(); - } - } - Action { - shortcut: StandardKey.Refresh - onTriggered: { - if (currentWebView) - currentWebView.reload(); - } - } - Action { - shortcut: StandardKey.AddTab - onTriggered: { - tabs.createEmptyTab(tabs.count != 0 ? currentWebView.profile : defaultProfile); - tabs.currentIndex = tabs.count - 1; - addressBar.forceActiveFocus(); - addressBar.selectAll(); - } - } - Action { - shortcut: StandardKey.Close - onTriggered: { - currentWebView.triggerWebAction(WebEngineView.RequestClose); - } - } - Action { - shortcut: "Escape" - onTriggered: { - if (currentWebView.state == "FullScreen") { - browserWindow.visibility = browserWindow.previousVisibility; - fullScreenNotification.hide(); - currentWebView.triggerWebAction(WebEngineView.ExitFullScreen); - } - } - } - Action { - shortcut: "Ctrl+0" - onTriggered: currentWebView.zoomFactor = 1.0 - } - Action { - shortcut: StandardKey.ZoomOut - onTriggered: currentWebView.zoomFactor -= 0.1 - } - Action { - shortcut: StandardKey.ZoomIn - onTriggered: currentWebView.zoomFactor += 0.1 - } - - Action { - shortcut: StandardKey.Copy - onTriggered: currentWebView.triggerWebAction(WebEngineView.Copy) - } - Action { - shortcut: StandardKey.Cut - onTriggered: currentWebView.triggerWebAction(WebEngineView.Cut) - } - Action { - shortcut: StandardKey.Paste - onTriggered: currentWebView.triggerWebAction(WebEngineView.Paste) - } - Action { - shortcut: "Shift+"+StandardKey.Paste - onTriggered: currentWebView.triggerWebAction(WebEngineView.PasteAndMatchStyle) - } - Action { - shortcut: StandardKey.SelectAll - onTriggered: currentWebView.triggerWebAction(WebEngineView.SelectAll) - } - Action { - shortcut: StandardKey.Undo - onTriggered: currentWebView.triggerWebAction(WebEngineView.Undo) - } - Action { - shortcut: StandardKey.Redo - onTriggered: currentWebView.triggerWebAction(WebEngineView.Redo) - } - Action { - shortcut: StandardKey.Back - onTriggered: currentWebView.triggerWebAction(WebEngineView.Back) - } - Action { - shortcut: StandardKey.Forward - onTriggered: currentWebView.triggerWebAction(WebEngineView.Forward) - } - - toolBar: ToolBar { - id: navigationBar - RowLayout { - anchors.fill: parent - ToolButton { - enabled: currentWebView && (currentWebView.canGoBack || currentWebView.canGoForward) - menu:Menu { - id: historyMenu - - Instantiator { - model: currentWebView && currentWebView.navigationHistory.items - MenuItem { - text: model.title - onTriggered: currentWebView.goBackOrForward(model.offset) - checkable: !enabled - checked: !enabled - enabled: model.offset - } - - onObjectAdded: function(index, object) { - historyMenu.insertItem(index, object) - } - onObjectRemoved: function(index, object) { - historyMenu.removeItem(object) - } - } - } - } - - ToolButton { - id: backButton - iconSource: "icons/go-previous.png" - onClicked: currentWebView.goBack() - enabled: currentWebView && currentWebView.canGoBack - activeFocusOnTab: !browserWindow.platformIsMac - } - ToolButton { - id: forwardButton - iconSource: "icons/go-next.png" - onClicked: currentWebView.goForward() - enabled: currentWebView && currentWebView.canGoForward - activeFocusOnTab: !browserWindow.platformIsMac - } - ToolButton { - id: reloadButton - iconSource: currentWebView && currentWebView.loading ? "icons/process-stop.png" : "icons/view-refresh.png" - onClicked: currentWebView && currentWebView.loading ? currentWebView.stop() : currentWebView.reload() - activeFocusOnTab: !browserWindow.platformIsMac - } - TextField { - id: addressBar - Image { - anchors.verticalCenter: addressBar.verticalCenter; - x: 5 - z: 2 - id: faviconImage - width: 16; height: 16 - sourceSize: Qt.size(width, height) - source: currentWebView && currentWebView.icon - } - style: TextFieldStyle { - padding { - left: 26; - } - } - focus: true - Layout.fillWidth: true - text: currentWebView && currentWebView.url - onAccepted: currentWebView.url = utils.fromUserInput(text) - } - ToolButton { - id: settingsMenuButton - menu: Menu { - MenuItem { - id: loadImages - text: "Autoload images" - checkable: true - checked: WebEngine.settings.autoLoadImages - } - MenuItem { - id: javaScriptEnabled - text: "JavaScript On" - checkable: true - checked: WebEngine.settings.javascriptEnabled - } - MenuItem { - id: errorPageEnabled - text: "ErrorPage On" - checkable: true - checked: WebEngine.settings.errorPageEnabled - } - MenuItem { - id: pluginsEnabled - text: "Plugins On" - checkable: true - checked: true - } - MenuItem { - id: fullScreenSupportEnabled - text: "FullScreen On" - checkable: true - checked: WebEngine.settings.fullScreenSupportEnabled - } - MenuItem { - id: offTheRecordEnabled - text: "Off The Record" - checkable: true - checked: currentWebView && currentWebView.profile === otrProfile - onToggled: function(checked) { - if (currentWebView) { - currentWebView.profile = checked ? otrProfile : defaultProfile; - } - } - } - MenuItem { - id: httpDiskCacheEnabled - text: "HTTP Disk Cache" - checkable: currentWebView && !currentWebView.profile.offTheRecord - checked: currentWebView && (currentWebView.profile.httpCacheType === WebEngineProfile.DiskHttpCache) - onToggled: function(checked) { - if (currentWebView) { - currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache; - } - } - } - MenuItem { - id: autoLoadIconsForPage - text: "Icons On" - checkable: true - checked: WebEngine.settings.autoLoadIconsForPage - } - MenuItem { - id: touchIconsEnabled - text: "Touch Icons On" - checkable: true - checked: WebEngine.settings.touchIconsEnabled - enabled: autoLoadIconsForPage.checked - } - MenuItem { - id: webRTCPublicInterfacesOnly - text: "WebRTC Public Interfaces Only" - checkable: true - checked: WebEngine.settings.webRTCPublicInterfacesOnly - } - MenuItem { - id: devToolsEnabled - text: "Open DevTools" - checkable: true - checked: false - } - MenuItem { - id: pdfViewerEnabled - text: "PDF viewer enabled" - checkable: true - checked: WebEngine.settings.pdfViewerEnabled - } - } - } - } - ProgressBar { - id: progressBar - height: 3 - anchors { - left: parent.left - top: parent.bottom - right: parent.right - leftMargin: -parent.leftMargin - rightMargin: -parent.rightMargin - } - style: ProgressBarStyle { - background: Item {} - } - z: -2; - minimumValue: 0 - maximumValue: 100 - value: (currentWebView && currentWebView.loadProgress < 100) ? currentWebView.loadProgress : 0 - } - } - - TabView { - id: tabs - function createEmptyTab(profile) { - var tab = addTab("", tabComponent); - // We must do this first to make sure that tab.active gets set so that tab.item gets instantiated immediately. - tab.active = true; - tab.title = Qt.binding(function() { return tab.item.title }); - tab.item.profile = profile; - return tab; - } - - anchors.top: parent.top - anchors.bottom: devToolsView.top - anchors.left: parent.left - anchors.right: parent.right - Component.onCompleted: createEmptyTab(defaultProfile) - - // Add custom tab view style so we can customize the tabs to include a close button - style: TabViewStyle { - property color frameColor: "#999" - property color fillColor: "#eee" - property color nonSelectedColor: "#ddd" - frameOverlap: 1 - frame: Rectangle { - color: "#eee" - border.color: frameColor - } - tab: Rectangle { - id: tabRectangle - color: styleData.selected ? fillColor : nonSelectedColor - border.width: 1 - border.color: frameColor - implicitWidth: Math.max(text.width + 30, 80) - implicitHeight: Math.max(text.height + 10, 20) - Rectangle { height: 1 ; width: parent.width ; color: frameColor} - Rectangle { height: parent.height ; width: 1; color: frameColor} - Rectangle { x: parent.width - 2; height: parent.height ; width: 1; color: frameColor} - Text { - id: text - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 6 - text: styleData.title - elide: Text.ElideRight - color: styleData.selected ? "black" : frameColor - } - Button { - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - anchors.rightMargin: 4 - height: 12 - style: ButtonStyle { - background: Rectangle { - implicitWidth: 12 - implicitHeight: 12 - color: control.hovered ? "#ccc" : tabRectangle.color - Text {text: "x" ; anchors.centerIn: parent ; color: "gray"} - }} - onClicked: tabs.removeTab(styleData.index); - } - } - } - - Component { - id: tabComponent - WebEngineView { - id: webEngineView - focus: true - - onLinkHovered: function(hoveredUrl) { - if (hoveredUrl == "") - hideStatusText.start(); - else { - statusText.text = hoveredUrl; - statusBubble.visible = true; - hideStatusText.stop(); - } - } - - states: [ - State { - name: "FullScreen" - PropertyChanges { - target: tabs - frameVisible: false - tabsVisible: false - } - PropertyChanges { - target: navigationBar - visible: false - } - } - ] - settings.autoLoadImages: appSettings.autoLoadImages - settings.javascriptEnabled: appSettings.javaScriptEnabled - settings.errorPageEnabled: appSettings.errorPageEnabled - settings.pluginsEnabled: appSettings.pluginsEnabled - settings.fullScreenSupportEnabled: appSettings.fullScreenSupportEnabled - settings.autoLoadIconsForPage: appSettings.autoLoadIconsForPage - settings.touchIconsEnabled: appSettings.touchIconsEnabled - settings.webRTCPublicInterfacesOnly: appSettings.webRTCPublicInterfacesOnly - settings.pdfViewerEnabled: appSettings.pdfViewerEnabled - - onCertificateError: function(error) { - error.defer(); - sslDialog.enqueue(error); - } - - onNewViewRequested: function(request) { - if (!request.userInitiated) - print("Warning: Blocked a popup window."); - else if (request.destination === WebEngineView.NewViewInTab) { - var tab = tabs.createEmptyTab(currentWebView.profile); - tabs.currentIndex = tabs.count - 1; - request.openIn(tab.item); - } else if (request.destination === WebEngineView.NewViewInBackgroundTab) { - var backgroundTab = tabs.createEmptyTab(currentWebView.profile); - request.openIn(backgroundTab.item); - } else if (request.destination === WebEngineView.NewViewInDialog) { - var dialog = applicationRoot.createDialog(currentWebView.profile); - request.openIn(dialog.currentWebView); - } else { - var window = applicationRoot.createWindow(currentWebView.profile); - request.openIn(window.currentWebView); - } - } - - onFullScreenRequested: function(request) { - if (request.toggleOn) { - webEngineView.state = "FullScreen"; - browserWindow.previousVisibility = browserWindow.visibility; - browserWindow.showFullScreen(); - fullScreenNotification.show(); - } else { - webEngineView.state = ""; - browserWindow.visibility = browserWindow.previousVisibility; - fullScreenNotification.hide(); - } - request.accept(); - } - - onQuotaRequested: function(request) { - if (request.requestedSize <= 5 * 1024 * 1024) - request.accept(); - else - request.reject(); - } - - onRegisterProtocolHandlerRequested: function(request) { - console.log("accepting registerProtocolHandler request for " - + request.scheme + " from " + request.origin); - request.accept(); - } - - onRenderProcessTerminated: function(terminationStatus, exitCode) { - var status = ""; - switch (terminationStatus) { - case WebEngineView.NormalTerminationStatus: - status = "(normal exit)"; - break; - case WebEngineView.AbnormalTerminationStatus: - status = "(abnormal exit)"; - break; - case WebEngineView.CrashedTerminationStatus: - status = "(crashed)"; - break; - case WebEngineView.KilledTerminationStatus: - status = "(killed)"; - break; - } - - print("Render process exited with code " + exitCode + " " + status); - reloadTimer.running = true; - } - - onWindowCloseRequested: { - if (tabs.count == 1) - browserWindow.close(); - else - tabs.removeTab(tabs.currentIndex); - } - - onSelectClientCertificate: function(selection) { - selection.certificates[0].select(); - } - - Timer { - id: reloadTimer - interval: 0 - running: false - repeat: false - onTriggered: currentWebView.reload() - } - } - } - } - WebEngineView { - id: devToolsView - visible: devToolsEnabled.checked - height: visible ? 400 : 0 - inspectedView: visible && tabs.currentIndex < tabs.count ? tabs.getTab(tabs.currentIndex).item : null - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - onNewViewRequested: function(request) { - var tab = tabs.createEmptyTab(currentWebView.profile); - tabs.currentIndex = tabs.count - 1; - request.openIn(tab.item); - } - } - MessageDialog { - id: sslDialog - - property var certErrors: [] - icon: StandardIcon.Warning - standardButtons: StandardButton.No | StandardButton.Yes - title: "Server's certificate not trusted" - text: "Do you wish to continue?" - detailedText: "If you wish so, you may continue with an unverified certificate. " + - "Accepting an unverified certificate means " + - "you may not be connected with the host you tried to connect to.\n" + - "Do you wish to override the security check and continue?" - onYes: { - certErrors.shift().ignoreCertificateError(); - presentError(); - } - onNo: reject() - onRejected: reject() - - function reject(){ - certErrors.shift().rejectCertificate(); - presentError(); - } - function enqueue(error){ - certErrors.push(error); - presentError(); - } - function presentError(){ - visible = certErrors.length > 0 - } - } - - FullScreenNotification { - id: fullScreenNotification - } - - DownloadView { - id: downloadView - visible: false - anchors.fill: parent - } - - function onDownloadRequested(download) { - downloadView.visible = true; - downloadView.append(download); - download.accept(); - } - - Rectangle { - id: statusBubble - color: "oldlace" - property int padding: 8 - visible: false - - anchors.left: parent.left - anchors.bottom: parent.bottom - width: statusText.paintedWidth + padding - height: statusText.paintedHeight + padding - - Text { - id: statusText - anchors.centerIn: statusBubble - elide: Qt.ElideMiddle - - Timer { - id: hideStatusText - interval: 750 - onTriggered: { - statusText.text = ""; - statusBubble.visible = false; - } - } - } - } -} diff --git a/tests/quicknanobrowser/DownloadView.qml b/tests/quicknanobrowser/DownloadView.qml deleted file mode 100644 index 545a502..0000000 --- a/tests/quicknanobrowser/DownloadView.qml +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 -import QtWebEngine 1.9 -import QtQuick.Layouts 1.0 - -Rectangle { - id: downloadView - color: "lightgray" - - ListModel { - id: downloadModel - property var downloads: [] - } - - function append(download) { - downloadModel.append(download); - downloadModel.downloads.push(download); - } - - Component { - id: downloadItemDelegate - - Rectangle { - width: listView.width - height: childrenRect.height - anchors.margins: 10 - radius: 3 - color: "transparent" - border.color: "black" - Rectangle { - id: progressBar - - property real progress: downloadModel.downloads[index] - ? downloadModel.downloads[index].receivedBytes / downloadModel.downloads[index].totalBytes : 0 - - radius: 3 - color: width == listView.width ? "green" : "#2b74c7" - width: listView.width * progress - height: cancelButton.height - - Behavior on width { - SmoothedAnimation { duration: 100 } - } - } - Rectangle { - anchors { - left: parent.left - right: parent.right - leftMargin: 20 - } - Label { - id: label - text: path - anchors { - verticalCenter: cancelButton.verticalCenter - left: parent.left - right: cancelButton.left - } - } - Button { - id: cancelButton - anchors.right: parent.right - iconSource: "icons/process-stop.png" - onClicked: { - var download = downloadModel.downloads[index]; - - download.cancel(); - - downloadModel.downloads = downloadModel.downloads.filter(function (el) { - return el.id !== download.id; - }); - downloadModel.remove(index); - } - } - } - } - - } - ListView { - id: listView - anchors { - topMargin: 10 - top: parent.top - bottom: parent.bottom - horizontalCenter: parent.horizontalCenter - } - width: parent.width - 20 - spacing: 5 - - model: downloadModel - delegate: downloadItemDelegate - - Text { - visible: !listView.count - horizontalAlignment: Text.AlignHCenter - height: 30 - anchors { - top: parent.top - left: parent.left - right: parent.right - } - font.pixelSize: 20 - text: "No active downloads." - } - - Rectangle { - color: "gray" - anchors { - bottom: parent.bottom - left: parent.left - right: parent.right - } - height: 30 - Button { - id: okButton - text: "OK" - anchors.centerIn: parent - onClicked: { - downloadView.visible = false; - } - } - } - } -} diff --git a/tests/quicknanobrowser/FullScreenNotification.qml b/tests/quicknanobrowser/FullScreenNotification.qml deleted file mode 100644 index 55f5f00..0000000 --- a/tests/quicknanobrowser/FullScreenNotification.qml +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.5 - -Rectangle { - id: fullScreenNotification - width: 500 - height: 40 - color: "white" - radius: 7 - - visible: false - opacity: 0 - - function show() { - visible = true; - opacity = 1; - reset.start(); - } - - function hide() { - reset.stop(); - opacity = 0; - } - - Behavior on opacity { - NumberAnimation { - duration: 750 - onStopped: { - if (opacity == 0) - visible = false; - } - } - } - - Timer { - id: reset - interval: 5000 - onTriggered: hide() - } - - anchors.horizontalCenter: parent.horizontalCenter - y: 125 - - Text { - id: message - width: parent.width - - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - wrapMode: Text.WordWrap - elide: Text.ElideNone - clip: true - - text: qsTr("You are now in fullscreen mode. Press ESC to quit!") - } -} diff --git a/tests/quicknanobrowser/doc/images/quicknanobrowser-demo.jpg b/tests/quicknanobrowser/doc/images/quicknanobrowser-demo.jpg deleted file mode 100644 index 12693bb..0000000 Binary files a/tests/quicknanobrowser/doc/images/quicknanobrowser-demo.jpg and /dev/null differ diff --git a/tests/quicknanobrowser/doc/src/quicknanobrowser.qdoc b/tests/quicknanobrowser/doc/src/quicknanobrowser.qdoc deleted file mode 100644 index 48a63c7..0000000 --- a/tests/quicknanobrowser/doc/src/quicknanobrowser.qdoc +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example webengine/quicknanobrowser - \title WebEngine Quick Nano Browser - \ingroup webengine-examples - \brief A web browser implemented using the WebEngineView QML type. - - \image quicknanobrowser-demo.jpg - - \e {Quick Nano Browser} demonstrates how to use the \l{Qt WebEngine QML Types} - {Qt WebEngine QML types} to develop a small web browser application that consists of a browser - window with a title bar, toolbar, tab view, and status bar. The web content is loaded in a web - engine view within the tab view. If certificate errors occur, users are prompted for action in a - message dialog. The status bar pops up to display the URL of a hovered link. - - A web page can issue a request for being displayed in fullscreen mode. Users can allow full - screen mode by using a toolbar button. They can leave fullscreen mode by using a keyboard - shortcut. Additional toolbar buttons enable moving backwards and forwards in the browser - history, reloading tab content, and opening a settings menu for enabling the following features: - JavaScript, plugins, fullscreen mode, off the record, HTTP disk cache, autoloading images, and - ignoring certificate errors. - - \include examples-run.qdocinc - - \section1 Creating the Main Browser Window - - When the browser main window is loaded, it creates an empty tab using the default profile. Each - tab is a web engine view that fills the main window. - - We create the main window in the \e BrowserWindow.qml file using the ApplicationWindow type: - - \quotefromfile webengine/quicknanobrowser/BrowserWindow.qml - \skipto ApplicationWindow - \printuntil currentWebView - \dots - \skipto width - \printuntil title - - We use the TabView Qt Quick control to create an empty tab view that fills the main window. We - set the tab active first, to make sure that the tab item is immediately instantiated: - - \skipto TabView - \printuntil Component.onCompleted - - The tab contains a web engine view that loads web content: - - \printuntil focus - - We use the \l Action type to create new tabs: - - \quotefromfile webengine/quicknanobrowser/BrowserWindow.qml - \skipto reload - \skipto Action - \printuntil } - - We use the \l TextField Qt Quick Control within a \l ToolBar to create an address bar that - shows the current URL and where users can enter another URL: - - \skipto toolBar - \printuntil anchors.fill - \dots - \skipto TextField - \printuntil addressBar - \dots - \skipto focus - \printuntil /^\ {16}\}/ - - \section1 Handling Certificate Errors - - If the certificate of the site being loaded triggers a certificate error, we call the - \l{WebEngineCertificateError::}{defer()} QML method to pause the URL request and wait for user - input: - - \quotefromfile webengine/quicknanobrowser/BrowserWindow.qml - \skipto onCertificateError - \printuntil } - - We use the MessageDialog type to prompt users to continue or cancel the loading of the web page. - If users select \uicontrol Yes, we call the - \l{WebEngineCertificateError::}{ignoreCertificateError()} method to ignore the error and - continue loading content from the URL. If users select \uicontrol No, we call the - \l{WebEngineCertificateError::}{rejectCertificate()} method to reject the request and stop - loading content from the URL: - - \skipto MessageDialog - \printuntil /^\ {4}\}/ - - \section1 Entering and Leaving Fullscreen Mode - - We create a menu item for allowing fullscreen mode in a settings menu that we place on the tool - bar. Also, we create an action for leaving fullscreen mode by using a keyboard shortcut. - We call the \l{FullScreenRequest::}{accept()} method to accept the fullscreen request. - The methdod sets the \l{WebEngineView::}{isFullScreen} property to be equal to the - \l{FullScreenRequest::}{toggleOn} property. - - \quotefromfile webengine/quicknanobrowser/BrowserWindow.qml - \skipto onFullScreenRequested - \printuntil /^\ {16}\}/ - - When entering fullscreen mode, we display a notification using the FullScreenNotification custom - type that we create in \e FullScreenNotification.qml. - - We use the \l Action type in the settings menu to create a shortcut for leaving fullscreen mode - by pressing the escape key: - - \quotefromfile webengine/quicknanobrowser/BrowserWindow.qml - \skipto Settings - \printuntil appSettings - \skipto fullScreenSupportEnabled - \printuntil Action - \skipto Escape - \printuntil /^\ {4}\}/ - - \section1 Files and Attributions - - The example uses icons from the Tango Icon Library: - - \table - \row - \li \l{quicknanobrowser-tango}{Tango Icon Library} - \li Public Domain - \endtable -*/ diff --git a/tests/quicknanobrowser/icons/3rdparty/COPYING b/tests/quicknanobrowser/icons/3rdparty/COPYING deleted file mode 100644 index 9549050..0000000 --- a/tests/quicknanobrowser/icons/3rdparty/COPYING +++ /dev/null @@ -1 +0,0 @@ -The icons in this repository are herefore released into the Public Domain. diff --git a/tests/quicknanobrowser/icons/3rdparty/go-next.png b/tests/quicknanobrowser/icons/3rdparty/go-next.png deleted file mode 100644 index 6f3f65d..0000000 Binary files a/tests/quicknanobrowser/icons/3rdparty/go-next.png and /dev/null differ diff --git a/tests/quicknanobrowser/icons/3rdparty/go-previous.png b/tests/quicknanobrowser/icons/3rdparty/go-previous.png deleted file mode 100644 index 93be3d1..0000000 Binary files a/tests/quicknanobrowser/icons/3rdparty/go-previous.png and /dev/null differ diff --git a/tests/quicknanobrowser/icons/3rdparty/process-stop.png b/tests/quicknanobrowser/icons/3rdparty/process-stop.png deleted file mode 100644 index b68290b..0000000 Binary files a/tests/quicknanobrowser/icons/3rdparty/process-stop.png and /dev/null differ diff --git a/tests/quicknanobrowser/icons/3rdparty/qt_attribution.json b/tests/quicknanobrowser/icons/3rdparty/qt_attribution.json deleted file mode 100644 index a3d5563..0000000 --- a/tests/quicknanobrowser/icons/3rdparty/qt_attribution.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Id": "quicknanobrowser-tango", - "Name": "Tango Icon Library", - "QDocModule": "qtwebengine", - "QtUsage": "Used in WebEngine Quick Nano Browser example.", - - "QtParts": [ "examples" ], - "Description": "Selected icons from the Tango Icon Library", - "Homepage": "http://tango.freedesktop.org/Tango_Icon_Library", - "Version": "0.8.90", - "DownloadLocation": "http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz", - "LicenseId": "DocumentRef-PublicDomain", - "License": "Public Domain", - "LicenseFile": "COPYING", - "Copyright": "Ulisse Perusin <uli.peru@gmail.com> -Steven Garrity <sgarrity@silverorange.com> -Lapo Calamandrei <calamandrei@gmail.com> -Ryan Collier <rcollier@novell.com> -Rodney Dawes <dobey@novell.com> -Andreas Nilsson <nisses.mail@home.se> -Tuomas Kuosmanen <tigert@tigert.com> -Garrett LeSage <garrett@novell.com> -Jakub Steiner <jimmac@novell.com>" -} diff --git a/tests/quicknanobrowser/icons/3rdparty/view-refresh.png b/tests/quicknanobrowser/icons/3rdparty/view-refresh.png deleted file mode 100644 index cab4d02..0000000 Binary files a/tests/quicknanobrowser/icons/3rdparty/view-refresh.png and /dev/null differ diff --git a/tests/quicknanobrowser/main.cpp b/tests/quicknanobrowser/main.cpp deleted file mode 100644 index 343882f..0000000 --- a/tests/quicknanobrowser/main.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "utils.h" - -#ifndef QT_NO_WIDGETS -#include <QtWidgets/QApplication> -typedef QApplication Application; -#else -#include <QtGui/QGuiApplication> -typedef QGuiApplication Application; -#endif -#include <QtQml/QQmlApplicationEngine> -#include <QtQml/QQmlContext> -#include <QtWebEngine/qtwebengineglobal.h> - -static QUrl startupUrl() -{ - QUrl ret; - QStringList args(qApp->arguments()); - args.takeFirst(); - for (const QString &arg : qAsConst(args)) { - if (arg.startsWith(QLatin1Char('-'))) - continue; - ret = Utils::fromUserInput(arg); - if (ret.isValid()) - return ret; - } - return QUrl(QStringLiteral("https://www.qt.io")); -} - -int main(int argc, char **argv) -{ - QCoreApplication::setOrganizationName("QtExamples"); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - Application app(argc, argv); - - QtWebEngine::initialize(); - - QQmlApplicationEngine appEngine; - Utils utils; - appEngine.rootContext()->setContextProperty("utils", &utils); - appEngine.load(QUrl("qrc:/ApplicationRoot.qml")); - if (!appEngine.rootObjects().isEmpty()) - QMetaObject::invokeMethod(appEngine.rootObjects().first(), "load", Q_ARG(QVariant, startupUrl())); - else - qFatal("Failed to load sources"); - - return app.exec(); -} diff --git a/tests/quicknanobrowser/quicknanobrowser.pro b/tests/quicknanobrowser/quicknanobrowser.pro deleted file mode 100644 index a9d64c7..0000000 --- a/tests/quicknanobrowser/quicknanobrowser.pro +++ /dev/null @@ -1,25 +0,0 @@ -requires(qtConfig(accessibility)) -CONFIG += release - -TEMPLATE = app -TARGET = quicknanobrowser - -HEADERS = utils.h -SOURCES = main.cpp - -OTHER_FILES += ApplicationRoot.qml \ - BrowserDialog.qml \ - BrowserWindow.qml \ - DownloadView.qml \ - FullScreenNotification.qml - -RESOURCES += resources.qrc - -QT += qml quick webengine - -qtHaveModule(widgets) { - QT += widgets # QApplication is required to get native styling with QtQuickControls -} - - -DESTDIR="$$PWD/../build" diff --git a/tests/quicknanobrowser/resources.qrc b/tests/quicknanobrowser/resources.qrc deleted file mode 100644 index af52c47..0000000 --- a/tests/quicknanobrowser/resources.qrc +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> - <qresource prefix="/"> - <file>ApplicationRoot.qml</file> - <file>BrowserDialog.qml</file> - <file>BrowserWindow.qml</file> - <file>DownloadView.qml</file> - <file>FullScreenNotification.qml</file> - </qresource> - <qresource prefix="icons"> - <file alias="go-next.png">icons/3rdparty/go-next.png</file> - <file alias="go-previous.png">icons/3rdparty/go-previous.png</file> - <file alias="process-stop.png">icons/3rdparty/process-stop.png</file> - <file alias="view-refresh.png">icons/3rdparty/view-refresh.png</file> - </qresource> -</RCC> diff --git a/tests/quicknanobrowser/utils.h b/tests/quicknanobrowser/utils.h deleted file mode 100644 index 260a0c9..0000000 --- a/tests/quicknanobrowser/utils.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef UTILS_H -#define UTILS_H - -#include <QtCore/QFileInfo> -#include <QtCore/QUrl> - -class Utils : public QObject { - Q_OBJECT -public: - Q_INVOKABLE static QUrl fromUserInput(const QString& userInput); -}; - -inline QUrl Utils::fromUserInput(const QString& userInput) -{ - QFileInfo fileInfo(userInput); - if (fileInfo.exists()) - return QUrl::fromLocalFile(fileInfo.absoluteFilePath()); - return QUrl::fromUserInput(userInput); -} - -#endif // UTILS_H diff --git a/UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/control b/tests/testRes/DEBCustomTemplate/chrome/DEBIAN/control similarity index 100% rename from UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/control rename to tests/testRes/DEBCustomTemplate/chrome/DEBIAN/control diff --git a/UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/postinst b/tests/testRes/DEBCustomTemplate/chrome/DEBIAN/postinst similarity index 100% rename from UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/postinst rename to tests/testRes/DEBCustomTemplate/chrome/DEBIAN/postinst diff --git a/UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/postrm b/tests/testRes/DEBCustomTemplate/chrome/DEBIAN/postrm similarity index 100% rename from UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/postrm rename to tests/testRes/DEBCustomTemplate/chrome/DEBIAN/postrm diff --git a/UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/prerm b/tests/testRes/DEBCustomTemplate/chrome/DEBIAN/prerm similarity index 100% rename from UnitTests/testRes/DEBCustomTemplate/chrome/DEBIAN/prerm rename to tests/testRes/DEBCustomTemplate/chrome/DEBIAN/prerm diff --git a/UnitTests/testRes/QIFCustomTemplate/config/config.xml b/tests/testRes/QIFCustomTemplate/config/config.xml similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/config/config.xml rename to tests/testRes/QIFCustomTemplate/config/config.xml diff --git a/UnitTests/testRes/QIFCustomTemplate/config/style.qss b/tests/testRes/QIFCustomTemplate/config/style.qss similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/config/style.qss rename to tests/testRes/QIFCustomTemplate/config/style.qss diff --git a/UnitTests/testRes/QIFCustomTemplate/customRes.qrc b/tests/testRes/QIFCustomTemplate/customRes.qrc similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/customRes.qrc rename to tests/testRes/QIFCustomTemplate/customRes.qrc diff --git a/UnitTests/testRes/QIFCustomTemplate/customconfig.xml b/tests/testRes/QIFCustomTemplate/customconfig.xml similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/customconfig.xml rename to tests/testRes/QIFCustomTemplate/customconfig.xml diff --git a/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs b/tests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs rename to tests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs diff --git a/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml b/tests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml rename to tests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml diff --git a/UnitTests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs b/tests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs rename to tests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs diff --git a/UnitTests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml b/tests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml similarity index 100% rename from UnitTests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml rename to tests/testRes/QIFCustomTemplate/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml diff --git a/UnitTests/testRes/TestIcon.png b/tests/testRes/TestIcon.png similarity index 100% rename from UnitTests/testRes/TestIcon.png rename to tests/testRes/TestIcon.png diff --git a/UnitTests/testRes/TestQMLWidgets.sh b/tests/testRes/TestQMLWidgets.sh similarity index 100% rename from UnitTests/testRes/TestQMLWidgets.sh rename to tests/testRes/TestQMLWidgets.sh diff --git a/UnitTests/testRes/Unix/Start b/tests/testRes/Unix/Start similarity index 100% rename from UnitTests/testRes/Unix/Start rename to tests/testRes/Unix/Start diff --git a/UnitTests/testRes/Unix/lib.so.1 b/tests/testRes/Unix/lib.so.1 similarity index 100% rename from UnitTests/testRes/Unix/lib.so.1 rename to tests/testRes/Unix/lib.so.1 diff --git a/UnitTests/testRes/customRunScript.sh b/tests/testRes/customRunScript.sh similarity index 100% rename from UnitTests/testRes/customRunScript.sh rename to tests/testRes/customRunScript.sh diff --git a/UnitTests/testRes/debugLibData b/tests/testRes/debugLibData similarity index 100% rename from UnitTests/testRes/debugLibData rename to tests/testRes/debugLibData diff --git a/UnitTests/testRes/qml/Scene b/tests/testRes/qml/Scene similarity index 100% rename from UnitTests/testRes/qml/Scene rename to tests/testRes/qml/Scene diff --git a/UnitTests/testRes/qml/SceneQt6 b/tests/testRes/qml/SceneQt6 similarity index 100% rename from UnitTests/testRes/qml/SceneQt6 rename to tests/testRes/qml/SceneQt6 diff --git a/UnitTests/testRes/qml/qmldir b/tests/testRes/qml/qmldir similarity index 100% rename from UnitTests/testRes/qml/qmldir rename to tests/testRes/qml/qmldir diff --git a/UnitTests/testRes/testMultiPackageConfig.json b/tests/testRes/testMultiPackageConfig.json similarity index 100% rename from UnitTests/testRes/testMultiPackageConfig.json rename to tests/testRes/testMultiPackageConfig.json diff --git a/UnitTests/testRes/win32/mingw/hanoi-towers.exe b/tests/testRes/win32/mingw/hanoi-towers.exe similarity index 100% rename from UnitTests/testRes/win32/mingw/hanoi-towers.exe rename to tests/testRes/win32/mingw/hanoi-towers.exe diff --git a/UnitTests/testRes/win32/msvc/TestStart.exe b/tests/testRes/win32/msvc/TestStart.exe similarity index 100% rename from UnitTests/testRes/win32/msvc/TestStart.exe rename to tests/testRes/win32/msvc/TestStart.exe diff --git a/UnitTests/testRes/win64/mingw/cqtdeployer.exe b/tests/testRes/win64/mingw/cqtdeployer.exe similarity index 100% rename from UnitTests/testRes/win64/mingw/cqtdeployer.exe rename to tests/testRes/win64/mingw/cqtdeployer.exe diff --git a/UnitTests/testRes/win64/msvc/exe.exe b/tests/testRes/win64/msvc/exe.exe similarity index 100% rename from UnitTests/testRes/win64/msvc/exe.exe rename to tests/testRes/win64/msvc/exe.exe diff --git a/tests/tstMain.cpp b/tests/tstMain.cpp new file mode 100644 index 0000000..ba33bb0 --- /dev/null +++ b/tests/tstMain.cpp @@ -0,0 +1,86 @@ +//# +//# Copyright (C) 2020-2022 QuasarApp. +//# Distributed under the GPLv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + +#include <QtTest> +#include "exampletest.h" + +// Use This macros for initialize your own test classes. +// Check exampletests +#define TestCase(name, testClass) \ + void name() { \ + initTest(new testClass()); \ + } + +/** + * @brief The tstMain class - this is main test class + */ +class tstMain : public QObject +{ + Q_OBJECT + + +public: + tstMain(); + + ~tstMain(); + +private slots: + + + // BEGIN TESTS CASES + TestCase(exampleTest, ExampleTest) + // END TEST CASES + +private: + + /** + * @brief initTest This method prepare @a test for run in the QApplication loop. + * @param test are input test case class. + */ + void initTest(Test* test); + + QCoreApplication *_app = nullptr; +}; + +/** + * @brief tstMain::tstMain + * init all availabel units for testsing + */ +tstMain::tstMain() { + + // init xample unit test + int argc =0; + char * argv[] = {nullptr}; + + _app = new QCoreApplication(argc, argv); + QCoreApplication::setApplicationName("testCQtDeployer"); + QCoreApplication::setOrganizationName("QuasarApp"); + + auto path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + + QDir(path).removeRecursively(); + +} + +tstMain::~tstMain() { + _app->exit(0); + delete _app; +} + +void tstMain::initTest(Test *test) { + QTimer::singleShot(0, this, [this, test]() { + test->test(); + delete test; + _app->exit(0); + }); + + _app->exec(); +} + +QTEST_APPLESS_MAIN(tstMain) + +#include "tstMain.moc" diff --git a/UnitTests/libcreator.cpp b/tests/units/libcreator.cpp similarity index 100% rename from UnitTests/libcreator.cpp rename to tests/units/libcreator.cpp diff --git a/UnitTests/libcreator.h b/tests/units/libcreator.h similarity index 100% rename from UnitTests/libcreator.h rename to tests/units/libcreator.h diff --git a/UnitTests/modules.cpp b/tests/units/modules.cpp similarity index 100% rename from UnitTests/modules.cpp rename to tests/units/modules.cpp diff --git a/UnitTests/modules.h b/tests/units/modules.h similarity index 100% rename from UnitTests/modules.h rename to tests/units/modules.h diff --git a/UnitTests/modulesqt513.cpp b/tests/units/modulesqt513.cpp similarity index 100% rename from UnitTests/modulesqt513.cpp rename to tests/units/modulesqt513.cpp diff --git a/UnitTests/modulesqt513.h b/tests/units/modulesqt513.h similarity index 100% rename from UnitTests/modulesqt513.h rename to tests/units/modulesqt513.h diff --git a/UnitTests/modulesqt514.cpp b/tests/units/modulesqt514.cpp similarity index 100% rename from UnitTests/modulesqt514.cpp rename to tests/units/modulesqt514.cpp diff --git a/UnitTests/modulesqt514.h b/tests/units/modulesqt514.h similarity index 100% rename from UnitTests/modulesqt514.h rename to tests/units/modulesqt514.h diff --git a/UnitTests/modulesqt515.cpp b/tests/units/modulesqt515.cpp similarity index 100% rename from UnitTests/modulesqt515.cpp rename to tests/units/modulesqt515.cpp diff --git a/UnitTests/modulesqt515.h b/tests/units/modulesqt515.h similarity index 100% rename from UnitTests/modulesqt515.h rename to tests/units/modulesqt515.h diff --git a/UnitTests/modulesqt5152.cpp b/tests/units/modulesqt5152.cpp similarity index 100% rename from UnitTests/modulesqt5152.cpp rename to tests/units/modulesqt5152.cpp diff --git a/UnitTests/modulesqt5152.h b/tests/units/modulesqt5152.h similarity index 100% rename from UnitTests/modulesqt5152.h rename to tests/units/modulesqt5152.h diff --git a/UnitTests/qmlcreator.cpp b/tests/units/qmlcreator.cpp similarity index 100% rename from UnitTests/qmlcreator.cpp rename to tests/units/qmlcreator.cpp diff --git a/UnitTests/qmlcreator.h b/tests/units/qmlcreator.h similarity index 100% rename from UnitTests/qmlcreator.h rename to tests/units/qmlcreator.h diff --git a/tests/units/test.cpp b/tests/units/test.cpp new file mode 100644 index 0000000..b5439b3 --- /dev/null +++ b/tests/units/test.cpp @@ -0,0 +1,9 @@ +//# +//# Copyright (C) 2020-2022 QuasarApp. +//# Distributed under the GPLv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + + +#include "test.h" diff --git a/tests/units/test.h b/tests/units/test.h new file mode 100644 index 0000000..d4ccf07 --- /dev/null +++ b/tests/units/test.h @@ -0,0 +1,20 @@ +//# +//# Copyright (C) 2020-2022 QuasarApp. +//# Distributed under the GPLv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + + +#ifndef TEST_H +#define TEST_H + +class Test +{ +public: + Test() = default; + virtual ~Test() = default; + virtual void test() = 0; +}; + +#endif // TEST_H diff --git a/UnitTests/testutils.cpp b/tests/units/testutils.cpp similarity index 100% rename from UnitTests/testutils.cpp rename to tests/units/testutils.cpp diff --git a/UnitTests/testutils.h b/tests/units/testutils.h similarity index 100% rename from UnitTests/testutils.h rename to tests/units/testutils.h diff --git a/UnitTests/tst_deploytest.cpp b/tests/units/tst_deploytest.cpp similarity index 100% rename from UnitTests/tst_deploytest.cpp rename to tests/units/tst_deploytest.cpp diff --git a/tests/virtualkeyboard/basic/Basic.qml b/tests/virtualkeyboard/basic/Basic.qml deleted file mode 100644 index 465b783..0000000 --- a/tests/virtualkeyboard/basic/Basic.qml +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.10 -import QtQuick.Controls 2.3 -import QtQuick.VirtualKeyboard 2.1 -import "content" - -Rectangle { - width: 1280 - height: 720 - color: "#F6F6F6" - - // Only set with CONFIG+=disable-desktop. - property bool handwritingInputPanelActive: false - - Flickable { - id: flickable - anchors.fill: parent - contentWidth: content.width - contentHeight: content.height - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick - - property real scrollMarginVertical: 20 - - ScrollBar.vertical: ScrollBar {} - - MouseArea { - id: content - width: flickable.width - height: textEditors.height + 24 - - onClicked: focus = true - - Column { - id: textEditors - spacing: 15 - x: 12 - y: 12 - width: parent.width - 26 - - Label { - color: "#565758" - text: "Tap fields to enter text" - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 22 - } - TextField { - width: parent.width - placeholderText: "One line field" - enterKeyAction: EnterKeyAction.Next - onAccepted: passwordField.focus = true - } - TextField { - id: passwordField - width: parent.width - echoMode: TextInput.Password - placeholderText: "Password field" - inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText - enterKeyAction: EnterKeyAction.Next - onAccepted: upperCaseField.focus = true - } - TextField { - id: upperCaseField - width: parent.width - placeholderText: "Upper case field" - inputMethodHints: Qt.ImhUppercaseOnly - enterKeyAction: EnterKeyAction.Next - onAccepted: lowerCaseField.focus = true - } - TextField { - id: lowerCaseField - width: parent.width - placeholderText: "Lower case field" - inputMethodHints: Qt.ImhLowercaseOnly - enterKeyAction: EnterKeyAction.Next - onAccepted: phoneNumberField.focus = true - } - TextField { - id: phoneNumberField - validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ } - width: parent.width - placeholderText: "Phone number field" - inputMethodHints: Qt.ImhDialableCharactersOnly - enterKeyAction: EnterKeyAction.Next - onAccepted: formattedNumberField.focus = true - } - TextField { - id: formattedNumberField - width: parent.width - placeholderText: "Formatted number field" - inputMethodHints: Qt.ImhFormattedNumbersOnly - enterKeyAction: EnterKeyAction.Next - onAccepted: digitsField.focus = true - } - TextField { - id: digitsField - width: parent.width - placeholderText: "Digits only field" - inputMethodHints: Qt.ImhDigitsOnly - enterKeyAction: EnterKeyAction.Next - onAccepted: textArea.focus = true - } - TextArea { - id: textArea - width: parent.width - placeholderText: "Multiple line field" - height: Math.max(206, implicitHeight) - } - } - } - } - - // Hide the text fields' cursors when fullscreen handwriting is active. - MouseArea { - anchors.fill: parent - visible: handwritingInputPanelActive - } -} diff --git a/tests/virtualkeyboard/basic/basic-b2qt.qml b/tests/virtualkeyboard/basic/basic-b2qt.qml deleted file mode 100644 index b189416..0000000 --- a/tests/virtualkeyboard/basic/basic-b2qt.qml +++ /dev/null @@ -1,174 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -// Deliberately imported after QtQuick to avoid missing restoreMode property in Binding. Fix in Qt 6. -import QtQml 2.14 -import QtQuick.Window 2.2 -import QtQuick.VirtualKeyboard 2.2 -import QtQuick.VirtualKeyboard.Settings 2.2 -import "content" - -Item { - width: 1280 - height: 720 - - Item { - id: appContainer - width: Screen.orientation === Qt.LandscapeOrientation ? parent.width : parent.height - height: Screen.orientation === Qt.LandscapeOrientation ? parent.height : parent.width - anchors.centerIn: parent - Basic { - id: virtualKeyboard - anchors.left: parent.left - anchors.top: parent.top - anchors.right: parent.right - anchors.bottom: parent.bottom - handwritingInputPanelActive: handwritingInputPanel.available && handwritingInputPanel.active - } - - /* Handwriting input panel for full screen handwriting input. - - This component is an optional add-on for the InputPanel component, that - is, its use does not affect the operation of the InputPanel component, - but it also can not be used as a standalone component. - - The handwriting input panel is positioned to cover the entire area of - application. The panel itself is transparent, but once it is active the - user can draw handwriting on it. - */ - HandwritingInputPanel { - z: 79 - id: handwritingInputPanel - anchors.fill: parent - inputPanel: inputPanel - Rectangle { - z: -1 - anchors.fill: parent - color: "black" - opacity: 0.10 - } - } - - /* Container area for the handwriting mode button. - - Handwriting mode button can be moved freely within the container area. - In this example, a single click changes the handwriting mode and a - double-click changes the availability of the full screen handwriting input. - */ - Item { - z: 99 - visible: handwritingInputPanel.enabled && Qt.inputMethod.visible - anchors { left: parent.left; top: parent.top; right: parent.right; bottom: inputPanel.top; } - HandwritingModeButton { - id: handwritingModeButton - anchors.top: parent.top - anchors.right: parent.right - anchors.margins: 10 - floating: true - flipable: true - width: 76 - height: width - state: handwritingInputPanel.state - onClicked: handwritingInputPanel.active = !handwritingInputPanel.active - onDoubleClicked: handwritingInputPanel.available = !handwritingInputPanel.available - } - } - - /* Keyboard input panel. - - The keyboard is anchored to the bottom of the application. - */ - InputPanel { - id: inputPanel - z: 89 - y: yPositionWhenHidden - x: Screen.orientation === Qt.LandscapeOrientation ? 0 : (parent.width-parent.height) / 2 - width: Screen.orientation === Qt.LandscapeOrientation ? parent.width : parent.height - - keyboard.shadowInputControl.height: (Screen.orientation === Qt.LandscapeOrientation ? parent.height : parent.width) - keyboard.height - - property real yPositionWhenHidden: Screen.orientation === Qt.LandscapeOrientation ? parent.height : parent.width + (parent.height-parent.width) / 2 - - states: State { - name: "visible" - /* The visibility of the InputPanel can be bound to the Qt.inputMethod.visible property, - but then the handwriting input panel and the keyboard input panel can be visible - at the same time. Here the visibility is bound to InputPanel.active property instead, - which allows the handwriting panel to control the visibility when necessary. - */ - when: inputPanel.active - PropertyChanges { - target: inputPanel - y: inputPanel.yPositionWhenHidden - inputPanel.height - } - } - transitions: Transition { - id: inputPanelTransition - from: "" - to: "visible" - reversible: true - enabled: !VirtualKeyboardSettings.fullScreenMode - ParallelAnimation { - NumberAnimation { - properties: "y" - duration: 250 - easing.type: Easing.InOutQuad - } - } - } - Binding { - target: InputContext - property: "animating" - value: inputPanelTransition.running - restoreMode: Binding.RestoreBinding - - } - AutoScroller {} - } - - Binding { - target: VirtualKeyboardSettings - property: "fullScreenMode" - value: appContainer.height > 0 && (appContainer.width / appContainer.height) > (16.0 / 9.0) - restoreMode: Binding.RestoreBinding - } - - } - - property bool inLandscapeOrientation: Screen.orientation === Qt.LandscapeOrientation - - Screen.orientationUpdateMask: Qt.LandscapeOrientation | Qt.PortraitOrientation - - Binding { - target: appContainer.Window.window !== null ? appContainer.Window.window.contentItem : null - property: "rotation" - value: inLandscapeOrientation ? 0 : 90 - } -} diff --git a/tests/virtualkeyboard/basic/basic.pro b/tests/virtualkeyboard/basic/basic.pro deleted file mode 100644 index 5a2e920..0000000 --- a/tests/virtualkeyboard/basic/basic.pro +++ /dev/null @@ -1,35 +0,0 @@ -TEMPLATE = app -TARGET = basic -QT += qml quick -SOURCES += main.cpp -CONFIG += link_pkgconfig -static { - QT += svg - QTPLUGIN += qtvirtualkeyboardplugin -} - -target.path = $$[QT_INSTALL_EXAMPLES]/virtualkeyboard/basic -INSTALLS += target - -RESOURCES += \ - demo.qrc - -OTHER_FILES += \ - Basic.qml \ - basic-b2qt.qml \ - content/AutoScroller.qml \ - content/HandwritingModeButton.qml \ - content/TextArea.qml \ - content/TextField.qml \ - -disable-xcb { - message("The disable-xcb option has been deprecated. Please use disable-desktop instead.") - CONFIG += disable-desktop -} - -disable-desktop|android-embedded|!isEmpty(CROSS_COMPILE)|qnx { - DEFINES += MAIN_QML=\\\"basic-b2qt.qml\\\" -} else { - DEFINES += MAIN_QML=\\\"Basic.qml\\\" -} -DESTDIR="$$PWD/../../build" diff --git a/tests/virtualkeyboard/basic/content/AutoScroller.qml b/tests/virtualkeyboard/basic/content/AutoScroller.qml deleted file mode 100644 index 9e837ba..0000000 --- a/tests/virtualkeyboard/basic/content/AutoScroller.qml +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.VirtualKeyboard 2.1 - -Item { - - property var innerFlickable - property var outerFlickable - property var inputItem: InputContext.priv.inputItem - - onInputItemChanged: { - innerFlickable = null - outerFlickable = null - if (inputItem !== null) { - var parent_ = inputItem.parent - while (parent_) { - if (parent_.maximumFlickVelocity) { - if (innerFlickable) { - outerFlickable = parent_ - break - } else { - innerFlickable = parent_ - } - } - parent_ = parent_.parent - } - delayedLoading.restart() - } - } - - function ensureVisible(flickable) { - if (Qt.inputMethod.visible && inputItem && flickable && flickable.visible && flickable.interactive) { - - var verticallyFlickable = (flickable.flickableDirection === Flickable.HorizontalAndVerticalFlick || flickable.flickableDirection === Flickable.VerticalFlick - || (flickable.flickableDirection === Flickable.AutoFlickDirection && flickable.contentHeight > flickable.height)) - var horizontallyFlickable = (flickable.flickableDirection === Flickable.HorizontalAndVerticalFlick || flickable.flickableDirection === Flickable.HorizontalFlick - || (flickable.flickableDirection === Flickable.AutoFlickDirection && flickable.contentWidth > flickable.width)) - - if ((!verticallyFlickable && !horizontallyFlickable) || !inputItem.hasOwnProperty("cursorRectangle")) - return - - var cursorRectangle = flickable.contentItem.mapFromItem(inputItem, inputItem.cursorRectangle.x, inputItem.cursorRectangle.y) - - var oldContentY = flickable.contentY - if (verticallyFlickable) { - var scrollMarginVertical = (flickable && flickable.scrollMarginVertical) ? flickable.scrollMarginVertical : 10 - if (flickable.contentY >= cursorRectangle.y - scrollMarginVertical) - flickable.contentY = Math.max(0, cursorRectangle.y - scrollMarginVertical) - else if (flickable.contentY + flickable.height <= cursorRectangle.y + inputItem.cursorRectangle.height + scrollMarginVertical) - flickable.contentY = Math.min(flickable.contentHeight - flickable.height, cursorRectangle.y + inputItem.cursorRectangle.height - flickable.height + scrollMarginVertical) - } - if (horizontallyFlickable) { - var scrollMarginHorizontal = (flickable && flickable.scrollMarginHorizontal) ? flickable.scrollMarginHorizontal : 10 - if (flickable.contentX >= cursorRectangle.x - scrollMarginHorizontal) - flickable.contentX = Math.max(0, cursorRectangle.x - scrollMarginHorizontal) - else if (flickable.contentX + flickable.width <= cursorRectangle.x + inputItem.cursorRectangle.width + scrollMarginHorizontal) - flickable.contentX = Math.min(flickable.contentWidth - flickable.width, cursorRectangle.x + inputItem.cursorRectangle.width - flickable.width + scrollMarginHorizontal) - } - } - } - Timer { - id: delayedLoading - interval: 10 - onTriggered: { - ensureVisible(innerFlickable) - ensureVisible(outerFlickable) - } - } - Connections { - ignoreUnknownSignals: true - target: Qt.inputMethod - function onAnimatingChanged() { if (inputItem && !Qt.inputMethod.animating) delayedLoading.restart() } - function onKeyboardRectangleChanged() { if (inputItem) delayedLoading.restart() } - function onCursorRectangleChanged() { if (inputItem && inputItem.activeFocus) delayedLoading.restart() } - } -} diff --git a/tests/virtualkeyboard/basic/content/FloatingButton_Active.svg b/tests/virtualkeyboard/basic/content/FloatingButton_Active.svg deleted file mode 100644 index c9c234e..0000000 --- a/tests/virtualkeyboard/basic/content/FloatingButton_Active.svg +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="390px" height="390px" viewBox="0 0 390 390" style="enable-background:new 0 0 390 390;" xml:space="preserve"> -<style type="text/css"> - .st0{opacity:0.3;enable-background:new ;} - .st1{opacity:0.5;} - .st2{fill:#FFFFFF;} - .st3{fill:#5CAA15;} - .st4{fill:none;} -</style> -<g id="Active"> - <g> - <circle class="st0" cx="195" cy="195" r="191"/> - <g class="st1"> - <path class="st2" d="M195,4c105.5,0,191,85.5,191,191s-85.5,191-191,191S4,300.5,4,195S89.5,4,195,4 M195,0 - c-26.3,0-51.9,5.2-75.9,15.3c-23.2,9.8-44.1,23.9-62,41.8s-32,38.8-41.8,62C5.2,143.1,0,168.7,0,195s5.2,51.9,15.3,75.9 - c9.8,23.2,23.9,44.1,41.8,62s38.8,32,62,41.8c24,10.2,49.6,15.3,75.9,15.3s51.9-5.2,75.9-15.3c23.2-9.8,44.1-23.9,62-41.8 - s32-38.8,41.8-62c10.2-24,15.3-49.6,15.3-75.9s-5.2-51.9-15.3-75.9c-9.8-23.2-23.9-44.1-41.8-62s-38.8-32-62-41.8 - C246.9,5.2,221.3,0,195,0L195,0z"/> - </g> - </g> - <circle class="st3" cx="195" cy="195" r="141"/> -</g> -<g id="icon"> - <g> - <g> - <path class="st2" d="M155.6,247.3c-10.1,0-18.9-5-23.1-13.6c-10.1-21,5.4-37.4,21.7-54.7c1.2-1.2,2.4-2.5,3.6-3.8 - c5.3-5.7,5.2-11.5,3.5-14.8c-1.8-3.4-5.5-4.9-10.2-4.2c-16.5,2.6-21.2,26.4-21.2,26.6l-11.9-2.2c0.3-1.3,6.4-32.3,31.2-36.3 - c9.8-1.6,18.5,2.4,22.7,10.4c4.7,8.9,2.6,20.1-5.3,28.6c-1.2,1.3-2.4,2.6-3.6,3.8c-16.7,17.8-25.9,28.5-19.6,41.4 - c3.3,6.8,11.1,7.6,16.9,6.3c9.2-2.1,19.8-11.1,19.7-29.5c-0.2-28.1,16.2-41.8,30.2-44.9c14.5-3.2,28.4,3.6,34.7,17 - c1.3,2.8,2.3,5.4,3.1,8.1c13.3,0.7,25.5,4.3,26,4.4l-3.4,11.5c-0.1,0-9.7-2.8-20.6-3.8c0.5,16.5-8.6,28.9-20.1,34.7 - c-11.9,6-24,3.8-28.9-5.2c-3.1-5.6-1.9-14.7,2.9-22.5c7.9-13,21.3-17.4,31.5-18.8c-0.4-1.2-0.9-2.4-1.4-3.4 - c-3.9-8.3-12.2-12.4-21.1-10.4c-9.7,2.2-21,12.1-20.8,33.1c0.2,25.5-15.6,38.1-29,41.3C160.5,247,158,247.3,155.6,247.3z - M237.8,197.7c-14,1.5-20.6,8.5-23.4,12.9c-3.3,5.2-3.4,9.8-2.9,10.9c1.6,2.9,7.3,3,13,0.2C235.3,216.2,238.3,206.6,237.8,197.7z - "/> - </g> - <rect x="118" y="144" class="st4" width="156" height="104"/> - </g> -</g> -</svg> diff --git a/tests/virtualkeyboard/basic/content/FloatingButton_Available.svg b/tests/virtualkeyboard/basic/content/FloatingButton_Available.svg deleted file mode 100644 index d5edc3c..0000000 --- a/tests/virtualkeyboard/basic/content/FloatingButton_Available.svg +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="390px" height="390px" viewBox="0 0 390 390" style="enable-background:new 0 0 390 390;" xml:space="preserve"> -<style type="text/css"> - .st0{opacity:0.3;enable-background:new ;} - .st1{opacity:0.5;} - .st2{fill:#FFFFFF;} - .st3{fill:#26282A;} - .st4{fill:none;} -</style> -<g id="Available"> - <g> - <circle class="st0" cx="195" cy="195" r="191"/> - <g class="st1"> - <path class="st2" d="M195,4c105.5,0,191,85.5,191,191s-85.5,191-191,191S4,300.5,4,195S89.5,4,195,4 M195,0 - c-26.3,0-51.9,5.2-75.9,15.3c-23.2,9.8-44.1,23.9-62,41.8s-32,38.8-41.8,62C5.2,143.1,0,168.7,0,195s5.2,51.9,15.3,75.9 - c9.8,23.2,23.9,44.1,41.8,62s38.8,32,62,41.8c24,10.2,49.6,15.3,75.9,15.3s51.9-5.2,75.9-15.3c23.2-9.8,44.1-23.9,62-41.8 - s32-38.8,41.8-62c10.2-24,15.3-49.6,15.3-75.9s-5.2-51.9-15.3-75.9c-9.8-23.2-23.9-44.1-41.8-62s-38.8-32-62-41.8 - C246.9,5.2,221.3,0,195,0L195,0z"/> - </g> - </g> - <circle class="st3" cx="195" cy="195" r="141"/> -</g> -<g id="icon"> - <g> - <g> - <path class="st2" d="M155.6,247.3c-10.1,0-18.9-5-23.1-13.6c-10.1-21,5.4-37.4,21.7-54.7c1.2-1.2,2.4-2.5,3.6-3.8 - c5.3-5.7,5.2-11.5,3.5-14.8c-1.8-3.4-5.5-4.9-10.2-4.2c-16.5,2.6-21.2,26.4-21.2,26.6l-11.9-2.2c0.3-1.3,6.4-32.3,31.2-36.3 - c9.8-1.6,18.5,2.4,22.7,10.4c4.7,8.9,2.6,20.1-5.3,28.6c-1.2,1.3-2.4,2.6-3.6,3.8c-16.7,17.8-25.9,28.5-19.6,41.4 - c3.3,6.8,11.1,7.6,16.9,6.3c9.2-2.1,19.8-11.1,19.7-29.5c-0.2-28.1,16.2-41.8,30.2-44.9c14.5-3.2,28.4,3.6,34.7,17 - c1.3,2.8,2.3,5.4,3.1,8.1c13.3,0.7,25.5,4.3,26,4.4l-3.4,11.5c-0.1,0-9.7-2.8-20.6-3.8c0.5,16.5-8.6,28.9-20.1,34.7 - c-11.9,6-24,3.8-28.9-5.2c-3.1-5.6-1.9-14.7,2.9-22.5c7.9-13,21.3-17.4,31.5-18.8c-0.4-1.2-0.9-2.4-1.4-3.4 - c-3.9-8.3-12.2-12.4-21.1-10.4c-9.7,2.2-21,12.1-20.8,33.1c0.2,25.5-15.6,38.1-29,41.3C160.5,247,158,247.3,155.6,247.3z - M237.8,197.7c-14,1.5-20.6,8.5-23.4,12.9c-3.3,5.2-3.4,9.8-2.9,10.9c1.6,2.9,7.3,3,13,0.2C235.3,216.2,238.3,206.6,237.8,197.7z - "/> - </g> - <rect x="118" y="144" class="st4" width="156" height="104"/> - </g> -</g> -</svg> diff --git a/tests/virtualkeyboard/basic/content/FloatingButton_Unavailable.svg b/tests/virtualkeyboard/basic/content/FloatingButton_Unavailable.svg deleted file mode 100644 index 4ce6b3a..0000000 --- a/tests/virtualkeyboard/basic/content/FloatingButton_Unavailable.svg +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="390px" height="390px" viewBox="0 0 390 390" style="enable-background:new 0 0 390 390;" xml:space="preserve"> -<style type="text/css"> - .st0{opacity:0.3;enable-background:new ;} - .st1{opacity:0.5;} - .st2{fill:#FFFFFF;} - .st3{fill:none;} -</style> -<g id="Unavailable"> - <g> - <circle class="st0" cx="195" cy="195" r="191"/> - <g class="st1"> - <path class="st2" d="M195,4c105.5,0,191,85.5,191,191s-85.5,191-191,191S4,300.5,4,195S89.5,4,195,4 M195,0 - c-26.3,0-51.9,5.2-75.9,15.3c-23.2,9.8-44.1,23.9-62,41.8s-32,38.8-41.8,62C5.2,143.1,0,168.7,0,195s5.2,51.9,15.3,75.9 - c9.8,23.2,23.9,44.1,41.8,62s38.8,32,62,41.8c24,10.2,49.6,15.3,75.9,15.3s51.9-5.2,75.9-15.3c23.2-9.8,44.1-23.9,62-41.8 - s32-38.8,41.8-62c10.2-24,15.3-49.6,15.3-75.9s-5.2-51.9-15.3-75.9c-9.8-23.2-23.9-44.1-41.8-62s-38.8-32-62-41.8 - C246.9,5.2,221.3,0,195,0L195,0z"/> - </g> - </g> -</g> -<g id="icon"> - <g> - <g> - <path class="st2" d="M155.6,247.3c-10.1,0-18.9-5-23.1-13.6c-10.1-21,5.4-37.4,21.7-54.7c1.2-1.2,2.4-2.5,3.6-3.8 - c5.3-5.7,5.2-11.5,3.5-14.8c-1.8-3.4-5.5-4.9-10.2-4.2c-16.5,2.6-21.2,26.4-21.2,26.6l-11.9-2.2c0.3-1.3,6.4-32.3,31.2-36.3 - c9.8-1.6,18.5,2.4,22.7,10.4c4.7,8.9,2.6,20.1-5.3,28.6c-1.2,1.3-2.4,2.6-3.6,3.8c-16.7,17.8-25.9,28.5-19.6,41.4 - c3.3,6.8,11.1,7.6,16.9,6.3c9.2-2.1,19.8-11.1,19.7-29.5c-0.2-28.1,16.2-41.8,30.2-44.9c14.5-3.2,28.4,3.6,34.7,17 - c1.3,2.8,2.3,5.4,3.1,8.1c13.3,0.7,25.5,4.3,26,4.4l-3.4,11.5c-0.1,0-9.7-2.8-20.6-3.8c0.5,16.5-8.6,28.9-20.1,34.7 - c-11.9,6-24,3.8-28.9-5.2c-3.1-5.6-1.9-14.7,2.9-22.5c7.9-13,21.3-17.4,31.5-18.8c-0.4-1.2-0.9-2.4-1.4-3.4 - c-3.9-8.3-12.2-12.4-21.1-10.4c-9.7,2.2-21,12.1-20.8,33.1c0.2,25.5-15.6,38.1-29,41.3C160.5,247,158,247.3,155.6,247.3z - M237.8,197.7c-14,1.5-20.6,8.5-23.4,12.9c-3.3,5.2-3.4,9.8-2.9,10.9c1.6,2.9,7.3,3,13,0.2C235.3,216.2,238.3,206.6,237.8,197.7z - "/> - </g> - <rect x="118" y="144" class="st3" width="156" height="104"/> - </g> -</g> -</svg> diff --git a/tests/virtualkeyboard/basic/content/HandwritingModeButton.qml b/tests/virtualkeyboard/basic/content/HandwritingModeButton.qml deleted file mode 100644 index d2a543b..0000000 --- a/tests/virtualkeyboard/basic/content/HandwritingModeButton.qml +++ /dev/null @@ -1,165 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: handwritingModeButton - state: "unavailable" - property bool floating - property bool flipable - readonly property real __minWidthHeight: Math.min(width, height) - - signal clicked() - signal doubleClicked() - - Flipable { - id: flipableImage - anchors.fill: parent - - property bool flipped - - front: Image { - sourceSize.width: handwritingModeButton.__minWidthHeight - sourceSize.height: handwritingModeButton.__minWidthHeight - smooth: false - source: "qrc:/content/FloatingButton_Unavailable.svg" - } - - back: Image { - id: buttonImage - sourceSize.width: handwritingModeButton.__minWidthHeight - sourceSize.height: handwritingModeButton.__minWidthHeight - smooth: false - source: "qrc:/content/FloatingButton_Available.svg" - } - - states: State { - PropertyChanges { target: rotation; angle: 180 } - when: flipableImage.flipped - } - - transform: Rotation { - id: rotation - origin.x: flipableImage.width / 2 - origin.y: flipableImage.height / 2 - axis { x: 0; y: 1; z: 0 } - angle: 0 - } - - transitions: Transition { - enabled: handwritingModeButton.flipable - NumberAnimation { target: rotation; property: "angle"; duration: 400 } - } - } - - states: [ - State { - name: "available" - PropertyChanges { target: flipableImage; flipped: true } - }, - State { - name: "active" - PropertyChanges { target: flipableImage; flipped: true } - PropertyChanges { target: buttonImage; source: "qrc:/content/FloatingButton_Active.svg" } - } - ] - - function snapHorizontal() { - if (!floating) - return - if (mouseArea.drag.maximumX > mouseArea.drag.minimumX) { - if (x + 20 >= mouseArea.drag.maximumX) { - anchors.left = undefined - anchors.right = parent.right - } else if (x - 20 <= mouseArea.drag.minimumX) { - anchors.right = undefined - anchors.left = parent.left - } - } - } - - function snapVertical() { - if (!floating) - return - if (mouseArea.drag.maximumY > mouseArea.drag.minimumY) { - if (y + 20 >= mouseArea.drag.maximumY) { - anchors.top = undefined - anchors.bottom = parent.bottom - } else if (y - 20 <= mouseArea.drag.minimumY) { - anchors.bottom = undefined - anchors.top = parent.top - } - } - } - - MouseArea { - id: mouseArea - anchors.fill: parent - drag { - target: handwritingModeButton.floating ? handwritingModeButton : undefined - axis: Drag.XAxis | Drag.YAxis - minimumX: 0 - maximumX: handwritingModeButton.parent.width - handwritingModeButton.width - onMaximumXChanged: !mouseArea.drag.active && handwritingModeButton.snapHorizontal() - minimumY: 0 - maximumY: handwritingModeButton.parent.height - handwritingModeButton.height - onMaximumYChanged: !mouseArea.drag.active && handwritingModeButton.snapVertical() - } - onPressed: { - if (!handwritingModeButton.floating) - return - handwritingModeButton.anchors.left = undefined - handwritingModeButton.anchors.top = undefined - handwritingModeButton.anchors.right = undefined - handwritingModeButton.anchors.bottom = undefined - } - onReleased: { - handwritingModeButton.snapHorizontal() - handwritingModeButton.snapVertical() - } - onClicked: { - handwritingModeButton.snapHorizontal() - handwritingModeButton.snapVertical() - clickTimer.restart() - } - onDoubleClicked: { - clickTimer.stop() - handwritingModeButton.snapHorizontal() - handwritingModeButton.snapVertical() - handwritingModeButton.doubleClicked() - } - Timer { - id: clickTimer - interval: Qt.styleHints ? Qt.styleHints.mouseDoubleClickInterval / 3 : 0 - repeat: false - onTriggered: handwritingModeButton.clicked() - } - } -} diff --git a/tests/virtualkeyboard/basic/content/TextArea.qml b/tests/virtualkeyboard/basic/content/TextArea.qml deleted file mode 100644 index 9fed65a..0000000 --- a/tests/virtualkeyboard/basic/content/TextArea.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.10 -import QtQuick.Controls 2.3 as Controls -import QtQuick.VirtualKeyboard 2.3 - -Controls.TextArea { - id: control - color: "#2B2C2E" - selectionColor: Qt.rgba(0.0, 0.0, 0.0, 0.15) - selectedTextColor: color - selectByMouse: true - font.pixelSize: Qt.application.font.pixelSize * 2 - - property int enterKeyAction: EnterKeyAction.None - readonly property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || text.length > 0 || inputMethodComposing - - EnterKeyAction.actionId: control.enterKeyAction - EnterKeyAction.enabled: control.enterKeyEnabled - - background: Rectangle { - color: "#FFFFFF" - border.width: 1 - border.color: control.activeFocus ? "#5CAA15" : "#BDBEBF" - } -} diff --git a/tests/virtualkeyboard/basic/content/TextField.qml b/tests/virtualkeyboard/basic/content/TextField.qml deleted file mode 100644 index 960afca..0000000 --- a/tests/virtualkeyboard/basic/content/TextField.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.10 -import QtQuick.Controls 2.3 as Controls -import QtQuick.VirtualKeyboard 2.3 - -Controls.TextField { - id: control - color: "#2B2C2E" - selectionColor: Qt.rgba(0.0, 0.0, 0.0, 0.15) - selectedTextColor: color - selectByMouse: true - font.pixelSize: Qt.application.font.pixelSize * 2 - - property int enterKeyAction: EnterKeyAction.None - readonly property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || acceptableInput || inputMethodComposing - - EnterKeyAction.actionId: control.enterKeyAction - EnterKeyAction.enabled: control.enterKeyEnabled - - background: Rectangle { - color: "#FFFFFF" - border.width: 1 - border.color: control.activeFocus ? "#5CAA15" : "#BDBEBF" - } -} diff --git a/tests/virtualkeyboard/basic/demo.qrc b/tests/virtualkeyboard/basic/demo.qrc deleted file mode 100644 index 8b71cb3..0000000 --- a/tests/virtualkeyboard/basic/demo.qrc +++ /dev/null @@ -1,13 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>content/AutoScroller.qml</file> - <file>content/TextArea.qml</file> - <file>content/TextField.qml</file> - <file>content/HandwritingModeButton.qml</file> - <file>content/FloatingButton_Active.svg</file> - <file>content/FloatingButton_Available.svg</file> - <file>content/FloatingButton_Unavailable.svg</file> - <file>Basic.qml</file> - <file>basic-b2qt.qml</file> - </qresource> -</RCC> diff --git a/tests/virtualkeyboard/basic/main.cpp b/tests/virtualkeyboard/basic/main.cpp deleted file mode 100644 index 34802fd..0000000 --- a/tests/virtualkeyboard/basic/main.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QQuickView> -#include <QGuiApplication> -#include <QQmlEngine> - -int main(int argc, char *argv[]) -{ - qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); - - QGuiApplication app(argc, argv); - QQuickView view(QString("qrc:/%2").arg(MAIN_QML)); - if (view.status() == QQuickView::Error) - return -1; - view.setResizeMode(QQuickView::SizeRootObjectToView); - - view.show(); - - return app.exec(); -} diff --git a/tests/virtualkeyboard/virtualkeyboard.pro b/tests/virtualkeyboard/virtualkeyboard.pro deleted file mode 100644 index 6c0f2ea..0000000 --- a/tests/virtualkeyboard/virtualkeyboard.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -qtHaveModule(quickcontrols2): SUBDIRS += basic diff --git a/tests/webui/about.html b/tests/webui/about.html deleted file mode 100644 index 475b566..0000000 --- a/tests/webui/about.html +++ /dev/null @@ -1,129 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Qt WebEngine WebUI Example</title> - <style> - html { - background: #f0f0f0; - color: #303030; - font: 16px system-ui; - height: 100%; - } - - body { - margin: 0; - padding: 0; - height: 100%; - display: flex; - flex-direction: column; - align-items: stretch; - } - - body > * { - padding-left: 20px; - padding-right: 20px; - } - - header { - flex: none; - display: flex; - align-items: center; - background: #f0fff0; - border-bottom: 1px solid #e0e0e0; - padding-top: 20px; - padding-bottom: 20px; - } - - header > h1 { - font: bold 20px system-ui; - margin-left: 18px; - } - - main { - flex: auto; - } - - footer { - flex: none; - display: flex; - justify-content: center; - padding-bottom: 20px; - } - - button { - background: #41cd52; - color: #f0f0f0; - font: 16px system-ui; - border: 0; - box-shadow: 0px 1px 3px rgb(0,0,0,0.5); - cursor: pointer; - margin: 0 0 1px; - padding: 10px 24px; - } - - button:hover { - background: #50dc61; - } - - button:active { - background: #50dc61; - box-shadow: 0px 1px 2px rgb(0,0,0,0.5); - margin: 1px 0 0; - } - - button:focus { - outline: 0; - } - - </style> - </head> - <body> - <header> - <img width="48px" height="48px" - src="qrc:/qt-project.org/qmessagebox/images/qtlogo-64.png"> - <h1>WebEngine Widgets<br>WebUI Example</h1> - </header> - <main> - <p> - Aside from the built-in schemes, such as <code>http</code> and - <code>qrc</code>, Qt WebEngine may be extended with <em>custom - schemes</em> by creating <em>custom scheme handlers</em>. - </p> - - <p> - This is a simple HTML page loaded from a custom scheme and - displayed by a <code>QWebEngineView</code>. Even the Quit button - below is a standard HTML <code><button></code> element. - </p> - - <p> - Read the documentation to find out - </p> - <ul> - <li> - <p> - How to create a custom scheme handler which serves HTML - and handles HTML form submissions. - </p> - </li> - <li> - <p> - How to prevent ordinary web content from accessing the - custom scheme. - </p> - </li> - <li> - <p> - How to prevent any other scheme from submitting HTML - form data. - </p> - </li> - </ul> - </main> - <footer> - <form action="" method="post"> - <button name="quit">Quit</button> - </form> - </footer> - </body> -</html> diff --git a/tests/webui/doc/images/webui-example.png b/tests/webui/doc/images/webui-example.png deleted file mode 100644 index 84e2c7f..0000000 Binary files a/tests/webui/doc/images/webui-example.png and /dev/null differ diff --git a/tests/webui/main.cpp b/tests/webui/main.cpp deleted file mode 100644 index bc5a851..0000000 --- a/tests/webui/main.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "webuihandler.h" - -#include <QApplication> -#include <QWebEnginePage> -#include <QWebEngineProfile> -#include <QWebEngineView> - -int main(int argc, char *argv[]) -{ - QCoreApplication::setOrganizationName("QtExamples"); - QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - WebUiHandler::registerUrlScheme(); - - QApplication app(argc, argv); - - QWebEngineProfile profile; - - WebUiHandler handler; - profile.installUrlSchemeHandler(WebUiHandler::schemeName, &handler); - - QWebEnginePage page(&profile); - page.load(WebUiHandler::aboutUrl); - - QWebEngineView view; - view.setPage(&page); - view.setContextMenuPolicy(Qt::NoContextMenu); - view.resize(500, 600); - view.show(); - - return app.exec(); -} diff --git a/tests/webui/webui.pro b/tests/webui/webui.pro deleted file mode 100644 index 1186aec..0000000 --- a/tests/webui/webui.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -QT += webenginewidgets - -HEADERS += \ - webuihandler.h - -SOURCES += \ - main.cpp \ - webuihandler.cpp - -RESOURCES += \ - webui.qrc - -DESTDIR="$$PWD/../build" diff --git a/tests/webui/webui.qrc b/tests/webui/webui.qrc deleted file mode 100644 index fecdc94..0000000 --- a/tests/webui/webui.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>about.html</file> - </qresource> -</RCC> diff --git a/tests/webui/webuihandler.cpp b/tests/webui/webuihandler.cpp deleted file mode 100644 index 139bfd1..0000000 --- a/tests/webui/webuihandler.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "webuihandler.h" - -#include <QApplication> -#include <QFile> -#include <QWebEngineUrlRequestJob> -#include <QWebEngineUrlScheme> - -#define SCHEMENAME "webui" - -const QByteArray WebUiHandler::schemeName = QByteArrayLiteral(SCHEMENAME); -const QUrl WebUiHandler::aboutUrl = QUrl(QStringLiteral(SCHEMENAME ":about")); - -WebUiHandler::WebUiHandler(QObject *parent) - : QWebEngineUrlSchemeHandler(parent) -{ -} - -void WebUiHandler::requestStarted(QWebEngineUrlRequestJob *job) -{ - static const QUrl webUiOrigin(QStringLiteral(SCHEMENAME ":")); - static const QByteArray GET(QByteArrayLiteral("GET")); - static const QByteArray POST(QByteArrayLiteral("POST")); - - QByteArray method = job->requestMethod(); - QUrl url = job->requestUrl(); - QUrl initiator = job->initiator(); - - if (method == GET && url == aboutUrl) { - QFile *file = new QFile(QStringLiteral(":/about.html"), job); - file->open(QIODevice::ReadOnly); - job->reply(QByteArrayLiteral("text/html"), file); - } else if (method == POST && url == aboutUrl && initiator == webUiOrigin) { - job->fail(QWebEngineUrlRequestJob::RequestAborted); - QApplication::exit(); - } else { - job->fail(QWebEngineUrlRequestJob::UrlNotFound); - } -} - -// static -void WebUiHandler::registerUrlScheme() -{ - QWebEngineUrlScheme webUiScheme(schemeName); - webUiScheme.setFlags(QWebEngineUrlScheme::SecureScheme | - QWebEngineUrlScheme::LocalScheme | - QWebEngineUrlScheme::LocalAccessAllowed); - QWebEngineUrlScheme::registerScheme(webUiScheme); -} diff --git a/tests/webui/webuihandler.h b/tests/webui/webuihandler.h deleted file mode 100644 index 045ffef..0000000 --- a/tests/webui/webuihandler.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef WEBUIHANDLER_H -#define WEBUIHANDLER_H - -#include <QWebEngineUrlSchemeHandler> - -class WebUiHandler : public QWebEngineUrlSchemeHandler -{ - Q_OBJECT -public: - explicit WebUiHandler(QObject *parent = nullptr); - - void requestStarted(QWebEngineUrlRequestJob *job) override; - - static void registerUrlScheme(); - - const static QByteArray schemeName; - const static QUrl aboutUrl; -}; - -#endif // !WEBUIHANDLER_H