From 86c98c43c2d7db069c06d27ce02c5864e407a2bc Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 13 Oct 2024 14:01:18 -0400 Subject: [PATCH] Fixes to make it build on OSX with old gear. I have an ancient OSX laptop that uses Clang 14 and it actuall works there. Amazing. --- README.md | 11 ++++++++++- gui.cpp | 1 + map.cpp | 1 + map.hpp | 2 -- scripts/reset_build.sh | 5 ++--- 5 files changed, 14 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/reset_build.sh diff --git a/README.md b/README.md index 27a6323..d0b1f98 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ # roguish -The next little game in the series where I make a fancy rogue game. \ No newline at end of file +The next little game in the series where I make a fancy rogue game. + +# OSX Build Notes + +* Quite a bad experience. Need to install Python, cmake, meson, and ninja all which are in homebrew but if you don't use homebrew then this is a problem. +* You need to run the .command script in Application/your python that updates the SSL certs. +* You have to give iTerm access to your keystrokes...because wtf it already has them? +* This points out a problem that I'm getting the keys using FTXUI but should either get them from SFML _or_ connect FTXUI to SFML's keyboard input events instead. +* Takes forever to load on older computers, and I've got no idea why SFML is like that. It seems the sound system is a pig that takes forever to load, so am I using it wrong? +* No actually this first run delay seems to be related to the security feature that blocks keyboard access on iTerm, so probably fixing that would speed it up. diff --git a/gui.cpp b/gui.cpp index 11fb77b..7892fac 100644 --- a/gui.cpp +++ b/gui.cpp @@ -4,6 +4,7 @@ #include // for allocator, shared_ptr #include // for string, operator<< #include // for sleep_for +#include #include // for hflow, paragraph, separator, hbox, vbox, filler, operator|, border, Element #include // for Render diff --git a/map.cpp b/map.cpp index d055bc9..223c64f 100644 --- a/map.cpp +++ b/map.cpp @@ -1,6 +1,7 @@ #include "map.hpp" #include "dbc.hpp" #include +#include #include #include "rand.hpp" #include diff --git a/map.hpp b/map.hpp index db9a91b..1f85408 100644 --- a/map.hpp +++ b/map.hpp @@ -15,8 +15,6 @@ struct Point { size_t y = 0; }; -struct Room; - struct Room { size_t x = 0; size_t y = 0; diff --git a/scripts/reset_build.sh b/scripts/reset_build.sh old mode 100644 new mode 100755 index e8c0b32..895bf23 --- a/scripts/reset_build.sh +++ b/scripts/reset_build.sh @@ -1,17 +1,16 @@ #!/usr/bin/env bash set -e -mv -f ./subprojects/packagecache . +mv -f ./subprojects/packagecache . || true rm -rf subprojects builddir mkdir subprojects -mv packagecache ./subprojects/ +mv packagecache ./subprojects/ || true mkdir builddir cp *.wrap subprojects meson wrap install fmt meson wrap install catch2 meson wrap install ftxui meson wrap install nlohmann_json -meson wrap install sfml meson wrap install libpng meson wrap install vorbis meson wrap install ogg