Commit Graph

371 Commits

Author SHA1 Message Date
Tim Jenssen
f34bd3309d scripts: add --keep-signed-content-at to makedmg.py
Change-Id: I3fd76cced3233afca90158717fbff400126a09c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-13 16:31:49 +00:00
Tim Jenssen
e0059feef5 scripts: add license-replacement feature
We also have enterprise dmg for example at the QtDesignStudio
case so we need to replace the default LGPL with enterprise.

Change-Id: I059e056cd4fda02f8befa72a2b694ade471b7f47
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-09 16:54:44 +00:00
Tim Jenssen
6445db8ca2 Revert "scripts: add ignore-codesign-paths feature"
This reverts commit cc4914ff83.

Reason for revert: did not work

Change-Id: Ib6e860f93a23bb599a4c6da98e23117498ff294a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-03 19:07:49 +00:00
Tim Jenssen
cc4914ff83 scripts: add ignore-codesign-paths feature
QtDesignStudio packages Qt into the dmg
which is already codesigned.

Change-Id: I8d0f0d6df1e8792e44ef93ab6f871e6eecad7183
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-03 18:21:54 +00:00
Tim Jenssen
e549ad4d01 makedmg: add dmg-size option
The dmg size for QtDesignStudio can be much bigger
then the default size which is enough for QtCreator.

Change-Id: I2a7cbe01ca05fc32bb3b6b5a82c1670f9703ae50
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-20 14:21:41 +00:00
Tim Jenssen
9eb2a7bc5b Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: Ic60cb293d07e7e25716adfbaa2f35e9d25ca148b
2023-01-10 17:48:42 +00:00
Eike Ziller
77dfa71f06 Deploying Qt: Clean up .cpp.o(bj) files when deploying Qt
These files are required when building against some static libraries
that Qt ships. Since we don't link against these libraries, we used to
remove them when we install Qt, but starting with Qt 6.5 some of these
files are required by the Qt CMake files, and configuration would fail.

So, we now have to remove them when deploying Qt, instead of already
when installing Qt.

Change-Id: Ie38ab3735b86df0372b946d6a808007b5ec84b88
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-20 09:58:28 +00:00
Eike Ziller
456b8b69f9 build_plugins.py: Create signed package for plugins
On macOS if SIGNING_IDENTITY is given.
Creates an extra <plugin>-signed.7z, to not interfere with existing
build setups.

Change-Id: I8ec7f5cbeb14fb749d5d62398916629b83bdb833
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-16 14:59:06 +00:00
Tim Jenssen
409f7f226f deployqtHelper_mac.sh: make sdktool optional
Silents the warning about not existing sdktool
in QtDesignStudio build.

Change-Id: Ia8e3f341936f4b20d340f9c66a5da3d01f14bccf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-17 14:21:53 +00:00
Tim Jenssen
0d2cb70fd6 qml2puppet: fix broken deployqtHelper_mac.sh
The extra subdirectory "qmldesigner" was removed
in cmake build scripts by last refactoring.

For other ui helper tools in libexec is already a
working qt.conf which can be reused.

Task-number: QDS-8308
Change-Id: I7e98d0187cf2748298da263e55a64918cbb6b2c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-16 15:35:01 +00:00
Artem Sokolovskii
60cd36ed31 ClangFormat: Remove deprecated entries in clangformatconfigwidget
Task-number: QTCREATORBUG-28263
Change-Id: I48b0456f3c7bea88905cea40d1e447655da64676
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-19 12:39:31 +00:00
Eike Ziller
c319163e66 build.py/CPack: Install to /opt from .deb packages
Default is /usr/local, and that is also the default when
installing self-built versions, so avoid a conflict.

Change-Id: I92879baa4afd1b90b7de6addfbcd7ec361b396cc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-13 06:17:15 +00:00
Eike Ziller
c72a9197a4 build.py: Add option to call cpack
Adds --with-cpack option.

- macOS: does nothing (we already create a better, signed disk image)
- Linux: creates qtcreator.deb in build directory
- Windows: Checks for NSIS and WIX installation,
  creates qtcreator.exe and qtcreator.msi as appropriate

Change-Id: Ie7816d04cb2e01e90795481e1519b0a6645f5cd3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-07 09:15:33 +00:00
Alessandro Portale
bbd64a2c94 Improve scripts/scrubts.py
List the same duplicates that lrelease shows. But better: all
occurrences with full filename:linenumber.

Change-Id: If0cf38183dbdb4118f2152e1ae86ec92bf0ae1cc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-27 06:55:06 +00:00
Cristian Adam
5bcb2e4c58 scripts: Remove clangbackend from deployqtHelper_mac.sh
Since we moved to clangd the file doesn't exist anymore.

When creating the dmg packaging the process would print
multiple errors pointing to the fact that the clangbackend
file doesn't exist.

Change-Id: I172cfa43e67ec4aa9e5e2f8b703e024b803c78a1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-26 13:25:50 +00:00
Alessandro Portale
f2e51011d4 scripts: Fix line number output in scrubts.py
Change-Id: I9e67ba1fe81264d6f0fde42021489c696574065f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-09 21:54:47 +00:00
Alessandro Portale
c21b150aa8 scripts: Improve scrubts.py
Output statistics on removed duplicate messages and merged contexts.
List remaining duplicate messages with identical source but different
translation.

Change-Id: If06f5cfc898c6261863cc53a3c464efead1d9890
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-09 21:44:26 +00:00
Alessandro Portale
024c327993 scripts: Add scrubts.py for .ts file cleanup
Rewrites a .ts file, removing duplicate messages of a specified
translation context and joining adjacent occurrences of that context.
Unlike lrelease and lconvert, this script does an exact comparison of
the whole <message/> xml tag.

Use on all .ts files:
 for tsfile in share/qtcreator/translations/qtcreator_*.ts; do python
scripts/scrubts.py $tsfile -context FooBar; done

Change-Id: I2dea5a0b00e35031718e654b289d6ad39dbaac2a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-02 07:23:46 +00:00
Christian Stenger
dd2d05a772 Scripts: Fix permissions
Broke with a7956df3ca.

Change-Id: I072ea34183aedf2fd693af1bb589660aa06b9e1c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-29 09:32:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Artem Sokolovskii
79aaf155b7 ClangFormat: Update generateClangFormatChecksUI script
Now relay on clang/Format.h file not on ClangFormatStyleOptions.rst.
The information from Format.h is more complete, reliable and easy
parsable.

Change-Id: I96899257f5fd075bfd6e51c5a4fa70a614c32398
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-07-29 11:14:22 +00:00
Cristian Adam
22b8f3bdcd scripts: Deploy clang-format tool
The beautifier plugin can use the clang-format tool, which is statically
build, and it's around 2-6 MB in size.

Fixes: QTCREATORBUG-25600
Change-Id: I900f0dbfc2ba2773d3ad986c149adb41a4103e94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-27 15:40:18 +00:00
Cristian Adam
61f04d260c scripts: remove deployment of libclang-cpp
All the clang binaries that we ship (clangd, clang-tidy,
clazy-standalone) are compiled statically and libclang-cpp
is not needed anymore.

Change-Id: I486fc0d1a55a18916c0abf56ec6a966321ef2b46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-22 08:29:14 +00:00
Cristian Adam
cdedc71182 scripts: Do not deploly clang and clang-cl executables
They were used in debugging of the libclang code model, and having
only the compiler is not very useful.

Users can install complete LLVM toolchains from llvm.org

Change-Id: If19a0b75c8505ba7589b377292bd96f855e91c00
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-17 14:05:03 +00:00
Cristian Adam
28497d928b Scripts: Do not deploy libclang anymore
Since libclang is no longer needed, we don't need to deploy the
library anymore.

Change-Id: Ia7bdb7e089ec95b8252efbfa1c607d03082a99e6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-25 09:45:10 +00:00
Eike Ziller
f5b77d87da Move build scripts to Python3
On newer macOS versions there even is no unversioned python
executable anymore, so we need to make it explicit

Change-Id: Ic2260a06b859e949a42f7dc34f1ff4dd582ce635
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-20 14:23:43 +00:00
Eike Ziller
9084ab1b64 Remove some unused scripts
These are no longer used, and instead solved via CMake or part of
build(_plugin).py

Change-Id: I86a829713fe32b9ff1386fc0bdfd23a88e3e00c4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-20 14:23:34 +00:00
Eike Ziller
d2e1590aec macOS: Do not deploy some plugins and their dependencies
macdeployqt deploys all plugins of a kind, like all tls or sql backends.
We only want the securetransport and sqlite ones from these, and
since Qt 6.3 now also builds the openssl backend, and the postgres backend
has a dependency on openssl that gets shipped, we end up with issues
(openssl backend being loaded which finds and loads openssl from postgres).

So clean these things up after macdeployqt.

Change-Id: Iccbe4c422a4cce3fd4da0af5f6e2595f85848ece
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-04-08 14:18:17 +00:00
Eike Ziller
81c1c63c1d macOS: Remove workarounds for Qt 6.2 betas
QTBUG-94796 is fixed, and macdeployqt copies all the plugins again.

Change-Id: I1f8201483e9cf4986eea0732d75d545425d3b5d6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-08 14:18:08 +00:00
Eike Ziller
2829412e15 macOS: Fix 'disclaim' in packages not passing on DYLD_... variables
Signed executables with hardened runtime need the entitlement
com.apple.security.cs.allow-dyld-environment-variables
to be able to pass on the DYLD_... variables to subprocesses.

Fixes: QTCREATORBUG-27175
Change-Id: Ibc203487be4d7111fc60b05749cae4e3ad750b3d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-11 08:43:59 +00:00
Christian Stenger
5ce07a2345 Scripts: Fix uichanges script
Amends 394bfb508f.

Change-Id: I6e933f8bc18298b81b99a716e734d84fbd2b7528
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-24 14:35:37 +00:00
Eike Ziller
041e8d178f Linux: (Optionally) Enforce XCB backend if QT_QPA_PLATFORM is not set
Especially on older distributions, Qt/Wayland works worse than Qt/
XCB(XWayland). On Ubuntu 20.04, starting Qt Creator with Wayland can
even crash the Wayland session
(https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1958684/).

We still want to ship the plugins, and allow forcing the usage of
Wayland, since on the other hand Wayland works better in HiDPI
environments for newer distributions.

Behavior is enabled when configuring with  -DQTC_FORCE_XCB=ON

Task-number: QTCREATORBUG-26867
Change-Id: I623f001412f809381208b6cb3ec5b3fcfdb86011
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-02-16 07:50:48 +00:00
Eike Ziller
aac0e8ef6e Fix finding python development package for cdb extension
Amends e9f3f8cc64

We switched to find_package(Python3 ...) and that doesn't use
PYTHON_LIBRARY and PYTHON_INCLUDE_DIR. Simply provide the root path for
find_package(Python3 ...).

Change-Id: If862151c095af358be5f35d3d8002d77dcd17aa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 13:18:49 +00:00
Christian Stenger
394bfb508f Scripts: Fix output for python 3
Change-Id: Ie914e04b25bdd4e41a9d2b3a9002385f5867ad6b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 10:26:01 +00:00
Christian Stenger
358146a322 Scripts: Make uichanges script work with Python 3
Change-Id: Ieb5abc4845098b62afa37a3e0e0fdf88326da2ab
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-17 10:15:45 +00:00
Eike Ziller
9056d708fa Merge remote-tracking branch 'origin/6.0'
Change-Id: I642abb110bb120e20af11a5d55244c03e6c48caa
2022-01-12 13:59:10 +01:00
Eike Ziller
bc6b05497d Build.py/macOS: Add a signed bundle
If a signing identity is given, create a signed install, and zip it up
(if zip files are wanted).
Can be used to directly add a signed app to an installer.

Change-Id: Ib575d7c907eea74c247407107884f29a526d5d1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-10 13:44:40 +00:00
Eike Ziller
998abe9b7a macOS/deployHelper: Accept if clazy-standalone already has right rpath
Adding an already existing rpath is an error for install_name_tool.
Not completely failing in that case makes local testing easier.

Change-Id: I22d94225af2375af4e397212b2a7500315f25882
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-10 10:57:54 +00:00
Eike Ziller
65e8c864af Merge remote-tracking branch 'origin/6.0'
Change-Id: I405e3f95b0cdcd7b2686f31baae16c03c787f007
2022-01-06 11:55:39 +01:00
Eike Ziller
1e46db88a1 Do not link packages against libGLX and libOpenGL
Also for the additional plugins.
Work around QTBUG-89754

Amends 7d948b0c5d

Fixes: QTCREATORBUG-26744
Change-Id: I5cafcbe77a37fcd9c5432ef45aa364066d772be8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-04 14:58:09 +00:00
Eike Ziller
85b60d9608 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/plugins/coreplugin/editormanager/editormanager.cpp

Change-Id: I80fe565749ad5c06dfe99436f2dc6ab4b66a2537
2021-12-16 10:50:33 +01:00
Eike Ziller
13db647329 build_plugin.py: Add --add-module-path option
Like we have for build.py

Change-Id: I8450b81edcdf10300985762153cd5750d9ddcd59
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-15 13:51:01 +00:00
Eike Ziller
d422b408e0 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
2021-12-09 12:04:32 +01:00
Eike Ziller
7d948b0c5d Do not link packages against libGLX and libOpenGL
Work around QTBUG-89754

Fixes: QTCREATORBUG-26652
Change-Id: I9fb7ba2127a93460184154a9eb2d4c053f8fc22d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-06 10:31:35 +00:00
Eike Ziller
d62d0f305b Merge remote-tracking branch 'origin/6.0'
Change-Id: I71b19dd8ecd96a7a2a58622f68283b8635264e48
2021-12-01 09:24:05 +01:00
Eike Ziller
fe710cadf9 Work around error when building telemetry plugin
Change-Id: Ia4a4314180b561c2a45446b1ae550c3164612b10
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-30 05:09:49 +00:00
Joerg Kreuzberger
efdaeaba43 Add option to build QtCreator with sanitizer
Fixes: QTCREATORBUG-26318
Change-Id: I44589b5bb39958eda2329b444e4857e8f61823bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-05 09:03:41 +00:00
Eike Ziller
03bcdc9186 Fix RPATH of Qbs binaries when built with Qt 6
The build system for Qt Creator ensures that we have the right
relative RPATH to Qt for the packages.
We still check if we need to fix the RPATHs when deploying Qt, and
the Qbs build relies on that.

That part was broken for Qt 6 since it looked for libQt5* to decide
if the relative RPATH to Qt must be added. Remove the Qt version
number from the check.

Change-Id: Ib9d0408943d61364bfe9c8813a55bf60145b7972
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2021-10-29 12:54:26 +00:00
Eike Ziller
342a24d56a Merge remote-tracking branch 'origin/5.0'
Change-Id: I0ef7cd302ba7cba64fec401f3426dd682b8dc036
2021-09-15 11:18:11 +02:00
Eike Ziller
9121372f9c macOS: Remove absolute RPATH from clazy-standalone
Remove the absolute RPATH to somewhere on the build machine,
which creates issues when loading Qt Creator on macOS 10.14,
and of course is bogus in any case.

Fixes: QTCREATORBUG-26196
Change-Id: Ic92deb9b2c6fe32f377fc31004779a2a43794054
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-15 08:33:07 +00:00