Skip to content

Commit aa3d240

Browse files
committed
Added Windows build script and documentation
1 parent 445f58d commit aa3d240

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ cd ../../bin/Release
4444

4545
### Windows
4646

47-
TBD.
48-
Build works on VS2019. CMake generation, but it will complain about SDL2 due to poorly setup sdl2-config.cmake.
49-
You'll need to setup the paths to SDL2 by hand.
47+
Double click on build_Visual_Studio_16_2019_x64.bat
48+
49+
If you want to use another target edit the beginning of the bat script, or manually:
50+
51+
1. Point CMake source to %bety_repo_path%
52+
1. Point CMake generation path to %bety_repo_path%/build
53+
54+
Build tested on VS2019.
5055

5156
### Python scripts
5257

build_Visual_Studio_16_2019_x64.bat

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
@echo off
3+
SETLOCAL
4+
5+
set GENERATOR="Visual Studio 16 2019"
6+
set PLATFORM=x64
7+
8+
set CMAKE_BIN_x86="C:\Program Files (x86)\CMake\bin\cmake.exe"
9+
set CMAKE_BIN_x64="C:\Program Files\CMake\bin\cmake.exe"
10+
IF EXIST %CMAKE_BIN_x64% (
11+
echo CMake 64-bit detected
12+
set CMAKE_BIN=%CMAKE_BIN_x64%
13+
) ELSE (
14+
IF EXIST %CMAKE_BIN_x86% (
15+
echo CMake 32-bit detected
16+
set CMAKE_BIN=%CMAKE_BIN_x86%
17+
) ELSE (
18+
echo Cannot detect either %CMAKE_BIN_x86% or
19+
echo %CMAKE_BIN_x64% make sure CMake is installed
20+
EXIT /B 1
21+
)
22+
)
23+
echo Using CMake at %CMAKE_BIN%
24+
25+
mkdir build
26+
cd build
27+
echo --- Building betsy ---
28+
%CMAKE_BIN% -G %GENERATOR% -A %PLATFORM% ..
29+
%CMAKE_BIN% --build . --config Debug
30+
%CMAKE_BIN% --build . --target install --config Debug
31+
%CMAKE_BIN% --build . --config Release
32+
%CMAKE_BIN% --build . --target install --config Release
33+
34+
echo Done!
35+
36+
ENDLOCAL

0 commit comments

Comments
 (0)