-
Notifications
You must be signed in to change notification settings - Fork 91
Сборка Вангеров под Windows (mingw64)
Katarn edited this page Nov 25, 2022
·
1 revision
Устанавливаете MSYS2 и запускаете mingw64. Результаты компиляции будут в каталоге Vangers/vangers/bin
.
ВАЖНО. Ваш компьютер должен иметь название на латинице. Не ВАСЯ-ПК, а VASYA-PC.
pacman --noconfirm -S mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-cmake mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-nasm mingw-w64-x86_64-yasm mingw-w64-x86_64-make mingw-w64-x86_64-diffutils
git clone https://github.com/KranX/Vangers
cd Vangers
git clone --depth 1 https://github.com/stalkerg/clunk.git clunk
mkdir clunk/build
cd clunk/build
cmake -DCMAKE_INSTALL_PREFIX=/mingw64 -G Ninja ..
ninja
ninja install
cd ../..
git clone --depth 1 --branch n4.2.2 https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-shared --prefix=/mingw64 --disable-everything --enable-swscale --enable-zlib --enable-demuxer=avi,rawvideo --enable-decoder=png,rawvideo --enable-parser=png --enable-protocol=file --disable-d3d11va --disable-dxva2 --disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg --disable-static --disable-bzlib --disable-libopenjpeg --disable-iconv
mingw32-make -j4
mingw32-make install
cd ..
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja .. -DBINARY_SCRIPT=OFF
ninja
cd ..
mkdir -p vangers/bin
cp /mingw64/bin/SDL2.dll vangers/bin/
cp /mingw64/bin/SDL2_net.dll vangers/bin/
cp /mingw64/bin/avcodec-58.dll vangers/bin/
cp /mingw64/bin/avformat-58.dll vangers/bin/
cp /mingw64/bin/avutil-56.dll vangers/bin/
cp /mingw64/bin/libogg-0.dll vangers/bin/
cp /mingw64/bin/libvorbis-0.dll vangers/bin/
cp /mingw64/bin/libvorbisfile-3.dll vangers/bin/
cp /mingw64/bin/zlib1.dll vangers/bin/
cp /mingw64/bin/libgcc_s_seh-1.dll vangers/bin/
cp /mingw64/bin/libstdc++-6.dll vangers/bin/
cp /mingw64/bin/libwinpthread-1.dll vangers/bin/
cp clunk/build/libclunk.dll vangers/bin/
cp build/src/vangers.exe vangers/bin/
cp build/server/vangers_server.exe vangers/bin/
cp -r data/* vangers/bin/
Далее в каталог Vangers/vangers/bin
скопируйте данные из игры (содержимое каталога data
из Steam).
cd Vangers/build
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja .. -DBINARY_SCRIPT=OFF
ninja
cd ..
cp build/src/vangers.exe vangers/bin/
cp build/server/vangers_server.exe vangers/bin/
cp -r data/* vangers/bin/
- Устанавливаете MinGW64:
pacman -S mingw-w64-x86_64-gdb
- Открываете каталог репозитория в VS Code;
- Создаете в
.vscode
файлlaunch.json
со следующим содержанием:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Запустить",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/vangers/bin/vangers.exe",
"args": ["-russian"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/vangers/bin",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys32\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Включить автоматическое форматирование для gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}