Merge branch 'master' of github.com:royqh1979/RedPanda-CPP

This commit is contained in:
Roy Qu 2024-03-29 08:31:31 +08:00
commit 6b5af409a6
7 changed files with 604 additions and 433 deletions

View File

@ -1,192 +1,263 @@
{
"Assembler" : {
"foreground" : "#0000FF",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Character" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Class" : {
"foreground" : "#008000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Comment" : {
"foreground" : "#0078D7",
"bold" : false,
"italic" : true,
"underlined" : false,
"strikeout" : false
},
"Escape sequences" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Float" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Function" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Global variable" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Hexadecimal" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Identifier" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Illegal Char" : {
"foreground" : "#FF0000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Local Variable" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Number" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Octal" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Preprocessor" : {
"foreground" : "#008000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Reserved Word" : {
"foreground" : "#000000",
"bold" : true,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Space" : {
"foreground": "#ffbababa",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"String" : {
"foreground" : "#FF0000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Symbol" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Variable" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Selected text" : {
"background" : "#64aaff7f"
},
"Gutter" : {
"foreground" : "#000000",
"background" : "#F0F0F0"
},
"Breakpoint" : {
},
"Error" : {
"foreground" : "#FFFFFF",
"background" : "#800000"
},
"Active Breakpoint": {
"background" : "#500055ff"
},
"Fold Line" : {
"foreground" : "#000000"
"background": "#500055ff",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Active Line": {
"background" : "#CCFFFF"
"background": "#ffccffff",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Warning" : {
"foreground" : "#9B6900"
"Assembler": {
"bold": false,
"foreground": "#ff0000ff",
"italic": false,
"strikeout": false,
"underlined": false
},
"Gutter Active Line": {
"foreground": "#ff0000ff"
"Breakpoint": {
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Character": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Class": {
"bold": false,
"foreground": "#ff008000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Comment": {
"bold": false,
"foreground": "#ff0078d7",
"italic": true,
"strikeout": false,
"underlined": false
},
"Current Highlighted Word": {
"background": "#64ffaaff"
"background": "#64ffaaff",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Editor Text": {
"background": "#ffffffff",
"foreground": "#ff000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Error": {
"background": "#ff800000",
"bold": false,
"foreground": "#ffff0000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Escape sequences": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Float": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Fold Line": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Function": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Global variable": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Gutter": {
"background": "#fff0f0f0",
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Gutter Active Line": {
"bold": false,
"foreground": "#ff0000ff",
"italic": false,
"strikeout": false,
"underlined": false
},
"Hexadecimal": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Identifier": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Illegal Char": {
"bold": false,
"foreground": "#ffff0000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Indent Guide Line": {
"foreground" : "#C0C0C0"
"bold": false,
"foreground": "#ffc0c0c0",
"italic": false,
"strikeout": false,
"underlined": false
},
"Local Variable": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Number": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Octal": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Preprocessor": {
"bold": false,
"foreground": "#ff008000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Reserve Word for Types": {
"bold": true,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Reserved Word": {
"bold": true,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Selected text": {
"background": "#64aaff7f",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Space": {
"bold": false,
"foreground": "#ffbababa",
"italic": false,
"strikeout": false,
"underlined": false
},
"String": {
"bold": false,
"foreground": "#ffff0000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Symbol": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Variable": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Warning": {
"bold": false,
"foreground": "#ff9b6900",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 1": {
"foreground" : "#000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 2": {
"foreground" : "#000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 3": {
"foreground" : "#FF0000"
"bold": false,
"foreground": "#ffff0000",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 4": {
"foreground" : "#000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
}
}

View File

@ -1,192 +1,263 @@
{
"Assembler" : {
"foreground" : "#0000FF",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Character" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Class" : {
"foreground" : "#008000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Comment" : {
"foreground" : "#0078D7",
"bold" : false,
"italic" : true,
"underlined" : false,
"strikeout" : false
},
"Escape sequences" : {
"foreground" : "#800080",
"bold" : true,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Float" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Function" : {
"foreground" : "#008080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Global variable" : {
"foreground" : "#400080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Hexadecimal" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Identifier" : {
"foreground" : "#000000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Illegal Char" : {
"foreground" : "#FF0000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Local Variable" : {
"foreground" : "#400080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Number" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Octal" : {
"foreground" : "#800080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Preprocessor" : {
"foreground" : "#008000",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Reserved Word" : {
"foreground" : "#000000",
"bold" : true,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Space" : {
"foreground": "#ffbababa",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"String" : {
"foreground" : "#0000FF",
"bold" : true,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Symbol" : {
"foreground" : "#C10000",
"bold" : true,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Variable" : {
"foreground" : "#400080",
"bold" : false,
"italic" : false,
"underlined" : false,
"strikeout" : false
},
"Selected text" : {
"background" : "#64aaff7f"
},
"Gutter" : {
"foreground" : "#000000",
"background" : "#F0F0F0"
},
"Breakpoint" : {
},
"Error" : {
"foreground" : "#FFFFFF",
"background" : "#800000"
},
"Active Breakpoint": {
"background" : "#500055ff"
},
"Fold Line" : {
"foreground" : "#000000"
"background": "#500055ff",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Active Line": {
"background" : "#CCFFFF"
"background": "#ffccffff",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Warning" : {
"foreground" : "#9B6900"
"Assembler": {
"bold": false,
"foreground": "#ff0000ff",
"italic": false,
"strikeout": false,
"underlined": false
},
"Gutter Active Line": {
"foreground": "#ff0000ff"
"Breakpoint": {
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Character": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Class": {
"bold": false,
"foreground": "#ff008000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Comment": {
"bold": false,
"foreground": "#ff0078d7",
"italic": true,
"strikeout": false,
"underlined": false
},
"Current Highlighted Word": {
"background": "#64ffaaff"
"background": "#64ffaaff",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Editor Text": {
"background": "#ffffffff",
"foreground": "#ff000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Error": {
"background": "#ff800000",
"bold": false,
"foreground": "#ffff0000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Escape sequences": {
"bold": true,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Float": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Fold Line": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Function": {
"bold": false,
"foreground": "#ff008080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Global variable": {
"bold": false,
"foreground": "#ff400080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Gutter": {
"background": "#fff0f0f0",
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Gutter Active Line": {
"bold": false,
"foreground": "#ff0000ff",
"italic": false,
"strikeout": false,
"underlined": false
},
"Hexadecimal": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Identifier": {
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Illegal Char": {
"bold": false,
"foreground": "#ffff0000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Indent Guide Line": {
"foreground" : "#C0C0C0"
"bold": false,
"foreground": "#ffc0c0c0",
"italic": false,
"strikeout": false,
"underlined": false
},
"Local Variable": {
"bold": false,
"foreground": "#ff400080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Number": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Octal": {
"bold": false,
"foreground": "#ff800080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Preprocessor": {
"bold": false,
"foreground": "#ff008000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Reserve Word for Types": {
"bold": true,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Reserved Word": {
"bold": true,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Selected text": {
"background": "#64aaff7f",
"bold": false,
"italic": false,
"strikeout": false,
"underlined": false
},
"Space": {
"bold": false,
"foreground": "#ffbababa",
"italic": false,
"strikeout": false,
"underlined": false
},
"String": {
"bold": true,
"foreground": "#ff0000ff",
"italic": false,
"strikeout": false,
"underlined": false
},
"Symbol": {
"bold": true,
"foreground": "#ffc10000",
"italic": false,
"strikeout": false,
"underlined": false
},
"Variable": {
"bold": false,
"foreground": "#ff400080",
"italic": false,
"strikeout": false,
"underlined": false
},
"Warning": {
"bold": false,
"foreground": "#ff9b6900",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 1": {
"foreground" : "#000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 2": {
"foreground" : "#C10000"
"bold": false,
"foreground": "#ffc10000",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 3": {
"foreground" : "#0000FF"
"bold": false,
"foreground": "#ff0000ff",
"italic": false,
"strikeout": false,
"underlined": false
},
"brace/parenthesis/bracket level 4": {
"foreground" : "#000000"
"bold": false,
"foreground": "#ff000000",
"italic": false,
"strikeout": false,
"underlined": false
}
}

View File

@ -6,7 +6,7 @@ set -euxo pipefail
# packages/msys/build-mingw.sh [-m|--msystem <MSYSTEM>] [-c|--clean] [-nd|--no-deps] [-t|--target-dir <dir>]
# Options:
# -m, --msystem <MSYSTEM> switch to other MSYS2 environment
# (MINGW32, MINGW64, UCRT64, CLANG32, CLANG64)
# (MINGW32, MINGW64, UCRT64, CLANG32, CLANG64, CLANGARM64)
# MUST be used before other options
# -c, --clean clean build and package directories
# -nd, --no-deps skip dependency check
@ -24,7 +24,7 @@ if [[ $# -gt 1 && ($1 == "-m" || $1 == "--msystem") ]]; then
msystem=$2
shift 2
case "${msystem}" in
MINGW32|MINGW64|UCRT64|CLANG32|CLANG64)
MINGW32|MINGW64|UCRT64|CLANG32|CLANG64|CLANGARM64)
export MSYSTEM="${msystem}"
exec /bin/bash --login "$0" "$@"
;;
@ -38,28 +38,30 @@ fi
case "${MSYSTEM}" in
MINGW32|CLANG32) # there is no UCRT32
NSIS_ARCH=x86
BITNESS=32
COMPILER_NAME="MinGW-w64 i686 GCC 8.1"
ARCHIVE_MINGW_COMPILER_BASENAME="RedPanda.C++.${APP_VERSION}.win32.${COMPILER_NAME}"
ARCHIVE_NO_COMPILER_BASENAME="RedPanda.C++.${APP_VERSION}.win32.No.Compiler"
PACKAGE_BASENAME="RedPanda.C++.${APP_VERSION}.win32"
;;
MINGW64|UCRT64|CLANG64)
NSIS_ARCH=x64
BITNESS=64
COMPILER_NAME="MinGW-w64 X86_64 GCC 11.4"
ARCHIVE_MINGW_COMPILER_BASENAME="RedPanda.C++.${APP_VERSION}.win64.${COMPILER_NAME}"
ARCHIVE_NO_COMPILER_BASENAME="RedPanda.C++.${APP_VERSION}.win64.No.Compiler"
PACKAGE_BASENAME="RedPanda.C++.${APP_VERSION}.win64"
;;
CLANGARM64)
NSIS_ARCH=arm64
PACKAGE_BASENAME="RedPanda.C++.${APP_VERSION}.arm64"
;;
*)
echo "This script must be run in one of the following MSYS2 shells:"
echo " - MINGW32 / CLANG32"
echo " - MINGW64 / UCRT64 / CLANG64"
echo " - CLANGARM64"
exit 1
;;
esac
CLEAN=0
CHECK_DEPS=1
compilers=()
COMPILER_MINGW32=0
COMPILER_MINGW64=0
TARGET_DIR="$(pwd)/dist"
while [[ $# -gt 0 ]]; do
case $1 in
@ -67,6 +69,16 @@ while [[ $# -gt 0 ]]; do
CLEAN=1
shift
;;
--mingw32)
compilers+=("mingw32")
COMPILER_MINGW32=1
shift
;;
--mingw64)
compilers+=("mingw64")
COMPILER_MINGW64=1
shift
;;
-nd|--no-deps)
CHECK_DEPS=0
shift
@ -87,7 +99,21 @@ PACKAGE_DIR="${TEMP}/redpanda-mingw-${MSYSTEM}-pkg"
QMAKE="${MINGW_PREFIX}/qt5-static/bin/qmake"
NSIS="/mingw32/bin/makensis"
SOURCE_DIR="$(pwd)"
MINGW_ARCHIVE="mingw${BITNESS}.7z"
MINGW32_ARCHIVE="mingw32.7z"
MINGW32_COMPILER_NAME="MinGW-w64 i686 GCC 8.1"
MINGW32_PACKAGE_SUFFIX="MinGW32_8.1"
MINGW64_ARCHIVE="mingw64.7z"
MINGW64_COMPILER_NAME="MinGW-w64 X86_64 GCC 11.4"
MINGW64_PACKAGE_SUFFIX="MinGW64_11.4"
if [[ ${#compilers[@]} -eq 0 ]]; then
PACKAGE_BASENAME="${PACKAGE_BASENAME}.NoCompiler"
else
[[ ${COMPILER_MINGW32} -eq 1 ]] && PACKAGE_BASENAME="${PACKAGE_BASENAME}.${MINGW32_PACKAGE_SUFFIX}"
[[ ${COMPILER_MINGW64} -eq 1 ]] && PACKAGE_BASENAME="${PACKAGE_BASENAME}.${MINGW64_PACKAGE_SUFFIX}"
fi
function fn_print_progress() {
echo -e "\e[1;32;44m$1\e[0m"
@ -100,7 +126,7 @@ if [[ ${CHECK_DEPS} -eq 1 ]]; then
MINGW32|MINGW64|UCRT64)
compiler=gcc
;;
CLANG32|CLANG64)
CLANG32|CLANG64|CLANGARM64)
compiler=clang
;;
esac
@ -117,8 +143,12 @@ if [[ ${CHECK_DEPS} -eq 1 ]]; then
done
fi
if [[ ! -f "${SOURCE_DIR}/assets/${MINGW_ARCHIVE}" ]]; then
echo "Missing MinGW archive: assets/${MINGW_ARCHIVE}"
if [[ ${COMPILER_MINGW32} -eq 1 && ! -f "${SOURCE_DIR}/assets/${MINGW32_ARCHIVE}" ]]; then
echo "Missing MinGW archive: assets/${MINGW32_ARCHIVE}"
exit 1
fi
if [[ ${COMPILER_MINGW64} -eq 1 && ! -f "${SOURCE_DIR}/assets/${MINGW64_ARCHIVE}" ]]; then
echo "Missing MinGW archive: assets/${MINGW64_ARCHIVE}"
exit 1
fi
@ -136,7 +166,7 @@ fn_print_progress "Building..."
pushd .
cd "${BUILD_DIR}"
qmake_flags=()
[[ NSIS_ARCH == x64 ]] && qmake_flags+=("X86_64=ON")
[[ ${NSIS_ARCH} == x64 ]] && qmake_flags+=("X86_64=ON")
"$QMAKE" PREFIX="${PACKAGE_DIR}" ${qmake_flags[@]} -o Makefile "${SOURCE_DIR}/Red_Panda_Cpp.pro" -r
mingw32-make -j$(nproc)
mingw32-make install
@ -153,45 +183,31 @@ cp "${SOURCE_DIR}/platform/windows/installer-scripts/lang.nsh" .
cp "${SOURCE_DIR}/platform/windows/installer-scripts/redpanda.nsi" .
popd
## make no-compiler package
## make package
pushd .
cd "${PACKAGE_DIR}"
SETUP_NAME="${ARCHIVE_NO_COMPILER_BASENAME}.Setup.exe"
PORTABLE_NAME="${ARCHIVE_NO_COMPILER_BASENAME}.Portable.7z"
fn_print_progress "Making no-compiler installer ..."
"${NSIS}" \
-DAPP_VERSION="${APP_VERSION}" \
-DARCH="${NSIS_ARCH}" \
-DFINALNAME="${SETUP_NAME}" \
redpanda.nsi
fn_print_progress "Making no-compiler Portable Package..."
7z x "${SETUP_NAME}" -o"RedPanda-CPP" -xr'!$PLUGINSDIR' -x"!uninstall.exe"
7z a -mmt -mx9 -ms=on -mqs=on -mf=BCJ2 "${PORTABLE_NAME}" "RedPanda-CPP"
rm -rf "RedPanda-CPP"
mv "${SETUP_NAME}" "${TARGET_DIR}"
mv "${PORTABLE_NAME}" "${TARGET_DIR}"
popd
## make mingw package
pushd .
cd "${PACKAGE_DIR}"
SETUP_NAME="${ARCHIVE_MINGW_COMPILER_BASENAME}.Setup.exe"
PORTABLE_NAME="${ARCHIVE_MINGW_COMPILER_BASENAME}.Portable.7z"
SETUP_NAME="${PACKAGE_BASENAME}.Setup.exe"
PORTABLE_NAME="${PACKAGE_BASENAME}.Portable.7z"
fn_print_progress "Making installer..."
[[ ! -d "mingw${BITNESS}" ]] && 7z x "${SOURCE_DIR}/assets/${MINGW_ARCHIVE}" -o"${PACKAGE_DIR}"
"${NSIS}" \
-DAPP_VERSION="${APP_VERSION}" \
-DARCH="${NSIS_ARCH}" \
-DFINALNAME="${SETUP_NAME}" \
-DHAVE_MINGW -DCOMPILERNAME="${COMPILER_NAME}" -DCOMPILERFOLDER="mingw${BITNESS}" \
redpanda.nsi
nsis_flags=(
-DAPP_VERSION="${APP_VERSION}"
-DARCH="${NSIS_ARCH}"
-DFINALNAME="${SETUP_NAME}"
-DMINGW32_COMPILER_NAME="${MINGW32_COMPILER_NAME}"
-DMINGW64_COMPILER_NAME="${MINGW64_COMPILER_NAME}"
)
if [[ ${COMPILER_MINGW32} -eq 1 ]]; then
nsis_flags+=(-DHAVE_MINGW32)
[[ -d "mingw32" ]] || 7z x "${SOURCE_DIR}/assets/${MINGW32_ARCHIVE}" -o"${PACKAGE_DIR}"
fi
if [[ ${COMPILER_MINGW64} -eq 1 ]]; then
nsis_flags+=(-DHAVE_MINGW64)
[[ -d "mingw64" ]] || 7z x "${SOURCE_DIR}/assets/${MINGW64_ARCHIVE}" -o"${PACKAGE_DIR}"
fi
"${NSIS}" "${nsis_flags[@]}" redpanda.nsi
fn_print_progress "Making Portable Package..."
7z x "${SETUP_NAME}" -o"RedPanda-CPP" -xr'!$PLUGINSDIR' -x"!uninstall.exe"

View File

@ -2,7 +2,8 @@
LangString MessageAppName 1033 "Red Panda C++"
LangString MessageSectionMain 1033 "The Red Panda C++ IDE (Integrated Development Environment)"
LangString MessageSectionIcons 1033 "Various icons that you can use in your programs"
LangString MessageSectionMinGW 1033 "The ${COMPILERNAME} compiler and associated tools, headers and libraries"
LangString MessageSectionMinGW32 1033 "The ${MINGW32_COMPILER_NAME} compiler and associated tools, headers and libraries"
LangString MessageSectionMinGW64 1033 "The ${MINGW64_COMPILER_NAME} compiler and associated tools, headers and libraries"
LangString MessageSectionLangs 1033 "The Red Panda C++ interface translated to different languages (other than English which is built-in)"
LangString MessageSectionAssocs 1033 "Use Red Panda C++ as the default application for opening these types of files"
LangString MessageSectionShortcuts 1033 "Create shortcuts to Red Panda C++ in various folders"
@ -13,7 +14,8 @@ LangString MessageRemoveConfig 1033 "Do you want to remove all the remainin
LangString SectionMainName 1033 "Program files (required)"
LangString SectionIconsName 1033 "Icon files"
LangString SectionLangsName 1033 "Language files"
LangString SectionMinGWName 1033 "${COMPILERNAME} compiler"
LangString SectionMinGW32Name 1033 "${MINGW32_COMPILER_NAME} compiler"
LangString SectionMinGW64Name 1033 "${MINGW64_COMPILER_NAME} compiler"
LangString SectionAssocsName 1033 "Associate files to Red Panda C++"
LangString SectionAssocExtNameBegin 1033 "Associate"
LangString SectionAssocExtNameEnd 1033 "files to Red Panda C++"
@ -26,7 +28,8 @@ LangString SectionConfigName 1033 "Remove old configuration files"
LangString MessageAppName 2052 "小熊猫C++"
LangString MessageSectionMain 2052 "小熊猫C++ IDE (集成开发环境)"
LangString MessageSectionIcons 2052 "项目模板使用的图标文件"
LangString MessageSectionMinGW 2052 "${COMPILERNAME} 编译器和相关的工具、头文件和库"
LangString MessageSectionMinGW32 2052 "${MINGW32_COMPILER_NAME} 编译器和相关的工具、头文件和库"
LangString MessageSectionMinGW64 2052 "${MINGW64_COMPILER_NAME} 编译器和相关的工具、头文件和库"
LangString MessageSectionLangs 2052 "小熊猫C++翻译文件"
LangString MessageSectionAssocs 2052 "使用小熊猫C++打开这些文件"
LangString MessageSectionShortcuts 2052 "开始菜单和快捷方式"
@ -37,7 +40,8 @@ LangString MessageRemoveConfig 2052 "你想要删除所有的配置文件
LangString SectionMainName 2052 "程序文件 (必须)"
LangString SectionIconsName 2052 "图标文件"
LangString SectionLangsName 2052 "语言文件"
LangString SectionMinGWName 2052 "${COMPILERNAME}编译器"
LangString SectionMinGW32Name 2052 "${MINGW32_COMPILER_NAME} 编译器"
LangString SectionMinGW64Name 2052 "${MINGW64_COMPILER_NAME} 编译器"
LangString SectionAssocsName 2052 "关联文件到小熊猫C++"
LangString SectionAssocExtNameBegin 2052 "将"
LangString SectionAssocExtNameEnd 2052 "文件关联到小熊猫C++"

View File

@ -104,12 +104,21 @@ Section "$(SectionMainName)" SectionMain
SectionEnd
!ifdef HAVE_MINGW
Section "$(SectionMinGWName)" SectionMinGW
!ifdef HAVE_MINGW32
Section "$(SectionMinGW32Name)" SectionMinGW32
SectionIn 1 3
SetOutPath $INSTDIR\${COMPILERFOLDER}
SetOutPath $INSTDIR
File /nonfatal /r "${COMPILERFOLDER}\*"
File /nonfatal /r "mingw32"
SectionEnd
!endif
!ifdef HAVE_MINGW64
Section "$(SectionMinGW64Name)" SectionMinGW64
SectionIn 1 3
SetOutPath $INSTDIR
File /nonfatal /r "mingw64"
SectionEnd
!endif
@ -263,8 +272,11 @@ SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SectionMain} "$(MessageSectionMain)"
!ifdef HAVE_MINGW
!insertmacro MUI_DESCRIPTION_TEXT ${SectionMinGW} "$(MessageSectionMinGW)"
!ifdef HAVE_MINGW32
!insertmacro MUI_DESCRIPTION_TEXT ${SectionMinGW32} "$(MessageSectionMinGW32)"
!endif
!ifdef HAVE_MINGW64
!insertmacro MUI_DESCRIPTION_TEXT ${SectionMinGW64} "$(MessageSectionMinGW64)"
!endif
!insertmacro MUI_DESCRIPTION_TEXT ${SectionShortcuts} "$(MessageSectionShortcuts)"
!insertmacro MUI_DESCRIPTION_TEXT ${SectionAssocs} "$(MessageSectionAssocs)"
@ -488,9 +500,8 @@ Section "Uninstall"
RMDir /r "$INSTDIR\Lang"
RMDir /r "$INSTDIR\Templates"
RMDir /r "$INSTDIR\MinGW32"
RMDir /r "$INSTDIR\MinGW64"
RMDir /r "$INSTDIR\Clang64"
RMDir /r "$INSTDIR\mingw32"
RMDir /r "$INSTDIR\mingw64"
StrCpy $0 "$INSTDIR"
Call un.DeleteDirIfEmpty
@ -499,10 +510,8 @@ Section "Uninstall"
DeleteRegKey ShCtx "Software\Microsoft\Windows\CurrentVersion\Uninstall\RedPanda-C++"
DeleteRegKey ShCtx "Software\RedPanda-C++"
IfSilent +2 ; Don't ask when running in silent mode
MessageBox MB_YESNO "$(MessageRemoveConfig)" IDNO Done
MessageBox MB_YESNO "$(MessageRemoveConfig)" /SD IDNO IDNO SkipRemoveConfig
RMDir /r "$APPDATA\RedPandaIDE"
SkipRemoveConfig:
Done:
SectionEnd