macbook air m1,12.2.1,qtcreator6.0.2,qt6.2.2,run in terminal not working , just output "Starting ......"
-
Hi, i am a newbie from china. sorry for my poor english.
i am using a macbook air m1, and latest qt, qtcreator . i installed xcode ,xcode command line tools. all my tools are new . i install qtcreator -1 days . using installer from official qt site .qt.io
that is macOS 12.2.1 (21D62) apple m1
qt creator 6.02 qt6.2.2 Based on Qt 6.2.2 (Clang 12.0 (Apple), 64 bit)
Built on Jan 18 2022 10:00:20
From revision f884ff2160
xcode Version 13.2.1 (13C100i am build a linux program , using cmake. when i checked the "run in terminal " option , there is no new terminal show up ...
the output of qtcreator says "starting /dfdfdfdf/"
my terminal path option is default , that is point to the defaute python script , .after that ,
i creat a qt example project , and set run in terminal , runs ok . that is started a new mac terminal window and zsh....than , i downloaded a simple helloword program using cmake from github
set the run in teriminal option , there is no terminal shows up ...just output "starting /fdf//helloword" .
i have no idea how to fix it.why i need to run in terminal?
because i am using camera , it is very fock in mac os to use camera , as a unix program ....
becuase if i run it directly , my program just crash...i am using opencv , becuase i do not have perminssion to use camera... i can run it , outside qtcreator , in a terminal .... or start->debug , debug the program, but i can not rebuilt ...if if rebuild i need to give permission again ...
i am sooooooooooooo tied on programing on mac .... i want to say , ...programing on mac is....very ...fock ...becuase the the strick policy ...anyway
i just want to make run in terminal work ... -
Hi, i am a newbie from china. sorry for my poor english.
i am using a macbook air m1, and latest qt, qtcreator . i installed xcode ,xcode command line tools. all my tools are new . i install qtcreator -1 days . using installer from official qt site .qt.io
that is macOS 12.2.1 (21D62) apple m1
qt creator 6.02 qt6.2.2 Based on Qt 6.2.2 (Clang 12.0 (Apple), 64 bit)
Built on Jan 18 2022 10:00:20
From revision f884ff2160
xcode Version 13.2.1 (13C100i am build a linux program , using cmake. when i checked the "run in terminal " option , there is no new terminal show up ...
the output of qtcreator says "starting /dfdfdfdf/"
my terminal path option is default , that is point to the defaute python script , .after that ,
i creat a qt example project , and set run in terminal , runs ok . that is started a new mac terminal window and zsh....than , i downloaded a simple helloword program using cmake from github
set the run in teriminal option , there is no terminal shows up ...just output "starting /fdf//helloword" .
i have no idea how to fix it.why i need to run in terminal?
because i am using camera , it is very fock in mac os to use camera , as a unix program ....
becuase if i run it directly , my program just crash...i am using opencv , becuase i do not have perminssion to use camera... i can run it , outside qtcreator , in a terminal .... or start->debug , debug the program, but i can not rebuilt ...if if rebuild i need to give permission again ...
i am sooooooooooooo tied on programing on mac .... i want to say , ...programing on mac is....very ...fock ...becuase the the strick policy ...anyway
i just want to make run in terminal work ... -
I solved this problem.
I install a new terminal called iterm2
search qtcreator and iterm2
there is a script to use iterm2
i copy the script put in ~/.iterm.sh
point terminal option to this script
than ok #! /bin/bashugly escaping: for apple script \ and " need to be escaped, whereas %q takes care of all bash escaping
declare -a args
mydir=pwd
mydir=$(printf '%q' "$mydir")
mydir="${mydir//\/\\}"
args[0]="cd ${mydir//"/\"};"
for a in "$@" ; do
x=$(printf '%q ' "$a")
x="${x//\/\\}"
args[${#args[@]}]="${x//"/\"}"
done
mArgs=${args[@]:0}osascript <<EOF
set cdScript to "$mArgs"
tell application "iTerm2"
set newWindow to (create window with default profile)
tell newWindow
select
set _session to current session
tell _session
write text cdScript
end tell
end tell
end tell -
I solved this problem.
I install a new terminal called iterm2
search qtcreator and iterm2
there is a script to use iterm2
i copy the script put in ~/.iterm.sh
point terminal option to this script
than ok #! /bin/bashugly escaping: for apple script \ and " need to be escaped, whereas %q takes care of all bash escaping
declare -a args
mydir=pwd
mydir=$(printf '%q' "$mydir")
mydir="${mydir//\/\\}"
args[0]="cd ${mydir//"/\"};"
for a in "$@" ; do
x=$(printf '%q ' "$a")
x="${x//\/\\}"
args[${#args[@]}]="${x//"/\"}"
done
mArgs=${args[@]:0}osascript <<EOF
set cdScript to "$mArgs"
tell application "iTerm2"
set newWindow to (create window with default profile)
tell newWindow
select
set _session to current session
tell _session
write text cdScript
end tell
end tell
end tell