-
Notifications
You must be signed in to change notification settings - Fork 17
Building Application
In theory,
qamel
supports Linux, Mac OS and Windows. Unfortunately, since I don't have Mac OS machine, I haven't test it there.
At its root, the build process in qamel
consisted of three steps :
- Installing the suitable Qt version.
- Setting up the profile for
qamel
build. - Build the app using
qamel build -p <profileName>
.
Between those three steps, the hardest part is installing Qt on your system. If you are only building for your operating system, you can simply use the official Qt's installer. The problem is when you want to cross-compile to other operating system or when you are building a static app.
Qt by default only supports dynamic linking, so if you want to build a static app, you need to build Qt manually. Same with cross compiling. For example, if you are using Arch Linux and want to build a Windows app, you need to build Qt using MXE first. And, since Qt is a huge library, it take a really long time to build it. In my case, it took almost three hours to build static Qt in Linux.
With that said, there are two ways of building qamel
app: using Docker image or by setting up manually.
This method is preferrable, especially if you don't want to build Qt by yourself.
- Make sure
qamel
anddocker
is already installed on your system and accessible from your$PATH
. - Enter your project's directory from terminal by running
cd $GOPATH/src/project-dir
. - Run
qamel docker <target>
and wait until the build finished.
There are several targets that already supported :
- linux
- linux-static
- win32
- win32-static
- win64
- win64-static
For more details, check documentation for CLI usage.
If you don't want to use Docker or want to do the installation process manually, you can follow the links on this table.
To ↓ From → | Linux | Windows | MacOS |
---|---|---|---|
Linux | ✔ | ||
Linux Static | ✔ | ||
Windows 32-bit | ✔ | ✔ | |
Windows 32-bit Static | ✔ | ✔ | |
Windows 64-bit | ✔ | ✔ | |
Windows 64-bit Static | ✔ | ✔ | |
MacOS |