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

check.sh: find Godot 4 executable when available as godot #217

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

yannick-was-taken
Copy link
Contributor

@yannick-was-taken yannick-was-taken commented Apr 6, 2023

The Issue

Some package managers (Arch Linux) install Godot 4.x as godot in the PATH. This is currently not correctly dealt with by check.sh, requiring the user to set GODOT4_BIN manually.

The Solution

If godot is available, check.sh now inspects the version of that Godot installation, and if 4.x, accepts it gladly, removing the need to manually set GODOT4_BIN.

Detail

The version check applies the regex ^4\. to the version returned by godot --version. An example version (the one available in Arch Linux's community repo) is 4.0.1.stable.arch_linux.

@yannick-was-taken
Copy link
Contributor Author

Oops, did not add the else branch... One sec.

@yannick-was-taken yannick-was-taken force-pushed the qol/godot-binary-lookup branch from 857b407 to b5f15ac Compare April 6, 2023 21:27
Copy link
Member

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Very nice that you check the version, because Godot 3 executables are regularly called godot and we still recommend that in gdnative.

check.sh Outdated Show resolved Hide resolved
@yannick-was-taken yannick-was-taken force-pushed the qol/godot-binary-lookup branch from b5f15ac to 22a40c2 Compare April 6, 2023 21:32
check.sh Outdated Show resolved Hide resolved
check.sh Outdated Show resolved Hide resolved
@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: tooling CI, automation, tools labels Apr 6, 2023
@yannick-was-taken yannick-was-taken force-pushed the qol/godot-binary-lookup branch from 22a40c2 to a8a1084 Compare April 6, 2023 21:53
Copy link
Member

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

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

Thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 6, 2023

Build succeeded:

@bors bors bot merged commit 77ca78d into godot-rust:master Apr 6, 2023
@yannick-was-taken yannick-was-taken deleted the qol/godot-binary-lookup branch April 6, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: tooling CI, automation, tools quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants