|
| 1 | +# How to Build (Qt 6.8.1) - Windows |
| 2 | + |
| 3 | +**(Note: These instructions have not been fully tested for 6.8.1. Let us know if you encounter any issues.)** |
| 4 | + |
| 5 | +## Build Tools: |
| 6 | + |
| 7 | +The installation order here is important. While other orderings may work, this is the specific order that we have tested. And the Qt installation must be the last thing installed. |
| 8 | + |
| 9 | +1. Install Visual Studio 2022: |
| 10 | + 1. [Download Page](https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes) |
| 11 | + 2. Make sure you select the C++ development tools. |
| 12 | +2. Install Windows Development SDK: |
| 13 | + 1. [Download Page](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) |
| 14 | +3. Install CMake: |
| 15 | + 1. [Download Page](https://cmake.org/download/) |
| 16 | + 2. When prompted select, "Add CMake to the system PATH for all users". |
| 17 | + |
| 18 | +## Install Qt 6.8.1: |
| 19 | + |
| 20 | +Unlike with Qt 5.12, there is no offline installer for it. So you have two options here, use the online installer, or use a copy of an installation. |
| 21 | + |
| 22 | +### Official Online Installer: |
| 23 | + |
| 24 | +If you are ok with creating an account with Qt and using their online installer, then use this method. |
| 25 | + |
| 26 | +1. Download the online installer from here: https://www.qt.io/download-qt-installer |
| 27 | +2. Select custom install settings. |
| 28 | +3. Select the following options: |
| 29 | + - Qt 6.8.1 |
| 30 | + - MSVC 2022 64-bit |
| 31 | + - Sources |
| 32 | + - Additional Libraries |
| 33 | + - Qt Image Formats |
| 34 | + - Qt Multimedia |
| 35 | + - Qt Serial Port |
| 36 | + - Qt Debug Information Files |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +If you repeatedly run into an error involving "SSL handshake failed", you will not be able to use the online installer. Please try the other option. |
| 42 | + |
| 43 | +### Unofficial Installation Copy: |
| 44 | + |
| 45 | +If you are unable or unwilling to use the online installer, the alternative is to copy an installation directly into your system. To do this, you will need to download the installation from us, and copy it into your C drive. |
| 46 | + |
| 47 | +1. Join our [Discord server](https://discord.gg/cQ4gWxN) and ask for the link to the Qt6 standalone. Someone will DM you with a link*. |
| 48 | +2. Download `Qt6.8.1.7z` and decompress it. You can use [7-zip](https://www.7-zip.org/) to decompress it. This will create a folder with the same name. |
| 49 | +3. Move this folder to `C:\`. It will probably ask you for permissions to do it. |
| 50 | +4. Navigate to: `C:\Qt6.8.1\Tools\QtCreator\bin\` and create a shortcut to `qtcreator.exe`. Copy this shortcut to somewhere convenient. (By default this shortcut is named, `Qt Creator 15.0.0 (Community)`) |
| 51 | + |
| 52 | +*This Qt6 standalone file is 3GB in size and is being hosted by our staff for our own developers. We don't want the entire world converging here and overrunning the server. |
| 53 | + |
| 54 | +## Setup: |
| 55 | + |
| 56 | +1. Clone this repo. |
| 57 | +2. Clone the [Packages Repo](https://github.com/PokemonAutomation/Packages). |
| 58 | +3. In the `Packages` repo, copy the `SerialPrograms/Resources` folder into the root of the `Arduino-Source` repo. |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +4. Open Qt Creator. |
| 63 | +5. Click on `File` -> `Open File or Project`. |
| 64 | +6. Navigate to `SerialPrograms` and select `CMakeLists.txt`. |
| 65 | +7. It will then ask you to configure the project. Ensure `Desktop Qt 6.8.1 MSVC2022 64bit` and `Release with Debug Information` are selected. |
| 66 | + - Ensure the build directory for `Desktop_Qt_6_8_1_MSVC2022_64bit-RelWithDebInfo` is located in the root of the `Arduino-Source` repo, and not buried in subfolders (e.g. `build` or `SerialPrograms`). |
| 67 | + - Click `Configure Project`. |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | +8. At the bottom left corner, click on the little monitor and select `Release with Debug Information`. |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +9. Still in the bottom left corner, click the upper green arrow to compile and launch the program. |
| 76 | + |
| 77 | +## Troubleshooting |
| 78 | + |
| 79 | +### Failed to open '../3rdPartyBinaries/opencv_world460d.zip', or file missing |
| 80 | + |
| 81 | +- Click `Projects` on the left sidebar. |
| 82 | +- In `Build directory`, ensure the build directory for `Desktop_Qt_6_8_1_MSVC2022_64bit-RelWithDebInfo` is located in the root of the `Arduino-Source` repo, and not buried in subfolders (e.g. `build` or `SerialPrograms`). |
| 83 | + - e.g. change the default build directory from: `Arduino-Source/SerialPrograms/build/Desktop_Qt_6_8_1_MSVC2022_64bit-RelWithDebInfo` |
| 84 | + - to: `Arduino-Source/build-SerialPrograms-Desktop_Qt_6_8_1_MSVC2022_64bit-RelWithDebInfo` |
| 85 | + |
| 86 | + |
| 87 | +<hr> |
| 88 | + |
| 89 | +**Discord Server:** |
| 90 | + |
| 91 | + |
| 92 | +[<img src="https://canary.discordapp.com/api/guilds/695809740428673034/widget.png?style=banner2">](https://discord.gg/cQ4gWxN) |
| 93 | + |
0 commit comments