59 lines
1.7 KiB
Batchfile
59 lines
1.7 KiB
Batchfile
@echo off
|
|
|
|
ECHO ======================================================
|
|
ECHO The Old Metin2 Project - Automated client build script
|
|
ECHO Only use on a clean project directory.
|
|
ECHO ======================================================
|
|
|
|
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 Check the environment variables
|
|
VERIFY OTHER 2>nul
|
|
SETLOCAL ENABLEEXTENSIONS
|
|
IF ERRORLEVEL 1 ECHO Unable to enable extensions
|
|
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.
|
|
EXIT /B -1
|
|
)
|
|
IF NOT DEFINED M2_PML_PATH (
|
|
ECHO M2_PML_PATH is NOT defined! Please define M2_PML_PATH with the path of your local PackMakerLite executable.
|
|
EXIT /B -1
|
|
)
|
|
ENDLOCAL
|
|
|
|
rem Initialize the MSVC environment
|
|
CALL "%M2_MSVC_DIR%\VC\Auxiliary\Build\vcvars32.bat"
|
|
|
|
rem Build
|
|
msbuild Metin2Client.sln /p:Configuration=Distribute /p:Platform="Win32"
|
|
|
|
rem Start assembling the client package
|
|
RMDIR /S /Q dist
|
|
MKDIR dist\
|
|
COPY /Y build\Distribute\UserInterface.exe dist\metin2.exe
|
|
|
|
rem Copy over the data from the bin directory
|
|
xcopy bin\ dist\ /Y /Q
|
|
DEL /S dist\.gitignore
|
|
xcopy bin\BGM\ dist\BGM\ /E /Y /Q
|
|
xcopy bin\lib\ dist\lib\ /E /Y /Q
|
|
MKDIR dist\mark\
|
|
xcopy bin\miles\ dist\miles\ /E /Y /Q
|
|
MKDIR dist\pack\
|
|
COPY /Y bin\pack\Index dist\pack\
|
|
COPY /Y bin\pack\*.rdch dist\pack\
|
|
MKDIR dist\screenshot\
|
|
xcopy bin\upload\ dist\upload\ /E /Y /Q
|
|
|
|
rem Build and copy the archives
|
|
DEL /F /Q "bin\pack\*.eix"
|
|
DEL /F /Q "bin\pack\*.epk"
|
|
|
|
FOR /d %%i IN ("bin\pack\*") DO (
|
|
echo Packing %%i
|
|
%M2_PML_PATH% --nolog --parallel -p "%%i"
|
|
)
|
|
MOVE /Y bin\pack\*.eix dist\pack\
|
|
MOVE /Y bin\pack\*.epk dist\pack\
|