Failed to create new Godot 4 project
Hourglass™ fails to create new Godot 4 projects as of 8bcdc4e5. The reason seems to be that check_updates.py does this for Godot 4 versions:
elif version.startswith("4"):
new_cfg_string += f"""[{version_id}]
{create_tags(tags)}
config_version=5
OSX.64="{path}/Godot_v{version}_macos.universal.zip"
OSX.arm64="{path}/Godot_v{version}_macos.universal.zip"
Windows.32="{path}/Godot_v{version}_win32.exe.zip"
Windows.64="{path}/Godot_v{version}_win64.exe.zip"
X11.32="{path}/Godot_v{version}_linux.x86_32.zip"
X11.64="{path}/Godot_v{version}_linux.x86_64.zip"
source="{path}/godot-{version}.tar.xz"
[{version_id}-mono]
{create_tags(tags + ["mono"])}
config_version=5
OSX.64="{path}/mono/Godot_v{version}_mono_macos.universal.zip"
OSX.arm64="{path}/mono/Godot_v{version}_mono_macos.universal.zip"
Windows.32="{path}/mono/Godot_v{version}_mono_win32.zip"
Windows.64="{path}/mono/Godot_v{version}_mono_win64.zip"
X11.32="{path}/mono/Godot_v{version}_mono_linux_x86_32.zip"
X11.64="{path}/mono/Godot_v{version}_mono_linux_x86_64.zip"
source="{path}/godot-{version}.tar.xz"
"""
Notice the config_version=5
line. Now let's look at the create_project
definition in ProjectCreator.gd:
func create_project(path: String, name: String, version: String, gles2: bool, git: bool) -> int:
var directory := Directory.new()
directory.make_dir_recursive(path)
if git and Git.is_available():
Git.init_repository(path)
var dir := Directory.new()
dir.copy("res://data/template/gitignore.txt", path.plus_file(".gitignore"))
var config_version := Versions.get_config_version(version)
var ret: int
match config_version:
0, 3:
# 0 is for custom versions. Just use the same template as 3.
ret = _create_project_3(path, name)
4:
ret = _create_project_4(path, name, gles2)
_:
return ERR_DOES_NOT_EXIST
if ret != OK: return ret
project_id = Projects.create_project(path, version)
return OK
The match
doesn't expect config_version
to be 5. Looking at Git blame, it seems 04a9b0f6 is responsible for the config_version=5
line and it is at that point that the creation of Godot 4 projects started to fail. Are we missing a function definition for the creation of Godoto 4 projects?