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

Mono/C# support for UWP #20271

Open
akien-mga opened this Issue Jul 19, 2018 · 15 comments

Comments

Projects
None yet
5 participants
@akien-mga
Copy link
Member

commented Jul 19, 2018

After Android (#20267), iOS (#20268) and HTML5 (#20270), we'll likely want to bring Mono/C# export support for UWP. This issue is to discuss what needs to be done and the progress.

CC @neikeq

@neikeq

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

This may already be working. Has anyone tried it?

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

I can try testing on Windows. Ideally this should be tested on an ARM device and on Xbox One too, but I don't have any of these devices.

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

Eh, I can't even build with the Mono module enabled...

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

Need to change this to include UWP:

if env['platform'] == 'windows':

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 20, 2018

Those I can't get around:

modules\mono\utils\mono_reg_utils.cpp(61): error C3861: 'RegOpenKeyExW': identifier not found
modules\mono\utils\mono_reg_utils.cpp(64): error C3861: 'RegOpenKeyExW': identifier not found
modules\mono\utils\mono_reg_utils.cpp(75): error C3861: 'RegQueryValueExW': identifier not found
modules\mono\utils\mono_reg_utils.cpp(81): error C3861: 'RegQueryValueExW': identifier not found
modules\mono\utils\mono_reg_utils.cpp(125): error C3861: 'RegCloseKey': identifier not found
modules\mono\utils\mono_reg_utils.cpp(147): error C3861: 'RegCloseKey': identifier not found
modules\mono\utils\mono_reg_utils.cpp(225): error C3861: 'RegCloseKey': identifier not found
inner_prod_aligned.c

It's not possible to access the registry on UWP.

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

Is it possible to use the .NET framework instead of Mono?

@NathanWarden

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2018

@vnen That's how Unity does it, they use .Net (Core? I believe) for UWP, and then typically use Mono for everything else.

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

@NathanWarden I mean if Godot can already do it, if there's some build flag to enable it.

@NathanWarden

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2018

@vnen That makes sense. I'm very sure you're on the right track, but I don't think that has been added. I haven't seen it yet at least. I can't imagine it would be too difficult though.

Were you thinking the build flag should just include .Net Core as an additional target (for use only with UWP), or to replace Mono entirely when built with that flag?

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

It should replace Mono. I don't see a reason to add Mono stuff to the binary and not use it.

@NathanWarden

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2018

That makes a lot of sense, unless UWP builds are going to be available in Godot proper at some point. .Net Core is a very stripped down version of .Net and is incompatible with both Mono and .Net proper in a lot of places.

So, I suppose the idea is this would be a version that people just have to compile from source for now.

How Unity supports both is that they spit out the compile errors to the console for the incompatibilities at build time with .Net Core since their UWP template obviously uses it. It's a little bit annoying, but much better than limiting the API across the board. I think they build the .Net Core assembly against msbuild at export time. Thus, you can still just have one version of the editor, but the UWP build template is .Net Core only.

So, essentially, Unity builds the UWP template against .Net Core, but builds the editor against whichever .Net version they're using. Actually, they have multiple right now that you can select from.

Sorry if I've just made a rabbit trail out of this. I suppose all you're trying to do is just simply seeing if a Godot build can compile against UWP :)

@vnen

This comment has been minimized.

Copy link
Member

commented Jul 23, 2018

Well, I'm the maintainer of the Godot UWP port (or at least I try to), but I'm not really willing to put much effort into the C# support. So if @neikeq can make it work with .NET I can help with the UWP part.

With UWP we can add the dependencies in the manifest which are installed automatically, so it probably doesn't need any additional library.

@NathanWarden

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2018

I hear you, it would be quite a bit of effort. Plus, it doesn't have to all be perfect on the first pass either. Thanks for all of your hard work :)

@akien-mga

This comment has been minimized.

Copy link
Member Author

commented Dec 17, 2018

Moving to 3.2 milestone, for 3.1 the focus is on getting the desktop platforms in good shape, plus maybe Android support if we can figure out the buildsystem.

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Dec 17, 2018

@GeorgeS2019

This comment has been minimized.

Copy link

commented Apr 20, 2019

@vnen I am excited that there is interest on Godot for UWP.
I see lots of potential for Godot as an alternative to Unity for Hololens 2 that is running on Snapdragon 850.

I believe Hololens OS is a variant of the Windows 10 on ARM

I am interested to know if there is a community interest to
(1) Get Godot running native in Windows 10 on ARM, as a step to get Godot eventually running on Hololens 2
(2) raise Microsoft Hololens team to include Godot as one of the game engine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.