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

Remove glfw from the engine builds #8296

Merged
merged 20 commits into from
Dec 20, 2023
Merged

Remove glfw from the engine builds #8296

merged 20 commits into from
Dec 20, 2023

Conversation

Jhonnyg
Copy link
Contributor

@Jhonnyg Jhonnyg commented Dec 6, 2023

GLFW is no longer being built as part of our main engine build. Instead, the current GLFW version (modified 2.7) is now begin built and distributed as an external package. We have also removed GLFW from our SDK, which means that some extensions might potentially break. This is considered a bugfix instead of a breaking change, since the headers should never have been part of the SDK from the first place.

This is the second part of our ongoing task (#7970) of migrating the current GLFW version to the latest stable official release, as well as separating all non-desktop platforms our of the GLFW infrastructure.

PR checklist

  • Code
    • Add engine and/or editor unit tests.
    • New and changed code follows the overall code style of existing code
    • Add comments where needed
  • Documentation
    • Make sure that API documentation is updated in code comments
    • Make sure that manuals are updated (in github.com/defold/doc)
  • Prepare pull request and affected issue for automatic release notes generator
    • Pull request - Write a message that explains what this pull request does. What was the problem? How was it solved? What are the changes to APIs or the new APIs introduced? This message will be used in the generated release notes. Make sure it is well written and understandable for a user of Defold.
    • Pull request - Write a pull request title that in a sentence summarises what the pull request does. Do not include "Issue-1234 ..." in the title. This text will be used in the generated release notes.
    • Pull request - Link the pull request to the issue(s) it is closing. Use on of the approved closing keywords.
    • Affected issue - Assign the issue to a project. Do not assign the pull request to a project if there is an issue which the pull request closes.
    • Affected issue - Assign the "breaking change" label to the issue if introducing a breaking change.
    • Affected issue - Assign the "skip release notes" is the issue should not be included in the generated release notes.

Example of a well written PR description:

  1. Start with the user facing changes. This will end up in the release notes.
  2. Add one of the GitHub approved closing keywords
  3. Optionally also add the technical changes made. This is information that might help the reviewer. It will not show up in the release notes. Technical changes are identified by a line starting with one of these:
    1. ### Technical changes
    2. Technical changes:
    3. Technical notes:
There was a anomaly in the carbon chroniton propeller, introduced in version 8.10.2. This fix will make sure to reset the phaser collector on application startup.

Fixes #1234

### Technical changes
* Pay special attention to line 23 of phaser_collector.clj as it contains some interesting optimizations
* The propeller code was not taking into account a negative phase.

Comment on lines +97 to +102
def package(self):
cwd = '../../packages'
target = "glfw-%s-%s.tar.gz" % (VERSION, self.options.platform)

dirs = []
dirs_search = ['include', 'lib', 'sdk', 'share']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there might be better ways to package this, but the old / current way of packaging isn't working with latest waf afaik, so for now this works "good enough"

@Jhonnyg Jhonnyg added engine Issues related to the Defold engine glfw task A task that needs to be performed labels Dec 11, 2023
@Jhonnyg Jhonnyg marked this pull request as ready for review December 11, 2023 14:21
@Jhonnyg Jhonnyg requested a review from JCash December 11, 2023 15:00
@Jhonnyg Jhonnyg changed the title Remove glfw from the engine builds and into external Remove glfw from the engine builds Dec 11, 2023
engine/gamesys/src/gamesys/test/fontview/wscript Outdated Show resolved Hide resolved
#define HID_MOUSE_BUTTON_6 GLFW_MOUSE_BUTTON_6
#define HID_MOUSE_BUTTON_7 GLFW_MOUSE_BUTTON_7
#define HID_MOUSE_BUTTON_8 GLFW_MOUSE_BUTTON_8
#define HID_SPECIAL_START 256
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

engine/hid/src/test/wscript Outdated Show resolved Hide resolved
@@ -58,7 +58,7 @@ for i in $(seq 2 $#); do
(
cd "${DEFOLD_PATH}/engine/${_SUBMODULE}"
waf install --platform="${1}" \
--prefix="${DYNAMO_HOME}" --skip-codesign --skip-tests --skip-build-tests --opt-level=0
--prefix="${DYNAMO_HOME}" --skip-codesign --skip-tests --skip-build-tests --opt-level=0 --with-vulkan
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also consider removing "--with-vulkan" from the build scripts, and instead add "--with-opengl"

@Jhonnyg Jhonnyg merged commit deebf3f into dev Dec 20, 2023
22 of 24 checks passed
@Jhonnyg Jhonnyg deleted the remove-glfw-from-build branch December 20, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues related to the Defold engine glfw task A task that needs to be performed
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants