-
Notifications
You must be signed in to change notification settings - Fork 753
Deploying Linux to Windows 64 bit Shared
There are two ways to deploy from Linux to Windows 64-bit, using docker image or using cross compiler.
This method is more recommended because it's easier and doesn't require you to install additional packages on your system.
-
Make sure you already installed
docker
on your system. -
Pull docker image for Windows 64-bit :
docker pull therecipe/qt:windows_64_shared
-
Deploy your app :
qtdeploy -docker build windows_64_shared
Once the deployment finished, you can start your application by running the executable file that located in folder deploy/windows
at your project's root directory.
You might want to use this method if you are planning on using the latest version of Qt. This method works by using Wine and MXE, so make sure you installed both of them in your system. Here are the steps for Debian and its derivatives :`
-
Install Wine :
sudo apt-get -y install wine
-
Add MXE to your local repository :
echo "deb https://pkg.mxe.cc/repos/apt/debian wheezy main" | sudo tee --append /etc/apt/sources.list.d/mxeapt.list > /dev/null sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB sudo apt-get update
-
Install MXE and its Qt packages :
sudo apt-get -y -qq install mxe-x86-64-w64-mingw32.shared-qt3d mxe-x86-64-w64-mingw32.shared-qtactiveqt mxe-x86-64-w64-mingw32.shared-qtbase mxe-x86-64-w64-mingw32.shared-qtcanvas3d mxe-x86-64-w64-mingw32.shared-qtcharts mxe-x86-64-w64-mingw32.shared-qtconnectivity mxe-x86-64-w64-mingw32.shared-qtdatavis3d mxe-x86-64-w64-mingw32.shared-qtdeclarative mxe-x86-64-w64-mingw32.shared-qtgamepad mxe-x86-64-w64-mingw32.shared-qtgraphicaleffects mxe-x86-64-w64-mingw32.shared-qtimageformats mxe-x86-64-w64-mingw32.shared-qtlocation mxe-x86-64-w64-mingw32.shared-qtmultimedia mxe-x86-64-w64-mingw32.shared-qtofficeopenxml mxe-x86-64-w64-mingw32.shared-qtpurchasing mxe-x86-64-w64-mingw32.shared-qtquickcontrols mxe-x86-64-w64-mingw32.shared-qtquickcontrols2 mxe-x86-64-w64-mingw32.shared-qtscript mxe-x86-64-w64-mingw32.shared-qtscxml mxe-x86-64-w64-mingw32.shared-qtsensors mxe-x86-64-w64-mingw32.shared-qtserialbus mxe-x86-64-w64-mingw32.shared-qtserialport mxe-x86-64-w64-mingw32.shared-qtservice mxe-x86-64-w64-mingw32.shared-qtsvg mxe-x86-64-w64-mingw32.shared-qtsystems mxe-x86-64-w64-mingw32.shared-qttools mxe-x86-64-w64-mingw32.shared-qttranslations mxe-x86-64-w64-mingw32.shared-qtvirtualkeyboard mxe-x86-64-w64-mingw32.shared-qtwebchannel mxe-x86-64-w64-mingw32.shared-qtwebkit mxe-x86-64-w64-mingw32.shared-qtwebsockets mxe-x86-64-w64-mingw32.shared-qtwinextras mxe-x86-64-w64-mingw32.shared-qtxlsxwriter mxe-x86-64-w64-mingw32.shared-qtxmlpatterns
-
Export environment variable
QT_MXE_ARCH=amd64
. -
Run
qtsetup
. -
Deploy your app :
qtdeploy build windows
Once the deployment finished, you can start your application by running the executable file that located in folder deploy/windows
at your project's root directory.