-
Notifications
You must be signed in to change notification settings - Fork 0
Build for Windows with MSVC
TODO: Requires updates for SDL3
This guide assumes some knowledge of Visual Studio and Git under Windows.
MSVC is not an offically supported build method, and these instructions were community driven. See Build for Windows with MSVC Build Tools for a command-line build option.
To build EmptyEpsilon for Windows, the supported methods are cross-compilation in Build for Windows on Linux or Build for Windows on WSL.
You can build EmptyEpsilon using Microsoft's Visual Studio C++ support.
- Microsoft Visual Studio. The Community Edition is free.
-
CMake (
winget install Kitware.CMake), at least 3.10. - SDL2 VC development libraries.
- A flavor of git tool.
Clone both oznogon/EmptyEpsilon and oznogon/SeriousProton.
Extract the SDL2 archive somewhere.
Create a sdl2-config.cmake at the root of where you extracted the SDL2 archive with the following content:
# Tweak these to fit your need.
set(_SDL2_version 2.0.16)
# Assumes the sdl2-config.cmake is located at the root
# of where the development libraries were extracted:
# - <root>/
# | - sdl2-config.cmake
# | - SDL2-2.0.16/
# | - (include, docs, lib...)
#
set(_SDL2_prefix "${CMAKE_CURRENT_LIST_DIR}/SDL2-${_SDL2_version}")
set(flavor x86)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(flavor x64)
endif()
add_library(SDL2::SDL2main STATIC IMPORTED)
set_target_properties(SDL2::SDL2main PROPERTIES
IMPORTED_LOCATION "${_SDL2_prefix}/lib/${flavor}/SDL2main.lib"
)
add_library(SDL2::SDL2 SHARED IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
IMPORTED_LOCATION "${_SDL2_prefix}/lib/${flavor}/SDL2.dll"
IMPORTED_IMPLIB "${_SDL2_prefix}/lib/${flavor}/SDL2.lib"
INTERFACE_INCLUDE_DIRECTORIES "${_SDL2_prefix}/include"
)
target_link_libraries(SDL2::SDL2 INTERFACE SDL2::SDL2main)- Run the CMake GUI (
cmake-gui) - Click
Browse source...and browse to your cloneddaid/EmptyEpsilon - click
Browse build...and select an appropriate location. - Click
Add Entry...:- Name:
SERIOUS_PROTON_DIR - Type:
PATH - Value: Browse to your cloned
daid/SeriousProton
- Name:
- Click
Add Entry...(again):- Name:
SDL2_DIR - Type:
PATH - Value: Browse to where you created the
sdl2-config.cmakefile.
- Name:
- Click
Configure- Select your appropriate project versions and compiler arch. The defaults are a good choice.
- You may get "Permission Denied" errors. If this happens, try running CMake as administrator.
- Click
Generate - Click
Open Projector browse to the build directory you chose and open the sln from there.
As simple as building the project under Visual Studio, using build solution or right clicking the project.
Updates should get auto-picked up!
- Home
- Building and installing the game
- Configuring the game
- Playing the game
- Officer roles and screens
- Captain
- Main screen
- Ship window
- Crews of 5-6 players
- Crews of 3-4 players
- Single-player crew
- Game Master (GM) screens
- Extra screens
- Minigames
- Weapon types
- Officer roles and screens
- Extending the game
- Troubleshooting
- Fork content