Red Panda C++ need Qt 5.15 to build.
Recommended development environments:
To setup development environment in Visual Studio Code:
0. (Windows only) Enable Developer Mode in Windows Settings, and enable core.symlinks
in Git (git config core.symlinks true
).
.vscode/compile_commands.json
(“C/C++: Edit Configurations (UI)” from the Command Palette);--compile-commands-dir=.vscode
;--qt=/usr
for example.* Note: xmake was introduced for compilation database generation and feature matrix test. It is not fully functional yet.
Library + Toolchain \ Target | x86 | x64 | ARM64 |
---|---|---|---|
MSYS2 + GNU-based MinGW | ✔️ | ✔️ | ❌ |
MSYS2 + LLVM-based MinGW | ✔️ | ✔️ | ✔️ |
Windows NT 5.x + MinGW Lite | ✔️ | ✔️ | ❌ |
See also more build instructions for Windows.
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), while the following toolchains are frequently tested:
Official distributions of Red Panda C++ are built with MINGW32 GCC and MINGW64 GCC.
Prerequisites:
pacman -S \
$MINGW_PACKAGE_PREFIX-{toolchain,qt5-static,7zip,cmake} \
mingw-w64-i686-nsis \
git curl
To build, launch selected MSYS2 environment, run:
./packages/msys/build-mingw.sh
to build Red Panda C++ installer and portable package with MinGW GCC toolchain or without compiler; and
./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.The script build-xp.sh
is alike build-mingw.sh
, but the toolchain is provided by Qt library.
Prerequisites:
pacman -S \
mingw-w64-x86_64-{7zip,cmake} \
mingw-w64-i686-nsis \
git curl
C:/Qt
.
C:
└─ Qt
└─ 5.15.13+redpanda1
├─ mingw141_32-msvcrt
│ ├─ bin
│ │ ├─ gcc.exe
│ │ ├─ mingw32-make.exe
│ │ └─ qmake.exe
│ ├─ include
│ ├─ lib
│ └─ ...
└─ mingw141_64-msvcrt
├─ bin
│ ├─ gcc.exe
│ ├─ mingw32-make.exe
│ └─ qmake.exe
├─ include
├─ lib
└─ ...
--qt
argument.To build, launch MSYS2 environment, run:
./packages/msys/build-xp.sh -p 32-msvcrt
This script accepts the same arguments as build-mingw.sh
, plus:
-p|--profile <profile>
: (REQUIRED) the profile of MinGW Lite as well as Qt library. Available profiles are 64-ucrt
, 64-msvcrt
, 32-ucrt
, 32-msvcrt
, 32-win2000
.
--qt <dir>
: set Qt directory. e.g. --qt /d/myqt-32
.
The directory structure should be like
D:
└─ myqt-32
├─ bin
├─ include
├─ lib
└─ ...
See also more build instructions for freedesktop.org-conforming (XDG) desktop systems.
sudo apt install --no-install-recommends build-essential debhelper devscripts equivs
./packages/alpine/buildapk.sh
./packages/archlinux/buildpkg.sh
./packages/debian/builddeb.sh
./packages/fedora/buildrpm.sh
./packages/opensuse/buildrpm.sh
~/packages/unsupported/$(uname -m)/redpanda-cpp-git-*.apk
/tmp/redpanda-cpp-git/redpanda-cpp-git-*.pkg.tar.zst
/tmp/redpanda-cpp_*.deb
~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm
RedPandaIDE
Note that some of these scripts check out HEAD of the repo, so any changes should be committed before building.
Alternatively, build in container (rootless Podman preferred; Docker may break file permissions):
podman run --rm -v $PWD:/mnt -w /mnt <image> ./packages/<distro>/01-in-docker.sh
# Arch Linux for example
podman run --rm -v $PWD:/mnt -w /mnt docker.io/archlinux:latest ./packages/archlinux/01-in-docker.sh
The package will be placed in dist/
.
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.
sudo apt install podman
./packages/debian-static/builddeb.sh
The package will be placed in dist/
.
podman run --rm -v $PWD:/mnt -w /mnt quay.io/redpanda-cpp/appimage-builder-x86_64:20240304.0 ./packages/appimage/01-in-docker.sh
Dockerfiles are available in redpanda-cpp/appimage-builder. Available architectures: x86_64
, aarch64
, riscv64
.
Prerequisites:
xcode-select --install
Build:
SRC_DIR="~/redpanda-src"
BUILD_DIR="~/redpanda-build"
INSTALL_DIR="~/redpanda-pkg"
rm -rf "$BUILD_DIR" # optional for clean build
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
~/Qt/5.15.2/clang_64/bin/qmake PREFIX="$INSTALL_DIR" "$SRC_DIR/Red_Panda_CPP.pro"
make -j$(sysctl -n hw.logicalcpu)
make install
~/Qt/5.15.2/clang_64/bin/macdeployqt "$INSTALL_DIR/bin/RedPandaIDE.app"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。