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

Buildsystem improvements for the Mono module #12388

Merged
merged 1 commit into from
Oct 29, 2017
Merged

Conversation

neikeq
Copy link
Contributor

@neikeq neikeq commented Oct 24, 2017

  • Make sure to search the mono installation directory for the right architecture in the windows registry.
  • Do not build GodotSharpTools directly to #bin dir. Instead build to the default output path and copy it. This way we avoid MSBuild adding files we don't want to #bin.
  • Add hint path for MSBuild in OSX.
  • Copy shared library on Unix if not statically linking.
  • Use vswhere to search MSBuild and search for 14.0 tools version in the registry instead of 4.0.
  • SCons will only fallback xbuild when msbuild is not found if 'xbuild_fallback=yes' is passed to the command.
  • Use mono's assembly path as FrameworkPathOverride if using with system's MSBuild (not mono's fork).
  • Cleanup.

@@ -1,121 +1,150 @@
#!/usr/bin/env python
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's wrong with this diff...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line endings?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the file before and after your patch:

$ file modules/mono/SCsub 
modules/mono/SCsub: Python script, ASCII text executable
$ git apply ~/Downloads/df950b9a2950d854d0c14de966856d6296fa8dcb.patch
[...]
$ file modules/mono/SCsub 
modules/mono/SCsub: Python script, ASCII text executable, with CRLF line terminators

@akien-mga
Copy link
Member

akien-mga commented Oct 24, 2017

This change will make it difficult for me to make alpha2 binaries, since I can't find a way to build MSBuild from source and I need to be able to generate the glue.

What are the problems with xbuild? Deprecating the only buildsystem that can be easily compiled from source for now is not a smart move IMO. That means that we can only build Godot on the platforms which are lucky enough to get official Mono repos/installers (Windows, macOS, Ubuntu/Debian/CentOS), so all other Linux distros are out.

Until there are clear instructions either upstream or in our docs regarding how to build MSBuild, I'd prefer we keep support for xbuild.

@akien-mga
Copy link
Member

BTW, regardless of whether we keep support for xbuild for now, modules/mono/SCsub should be made to check for msbuild/xbuild in $MONO64_PREFIX/bin and $MONO32_PREFIX/bin too (and that by default, so that they can override system installed older versions).

@neikeq neikeq force-pushed the r branch 3 times, most recently from 37f2676 to 265c00b Compare October 29, 2017 03:22
@neikeq
Copy link
Contributor Author

neikeq commented Oct 29, 2017

Updated. In order to build with xbuild if msbuild is not found, you will have to pass xbuild_fallback=yes to scons. For the editor, I changed the setting name to xbuild (Deprecated) and it's not displayed on Windows.

- Make sure to search the mono installation directory for the right architecture in the windows registry.
- Do not build GodotSharpTools directly to #bin dir. Instead build to the default output path and copy it. This way we avoid MSBuild adding files we don't want to #bin.
- Add hint path for MSBuild in OSX.
- Copy shared library on Unix if not statically linking.
- Use vswhere to search MSBuild and search for 14.0 tools version in the registry instead of 4.0.
- SCons will only fallback xbuild when msbuild is not found if 'xbuild_fallback=yes' is passed to the command.
- Use mono's assembly path as FrameworkPathOverride if using with system's MSBuild (not mono's fork).
- Cleanup.
@neikeq neikeq merged commit 09a1e11 into godotengine:master Oct 29, 2017
neikeq added a commit to neikeq/godot that referenced this pull request Oct 29, 2017
akien-mga added a commit that referenced this pull request Oct 29, 2017
@neikeq neikeq deleted the r branch May 13, 2021 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants