Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issues Building For Web on Windows #65

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

BlueMagnificent
Copy link
Contributor

Two issues are currently encountered when building Urho3D for Web on Windows.

  1. While setting up a build by directly or indirectly calling script\cmake_generic.bat, an infinite loop will occur when the -D options is not followed by a space, see Infinite Loop in script/cmake_generic.bat #59. Example script\cmake_vs2022.bat build -DURHO3D_SAMPLES=1. This can easily be avoided by adding the needed space after -D. However when used with Emscripten's emcmake to setup for Web, the infinite loop will be encountered once more because emcmake emits the CMAKE_TOOLCHAIN_FILE and CMAKE_CROSSCOMPILING_EMULATOR build options with no space after -D.

    Additionally, emcmake emits the MinGW makefiles generator flag without quotes around MinGW Makefiles and this breaks CMake.

  2. In Source\Tools\CMakeLists.txt, the CMake command to install PackageTool and BindingGenerator under the CMAKE_CROSSCOMPILING option specifies these files without an extension. When building for Web on Windows, the builds are successful but installation fails with error file INSTALL cannot find <path/to/file> because the file being looked for has no extension while the actual file that was built has .exe extension.

This PR fixes the above mentioned issues and was tested on a Windows 11 machine using Emscripten version 3.1.59 ( the latest version at the time of this post)

@klaussilveira
Copy link
Contributor

Thanks! Sorry for the delay on this. We tend to be more active on Discord, so feel free to bug us there if a review is pending for too long.

@klaussilveira klaussilveira merged commit 95d36d0 into u3d-community:master Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants