|
| 1 | +# Felgo QML Hot Reload Demo |
| 2 | + |
| 3 | +A demo integration of Felgo Hot Reload to an existing Qt project |
| 4 | + |
| 5 | +To learn more about Felgo Hot Reload, have a look at https://felgo.com/qml-hot-reload |
| 6 | + |
| 7 | +This repository includes two commits: |
| 8 | + |
| 9 | +- An initial commit with a Qt/QML project |
| 10 | +- A [commit](https://github.com/FelgoSDK/FelgoHotReloadDemo/commit/master) with the changes applied to add Felgo Hot Reload to the project |
| 11 | + |
| 12 | +## Installing Prerequisites |
| 13 | + |
| 14 | +### 1. Install Qt |
| 15 | + |
| 16 | +We recommend that you use Qt versions 5.15.2 or 6.5.3 with one of the kits: |
| 17 | +- `gcc_64` kit on Linux |
| 18 | +- `msvc2019_64` kit on Windows |
| 19 | +- `clang_64` kit for Qt 5.15.2 or `macos` kit for Qt 6.5.3 on macOS |
| 20 | + |
| 21 | +### 2. Install Felgo Hot Reload |
| 22 | + |
| 23 | +You can install Felgo Hot Reload in two ways: |
| 24 | + |
| 25 | +- Download the latest release package of this repository [releases page](https://github.com/FelgoSDK/FelgoHotReloadDemo/releases). This package contains: |
| 26 | + - the Felgo Hot Reload GUI application for |
| 27 | + - **Linux** |
| 28 | + - **Windows** |
| 29 | + - **macOS** |
| 30 | + - the client libraries for the following build kits |
| 31 | + - **GNU/Linux** |
| 32 | + - Qt 5.15.2 `gcc_64` |
| 33 | + - Qt 6.5.3 `gcc_64` |
| 34 | + - **Windows** |
| 35 | + - Qt 5.15.2 `msvc2019_64` |
| 36 | + - Qt 6.5.3 `msvc2019_64` |
| 37 | + - **macOS** |
| 38 | + - Qt 5.15.2 `clang_64` |
| 39 | + - Qt 6.5.3 `macos` |
| 40 | +- Install with the official Felgo Hot Reload Installer, coming with a free evaluation (see below). Use this option if you are not using Qt 5.15.2 or Qt 6.5.3, the installer supports a large variety of development kits. |
| 41 | + |
| 42 | +You need a valid license key, which you can obtain with a [free evaluation here](https://felgo.com/qml-hot-reload). |
| 43 | + |
| 44 | +## Running the Project |
| 45 | + |
| 46 | +### 1. Building |
| 47 | + |
| 48 | +We recommend using CMakeLists.txt file to generate build files when using Qt 6 kits, and FelgoHotReloadDemo.pro file to generate build files when using Qt 5 kits. |
| 49 | + |
| 50 | +#### Qt Creator |
| 51 | + |
| 52 | +**Generating project files with CMake** |
| 53 | + |
| 54 | +Add the `FELGO_HOT_RELOAD_PATH` variable to the Projects - Build Settings - CMake Details and set it to the Felgo Hot Reload client libraries directory for your selected kit. |
| 55 | +Assuming you are using the repository release package on a Linux machine, the path is `../client/6.5.3/gcc_64` |
| 56 | + |
| 57 | +**Generating project files with qmake** |
| 58 | + |
| 59 | +Add the `FELGO_HOT_RELOAD_PATH` additional argument to the Projects - Build Settings - Build Steps Details and set it to the Felgo Hot Reload client libraries directory for your selected kit. |
| 60 | +Assuming you are using the repository release package on a Linux machine, the argument is `FELGO_HOT_RELOAD_PATH=../client/5.15.2/gcc_64` |
| 61 | + |
| 62 | +#### Other IDEs |
| 63 | + |
| 64 | +Use your IDE build configuration features to set the `FELGO_HOT_RELOAD_PATH` variable before you generate the project files. |
| 65 | +Assuming you are using the release package on a Linux machine, the path is `../client/6.5.3/gcc_64` |
| 66 | + |
| 67 | +Run CMake or qmake and build the application like any other. |
| 68 | + |
| 69 | +### 2. Create Felgo Hot Reload configuration file |
| 70 | + |
| 71 | +#### CMake |
| 72 | + |
| 73 | +CMake creates the required `hot_reload_config.json` file automatically. There's nothing you have to do. |
| 74 | + |
| 75 | +#### qmake |
| 76 | + |
| 77 | +Copy or rename `hot_reload_config_qmake.json` to `hot_reload_config.json`. |
| 78 | + |
| 79 | +### 3. Running |
| 80 | + |
| 81 | +- Open the FelgoHotReload GUI application from the repository package or installation and select the `FelgoHotReloadDemo` folder within the opening file dialog (your project directory). |
| 82 | +- Run your application and select the “Connect to Local” option. The project loads up. |
| 83 | +- Edit the QML code of your application and see changes to the running applications. |
| 84 | + |
0 commit comments