Commit Graph

14 Commits

Author SHA1 Message Date
Eike Ziller
364013b9ac Merge remote-tracking branch 'origin/9.0' into 10.0
Change-Id: Ib01e191652168b2c38e80678f2f804bb95143cc5
2023-02-14 16:05:31 +01:00
Eike Ziller
5c98eaf592 Fix opening Terminal on macOS 13
When Qt Creator is notarized.

Using "open" results in a privacy error. A workaround is to use
osascript. Unfortunately then the terminal window does not close
automatically anymore.

Fixes: QTCREATORBUG-28683
Change-Id: I9861d7bd5100fd28b46b774fa465c970758a3a3f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-14 15:04:02 +00:00
Kai Köhne
4e9c1d126c Replace GPL-3.0 with GPL-3.0-only
GPL-3.0 is deprecated by SPDX.

Change done by

 find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \;

Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 08:05:04 +00:00
Eike Ziller
3811236903 macOS: Fix opening terminal
The scripts executable flag went missing

Amends a7956df3ca

Fixes: QTCREATORBUG-28251
Change-Id: I9773dee3967edc2ebb0eb49c539b37796a48cf5a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-06 11:44:24 +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
Eike Ziller
be1437c797 Fix opening terminal with macOS 12.3
macOS removed support for Python2, so switch to Python3 (and fix that we
now need to specify text mode for a temporary file if we want to write
text there, not binary data).

Fixes: QTCREATORBUG-27337
Change-Id: I4884480c32e017aa710f90ab0b5afe493a2adb9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-06 13:19:35 +00:00
Xiaofeng Wang
0d17063e82 macOS: use string array to be compatible with both bash and zsh
By default, zsh does not split words in string by spaces.
See https://zsh.sourceforge.io/FAQ/zshfaq03.html

Change-Id: I167bae2af628be5b2fc9429a090628b6049f7ce4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-08 08:04:18 +00:00
Eike Ziller
817f81cbfd macOS: Force shell to a supported shell in Terminals opened from Qt Creator
The whole logic (setting up environment, run interactive or non-interactive shell)
is specific to the shell. So force Terminal to use one of the supported ones.
Currently that is zsh and bash.

Fixes: QTCREATORBUG-21712
Change-Id: I83057dd92c5c976f9f5d6f4faf0f596a75d58293
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-12 10:29:31 +00:00
Eike Ziller
f9c03f23c4 macOS: Fix opening and running in terminal with zsh
We need to read different startup files for zsh.

Task-number: QTCREATORBUG-21712
Change-Id: Id10b185e3957b44423e847114adc1b3085a8089d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-08 14:40:30 +00:00
Eike Ziller
e6060d19d7 macOS: Environment with 'Open Terminal Here'
Regression introduced with 8b4344f2a2

Change-Id: Ic839a6151e2b5fb06c8a685f5b5097d5d6894bbe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-07 13:46:22 +00:00
Christian Kandeler
8b4344f2a2 ProjectExplorer: When running in the terminal on macOS, make it close
... after the application has finished and the user pressed the return
key as requested.

Fixes: QTCREATORBUG-15138
Change-Id: Id5b9fce553eb96b10aa76ccbd87fb66f02218110
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 08:55:38 +00:00
Eike Ziller
a865fa513b macOS: Fix passing environment to terminal
We do not actually start a new Terminal process, so we need to clean up
the environment after the fact.

Clean the environment in the started shell except for some essentials,
read the config files as if for a login shell, and re-export the
environment.

There still can be differences, since environment variables set in the
user's bash profile etc will "win". This is wrong if we want to open the
terminal in anything but the "system environment", especially if the
PATH is effected, but I don't see how to solve that without severely
crippling the shell setup. This is also the current state on Linux.

Change-Id: I1d3c8184ac3bf543675e96f73253085fa6b1b29d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 11:09:31 +00:00
Eike Ziller
972cd5514f macOS: Reduce clutter shown when opening terminal
By writing the needed special commands to a temporary file.
What we cannot get rid of is the command for opening a bash that sources
that file.
Since Terminal usually opens a login shell, but we cannot set a special
file for sourcing in that case, the special commands include mimicking
the behavior of a login shell by reading the corresponding config files.

This is in preparation to setting up the environment for the shell.
Since we do not start a new process for the Terminal on macOS, we will
need to explicitly export the whole environment after the fact,
resulting in potentially dozens of export commands to be executed.

Change-Id: Ia24cf1f00e62411734f5d6514d073e11d4cdae6e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 11:09:24 +00:00
Eike Ziller
53f0e6c0ee macOS: Replace openTerminal.command by python script
This script will become even less trivial in the future, so use an
actually usable programming language for it.

Change-Id: I4fa1c8d327f97585bf8dde0ffaefc5fac7c1ca18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 10:04:33 +00:00