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 project export #16920

Merged
merged 2 commits into from
Feb 23, 2018
Merged

Mono project export #16920

merged 2 commits into from
Feb 23, 2018

Conversation

neikeq
Copy link
Contributor

@neikeq neikeq commented Feb 22, 2018

Just a WIP, but worth being merged at this point.

TODO (not in this PR):

  • Make it use the export templates compiled with mono, somehow.
  • Fix _export_begin not being called with the "Export PCK" option. I used this patch for testing purposes but, as you can see, it doesn't take Debug/Release and the output path into account:
    @@ -596,6 +596,7 @@ EditorExportPlatform::ExportNotifier::~ExportNotifier() {
     }
     
     Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func) {
    +	ExportNotifier notifier(*this, p_preset, false, "", 0);
     	//figure out paths of files that will be exported
     	Set<String> paths;
     	Vector<String> path_remaps;

@@ -274,8 +274,6 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
}

Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
if (p_path.ends_with(".so") || p_path.ends_with(".dylib") || p_path.ends_with(".dll"))
return OK;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @karroffel @endragor Follow up from #11580 (review). I don't know if this will break anything.

@exts
Copy link
Contributor

exts commented Mar 9, 2018

@neikeq so just to test I grabbed master and built all the export templates for windows 10 64 bit.

In the https://bitbucket.org/G4MR/godot-breaker/src bin folder you should find the release/debug executables that I ran which gives me errors.

  • One error I get is mono core api hash mismatch which doesn't seem right because I copied/pasted the generated dll's that were built with my version of mono (latest using vc++ 2017 build tools)

  • Another error I get is SOMETIMES when I start the game it'll tell me a non existent signal exists from StartGame to BlockDestroyed and other times I could load it up and nothing pops up. When this happens with the below image the restart button stops working completely (once the game ends) which is strange. In the editor I don't get such error or issue so the signal's are working and used correctly.

  • Third issue I forgot to mention is that the release build doesn't play sounds when the brick breaks which is also strange, although sometimes the debug version works how it should.

https://i.imgur.com/wta4Cb4.png

You can see all the source in that repo if you want to attempt to reproduce. Hope this helps with the ongoing efforts for getting exporting stable. 👍

@akien-mga
Copy link
Member

One error I get is mono core api hash mismatch which doesn't seem right because I copied/pasted the generated dll's that were built with my version of mono (latest using vc++ 2017 build tools)

I think the core API changes between tools=yes and tools=no builds, so you need to regenerate the mono glue for each build.

@exts
Copy link
Contributor

exts commented Mar 13, 2018

hmm, I'll test it again later

@hpvb
Copy link
Member

hpvb commented Apr 14, 2018

Cherry picked into 3.0.3

@hpvb hpvb removed the cherrypick label Apr 14, 2018
@neikeq neikeq deleted the mono-project-export branch May 14, 2021 01:55
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.

4 participants