How to default open an app by rosetta mode on Mac M1 after installation? - apple-m1

I developed a macOS application in Universal mode (with arm64 and x86_64), but some libraries are still in x86_64 architecture. Can I make my app run in x86_64 by default after installation? and how to do this? I know that the user has the option to run in rosetta mode in Application's Info, but I would like to know a way to set that by installation.

I haven't found a way to do that, but I think I can relaunch my application using arch -x86_64 to let my application in x86_64 mode.

Related

Can't open app on Simulator MacOS Catalina

I can't install app on my simulator after update to MacOS Catalina, it was fine on earlier versions. But Now when I try to run the app installed in the simulator I get this popup.
I have changed system Security & Privacy setting using this command in the terminal sudo spctl --master-disable and now my it looks like this.
But even after this I can't run the app, any idea, suggestion ?
My Xcode version is 11.1 & target iOS version is 13.1, app runs smoothly when ran using xcode, but exported app is causing this issue.
I was able to solve this problem by running the following command.
xattr -dr com.apple.quarantine <path_to_app>
It turns out if you download app using some browser then it adds a flag which is considered a security threat in catalina, running this commands solves the issue.

Deploying JavaFx for different OS

I' m using netbeans IDE for create JavaFx application on ubuntu.My question that can i deploy installer for MAC Os and Windows OS on ubuntu?
For Mac OS you can look into Bundle Java program for Mac users with maven from GNU/Linux
For Windows look into Inno setup.

Qt static build with -target xp has MF.dll dependency

I ran ./configure with -static -static-runtime -target xp. Unfortuantely my application does not run when I use QMediaPlayer on Windows XP. There is a missing reference to MF.dll which aborts the program start with a critical error message.
Pretty much this bug: https://bugreports.qt.io/browse/QTBUG-42460
Does anyone has figured out how to clean the reference to MF.dll? My guess was -no-wmf-backend, but the person who reported the bug said it's not enough. Before I recompile another 8 hours, I would like to have some clarification, thank you.
In config.tests before building Qt and running configure, there is a file called evr. Let it fail to avoid MF.dll dependency on Windows XP. QMediaPlayer will just work fine then.

Run Qt app with eglfs plugin on a normal computer

I am trying to run a Qt application under EGLFS with Linux Mint on a Macbook Pro.
I have:
Configured and compiled Qt with all the needed flags and dependences.
Tried to run the app with X11 turned off.
Used kms integration.
Installed all the Mesa drivers ( I have an intel GPU ).
Even compiled EGL myself.
But it keeps saying "Unable to create EGL Display".
Does anyone knows what am I missing ?
P.S For example I can run weston-launch which I believe it runs over drm-egl.
I had the same problem like you. I have solved it by:
Building Qt with "-opengl desktop" switch.
Making conf file with my displays (look at: http://doc.qt.io/qt-5/embedded-linux.html at section "eglfs with eglfs_kms backend") inside application directory
Exporting QT_QPA_EGLFS_KMS_CONFIG=conf
Then switch to free tty and run application with -platform eglfs argument.

Deployment of statically linked Qt application backward compatibility

This is my first attempt at making a Qt Application work on different systems.
I have opted for static linking method.I have already compiled the sources of Qt 5.5 and compiled my application with the static Qt. The executable is working fine on my computer.
My operating system is Ubuntu 15.04. But when I tried to run the same executable on Ubuntu 14.04 then I ran into trouble. The key details of the error message are given below.
libstdc++.so.6 cxxabi_1.3.8 not found
I did a standard Google search and realised it was because I had a newer version of it on my machine, the machine where I had created the executable. There were so many different approaches to handle this problem. One of the solutions I saw involved shipping your own copy of libstdc++.so with the executable. But when I tried to copy the .so file to a pen drive, there was a warning saying that the file system does not support such files.
My question is , what am I doing wrong ? Also if I wanted to make the executable target Ubuntu 10.04, what would be the correct procedure handling the backward compatibility issues. I know that one method would be to install the same OS on my machine and then create the executable , is there any other way?
libstd++ is backward compatible but not forward compatible, which means you can run a program with a newer version of libstdc++ than the one you compiled it with but not vice-versa. This is what you experienced.
One way to deal with this issue is using older OS versions as the build machine. When you for example use Ubuntu 14.04 LTS, you'll get this list of compatible target systems.
The build system you're using will probably limit available compilers. On Ubuntu 14.04 you get GCC 4.8, which is good for most C++11 and packages for clang 3.6 are available, which will give you full C++14 support.
Targeting Ubuntu 10.04 will be challenging if you do not want to use a stone age compiler.
The idea of shipping libstdc++ will not help you much because you'll run into the same problem with libc.

Resources