-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add "Build System" section to godot-cpp docs. #10919
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
base: master
Are you sure you want to change the base?
Conversation
d2649bb
to
a05d8c3
Compare
you asked.. so.. Starting with what we have already:
I would think that the buildsystem information belongs in the about section, and should not include any instruction, just links to the getting-started, or to a more detailed document. and as a side note, the adding documentaion should be rolled into getting started, or at least have a chapter in there, and be stripped of any duplicate information like the bbcode tags, instead link to the appropriate section for that. If there were going to be additional documents, they should be highly specific to a singular topic that can either be referenced from the about or quick start. |
Is there some planning issue or document I could review to get my bearings on requests for review? |
Thanks for offering your opinion, I was hoping for something opinionated so I'm glad I asked 😄 This is how I envision the
Perhaps you'd be interested in making a counter-proposal to this one? ^ |
That makes sense. I agree on that.
Hard disagree on that. Getting started would mean getting some first result like the typical print("Hello World") in every programming language. It should not contain more detailed information. We have to be careful not to add to much information in there. Also, the BBCode tags are purposely integrated since not every BBCode tag from the original page is supported. I tried them out.
That would be a good topic to discuss at the next meeting. |
Well perhaps I was overzealous on the topic, even if the documentation has its own page, it should have a mention in the getting started, even if its a link at the bottom section under next-steps. |
|
||
GDExtensions are expected to run on many different systems. Generally, a single computer is only capable of building | ||
for a few different platforms. For example, Windows users will be able to build for Windows, Android and Web, | ||
but not for macOS or Linux. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct, I would avoid making statements like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is generally correct, at least if you ignore cross-compile tools. It's not the default to be able to cross compile to other platforms.
I think it's important to mention this, but I'm open to a different way of formulating this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I wanted to include this in a document I would predicate my statements on 'supported toolchains', which provides the easy path you want to mention, without being overly pessimistic on whats possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the phrasing to also mention cross platform toolchains.
for a few different platforms. For example, Windows users will be able to build for Windows, Android and Web, | ||
but not for macOS or Linux. | ||
|
||
To make your GDExtension as widely compatible as possible, we recommend setting up Continuous Integration (CI) to build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really the point of CI though is it? the template project absolutely, but CI has a separate purpose unrelated to cross platform devlopment.
To make your GDExtension as widely compatible as possible, we recommend setting up Continuous Integration (CI) to build | |
To make your GDExtension as widely compatible as possible, we recommend using the godot-cpp-template project that uses CI to build for all platforms, or some such |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose i'm biased since that's what I use it for: I don't use CI to verify correctness of my code, but it saves me a lot of headache trying to get builds for all the different platforms.
I don't know what else to recommend to users to get cross platform builds. I don't think recommending them cross-compile tools locally is a good idea since they won't be able to test them, and they can be inferior and more complicated than native tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template is a good recommendation, it uses the github CI to achieve the result, but it's not the point of CI to perform cross platform development, so the recommendation is for the template, not for GIthub CI. I am pedantic with the meaning of words and the purpose of tools, as some users might be reading these things for the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continuous integration (CI in short) means that you are ensuring that newly integrated code doesn't break the project.
Continuous deployment (CD in short) means on the other hand to deliver software frequently through automated deployment (which is what @Ivorforce is meaning by this sentence). Both of these fall under the DevOps term.
TLDR: What you mean is Continuous deployment (CD) which is also integrated in the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I've seen it used, building the project is still CI, while CD is putting it into live production systems (or automatically offering it up for public download). Does this mismatch your understanding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ivorforce atlassian has an article describing the details, which fits my understanding: https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I'm seeing, building the project is part of CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can now see your interpretation of the words, so yes. I can see how you got there. it does work, from a certain point of view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I've seen it used, building the project is still CI, while CD is putting it into live production systems (or automatically offering it up for public download). Does this mismatch your understanding?
Yes this is how I would see it👍🏻
Is there a reason this is only for 4.5 and that this does not apply to 4.4 and earlier? |
Yes, the restructuring (#10631) of these sections was only merged for 4.5, so it's somewhat difficult to merge back changes. |
|
||
While actively supported, it is considered secondary to the SCons build system. This means it may lack some features | ||
that are provided for users using SCons. It is documented in godot-cpp's | ||
`cmake.rst <https://github.com/godotengine/godot-cpp/blob/master/doc/cmake.rst>`__ file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be addressed here, but I personally think we should eventually move the contents of the cmake.rst
into the documentation in this repo, now that the new CMake configuration has stabilized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, that's a good point. We want to avoid restructuring after adding this information, so I've opted to just go for it and include the file. This means we'll need another round of reviews, but it should be worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks! I've added some review on the content that was copied in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great to me! (...and sorry for taking so long to take a look at it)
a05d8c3
to
2d6487b
Compare
2d6487b
to
a9d0c66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave it another read through, and found a few more nit-picks (mostly regarding punctuation)
a9d0c66
to
78552ab
Compare
|
||
You can find more information about common SCons arguments and build patterns in the | ||
`SCons User Guide <https://scons.org/doc/latest/HTML/scons-user/index.html>`__. Additional commands may be added by | ||
individual godot-cpp projects, so consult their documentations for more information on those. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
individual godot-cpp projects, so consult their documentations for more information on those. | |
individual godot-cpp projects, so consult their specific documentation for more information on those. |
Or similar, "documentation" is almost never plural
* `MinGW-W64-builds <https://github.com/niXman/mingw-builds-binaries/releases>`_ | ||
* `Jetbrains-CLion <https://www.jetbrains.com/clion/>`_ | ||
|
||
Jetbrains builtin compiler is just the MingW64 above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jetbrains builtin compiler is just the MingW64 above. | |
Jetbrains built-in compiler is just the MingW64 above. |
Generally used wording
Toolchains | ||
---------- | ||
This section attempts to list the host and target combinations that have been |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section attempts to list the host and target combinations that have been | |
This section attempts to list the host and target combinations that have been |
Toolchains | ||
---------- | ||
This section attempts to list the host and target combinations that have been | ||
at tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at tested. | |
tested. |
.. topic:: Using the toolchain file from the Android SDK | ||
|
||
This defaults to minimum supported version and armv7-a: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This defaults to minimum supported version and armv7-a: | |
This defaults to the minimum supported version and armv7-a: |
|
||
.. code-block:: | ||
# Assuming our current directory is the godot-cpp source root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Assuming our current directory is the godot-cpp source root | |
# Assuming our current directory is the godot-cpp source root. |
|
||
.. code-block:: | ||
# Assuming our current directory is the godot-cpp source root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Assuming our current directory is the godot-cpp source root | |
# Assuming our current directory is the godot-cpp source root. |
|
||
.. code-block:: | ||
# Assuming our current directory is the godot-cpp source root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Assuming our current directory is the godot-cpp source root | |
# Assuming our current directory is the godot-cpp source root. |
Building for multiple platforms | ||
------------------------------- | ||
|
||
GDExtensions are expected to run on many different systems, each separate binaries and build configurations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GDExtensions are expected to run on many different systems, each separate binaries and build configurations. | |
GDExtensions are expected to run on many different systems, each with separate binaries and build configurations. |
mentioned in the `godot-cpp-template <https://github.com/godotengine/godot-cpp-template>`__ | ||
`.gdextension file <https://github.com/godotengine/godot-cpp-template/blob/main/demo/bin/example.gdextension>`__. | ||
|
||
There are two popular ways with which cross platform builds can be achieved: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two popular ways with which cross platform builds can be achieved: | |
There are two popular ways by which cross platform builds can be achieved: |
This article is meant as a jump-off point for new godot-cpp users to understand how to build their GDExtension, and how to work with the binaries.
Since much of the functionality is covered elsewhere, it is mainly some simple commands and explanations, and otherwise a hub of links for people to find the appropriate other spots.
Tagging @enetheru, I can't request review from you through GitHub but I'd like to hear your opinion as well :)