summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Enders <smenders@gmail.com>2021-01-29 20:42:36 -0500
committerStephen Enders <smenders@gmail.com>2021-01-29 21:25:35 -0500
commit9282acbacda6e6c67d9f2cde8ba5511216b7d3b0 (patch)
treea35c8e9e2ba753a4aa7a7bb48f16aba30b60f141
parent931dd28838fe09e8e8f07889f7a23c88aa47785b (diff)
Add windows and linux build notes
Added some really rough build notes too
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt5
-rw-r--r--README.md47
-rw-r--r--tasks.txt2
4 files changed, 54 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 9620655..8448f8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
*.o
ur
+ur.exe
Makefile
CMakeFiles
CMakeCache.txt
cmake_install.cmake
+build-mingw
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9aa3965..96ac035 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,11 @@ project(ur-sfml)
set(CMAKE_CXX_STANDARD 20)
set(EXECUTABLE_NAME ur)
+# detect windows
+if (WIN32)
+ set(SFML_DIR /home/senders/Downloads/SFML-2.5.1/lib/cmake/SFML)
+endif()
+
# setup SFML
set(SFML_LIBRARIES sfml-system sfml-window sfml-graphics)
find_package(SFML 2.5 REQUIRED COMPONENTS system window graphics)
diff --git a/README.md b/README.md
index 5e3913b..db32d1b 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,52 @@
## How to play
-Two players - 7 pieces each -
+Two players face off with 7 pieces taking turns rolling the dice and progressing their pieces
+to the end of the paths.
+First player is on the bottom, and top player is player 2.
+## Development
+
+### Linux
+
+Ur is built with SFML and cmake. You will need to install SFML libraries and cmake utilities.
+
+Then configure cmake:
+
+```
+cmake .
+make
+```
+
+### Windows
+
+To build on windows you'll need to setup
+the SFML include path as `SFML_DIR`
+
+then make sure to include all the DLLs needed when running.
+The ones required right now are:
+
+ - `sfml-graphics-2.dll`
+ - `sfml-system-2.dll`
+ - `sfml-window-2.dll`
+ - `libgcc_s_seh-1.dll`
+ - `libstdc++-6.dll`
+ - `libwinpthread-1.dll`
+
+Additional SFML libs not used:
+
+ - `sfml-audio-2.dll`
+ - `sfml-network-2.dll`
+
+On linux you can build the project for windows using mingw:
+
+```
+mkdir build-mingw
+cd build-mingw
+x86_64-w64-mingw-cmake -S ../ -B .
+make
+```
+
+You can run your windows build via wine64 by bundling your dll and the res folder along side the exe.
diff --git a/tasks.txt b/tasks.txt
index 44d0cb3..d0eb627 100644
--- a/tasks.txt
+++ b/tasks.txt
@@ -6,7 +6,7 @@
[x] no overlap
[x] pass on no-moves available
[x] only pass turn on "legal" move
-[ ] windows build
+[x] windows build
[ ] add useful logging
[ ] detect "win"
[ ] add splash / start screen?