Setting up Visual Studio to compile Ingnomia under Windows
Back in 2014, I really had fun with Gnomoria. I have 443.4 hours of playtime, and it made me sad when I found out that the original dev abandoned the project. That's when I learned of Ingnomia, an open source project to continue its legacy.
Now I also learned that Ingnomia's development seem to have stalled. So I decided to work on some improvements on my own, so maybe the community will get motivated yet again.
Gemini suggested that I tried to swap Noesis GUI, which is non-free, for Dear ImGui, which is open source. Setting up Ingnomia project for development is a pain due to Noesis requiring a trial key to work with it. And I naively thought that was the only issue with Noesis.
The first issue I ran into was setting up project dependencies. Qt requires you to sign up to download libraries, which is quite frustrating. I learned that you can download and compile them using vcpkg, so that's what I decided to do.
mkdir build
cd build
cmake .. -A x64 -DCMAKE_TOOLCHAIN_FILE="D:/Documents/Projetos/vcpkg/scripts/buildsystems/vcpkg.cmake"
vcpkg, I had to download the SDK zip manually from Valve and explicitly map the inclusion and library paths in the CMake command. The same went for OpenAL (Open Audio Library), which handles the 3D positional audio. Fortunately, OpenAL-Soft was available via vcpkg, so a quick vcpkg install openal-soft:x64-windows did the trick.static_assert check inside the code to block the compilation if a proprietary NOESIS_LICENSE_KEY wasn't provided. I had to go into the header files and comment out that assertion to bypass the cloud-licensing roadblock for local development.NsApp/DelegateCommand.h and rendering frameworks were buried deep inside recursive subdirectories that the old CMake configuration didn't know existed. I had to write a custom, recursive globbing script inside the root CMakeLists.txt to automatically scan and inject all Noesis headers and .lib import files into the compiler..cpp files to compile, the linker threw a fit with multiple unresolved external symbols. It turns out modern Noesis versions provide their App Framework as raw source code rather than pre-compiled .lib files.imgui_impl_qt), I bumped into MSVC's error C1010 regarding Precompiled Headers (PCH). Windows development enforces that every single source file must explicitly include the precompiled header at the very first line of code—a major workflow cultural shock coming from Linux!CMakeLists.txt, decoupled it from the main execution threads, and silenced its legacy calls inside mainwindow.cpp.Now we have to make the compiler generate a clean, unencumbered Ingnomia.exe binary. Code referencing the old proprietary UI framework must be erased, so we can have the OpenGL 4.3 rendering context active, with Dear ImGui successfully linked and running.
There is still a ton of dead, orphaned C++ interface code inside the directory tree that needs to be systematically deleted, but we'll need to revisit those sources to build our ImGui components anyway. Next time, I'll be focused on making it compile, and setting up the first rendering frames of our new open-source interface overlay.
Stay tuned for the revival!
Comentários
Postar um comentário