diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-06-02 15:39:55 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2023-06-29 08:46:59 +0000 |
commit | 97769dfdacd006f4d82b240371e3ca79d445ab7a (patch) | |
tree | 720a63db1fda4134ffe2185ac427313e8b8d0b13 /share | |
parent | e0f831bd8a9016b4b8a536e5eb08dda262173e93 (diff) |
Update dmgbuild
And remove unneeded package.
The dmg test is disabled for now as it is flaky.
Change-Id: Ia9eefa977a5148a9b5aa2e6a39087a7c55618d49
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/CMakeLists.txt | 15 | ||||
-rw-r--r-- | share/qbs/modules/dmg/DMGModule.qbs | 7 | ||||
-rw-r--r-- | share/qbs/modules/dmg/dmg.js | 8 | ||||
-rw-r--r-- | share/share.qbs | 9 |
4 files changed, 12 insertions, 27 deletions
diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index 976111f71..fbdcc991d 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -8,20 +8,6 @@ endif() # below we copy some files that are required to run qbs from the build directory # emulating the same layout we will have after the installation -# copy & install dmgbuild -install( - PROGRAMS ../src/3rdparty/python/bin/dmgbuild - DESTINATION "${QBS_LIBEXEC_INSTALL_DIR}" - ) -set(_DMGBUILD_INSTALL_PATH ${CMAKE_BINARY_DIR}/${QBS_OUTPUT_PREFIX}${QBS_LIBEXEC_INSTALL_DIR}/dmgbuild) -add_custom_command( - OUTPUT ${_DMGBUILD_INSTALL_PATH} - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../src/3rdparty/python/bin/dmgbuild - ${CMAKE_BINARY_DIR}/${QBS_OUTPUT_PREFIX}${QBS_LIBEXEC_INSTALL_DIR} - COMMENT "Copying dmgbuild script" - ) - # copy & install python packages set(_SITE_PACKAGES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src/3rdparty/python/lib/python2.7/site-packages/) file(GLOB_RECURSE _SITE_PACKAGES_RELATIVE RELATIVE "${_SITE_PACKAGES_DIR}" "${_SITE_PACKAGES_DIR}/*.py") @@ -102,7 +88,6 @@ add_custom_command( add_custom_target( BuildQbsResources ALL DEPENDS - "${_DMGBUILD_INSTALL_PATH}" ${_SITE_PACKAGES_DST} ${_QBS_RESOURCES_DST} "${_QMLTYPES_INSTALL_PATH}" diff --git a/share/qbs/modules/dmg/DMGModule.qbs b/share/qbs/modules/dmg/DMGModule.qbs index 59161b1db..27a945033 100644 --- a/share/qbs/modules/dmg/DMGModule.qbs +++ b/share/qbs/modules/dmg/DMGModule.qbs @@ -34,6 +34,7 @@ import qbs.FileInfo import qbs.Host import qbs.ModUtils import qbs.Process +import qbs.Probes import qbs.TextFile import "dmg.js" as Dmg @@ -73,6 +74,12 @@ Module { property string sourceBase + Probes.BinaryProbe { + id: pythonProbe + names: ["python3"] + } + property string pythonExePath: pythonProbe.found ? pythonProbe.filePath : "python3" + readonly property string pythonPath: File.canonicalFilePath(FileInfo.joinPaths(path, "..", "..", "python")) diff --git a/share/qbs/modules/dmg/dmg.js b/share/qbs/modules/dmg/dmg.js index 7d50d95f3..4bd735e90 100644 --- a/share/qbs/modules/dmg/dmg.js +++ b/share/qbs/modules/dmg/dmg.js @@ -154,7 +154,7 @@ function dmgbuildSettings(product, inputs) { }, "format": product.dmg.format, "compression-level": product.dmg.compressionLevel, - "license": { + "build_license": { "default-language": product.dmg.defaultLicenseLocale, "licenses": reduceLicensesForKey(licenseFileObjects, "licenses"), "buttons": reduceLicensesForKey(licenseFileObjects, "buttons") @@ -199,8 +199,10 @@ function prepareDmg(project, product, inputs, outputs, input, output) { cmds.push(cmd); // Create the actual DMG via dmgbuild - cmd = new Command(FileInfo.joinPaths(product.qbs.libexecPath, "dmgbuild"), - [product.dmg.volumeName, + cmd = new Command(product.dmg.pythonExePath, + ["-m", + "dmgbuild", + product.dmg.volumeName, output.filePath, "--no-hidpi", // qbs handles this by itself "--settings", settingsJsonFilePath]); diff --git a/share/share.qbs b/share/share.qbs index 97af30396..8f2347a67 100644 --- a/share/share.qbs +++ b/share/share.qbs @@ -18,15 +18,6 @@ Product { } Group { - name: "Python executables" - files: ["../src/3rdparty/python/bin/dmgbuild"] - fileTags: ["qbs resources"] - qbs.install: true - qbs.installDir: qbsbuildconfig.libexecInstallDir - qbs.installSourceBase: "../src/3rdparty/python/bin" - } - - Group { name: "Python packages" prefix: "../src/3rdparty/python/**/" files: ["*.py"] |