Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Change qtcreator terminal used to run build time targets
Qt 6.11 is out! See what's new in the release blog

Change qtcreator terminal used to run build time targets

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 629 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GregWilsonLindberg
    wrote on last edited by
    #1

    First I'm running QtCreator 4.15.0 under Ubuntu 20.04.
    I've got a project (in a .pro file) that generates a build time target from a shell script. I'm trying to pass some arguments to ls that used to work under Ubuntu 18.04, but are now generating an error:
    ls: cannot access '../../QScribe-Alphas/QScribeGui/*.{cpp,h,qml}': No such file or directory

    The problem is that qtcreator is running the script in the 'sh' shell, I would like to change that to 'bash'.

    I found a pointer to Options->Environment->System->Terminal:. I changed it to point to /bin/bash, but the script is still running under 'sh'.

    How do I change the shell that is used to run build time targets?

    Regards,
    Greg

    1 Reply Last reply
    0
    • G Offline
      G Offline
      GregWilsonLindberg
      wrote on last edited by
      #2

      In talking to Qt support , they told me that the reason that it is not possible to change the shell used at build time is that it is spawned by make not QtCreator. They suggested that I add a shebang (#!/bin/bash) to the top of the script and that worked.

      The also suggested that it might be possible to force make to use bash, but couldn't provide a tested method.
      I posted this to let others know what the outcome is.

      Greg

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        I would go with "#!/usr/bin/env bash" so that the configured version of bash is used rather than forcing a specific version.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved