asc-community / MxEngine

C++ open source 3D game engine
BSD 3-Clause "New" or "Revised" License
1.15k stars 60 forks source link

Cannot clone repository on windows - Filename too long #38

Closed SamCZ closed 3 years ago

SamCZ commented 3 years ago

Hi, I tried to clone the repo but there was some big paths...

fatal: cannot write keep file 'C:/Sam/Projects/MxEngine/.git/modules/submodules/EABase/modules/test/packages/EAAssert/modules/test/packages/EAStdC/modules/test/packages/EABase/modules/test/packages/EAAssert/modules/test/packages/EATest/objects/pack/pack-6d073bdd62588b34da942b063a49764ff4bc6076.keep': Filename too long

fatal: cannot write keep file 'C:/Sam/Projects/MxEngine/.git/modules/submodules/EABase/modules/test/packages/EAAssert/modules/test/packages/EAStdC/modules/test/packages/EABase/modules/test/packages/EAAssert/modules/test/packages/EAStdC/objects/pack/pack-c2abf1a9729d214faabf774f6f416ea879c9e798.keep': Filename too long

MomoDeve commented 3 years ago

Do you use --recurse-submodules option when cloning? If so, try using git submodule update --init (see project readme)

SamCZ commented 3 years ago

I've used CLion automatic clone, I just cloned it in cmd and it works now, but there is one another problem..

C:\Sam\Projects\MxEngine\submodules\RuntimeCompiledCPlusPlus\Aurora\RuntimeCompiler\Compiler_PlatformWindows.cpp: In member function 'void Compiler::RunCompile(const std::vector<FileSystemUtils::Path>&, const CompilerOptions&, std::vector<FileSystemUtils::Path>, const FileSystemUtils::Path&)': C:\Sam\Projects\MxEngine\submodules\RuntimeCompiledCPlusPlus\Aurora\RuntimeCompiler\Compiler_PlatformWindows.cpp:261:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 261 | char* pCharTypeFlags = "";

SamCZ commented 3 years ago

and also C:\Sam\Projects\MxEngine\submodules\RuntimeCompiledCPlusPlus\Aurora\RuntimeCompiler\Compiler_PlatformWindows.cpp: In function 'void GetPathsOfVisualStudioInstalls(std::vector<VSVersionInfo>*, ICompilerLogger*)': C:\Sam\Projects\MxEngine\submodules\RuntimeCompiledCPlusPlus\Aurora\RuntimeCompiler\Compiler_PlatformWindows.cpp:327:34: error: '_MSC_VER' was not declared in this scope

Sorry I'm going to leave this be, I wanted to find another engine to use it with my game, but this its only possible to use it with Visual Studio and I want to use Clion

MomoDeve commented 3 years ago

The problem here is with the library RCC++ which I use. I will probably fix this bug myself tomorrow, but this issue should also be addressed to the library author (I can do it too)

MomoDeve commented 3 years ago

We can add support for runtime builds with clion, but it will take some time

MomoDeve commented 3 years ago

What toolchain are you using? I want to reproduce the error you described

SamCZ commented 3 years ago

I used MingW downloaded from MSYS2 package manager

MomoDeve commented 3 years ago

I am afraid it will not be possible to run MxEngine with MinGW toolchain. The reasons for that are the following: 1) RCC++ library does not support MinGW builds, so it will not be possible to recompile C++ scripts ar runtime (adding support for MinGW is not an easy task. The original library developer does not have plans to add it, and I do not have enough time to implement it myself) 2) I managed to get rid of compile errors, but still could not run the engine. I found out that MinGW's GCC is very bad at producing binaries (GCC's MxEngine.lib is twice as big as clang's: 550MB vs 307MB). MinGW's linker cannot handle such large libraries and the compile process lasts forever.

If you use clion as IDE only because of convenience, I suggest to install LLVM Visual Studio toolchain and use it instead of MinGW. It is much faster, produces smaller binaries and supports more platform-specific features. The toolchain can be changed in your IDE's cmake settings