Does anyone know how? I would like to fork it, and Windows development would be much simpler, given my setup. I know that there are other ways, maybe WSL or a Linux VM, but I have technical reason for preferring straight Windows development.
None of the releases support being built on Windows in a “normal” fashion: they all expect to be cross compiled with MinGW on Linux.
However, @ArdiMaster has recently done work to get Gargoyle building in a more MSVC-like environment. If you check out the latest master, the INSTALL.md file has a section “Clang on Windows” which has some information on building. I’m not sure if MSVC itself would have any luck building Gargoyle, but this does use Clang in its MSVC mode, and uses Microsoft’s runtime (as opposed to MinGW).
No; there are plenty of spots that use GNU syntax extensions which MSVC does not understand. (Within the bundled interpreters more than garglk itself.)
I haven’t actually tried this, but I would expect that the easiest route to building on Windows would be to use an environment that provides the MinGW compilers, such as MSYS2 (https://www.msys2.org/). This is what I use for building the Inform7 compiler toolchain on Windows, among other things.
Yes, i was going to also suggest this. I build on windows with msys2. I could have a go at building Gargoyle. but it appears to use Jam. I cant find this to download.
rm -rf build/dist build-mingw
./windows.sh -a x86_64 -g -b
Might try later…
errors:
+ env MINGW_TRIPLE=x86_64-w64-mingw32 MINGW_LOCATION=/usr cmake .. -DCMAKE_TOOLCHAIN_FILE=../Toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DSOUND=SDL
-- Building for: Ninja
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/msys64/mingw64/bin/x86_64-w64-mingw32-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at D:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (messag
e):
Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
Call Stack (most recent call first):
D:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESS
AGE)
D:/msys64/mingw64/share/cmake/Modules/FindFreetype.cmake:162 (find_package_handle_standard_args)
garglk/CMakeLists.txt:122 (find_package)
I’ve never used MSYS2, but I just installed it to give it a try, and there are a couple things:
First, you shouldn’t need to use the windows.sh script. That’s meant for cross compiling on Linux. Since MSYS2 provides a POSIX-looking environment, you can directly call cmake just as you would on a Unix-like system.
Next, it looks to me like packages are installed in /mingw64 (in the MSYS2 environment), but CMake doesn’t know to look there. Pass -DCMAKE_PREFIX_PATH=/mingw64 so it knows about it.
With that, and installing various packages, I get the CMake process to complete.
Building fails for me, though. gcc and clang fail in their own ways, as do compilers installed as “gcc” vs “mingw-w64-x86_64-gcc”. Ninja vs Make have different failure modes, too.
This is beyond my area of understanding, but perhaps you can get it nudged further along.
Yes, the config step completes once all required packages are installed.
On Mac it doesn’t (yet) use Qt. And though I hope to eventually switch the official releases over to Qt, I see no reason to abandon CMake. I’m not even sure QMake provides the level of configurability Gargoyle needs.