Bundle: Implement ZIP creation on Windows

This commit is contained in:
2018-08-08 15:14:41 +02:00
parent 383cb4fcd2
commit 202ffb7ff1
2 changed files with 13 additions and 1 deletions

View File

@@ -203,6 +203,13 @@ if [ -z "${WGET}" ]; then
exit 1
fi
if [[ "${KERNEL_NAME}" == "MINGW"* ]]; then
_7Z=`which 7z`
if [ -z "${_7Z}" ]; then
echo "ERROR: 7z is not found, can not continue."
exit 1
fi
fi
# Make sure storage directory exists.
if [ -z ${STORAGE_DIRECTORY} ]; then
@@ -408,6 +415,10 @@ if [ "${KERNEL_NAME}" == "Darwin" ]; then
"${BUNDLE_DIRECTORY}" \
--exclude='*.DS_Store*' \
--exclude='*.pyc*'
elif [[ "${KERNEL_NAME}" == "MINGW"* ]]; then
"${_7Z}" a -r \
`basename ${BUNDLE_DIRECTORY}`.zip \
"${BUNDLE_DIRECTORY}"
else
${TAR} \
-C "${STORAGE_DIRECTORY}" \

View File

@@ -1,6 +1,7 @@
@echo off
SET ARCH=%1
set PATH=%PATH%;C:\Program Files\7-Zip\
if "%ARCH%" == "x64" (echo Building for 64bit) else (
if "%ARCH%" == "x86" (echo Building for 32bit) else (
@@ -14,4 +15,4 @@ rem cd %HOMEPATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
echo Use full exe names when running under bash, e.g. "msbuild.exe"
echo Loading bash, you may now use git and msbuild in the same console \o/.
"C:\Program Files\Git\bin\sh.exe" --login -i
"C:\Program Files\Git\bin\sh.exe" bundle-linux.sh