work save: package script for windows

This commit is contained in:
Roy Qu 2022-01-16 15:08:54 +08:00
parent 6be9190a8a
commit b26201d166
7 changed files with 75 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/.vs
*.bak

View File

@ -13,8 +13,6 @@ isEmpty(PREFIX) {
PREFIX = /usr/local
}
APP_VERSION = beta.0.13.2
DEFINES += PREFIX=\\\"$${PREFIX}\\\"
DEFINES += APP_NAME=\\\"$${APP_NAME}\\\"
DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}\\\"
@ -352,6 +350,12 @@ linux: {
TRANSLATIONS += \
RedPandaIDE_zh_CN.ts
win32: {
!isEmpty(PREFIX) {
target.path = $${PREFIX}
}
}
# Default rules for deployment.
qnx: target.path = $${PREFIX}/bin
else: unix:!android: target.path = $${PREFIX}/bin

View File

@ -7,6 +7,8 @@ SUBDIRS += \
APP_NAME = RedPandaCPP
APP_VERSION = 0.14
linux: {
isEmpty(PREFIX) {
@ -34,3 +36,18 @@ linux: {
INSTALLS += desktop
}
win32: {
!isEmpty(PREFIX) {
target.path = $${PREFIX}
resources.path = $${PREFIX}
resources.files += templates
resources.files += README.md
resources.files += NEWS.md
resources.files += LICENSE
resources.files += RedPandaIDE/images/devcpp.ico
INSTALLS += resources
}
}

View File

@ -23,6 +23,12 @@ isEmpty(PREFIX) {
PREFIX = /usr/local
}
win32: {
!isEmpty(BUILD_MSYS) {
target.path = $${PREFIX}
}
}
# Default rules for deployment.
qnx: target.path = $${PREFIX}/libexec/$${APP_NAME}
else: unix:!android: target.path = $${PREFIX}/libexec/$${APP_NAME}

View File

@ -30,6 +30,12 @@ isEmpty(PREFIX) {
PREFIX = /usr/local
}
win32: {
!isEmpty(PREFIX) {
target.path = $${PREFIX}
}
}
# Default rules for deployment.
qnx: target.path = $${PREFIX}/libexec/$${APP_NAME}
else: unix:!android: target.path = $${PREFIX}/libexec/$${APP_NAME}

View File

@ -1,9 +1,9 @@
####################################################################
# Startup
!define COMPILERNAME "MinGW-w64 X86_64 GCC 11.2"
!define COMPILERNAME "MinGW-w64 X86_64 GCC 10.3"
!define COMPILERFOLDER "MinGW64"
!define DEVCPP_VERSION "beta.0.12.3"
!define DEVCPP_VERSION "0.14"
!define FINALNAME "RedPanda-Cpp.7.${DEVCPP_VERSION}.${COMPILERNAME}.Setup.exe"
!define DISPLAY_NAME "Red Panda Dev-C++ 7 ${DEVCPP_VERSION}"

37
packages/msys/build.sh Normal file
View File

@ -0,0 +1,37 @@
#!/bin/bash
BUILD_DIR="${TEMP}/redpandacpp-build"
PACKAGE_DIR="${TEMP}/RedPanda-CPP"
GCC_DIR="/mingw64"
PATH="${GCC_DIR}/bin:${PATH}"
QMAKE="${GCC_DIR}/qt5-static/bin/qmake"
NSIS="/d/Program Files (x86)/NSIS/bin/makensis.exe"
SOURCE_DIR=`pwd`
MINGW64="/d/Program Files/RedPanda-CPP/MINGW64"
test -z "${BUILD_DIR}" | mkdir "${BUILD_DIR}"
test -z "${PACKAGE_DIR}" | mkdir "${PACKAGE_DIR}"
pushd .
cd "${BUILD_DIR}"
echo `pwd`
"$QMAKE" PREFIX="${PACKAGE_DIR}" BUILD_MSYS=1 -o Makefile "${SOURCE_DIR}\Red_Panda_Cpp.pro" -r -spec win32-g++
make -j16
make install
popd
pushd .
cd "${PACKAGE_DIR}"
mklink /j MinGW64 "${MINGW64}"
cp "${SOURCE_DIR}\installer\devcpp-x64.nsi" build.nsi
cp "${SOURCE_DIR}\installer\lang.nsh" .
"${NSIS}" build.nsi
rm -f lang.nsi
rm -f build.nsi
popd