QProcess returns "wrong" result due to architecture, mac.
-
Hey
Ok soo this is fun one.. I want to know what is the architecture of current system... You know x86_64 or arm64 (I'm on mac m1)... the fun part is... if I compile my app for Intel only, and run (mac runs it via rosetta) >
QSysInfo::currentCpuArchitecture()
I will get x86_64, because thats what whatever enumeration does and thats what Qt gets. Which is not what I want. I want to know if this hardware is x86_64 or arm... so I figured I would run aQProcess("uname",{"-m"});
instead and just get it from OS... but oh boi how I was wrong, that returns x86_64 too!!! Soo my magical question is... how can I use QProcess to get the correct architecture? Or qt lib in general ?Regards
DariuszSOLLUTION :
Found out that we can check if we are running in translated mode via > https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environmentIt would be nice if Qt had an option to figure that one natively via QSysInfo at some point.
-
Hi,
You can open a feature request to discuss that matter.