Thomas Frohwein <[email protected]> wrote:
> Hello,
> 
> I would like to propose downgrading the version check that Godot
> performs when it compares the binary and what a distributed .pck file
> was created with. This is just for godot/pack1 and just for the minor
> version. The reasons are as followed:
> 
> - Godot 3.x development is in maintenance mode and API changes are
>   expected to be rare.
> - Releasing new versions for 3.x is not a priority for upstream at this
>   point. They still crank the minor version liberally.
> - Some distributed games are built with upstream HEAD which is now at
>   3.7, but the latest release is 3.6.2. Such games don't launch with
>   the current state of our Godot port.
> 
> With this diff I can run the game "Brotato" again which runs fine on
> longer playing with the 3.6.2 binary. There are likely more games doing
> this.
> 
> With this diff, there is still a warning, so if stuff breaks anew, it
> should be clear in the terminal output.
> 
> ok? comments?

makes sense to me; okay op@

do you want to try to upstream this?

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/godot/pack1/Makefile,v
> diff -u -p -r1.3 Makefile
> --- Makefile  21 Mar 2026 20:27:25 -0000      1.3
> +++ Makefile  14 May 2026 00:08:52 -0000
> @@ -6,7 +6,7 @@ COMMENT-sharp=        .NET libs for mono/C# mod
>  VERSION =    3.6.2
>  PKGNAME =    godot3-${VERSION}
>  SHARPFILES_V =       3.5.2
> -REVISION =   0
> +REVISION =   1
>  
>  MULTI_PACKAGES =     -main -sharp
>  
> Index: patches/patch-core_io_file_access_pack_cpp
> ===================================================================
> RCS file: patches/patch-core_io_file_access_pack_cpp
> diff -N patches/patch-core_io_file_access_pack_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-core_io_file_access_pack_cpp        14 May 2026 00:08:52 
> -0000
> @@ -0,0 +1,22 @@
> +With relative API stability in Godot 3.x, don't error when Godot bin
> +minor is less than pack file minor, warn instead. This is stop refusing
> +to run games that are built with HEAD and report higher minor version
> +than latest release.
> +
> +Index: core/io/file_access_pack.cpp
> +--- core/io/file_access_pack.cpp.orig
> ++++ core/io/file_access_pack.cpp
> +@@ -211,10 +211,12 @@ bool PackedSourcePCK::try_open_pack(const String &p_pa
> +             memdelete(f);
> +             ERR_FAIL_V_MSG(false, "Pack version unsupported: " + 
> itos(version) + ".");
> +     }
> +-    if (ver_major > VERSION_MAJOR || (ver_major == VERSION_MAJOR && 
> ver_minor > VERSION_MINOR)) {
> ++    if (ver_major > VERSION_MAJOR) {
> +             f->close();
> +             memdelete(f);
> +             ERR_FAIL_V_MSG(false, "Pack created with a newer version of the 
> engine: " + itos(ver_major) + "." + itos(ver_minor) + ".");
> ++    } else if (ver_major == VERSION_MAJOR && ver_minor > VERSION_MINOR) {
> ++            WARN_PRINT("Pack created with a newer version of the engine: " 
> + itos(ver_major) + "." + itos(ver_minor) + ".");
> +     }
> + 
> +     for (int i = 0; i < 16; i++) {

Reply via email to