0

I use, or perhaps abuse, the "system" command of qmake a lot in scripts interpreted by Qt Creator. As an example the command

RESPONSE = $$system(ls)

will in OSX populate the stringlist RESPONSE with the content of the working dir. After that a lot of string manipulation with RESPONSE can be done inside qmake.

However I noticed that with the Xcode utilities like "codesign" there is a system response (as shown in the "Compile Window" in Qt Creator) but the response is not put in RESPONSE.

Is there a way to get to get hold of the response of utilities like codesign inside qmake?

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
adlag
  • 1,016
  • 9
  • 19

1 Answers1

1

These utilities output to stderr, not stdout. You'll need to run them in a shell wrapper that redirects stderr to stdout, like bash -c 'codesign ... 2>&1'

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313