Added a crude build script, DirectX 9 documentation

This commit is contained in:
Exynox 2024-11-16 18:51:55 +02:00
parent d19dc772db
commit e685bdd3e3
4 changed files with 72 additions and 1 deletions

View File

@ -10,3 +10,16 @@ while using files from [TMP4's project](https://metin2.dev/topic/27610-40250-ref
Except for some work in order to ensure compatibility with the server, this client is pretty much
unchanged.
## Requirements
### Installing DirectX 9.0c
The client has been updated to DirectX 9. This means that if DirectX 9 is not installed on your computer, you might be met with one of these error messages:
![picture](/doc/img/directx-error-1.png)
![picture](/doc/img/directx-error-2.png)
In this case, simply [download the DirectX End-User Runtimes (June 2010) from Microsoft's website](http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe) (SHA-1 checksum: `7E5D2E5E1A13FBC47F990CC55CBDB428CD12F759`). This is a self-extracting archive, so simply create a new folder, run the executable and extract its contents to that folder.
In this working folder, find and run `DXSETUP.exe` in order to start the install.
After the installation is complete, your client should run without issue.

58
build.bat Normal file
View File

@ -0,0 +1,58 @@
@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\

BIN
doc/img/directx-error-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
doc/img/directx-error-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB