Closed DarkWanderer closed 2 months ago
I plead guilty for adding plain source external dependencies, because adding submodules in pull requests seems a mess to synchronize between different repositories, especially when you do modifications to the original code.
If there's a simple way to do it then I'd be happy to hear it.
I plead guilty for adding plain source external dependencies, because adding submodules in pull requests seems a mess to synchronize between different repositories, especially when you do modifications to the original code.
If there's a simple way to do it then I'd be happy to hear it.
What is the use case for the changes in original code? Can it be covered by 'glue' code instead?
The ldoc module is generating CSS that looks terrible in htmlhelp, I patched some hard coded CSS values to work around it. There's probably a cleaner way to do it but I was running out of steam doing the documentation work and forgot to investigate it further.
That's not the best way to handle it generally - as it will make updating the modified library a sisyphean task later. It seems like time to fix that exceeds the time I have currently though, so I have limited the scope of the PR to elimination of submodules. Ready for review
A couple of remarks :
FetchContent_Declare(
lua
URL https://www.lua.org/ftp/lua-5.1.5.tar.gz
URL_HASH SHA256=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
)
but as expected, like every other thing cmake related, I cannot make it work.
#if(ORBITER_MAKE_DOC)
to generate the Lua doc, the build fails :
>------ Build All started: Project: openorbiter, Configuration: x64-Debug ------
[1/5] Generating out/index.html
FAILED: Src/Module/LuaScript/LuaInterpreter/out/index.html
cmd.exe /C "cd /D C:\github\openorbiter\out\build\x64-Debug\Src\Module\LuaScript\LuaInterpreter && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/Interpreter.cpp C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/Interpreter.h C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/config.ld C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/intro.md C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/lua_vessel_mtd.cpp C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/types.lua C:/github/openorbiter/out/build/x64-Debug/Src/Module/LuaScript/LuaInterpreter && C:\github\openorbiter\out\build\x64-Debug\Utils\lua.exe /ldoc.lua -v --multimodule . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Src/Module/LuaScript/LuaInterpreter/interpreter.hhp C:/github/openorbiter/out/build/x64-Debug/Src/Module/LuaScript/LuaInterpreter/out"
C:\github\openorbiter\out\build\x64-Debug\Utils\lua.exe: cannot open /ldoc.lua: No such file or directory
[2/5] cmd.exe /C "cd /D C:\github\openorbiter\out\build\x64-Debug\Extern && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Extern/ldoc/ C:/github/openorbiter/out/build/x64-Debug/packages/ldoc && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Extern/Penlight/lua/ C:/github/openorbiter/out/build/x64-Debug/"
[3/5] cmd.exe /C "cd /D C:\github\openorbiter\out\build\x64-Debug\Sound\XRSound && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory C:/github/openorbiter/out/build/x64-Debug/Doc && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory C:/github/openorbiter/out/build/x64-Debug/XRSound && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory C:/github/openorbiter/out/build/x64-Debug/Orbitersdk/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Sound/XRSound/assets/XRSound/XRSound-Atlantis.cfg C:/github/openorbiter/Sound/XRSound/assets/XRSound/XRSound-DG-S.cfg C:/github/openorbiter/Sound/XRSound/assets/XRSound/XRSound-DeltaGlider.cfg C:/github/openorbiter/Sound/XRSound/assets/XRSound/XRSound-ShuttleA.cfg C:/github/openorbiter/Sound/XRSound/assets/XRSound/XRSound.cfg C:/github/openorbiter/out/build/x64-Debug/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Sound/XRSound/assets/XRSound/ReadMe.txt C:/github/openorbiter/out/build/x64-Debug/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy "C:/github/openorbiter/Sound/XRSound/assets/Doc/XRSound User Manual.pdf" C:/github/openorbiter/out/build/x64-Debug/Doc/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Sound/XRSound/src/XRSound.h C:/github/openorbiter/out/build/x64-Debug/Orbitersdk/XRSound/ && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Extern/irrKlang/x64/bin/winx64-visualStudio/ikpMP3.dll C:/github/openorbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Extern/irrKlang/x64/bin/winx64-visualStudio/ikpFlac.dll C:/github/openorbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy C:/github/openorbiter/Extern/irrKlang/x64/bin/winx64-visualStudio/irrKlang.dll C:/github/openorbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Sound/XRSound/assets/XRSound/Default C:/github/openorbiter/out/build/x64-Debug/XRSound/Default"
[4/5] cmd.exe /C "cd /D C:\github\openorbiter\out\build\x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/BinAssets/ C:/github/openorbiter/out/build/x64-Debug && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Scenarios/ C:/github/openorbiter/out/build/x64-Debug/Scenarios && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Textures/ C:/github/openorbiter/out/build/x64-Debug/Textures && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Meshes/ C:/github/openorbiter/out/build/x64-Debug/Meshes && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Script/ C:/github/openorbiter/out/build/x64-Debug/Script && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Config/ C:/github/openorbiter/out/build/x64-Debug/Config && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/GravityModels/ C:/github/openorbiter/out/build/x64-Debug/GravityModels && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E copy_directory C:/github/openorbiter/Flights/ C:/github/openorbiter/out/build/x64-Debug/Flights && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory C:/github/openorbiter/out/build/x64-Debug/Orbitersdk/lib/Lua"
ninja: build stopped: subcommand failed.
Build All failed.
I don't know if the Lua github is the official one but it's not listing the latest 5.1.5 release. I tried to use
Yes, the GitHub repo doesn't have 5.1.5 for some reason. Do we need that version specifically? Can we live with 5.1.1?
If I comment the #if(ORBITER_MAKE_DOC) to generate the Lua doc, the build fails :
Sounds like we need documents build enabled in CI... I'll take a look
Can we live with 5.1.1?
Yes it should be good enough for the time being
Regarding the documentation, it's not producing a pdf but still using htmlhelp to generate a .chm file.
Prereq to continue working on this: #480 ✅
This PR is ready for merge
Reasons
Change
Use Fetch_MakeAvailable instead of .gitmodules to avoid unnecessary complexity. Lua modules are out of scope for now