Mehmet Özcan
Mehmet Özcan

Reputation: 85

How to deploy a qt based app(developed on Mac) to Windows?

I developed a desktop Qt app on macOs. I want to execute my app on windows. I've looked that pages: https://doc.qt.io/qt-5.9/osx-deployment.html https://godhc.wordpress.com/2012/06/10/build-your-qt-project-on-windows-and-mac-osx/ But it did not make sense well. Can someone explain me how to do that?

Upvotes: 1

Views: 1061

Answers (1)

user_number153
user_number153

Reputation: 562

you have to recompile it on windows. you have to make sure your code doesn't use macos "framworks" or unix or linux specific functions.

i recommend downloading a precompiled static QT as building it is impossible. you can get that here and using the visual studio compiler, you will have to download visual studio and all the c++ addons and stuff.

!! edit what ever directory your cmd is in is the output of the qmake !! you then open up cmd and run the static compiled QT's qmake on the .pro file of your project. e.g.

E:\QT_projects\QT\qt5-5.7.1-vs2015\qt5-x86-static-release\bin\qmake.exe E:\QT_projects\variable-length-string-editor-for-binaries\StringEditer.pro

that will make the makefile. and then open the visual studio cmd called "Developer Command Prompt for VS 2017" for me opening the start menu and typing it in will show it.

you then navigate to the folder where the make files that qmake generated e.g.

cd E:\QT_projects\variable-length-string-editor-for-binaries

then run nmake on release or debug or just nmake e.g.

nmake release

Upvotes: 1

Related Questions