|
| 1 | +Building GCodeWorkShop |
| 2 | +====================== |
| 3 | + |
| 4 | +GCodeWorkShop is written in C++ using the Qt5 framework. In general, |
| 5 | +the following steps are needed to build it: |
| 6 | + |
| 7 | +- Install the C++11 compiler supported by [Qt SDK][1]. You should also |
| 8 | + install the make utility. |
| 9 | +- Install Qt utilities such as qmake, moc, lrelease and the resource packer. |
| 10 | +- Install the Qt5 framework with version 5.6 or higher. |
| 11 | +- Obtain and unzip the GCodeWorkShop source code. |
| 12 | +- Create a build folder and navigate to it. |
| 13 | +- Run qmake specifying the path to GCodeWorkShop sources. |
| 14 | +- Run make to build the application. |
| 15 | + |
| 16 | + |
| 17 | +Building in Debian |
| 18 | +------------------ |
| 19 | + |
| 20 | +Install the following packages. |
| 21 | + |
| 22 | +``` |
| 23 | +apt update |
| 24 | +apt install build-essential qtbase5-dev qttools5-dev-tools libqt5serialport5-dev |
| 25 | +``` |
| 26 | + |
| 27 | +Switch to the folder with sources. Now you can either build the application |
| 28 | +step by step or use the script to automatically build the application and |
| 29 | +create an installation package. |
| 30 | + |
| 31 | + |
| 32 | +### Step-by-step build |
| 33 | + |
| 34 | +```sh |
| 35 | +mkdir -p build |
| 36 | +cd build |
| 37 | +qmake -r .. |
| 38 | +make lrelease -j $(nproc) |
| 39 | +qmake -r .. |
| 40 | +make -j $(nproc) |
| 41 | +``` |
| 42 | + |
| 43 | + |
| 44 | +### Automatically build and create an package |
| 45 | + |
| 46 | +Run script: |
| 47 | + |
| 48 | +```sh |
| 49 | +install/deb-build.sh |
| 50 | +``` |
| 51 | + |
| 52 | +The script creates a .deb package in the current folder and does not require |
| 53 | +root privileges. |
| 54 | + |
| 55 | + |
| 56 | +Building in windows with MSYS2 |
| 57 | +------------------------------ |
| 58 | + |
| 59 | +Install the following packages. |
| 60 | + |
| 61 | +```sh |
| 62 | +pacman -Syu |
| 63 | +pacman -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-nsis \ |
| 64 | + mingw-w64-x86_64-qt5-tools mingw-w64-x86_64-qt5-translations \ |
| 65 | + mingw-w64-x86_64-qt5-base mingw-w64-x86_64-qt5-serialport |
| 66 | +``` |
| 67 | + |
| 68 | +Switch to the folder with sources. Now you can either build the application |
| 69 | +step by step or use the script to automatically build the application and |
| 70 | +create an installer. |
| 71 | + |
| 72 | + |
| 73 | +### Step-by-step build |
| 74 | + |
| 75 | +```sh |
| 76 | +mkdir -p build |
| 77 | +cd build |
| 78 | +qmake -r .. |
| 79 | +make lrelease -j $(nproc) |
| 80 | +qmake -r .. |
| 81 | +make -j $(nproc) |
| 82 | +``` |
| 83 | + |
| 84 | + |
| 85 | +### Automatically build and create an installer |
| 86 | + |
| 87 | +Run script: |
| 88 | + |
| 89 | +```sh |
| 90 | +install/win-msys2-build.sh |
| 91 | +``` |
| 92 | + |
| 93 | +The script creates a .exe installer in the current folder. |
| 94 | + |
| 95 | + |
| 96 | +[1]: https://doc.qt.io/qt-5/supported-platforms.html "Qt5 doc: supported platforms" |
0 commit comments