godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

Add a page on creating custom platform ports

Open Calinou opened this issue 3 years ago • 8 comments

Follow-up to https://github.com/godotengine/godot-docs/pull/6133.

Marked as draft as the content is technically complete, but I'd like proofreading from people involved in writing platform ports such as @efornara.

~~One thing I wonder is whether audio drivers can be distributed as part of platform/, rather than drivers/. This might be more convenient so you don't have to distribute your platform port as an engine fork (or a collection of folders) that can't be easily git clone'd into a Godot repository clone.~~ Edit: This is now documented.

Calinou avatar Oct 27 '22 21:10 Calinou

One thing I wonder is whether audio drivers can be distributed as part of platform/, rather than drivers/.

Yes, see Android and Web platform ports.

akien-mga avatar Oct 27 '22 22:10 akien-mga

It looks good to me, keeping in mind that the page cannot be exhaustive, and it looks more like a starting point with some tips.

I personally would add the suggestion to investigate if the platform allows deriving from OS_Unix instead of implementing OS from scratch. If you are familiar with Windows and tasked with a port, you might use that port as your reference.

When wayland support is merged, it will probably make sense to mention the option of adding a new DisplayServer to linuxbsd instead of creating a brand new platform.

efornara avatar Oct 28 '22 09:10 efornara

CC @Riteo if you have some input after working on Wayland support :) And CC @RandomShaper who's quite familiar with that stuff.

I'll try to review too when I find some time.

Links to X11 files will need to be adjusted after https://github.com/godotengine/godot/pull/68182

akien-mga avatar Nov 11 '22 15:11 akien-mga

I'd add a very brief explanation on what the build system expects for a working platform, namely the custom detect.py script, but other than that this looks like a great starting point for a developer wanting to work on a custom platform.

deralmas avatar Nov 12 '22 11:11 deralmas

Links to X11 files will need to be adjusted after https://github.com/godotengine/godot/pull/68182


I'd add a very brief explanation on what the build system expects for a working platform, namely the custom detect.py script, but other than that this looks like a great starting point for a developer wanting to work on a custom platform.

Both are done :slightly_smiling_face:

Calinou avatar Dec 19 '22 17:12 Calinou

This needs to be rebased. Also should this still be considered a draft?

skyace65 avatar Jan 21 '23 02:01 skyace65

This needs to be rebased. Also should this still be considered a draft?

Done! This can be reviewed and merged now.

Calinou avatar Jan 30 '23 17:01 Calinou

I get a CI error on an unrelated page despite rebasing on master and pushing the result:

Warning, treated as error:
/home/runner/work/godot-docs/godot-docs/tutorials/scripting/gdextension/what_is_gdextension.rst:19:undefined label: doc_custom_modules_in_c++

Calinou avatar Mar 01 '23 17:03 Calinou

Finally merged - thank you! 🎉

mhilbrunner avatar Mar 23 '23 01:03 mhilbrunner