forked from metin2/client
Updated build script to use 7-Zip for building archives
This commit is contained in:
parent
830e47b00b
commit
8b4d012e72
@ -1,15 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
setlocal enabledelayedexpansion
|
|
||||||
FOR /d %%i IN ("*") DO (
|
|
||||||
echo Packing %%i
|
|
||||||
rem "C:\Program Files\7-Zip\7z.exe" a "%%i.zip" ".\%%i\*" -m0=BZip2
|
|
||||||
rem "C:\Program Files\7-Zip-Zstandard\7za.exe" a "%%i.zip" ".\%%i\*" -m0=Zstd
|
|
||||||
rem "C:\Program Files\7-Zip\7z.exe" a "%%i.zip" ".\%%i\*" -m0=Copy
|
|
||||||
"C:\Program Files\7-Zip\7z.exe" a "%%i.zip" ".\%%i\*"
|
|
||||||
if !errorlevel! neq 0 exit /b !errorlevel!
|
|
||||||
|
|
||||||
cls
|
|
||||||
)
|
|
||||||
|
|
||||||
pause
|
|
19
build.bat
19
build.bat
@ -6,7 +6,7 @@ ECHO Only use on a clean project directory.
|
|||||||
ECHO ======================================================
|
ECHO ======================================================
|
||||||
|
|
||||||
rem SET M2_MSVC_DIR=C:\Program Files\Microsoft Visual Studio\2022\Community\
|
rem SET M2_MSVC_DIR=C:\Program Files\Microsoft Visual Studio\2022\Community\
|
||||||
rem SET M2_PML_PATH=C:\Users\User\Path\To\PackMakerLite\PackMakerLite.exe
|
rem SET M2_7ZIP_PATH=C:\Program Files\7-Zip\7z.exe
|
||||||
|
|
||||||
rem Check the environment variables
|
rem Check the environment variables
|
||||||
VERIFY OTHER 2>nul
|
VERIFY OTHER 2>nul
|
||||||
@ -16,17 +16,21 @@ IF NOT DEFINED M2_MSVC_DIR (
|
|||||||
ECHO M2_MSVC_DIR is NOT defined! Please define M2_MSVC_DIR with the path of your local MSVC install.
|
ECHO M2_MSVC_DIR is NOT defined! Please define M2_MSVC_DIR with the path of your local MSVC install.
|
||||||
EXIT /B -1
|
EXIT /B -1
|
||||||
)
|
)
|
||||||
IF NOT DEFINED M2_PML_PATH (
|
IF NOT DEFINED M2_7ZIP_PATH (
|
||||||
ECHO M2_PML_PATH is NOT defined! Please define M2_PML_PATH with the path of your local PackMakerLite executable.
|
ECHO M2_7ZIP_PATH is NOT defined! Please define M2_7ZIP_PATH with the path of your local 7-Zip "7z.exe" executable.
|
||||||
EXIT /B -1
|
EXIT /B -1
|
||||||
)
|
)
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
|
|
||||||
|
rem Cause variables to be expanded at execution time (in order for !errorlevel! to work)
|
||||||
|
SETLOCAL EnableDelayedExpansion
|
||||||
|
|
||||||
rem Initialize the MSVC environment
|
rem Initialize the MSVC environment
|
||||||
CALL "%M2_MSVC_DIR%\VC\Auxiliary\Build\vcvars32.bat"
|
CALL "%M2_MSVC_DIR%\VC\Auxiliary\Build\vcvars32.bat"
|
||||||
|
|
||||||
rem Build
|
rem Build
|
||||||
msbuild Metin2Client.sln /p:Configuration=Distribute /p:Platform="Win32"
|
msbuild Metin2Client.sln /p:Configuration=Distribute /p:Platform="Win32"
|
||||||
|
if !errorlevel! neq 0 exit /b !errorlevel!
|
||||||
|
|
||||||
rem Start assembling the client package
|
rem Start assembling the client package
|
||||||
RMDIR /S /Q dist
|
RMDIR /S /Q dist
|
||||||
@ -48,12 +52,11 @@ MKDIR dist\screenshot\
|
|||||||
xcopy bin\upload\ dist\upload\ /E /Y /Q
|
xcopy bin\upload\ dist\upload\ /E /Y /Q
|
||||||
|
|
||||||
rem Build and copy the archives
|
rem Build and copy the archives
|
||||||
DEL /F /Q "bin\pack\*.eix"
|
DEL /F /Q "bin\pack\*.zip"
|
||||||
DEL /F /Q "bin\pack\*.epk"
|
|
||||||
|
|
||||||
FOR /d %%i IN ("bin\pack\*") DO (
|
FOR /d %%i IN ("bin\pack\*") DO (
|
||||||
echo Packing %%i
|
echo Packing %%i
|
||||||
%M2_PML_PATH% --nolog --parallel -p "%%i"
|
"%M2_7ZIP_PATH%" a "%%i.zip" ".\%%i\*"
|
||||||
|
if !errorlevel! neq 0 exit /b !errorlevel!
|
||||||
)
|
)
|
||||||
MOVE /Y bin\pack\*.eix dist\pack\
|
MOVE /Y bin\pack\*.zip dist\pack\
|
||||||
MOVE /Y bin\pack\*.epk dist\pack\
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user