### 1. **Install Qt 5.12.12**
If you don't have Qt 5.12.12 installed yet, follow the installation steps for your system. On Linux, you can use `apt` or `yum` if it's available in your package manager, or you can download it directly from the [Qt website](https://www.qt.io/download).
### 2. **Set Up Qt and `qmake`**
After installing Qt, set up your environment to use it:
```bash
export PATH=/path/to/Qt5.12.12/5.12.12/gcc_64/bin:$PATH
```
Replace `/path/to/Qt5.12.12/5.12.12/gcc_64/bin` with the actual path where you installed Qt 5.12.12. For example:
```bash
export PATH=/home/$USER/Qt5.12.12/5.12.12/gcc_64/bin:$PATH
```
To verify that `qmake` is set up correctly, run the following command:
```bash
qmake --version
```
This should output:
```
QMake version 3.1
Using Qt version 5.12.12
```
### 3. **Clone the Application**
Now, you need to clone the `OctoGUI` repository from GitHub:
```bash
cd /home/$USER/app
git clone -b tracksensetwin_v4 https://github.com/octobotics/OctoGUI.git
```
Ensure you're cloning the correct branch. If `tracksensetwin_v4` is not the latest, you can check out the latest branch from the repository.
### 4. **Compile and Build the App**
After cloning the repository, navigate to the `OctoboticsApp` directory and create a build directory:
```bash
cd /home/$USER/app/OctoGUI/OctoboticsApp
mkdir build
cd build
```
Run `qmake` to generate the Makefile for the project:
```bash
qmake ../OctoboticsApp.pro
```
Next, build the app using `make`:
```bash
make
```
Finally, you can run the app:
```bash
./OctoboticsApp
```
### 5. **Create the AppImage**
To make an AppImage for the app, follow these steps:
1. Navigate to the `utils` directory:
```bash
cd /home/$USER/app/OctoGUI/utils
```
2. Create a build directory inside the `utils` folder:
```bash
mkdir build
```
3. Move the compiled `OctoboticsApp` to the `build` directory:
```bash
mv /home/$USER/app/OctoGUI/OctoboticsApp/build/OctoboticsApp /home/$USER/app/OctoGUI/utils/build
```
4. Now, run the `build.sh` script to create the AppImage:
```bash
cd /home/$USER/app/OctoGUI/utils
./build.sh
```
**Wait for the build process to complete**. Once it's done, the AppImage will be ready!
### 6. **Final Step: Enjoy Your Beautiful AppImage**
Now you have your `OctoPilot` built and packaged as an AppImage, ready to be used on your desktop. You can simply move the AppImage to your desktop or desired location.