diff --git a/BUILD.md b/BUILD.md index c61342fc..2f642d65 100644 --- a/BUILD.md +++ b/BUILD.md @@ -265,23 +265,25 @@ Extra requirements for Windows host: ```bash DOCKER=docker # or podman SOURCE_DIR=/build/RedPanda-CPP # source directory *in container* + JOBS=$(nproc) # reduce it for multiple builds at same time MIRROR=mirrors.kernel.org # leave empty for default mirror PLATFORM=linux/amd64 # or linux/386, linux/arm64/v8, linux/arm/v7, linux/riscv64 IMAGE=debian:12 # or Ubuntu (e.g. ubuntu:22.04) - $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -v $PWD:$SOURCE_DIR --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh + $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -e JOBS=$JOBS -v $PWD:$SOURCE_DIR --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh ``` * Windows host: ```ps1 $DOCKER = "docker" # or "podman" $SOURCE_DIR = "/build/RedPanda-CPP" # source directory *in container* + $JOBS = $Env:NUMBER_OF_PROCESSORS # reduce it for multiple builds at same time $MIRROR = "mirrors.kernel.org" # leave empty for default mirror $PLATFORM = "linux/amd64" # or "linux/386", "linux/arm64/v8", "linux/arm/v7", "linux/riscv64" $IMAGE = "debian:12" # or Ubuntu (e.g. "ubuntu:22.04") - & $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -v "$(Get-Location):$SOURCE_DIR" --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh + & $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -e JOBS=$JOBS -v "$(Get-Location):$SOURCE_DIR" --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh ``` ### Manual Install diff --git a/BUILD_cn.md b/BUILD_cn.md index 41159fef..00c638b9 100644 --- a/BUILD_cn.md +++ b/BUILD_cn.md @@ -265,23 +265,25 @@ Windows 宿主的额外要求: ```bash DOCKER=docker # 或 podman SOURCE_DIR=/build/RedPanda-CPP # *容器内*的源代码路径 + JOBS=$(nproc) # 同时构建多个包时可降低并行数 MIRROR=mirrors.ustc.edu.cn # 留空以使用默认的镜像站 PLATFORM=linux/amd64 # 或 linux/386、linux/arm64/v8、linux/arm/v7、linux/riscv64 IMAGE=debian:12 # 或 Ubuntu(如 ubuntu:22.04) - $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -v $PWD:$SOURCE_DIR --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh + $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -e JOBS=$JOBS -v $PWD:$SOURCE_DIR --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh ``` * Windows 宿主: ```ps1 $DOCKER = "docker" # 或 "podman" $SOURCE_DIR = "/build/RedPanda-CPP" # *容器内*的源代码路径 + $JOBS = $Env:NUMBER_OF_PROCESSORS # 同时构建多个包时可降低并行数 $MIRROR = "mirrors.ustc.edu.cn" # 留空以使用默认的镜像站 $PLATFORM = "linux/amd64" # 或 "linux/386"、"linux/arm64/v8"、"linux/arm/v7"、"linux/riscv64" $IMAGE = "debian:12" # 或 Ubuntu(如 "ubuntu:22.04") - & $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -v "$(Get-Location):$SOURCE_DIR" --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh + & $DOCKER run --rm -e MIRROR=$MIRROR -e SOURCE_DIR=$SOURCE_DIR -e JOBS=$JOBS -v "$(Get-Location):$SOURCE_DIR" --platform $PLATFORM $IMAGE $SOURCE_DIR/packages/debian/01-in-docker.sh ``` ### 手动安装 diff --git a/NEWS.md b/NEWS.md index af265fa1..fd33be61 100644 --- a/NEWS.md +++ b/NEWS.md @@ -22,6 +22,8 @@ Red Panda C++ Version 2.25 - enhancement: Differentiate /* and /** when calculate auto indents. - fix: crash when using ibus as the input method. - fix: Correctly handle project templates that have wrong unit counts. + - fix: Project recompiles for every run if auto increase build number is turned on. + - fix: Auto increase build number for project is not correctly processed. Red Panda C++ Version 2.24 diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 4c2b0464..7aa42482 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -1918,14 +1918,14 @@ PProjectModelNode Project::getParentFileSystemFolderNode(const QString &filename void Project::incrementBuildNumber() { mOptions.versionInfo.build++; - mOptions.versionInfo.fileVersion = QString("%1.%2.%3.%3") + mOptions.versionInfo.fileVersion = QString("%1.%2.%3.%4") .arg(mOptions.versionInfo.major) .arg(mOptions.versionInfo.minor) .arg(mOptions.versionInfo.release) .arg(mOptions.versionInfo.build); if (mOptions.versionInfo.syncProduct) mOptions.versionInfo.productVersion = mOptions.versionInfo.fileVersion; - setModified(true); + saveOptions(); } QHash Project::loadLayout() diff --git a/packages/debian/01-in-docker.sh b/packages/debian/01-in-docker.sh index 6d2d664e..08c1b7d0 100755 --- a/packages/debian/01-in-docker.sh +++ b/packages/debian/01-in-docker.sh @@ -5,6 +5,7 @@ set -xe TMP_FOLDER=/build/redpanda-build DISTRO_ID=$(grep ^ID= /etc/os-release | cut -d= -f2- | tr -d '"') VERSION_ID=$(grep ^VERSION_ID= /etc/os-release | cut -d= -f2- | tr -d '"') +[[ -z $JOBS ]] && JOBS=$(nproc) # install deps default_repositories=( @@ -50,7 +51,7 @@ cp Red_Panda_CPP.pro $TMP_FOLDER # build cd $TMP_FOLDER -dpkg-buildpackage -us -uc +dpkg-buildpackage -us -uc -j$JOBS # copy back to host cd ..