1. Install [xmake](https://xmake.io/) and [XMake extension](https://marketplace.visualstudio.com/items?itemName=tboox.xmake-vscode).
2. Install [C/C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) for language and debugging support.
3. Optionally install [clangd](https://clangd.llvm.org/) and [clangd extension](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd) for better analysis.
4. Config workspace:
- Compile commands: `.vscode/compile_commands.json` (“C/C++: Edit Configurations (UI)” from the Command Palette);
## MSYS2 Qt Library with MinGW Toolchain (Recommended)
Red Panda C++ should work with any MinGW toolchain from MSYS2, including GCCs and Clangs in three GNU-based environments (MINGW32, MINGW64 and UCRT64), and Clangs in three LLVM-based environments (CLANG32, CLANG64 and CLANGARM64; see also [MSYS2’s document](https://www.msys2.org/docs/environments/)), while the following toolchains are frequently tested:
- MINGW32 GCC,
- MINGW64 GCC,
- UCRT64 GCC (recommended for x64)
- CLANGARM64 Clang (the only and recommended toolchain for ARM64).
Official distributions of Red Panda C++ are built with MINGW32 GCC and MINGW64 GCC.
to build Red Panda C++ installer and portable package with MinGW GCC toolchain or without compiler; and
```bash
./packages/msys/build-llvm.sh
```
to build Red Panda C++ installer with LLVM MinGW toolchain.
Common arguments:
-`-h`, `--help`: show help message.
-`-c`, `--clean`: clean build directory.
-`-nd`, `--no-deps`: do not check dependencies.
-`-t <dir>`, `--target-dir <dir>`: set target directory for the packages. Default: `dist/`.
Extra arguments for `build-mingw.sh`:
-`--mingw32`: add `assets/mingw32.7z` to the package.
-`--mingw64`: add `assets/mingw64.7z` to the package.
-`--mingw`: alias for `--mingw32` (x86 app) or `--mingw64` (x64 app).
-`--ucrt <build>`: add UCRT runtime from Windows SDK to the package. e.g. `--ucrt 22621` for Windows 11 SDK 22H2.
## Windows XP Qt Library with MinGW UCRT Toolchain
The script `build-xp.sh` is alike `build-mingw.sh`, but it will download a standalone MinGW UCRT toolchain to build Red Panda C++ for Windows XP, according to current MSYS2 environment:
The package `redpanda-cpp-bin` is roughly “AppImage repack”. The binary is actually built in a container. Thus the build host is not necessarily Ubuntu 20.04; any Linux distribution with Podman and dpkg should work.
Dockerfiles are available in [redpanda-cpp/appimage-builder](https://github.com/redpanda-cpp/appimage-builder). Available architectures: `x86_64`, `aarch64`, `riscv64`.