Coder Social home page Coder Social logo

renpy / renpy-build Goto Github PK

View Code? Open in Web Editor NEW
64.0 10.0 47.0 427.96 MB

Build system for the Ren'Py visual novel engine. (The engine itself, not games.)

Python 44.89% C 50.00% Shell 0.48% VBScript 0.01% HTML 0.36% Java 2.50% Objective-C 0.31% Cython 0.45% JavaScript 0.96% CMake 0.04%

renpy-build's Introduction

Ren'Py Build

The purpose of the Ren'Py build system is to provide a single system that can build the binary components of Ren'Py and all its dependencies, in the same manner that is used to make official Ren'Py releases.

Requirements

Ren'Py Build requires a computer running Ubuntu 22.04. While it can run on a desktop computer, portions of the build process must run at root, and the whole process has security implications. My recommendation is to create a virtual machine, install Ubuntu 22.04 on it, and run this procedure on that machine.

The virtual machine must be provisioned with at least 64 GB of disk space. I've compiled with 8 virtual CPUs and 16GB of RAM, though it may be possible with less than that.

Setting up Ren'Py Build requires some Linux knowledge to complete.

I recommend dedicating a user to Ren'Py Build. In this example, I name the user rb, with a home directory of /home/rb. Once that's done, you will want to modify your computer so that user can use the sudo command without a password. It's important that the username you chose does not have a space in it.

That means first manually sudo-ing to root with the sudo -s command and your user's password. Run the visudo command, and add the following line to the bottom of the file:

rb ALL = (ALL) NOPASSWD : ALL

Be sure to leave a blank line after it, then save the file with ctrl+X, and use exit to get back to the non-root user. Note that this will allow anyone who can log in as rb to become the superuser of this system.

Preparing

To get ready to build, log in as the rb user, and then run the following commands to instal git and clone renpy-build:

sudo apt install git
git clone https://github.com/renpy/renpy-build

Change into the renpy-build directory, and run prepare.sh:

cd ~/renpy-build
./prepare.sh

This will globally change your system. It will install packages from Ubuntu and LLVM repositories. Please make sure you're comfortable with this change before continuing.

This will first install all the packages required to build Ren'Py, and then it will clone Ren'Py and pygame_sdl2. It will also create a python virtual environment with the tools in it. If this completes successfully, you are ready to build.

Finally, a number of files need to be downloaded from third parties. These are listed in tars/README.rst .

Building

You'll need to be in the renpy-build directory to build. If you're not, run:

cd ~/renpy-build

From the renpy-build directory, activate the virtualenv with the command:

. tmp/virtualenv.py3/bin/activate

It should then be possible to build using the command:

./build.py

The build command can take some options:

--python <version>

The python version to build. Can be "3" or "2", defaults to 3.

--platform <name>

The platform to build for. One of linux, windows, mac, android, ios, or web.

--arch <name>

The architecture to build for. The architectures vary by platform, here is a copy of the table from build.py. :

# Python 2

Platform("linux", "x86_64", "2")
Platform("linux", "i686", "2")
Platform("linux", "aarch64", "2")
Platform("linux", "armv7l", "2")

Platform("windows", "x86_64", "2")
Platform("windows", "i686", "2")

Platform("mac", "x86_64", "2")
Platform("mac", "arm64", "2")

Platform("android", "x86_64", "2")
Platform("android", "arm64_v8a", "2")
Platform("android", "armeabi_v7a", "2")

Platform("ios", "arm64", "2")
Platform("ios", "sim-x86_64", "2")
Platform("ios", "sim-arm64", "2")

Platform("web", "wasm", "2")

# Python 3

Platform("linux", "x86_64", "3")
Platform("linux", "aarch64", "3")
Platform("linux", "armv7l", "3")

Platform("windows", "x86_64", "3")

Platform("mac", "x86_64", "3")
Platform("mac", "arm64", "3")

Platform("android", "x86_64", "3")
Platform("android", "arm64_v8a", "3")
Platform("android", "armeabi_v7a", "3")

Platform("ios", "arm64", "3")
Platform("ios", "sim-x86_64", "3")
Platform("ios", "sim-arm64", "3")

Platform("web", "wasm", "3", experimental=True)
--experimental

This builds platforms marked as experimental.

A second build should be faster than the first, as it will only rebuild Ren'Py, pygame_sdl2, and other components that are likely to frequently change.

Updating

It's possible to change renpy or pygame_sdl2 to be symlinks to your own clones of those projects after the prepare step is complete. Updating renpy-build itself may require deleting the tmp/ directory and a complete rebuild, though simple changes may not require that. You may also need to run prepare.sh again.

Note

Support for unofficial builds of Ren'Py will be limited.

renpy-build's People

Contributors

beuc avatar brainos233 avatar brandonpow1 avatar bronya-rand avatar dobby233liu avatar gouvernathor avatar juergbi avatar kapilgain avatar kassy2048 avatar mal avatar meithal avatar qtich avatar renpy-bot avatar renpytom avatar scj643 avatar suphamster avatar the66f95 avatar uyjulian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

renpy-build's Issues

i386 in armv7l?

c.env("LDFLAGS", "{{ LDFLAGS }} -L{{ sysroot }}/usr/lib/i386-linux-gnu -L{{install}}/lib32 ")

Is this line supposed to be here? This is in the armv7l section, so I'm not sure how anything related to i386 is relevant here.

Prepare fails on Ubuntu 22.04

Building pygame_sdl2 now requires libsdl2-image 2.6.0 since this PR has been merged, but Ubuntu 22.04 is stuck on 2.0.x, so "prepare.sh" fails eventually:

Errors log
gen3/pygame_sdl2.image.c: In function ‘__pyx_pf_11pygame_sdl2_5image_init’:
gen3/pygame_sdl2.image.c:1669:126: error: ‘IMG_INIT_JXL’ undeclared (first use in this function); did you mean ‘IMG_INIT_JPG’?
 1669 |   __pyx_v_11pygame_sdl2_5image_image_formats = IMG_Init((((((IMG_INIT_JPG | IMG_INIT_PNG) | IMG_INIT_TIF) | IMG_INIT_WEBP) | IMG_INIT_JXL) | IMG_INIT_AVIF));
      |                                                                                                                              ^~~~~~~~~~~~
      |                                                                                                                              IMG_INIT_JPG
gen3/pygame_sdl2.image.c:1669:126: note: each undeclared identifier is reported only once for each function it appears in
gen3/pygame_sdl2.image.c:1669:142: error: ‘IMG_INIT_AVIF’ undeclared (first use in this function); did you mean ‘IMG_INIT_TIF’?
 1669 |   __pyx_v_11pygame_sdl2_5image_image_formats = IMG_Init((((((IMG_INIT_JPG | IMG_INIT_PNG) | IMG_INIT_TIF) | IMG_INIT_WEBP) | IMG_INIT_JXL) | IMG_INIT_AVIF));
      |                                                                                                                                              ^~~~~~~~~~~~~
      |                                                                                                                                              IMG_INIT_TIF
gen3/pygame_sdl2.image.c: In function ‘__pyx_pf_11pygame_sdl2_5image_6load’:
gen3/pygame_sdl2.image.c:2520:27: warning: implicit declaration of function ‘IMG_LoadSizedSVG_RW’; did you mean ‘IMG_LoadSVG_RW’? [-Wimplicit-function-declaration]
 2520 |             __pyx_v_img = IMG_LoadSizedSVG_RW(__pyx_v_rwops, __pyx_v_width, __pyx_v_height);
      |                           ^~~~~~~~~~~~~~~~~~~
      |                           IMG_LoadSVG_RW
gen3/pygame_sdl2.image.c:2520:25: warning: assignment to ‘SDL_Surface *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2520 |             __pyx_v_img = IMG_LoadSizedSVG_RW(__pyx_v_rwops, __pyx_v_width, __pyx_v_height);
      |                         ^
gen3/pygame_sdl2.image.c: In function ‘__pyx_pymod_exec_image’:
gen3/pygame_sdl2.image.c:4476:46: error: ‘IMG_INIT_JXL’ undeclared (first use in this function); did you mean ‘IMG_INIT_JPG’?
 4476 |   __pyx_t_2 = __Pyx_PyInt_From_IMG_InitFlags(IMG_INIT_JXL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
      |                                              ^~~~~~~~~~~~
      |                                              IMG_INIT_JPG
gen3/pygame_sdl2.image.c:4488:46: error: ‘IMG_INIT_AVIF’ undeclared (first use in this function); did you mean ‘IMG_INIT_TIF’?
 4488 |   __pyx_t_2 = __Pyx_PyInt_From_IMG_InitFlags(IMG_INIT_AVIF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
      |                                              ^~~~~~~~~~~~~
      |                                              IMG_INIT_TIF
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

This is on latest Ubuntu 22.04 from a docker image:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

It works using Ubuntu 22.10 (and maybe 23.04), but that means the build instructions are not valid anymore.

Windows Visual Studio compilation

Talking about porting to other devices, we have confirmed with a game that pygame runs fine on Android using the kivy framework, but that still requires Python 3, the thing is that we made pygame run on Xbox One and we use Visual Studio for all this related.

Our concern is to port to UWP, like Microsoft Store Apps and specifically targeting Xbox One/Series X, question arises here:

Is there anything like a Windows-Only build environment? Like pre-cythonized c files that can be dropped to Visual Studio, or any .sln solution file that already handles building? How does building under Windows work?

The prepare.sh File Not Working Correctly With a Fresh Ubuntu 22.04 Install

Hey, so I've been trying to compile renpy for a bit of time now, and each time it just keeps throwing unmet dependencies errors (following the readme guide):

rb@ubuntu22:~/tools/renpy-build$ sudo ./prepare.sh
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev-is-python2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-dev-is-python3

E: Package 'python-dev-is-python2' has no installation candidate

This locks the sh file until exiting (since it only moves on after the command finises, and in this case apt doesn't exit), solved a little by adding & at the end of each apt command, but that also obviously means a lot of packages won't be installed correctly and may lead to some weird errors down the line. Anyways, the issue persists even with fresh installs (I tried multiple times), specifically I'm using Ubuntu 22.04.1 LTS server on a VM. I think even if I were to manually install everything it would still result in the same Cython error, and apt --fix-broken install ends up removing what I installed manually like python-dev-is-python3. ISOs were from here.

With Ubuntu 20 it works quite nicely (the expected behavior of prepare.sh doing everything without throwing errors), up to before the step of running build.py, starting it results in Cython could not be run. error, which there is zero info about. Debugging the code a little shows that it happens from line 201, but I don't know much about how the code works so I haven't dug deeper.

some more info, in the 20.04 version, there was an exit on some line after the apt installs calls, not sure why it was there but it ended up stopping the script before doing what's after it, which is setting up venv and LLVM (LLVM needed manual installation as it was incompatible, using bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" was the most reliable solution, and works with a lot better with different environments) and that was weird because I'm not sure why it's there.

I initially sent a message on discord but was told to try and open a ticket.

Excessive CPU usage during playback of VP8/9 videos since commit c64c03478fac7f6b8733e2703035a71ecf0244ff

Despite c64c034's comment it seems MMX is still important to the ffmpeg build. With it disabled it requires significantly more CPU on decode. Effectively reverting that commit on Win/Linux with something like:

diff --git a/tasks/ffmpeg.py b/tasks/ffmpeg.py
index 936fa7a..f98bedd 100644
--- a/tasks/ffmpeg.py
+++ b/tasks/ffmpeg.py
@@ -96,8 +96,10 @@ def build(c: Context):
         --enable-w32threads
 {% endif %}
 
+{% if c.platform == "mac" %}
         --disable-mmx
         --disable-mmxext
+{% endif %}
 
         --enable-ffmpeg
         --enable-ffplay

Allows for the noticeably reduced CPU usage.

Testing was done with @PastryIRL's vp9_test repo and captured via pidstat.

pidstat
LC_NUMERIC=C.UTF-8 pidstat -dru -Hh -C 'pythonw' 1 >> renpy-$(date +%s).pidstat

Here's a comparison with renpy-8.0.3-sdk default no MMX and one built with MMX.

Old A6-3500 Llano system (Debian sid)

In Ren'Py anything above 270% CPU is too much for this system and it starts frame dropping. E.G. 60 FPS VP9 movies turn into a slide show. The CPU drop halfway through was the switch over to the VP8 vid.

CPU flags

cat /proc/cpuinfo

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb hw_pstate vmmcall arat npt lbrv svm_lock nrip_save pausefilter

lib-def-Llano-8 0 3-sdk

MMX
lib-mmx-Llano-8 0 3-sdk

The Llano with the MMX enabled Ren'Py build can handle 60 FPS VP9 1080p vids just fine as long as the bitrate isn't out of control. Though sometimes devs encode it way higher than needed for 1080p...

Now with a current CPU with renpy-8.1.1-sdk default no MMX and again one built with MMX.

New Ryzen system (Debian sid)

CPU flags

cat /proc/cpuinfo

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid overflow_recov succor smca fsrm flush_l1d

lib-def-Zen4-8 1 1-sdk

MMX
lib-mmx-Zen4-8 1 1-sdk

This system has no playback issues. It's much faster per core and has plenty of CPU to spare. As you can see the MMX build still offers significant reduction in CPU even with the newer flags available. This naturally holds true for 4K video as well.

It would be nice to get MMX enabled again for at least the Win/Linux builds. This allows projects that use VP9 videos in particular to perform well on "marginal" systems and in the case of 4k expands the pool of systems able to play it at all.

Built without Live2D SDK

I know I need CubismSDKforNative-4-r.1.zip, but since it's proprietary software I don't want to use it, can I build renpy without support for Live2D?

ccache /home/renpy/renpy-build/tmp/cross.linux-x86_64/bin/x86_64-pc-linux-gnu-gcc -m64 -O3 -fPIC -pthread --sysroot /home/renpy/renpy-build/tmp/sysroot.linux-x86_64 -I/home/renpy/renpy-build/tmp/install.linux-x86_64/include -DRENPY_BUILD -I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/python2.7 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/SDL2 -I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/fribidi -I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/freetype2 -I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/python2.7/pygame_sdl2 -I/home/renpy/renpy-build/pygame_sdl2 -I/home/renpy/renpy-build/pygame_sdl2/src -I/home/renpy/renpy-build/renpy/module -c /home/renpy/renpy-build/renpy/module/gen-static/renpy.gl2.live2dmodel.c -o renpy.gl2.live2dmodel.o
/home/renpy/renpy-build/renpy/module/gen-static/renpy.gl2.live2dmodel.c:686:10: fatal error: Live2DCubismCore.h: No such file or directory
  686 | #include "Live2DCubismCore.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
build-librenpy.linux-x86_64-py2: process failed with 1.
args: ['ccache', '/home/renpy/renpy-build/tmp/cross.linux-x86_64/bin/x86_64-pc-linux-gnu-gcc', '-m64', '-O3', '-fPIC', '-pthread', '--sysroot', '/home/renpy/renpy-build/tmp/sysroot.linux-x86_64', '-I/home/renpy/renpy-build/tmp/install.linux-x86_64/include', '-DRENPY_BUILD', '-I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/python2.7', '-DOBJC_OLD_DISPATCH_PROTOTYPES=1', '-I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/SDL2', '-I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/fribidi', '-I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/freetype2', '-I/home/renpy/renpy-build/tmp/install.linux-x86_64/include/python2.7/pygame_sdl2', '-I/home/renpy/renpy-build/pygame_sdl2', '-I/home/renpy/renpy-build/pygame_sdl2/src', '-I/home/renpy/renpy-build/renpy/module', '-c', '/home/renpy/renpy-build/renpy/module/gen-static/renpy.gl2.live2dmodel.c', '-o', 'renpy.gl2.live2dmodel.o']
  File "./build.py", line 159, in <module>
    main()
  File "./build.py", line 155, in main
    args.function(args)
  File "./build.py", line 80, in build
    task.run(context)
  File "/home/renpy/renpy-build/renpybuild/model.py", line 473, in run
    self.function(context)
  File "/home/renpy/renpy-build/tasks/librenpy.py", line 68, in build
    c.run("{{ CC }} {{ CFLAGS }} -c {{ src }} -o {{ object }}", verbose=True)
  File "/home/renpy/renpy-build/renpybuild/model.py", line 235, in run
    renpybuild.run.run(command, self, verbose, quiet)
  File "/home/renpy/renpy-build/renpybuild/run.py", line 336, in run
    traceback.print_stack()

prepare.sh fails

Hello

So I tried following steps:

  1. Installed a clean Ubuntu 23.10 into a VirtualBox (7.0.12) environment.
  2. Created a user "rb" as instructed and made it root.
  3. Cloned renpy-build and hit ./prepare.sh

and got this:

(prepare.sh, line 14)
E: Unable to locate package python2-dev

Is python2-dev still needed or is this only for building with python version 2?
After deleting python2-dev in prepare.sh, I have the following:


(prepare.sh, line 45)

Ign:2 https://apt.llvm.org/mantic 1lvm-toolchain-mantic-15 InRelease
Err:6 https://apt.llvm.org/mantic llvm-toolchain-mantic-15 Release
404
Not Found [IP: 146.75.118.49 443]
Reading package lists... Done
E: The repository http://apt.llvm.org/mantic llvm-toolchain-mantic-15 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) mandage rb@renpy-1-2:~/renpy-builds
for repository creation and user configuration details.
rb@renpy-1-2:~/renpy-builds 

Is it possible to use llvm 16 or 17?


(nightly/python.sh, line 17)

copying src/pygame
_sl2/pygame_sdl2.h -> /us/include/python3.11
error: could not create
/usr/include/python3.11/pygame_sd12.h': Permission deni
ed rb@renpy-1-2:~/reny-butld§

After changing line 18 to:

sudo python3 setup.py install headers
This is our next output:

Traceback (most recent call last):
File
"/home/rb/renpy-build/pygame_sd2/setup.py", line 26, in ‹module> from setuplib import android,
ios, windows, cython, pymodule, setup, parse_c
flags, parse_libs, find_unnecessary_gen, gen
File
"/home/rb/renpy-build/pygame_sd12/setuplib.py", line 27, in <module> import setuptools
ModuleNotFoundError: No module named 'setuptools'

Am I missing something here?
Thanks.

get-pip no longer runs on Python2

The deprecation is on schedule for quite a while now so I'm not surprised it finally stopped working.

Traceback (most recent call last):
  File "/opt/renpy-build/tmp/get-pip.py", line 24244, in <module>
    main()
  File "/opt/renpy-build/tmp/get-pip.py", line 199, in main
    bootstrap(tmpdir=tmpdir)
  File "/opt/renpy-build/tmp/get-pip.py", line 82, in bootstrap
    from pip._internal.cli.main import main as pip_entry_point
  File "/tmp/tmpeSU33p/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

Also see https://pip.pypa.io/en/stable/development/release-process/#python-2-support

I've got a game set to run at 200x150 `config.screen_width = 200 config.screen_height = 150` and then scaled up to 800x600 `$ renpy.set_physical_size((800, 600))`. This method works fine in the normal launcher and in the windows build.

I've got a game set to run at 200x150 config.screen_width = 200 config.screen_height = 150 and then scaled up to 800x600 $ renpy.set_physical_size((800, 600)). This method works fine in the normal launcher and in the windows build.

However, when I attempt this on the web player, the game never finishes loading. When I grab the log, I find the error AttributeError: 'NoneType' object has no attribute 'info' referring to the line with renpy.set_physical_size. I'm assuming this is some sort of bug, since the other methods of playing don't seem to have this issue? But I'm not really well-versed in these things, apologies if I'm just missing something, or if this isn't the right place to submit this kind of feedback.

Originally posted by @PizzaGlover in renpy/renpyweb#11

JAVA_HOME is not recognized on Linux and macOS due to hardcoded javac.exe check in plat.py > maybe_java_home

Context

I was testing Renpy nightly (in order to check renpy/renpy#5137) which uses Java 17. instead of Java 8, and therefore needs to be run with Java 17 to avoid this version check error:

CalledProcessError: Command '['java', '-classpath', '/home/leyn/Applications/Game Engines/renpy-nightly-sdk/rapt/buildlib', 'CheckJDK', '17']' returned non-zero exit status 1.

This can be done with sudo update-alternatives --config java on Linux, but since I wanted to keep Java 8 as default for Renpy stable to work, I preferred running Renpy nightly with temporary env variable JAVA_HOME:

# example using OpenJDK 17, where renpy-nightly.sh is a symlink to renpy.sh in a nightly install of renpy-sdk
$ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 renpy-nightly.sh

then selected Install SDK again. However, JAVA_HOME was not recognized, therefore the default Java version 8 was used, and renpy-nightly failed on the JDK 17 check exactly as if I had not defined JAVA_HOME at all:

CalledProcessError: Command '['java', '-classpath', '/home/leyn/Applications/Game Engines/renpy-nightly-sdk/rapt/buildlib', 'CheckJDK', '17']' returned non-zero exit status 1.

Cause

I identified the issue in this file: renpy-nightly-sdk/rapt/buildlib/rapt/plat.py line 44:

def maybe_java_home(s):
	...
	if "JAVA_HOME" in os.environ:
		if not os.path.exists(os.path.join(os.environ["JAVA_HOME"], "bin", "javac.exe")):

which is incorrectly checking a hardcoded Windows .exe. The change was introduced in commit c820d9b

As a quick fix, I replaced the line with:

		if not os.path.exists(os.path.join(os.environ["JAVA_HOME"], "bin", "javac")):

and it fixed the issue on Linux.

For a more generic fix that still works on Windows though, we could either check a prepare string variable that could be "javac.exe" or "javac" depending on the OS, or even simpler, reuse the binary filename passed as argument s:

		if not os.path.exists(os.path.join(os.environ["JAVA_HOME"], "bin", s)):

Since it's also used in the return line below:

        return os.path.join(os.environ["JAVA_HOME"], "bin", s)

we could also precompute some variable s_full_path = os.path.join(os.environ["JAVA_HOME"], "bin", s) and reuse it in both locations (personally I'd rename s to something like binary_name or executable_filename to make things clearer too).

That sounds like an easy PR but I haven't cloned the renpy-build repository (unlike renpy-sdk) so I may not be able to send it immediately. So if somebody else who already cloned the repo feels like it, they can also make that PR to be even faster.

Problems with compiling avif for Windows x64 build, Linux x64 builds fine.

Command used sudo ./build.py --python 3 --platform windows
[ 94%] Building C object CMakeFiles/avif.dir/src/codec_aom.c.obj
In file included from /home/rb/renpy-build/tmp/source/libavif/src/mem.c:6:
In file included from /usr/include/stdlib.h:395:
In file included from /usr/include/sys/types.h:176:
In file included from /usr/include/endian.h:35:
/usr/include/bits/byteswap.h:75:10: error: implicit conversion loses integer precision: 'unsigned long long' to '__uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
return __bswap_constant_64 (__bsx);

/usr/include/bits/byteswap.h:67:4: note: expanded from macro '__bswap_constant_64'
 | (((x) & 0x00000000000000ffull) << 56))
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:167: CMakeFiles/avif.dir/src/mem.c.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/rb/renpy-build/tmp/source/libavif/src/io.c:6:
In file included from /usr/include/limits.h:124:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64/lib/clang/15.0.0/include/limits.h:21:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:6:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/crtdefs.h:10:
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:75:44: error: typedef redefinition with different types ('unsigned long long' vs 'unsigned long')
__MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
                                         ^
/usr/include/stdint.h:90:27: note: previous definition is here
typedef unsigned long int       uintptr_t;
                              ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/io.c:6:
In file included from /usr/include/limits.h:195:
In file included from /usr/include/bits/posix1_lim.h:161:
In file included from /usr/include/bits/local_lim.h:38:
/usr/include/linux/limits.h:13:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
#define PATH_MAX        4096    /* # chars in a path name including nul */
      ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:20:9: note: previous definition is here
#define PATH_MAX        260
      ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/io.c:7:
/usr/include/stdio.h:77:19: error: typedef redefinition with different types ('__ssize_t' (aka 'long') vs 'long long')
typedef __ssize_t ssize_t;
                ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:45:35: note: previous definition is here
__MINGW_EXTENSION typedef __int64 ssize_t;
                                ^
/home/rb/renpy-build/tmp/source/libavif/src/io.c:42:50: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
  uint64_t availableSize = reader->rodata.size - offset;
           ~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/io.c:63:27: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
  reader->io.sizeHint = size;
                      ~ ^~~~
5 errors generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:152: CMakeFiles/avif.dir/src/io.c.obj] Error 1
In file included from /home/rb/renpy-build/tmp/source/libavif/src/avif.c:6:
In file included from /usr/include/limits.h:124:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64/lib/clang/15.0.0/include/limits.h:21:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:6:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/crtdefs.h:10:
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:75:44: error: typedef redefinition with different types ('unsigned long long' vs 'unsigned long')
__MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
                                         ^
/usr/include/stdint.h:90:27: note: previous definition is here
typedef unsigned long int       uintptr_t;
                              ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/avif.c:6:
In file included from /usr/include/limits.h:195:
In file included from /usr/include/bits/posix1_lim.h:161:
In file included from /usr/include/bits/local_lim.h:38:
/usr/include/linux/limits.h:13:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
#define PATH_MAX        4096    /* # chars in a path name including nul */
      ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:20:9: note: previous definition is here
#define PATH_MAX        260
      ^
2 errors generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:92: CMakeFiles/avif.dir/src/avif.c.obj] Error 1
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:65:18: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
  data[0] = (l >> 56) & 0xff;
               ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:66:18: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
  data[1] = (l >> 48) & 0xff;
               ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:67:18: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
  data[2] = (l >> 40) & 0xff;
               ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:68:18: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
  data[3] = (l >> 32) & 0xff;
               ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:80:31: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
         ((uint64_t)data[3] << 32) | ((uint64_t)data[2] << 40) | ((uint64_t)data[1] << 48) | ((uint64_t)data[0] << 56);
                            ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:80:59: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
         ((uint64_t)data[3] << 32) | ((uint64_t)data[2] << 40) | ((uint64_t)data[1] << 48) | ((uint64_t)data[0] << 56);
                                                        ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:80:87: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
         ((uint64_t)data[3] << 32) | ((uint64_t)data[2] << 40) | ((uint64_t)data[1] << 48) | ((uint64_t)data[0] << 56);
                                                                                    ^  ~~
/home/rb/renpy-build/tmp/source/libavif/src/utils.c:80:115: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
         ((uint64_t)data[3] << 32) | ((uint64_t)data[2] << 40) | ((uint64_t)data[1] << 48) | ((uint64_t)data[0] << 56);
                                                                                                                ^  ~~
8 errors generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:302: CMakeFiles/avif.dir/src/utils.c.obj] Error 1
In file included from /home/rb/renpy-build/tmp/source/libavif/src/codec_aom.c:34:
In file included from /usr/include/limits.h:124:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64/lib/clang/15.0.0/include/limits.h:21:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:6:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/crtdefs.h:10:
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:75:44: error: typedef redefinition with different types ('unsigned long long' vs 'unsigned long')
__MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
                                         ^
/usr/include/stdint.h:90:27: note: previous definition is here
typedef unsigned long int       uintptr_t;
                              ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/codec_aom.c:34:
In file included from /usr/include/limits.h:195:
In file included from /usr/include/bits/posix1_lim.h:161:
In file included from /usr/include/bits/local_lim.h:38:
/usr/include/linux/limits.h:13:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
#define PATH_MAX        4096    /* # chars in a path name including nul */
      ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:20:9: note: previous definition is here
#define PATH_MAX        260
      ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/codec_aom.c:35:
In file included from /usr/include/stdlib.h:395:
/usr/include/sys/types.h:108:19: error: typedef redefinition with different types ('__ssize_t' (aka 'long') vs 'long long')
typedef __ssize_t ssize_t;
                ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:45:35: note: previous definition is here
__MINGW_EXTENSION typedef __int64 ssize_t;
                                ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/codec_aom.c:35:
In file included from /usr/include/stdlib.h:395:
In file included from /usr/include/sys/types.h:129:
/usr/include/bits/types/time_t.h:10:18: error: typedef redefinition with different types ('__time_t' (aka 'long') vs '__time64_t' (aka 'long long'))
typedef __time_t time_t;
               ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:138:20: note: previous definition is here
typedef __time64_t time_t;
                 ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/codec_aom.c:35:
In file included from /usr/include/stdlib.h:395:
In file included from /usr/include/sys/types.h:176:
In file included from /usr/include/endian.h:35:
/usr/include/bits/byteswap.h:75:10: error: implicit conversion loses integer precision: 'unsigned long long' to '__uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
return __bswap_constant_64 (__bsx);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/byteswap.h:67:4: note: expanded from macro '__bswap_constant_64'
 | (((x) & 0x00000000000000ffull) << 56))
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:332: CMakeFiles/avif.dir/src/codec_aom.c.obj] Error 1
In file included from /home/rb/renpy-build/tmp/source/libavif/src/read.c:8:
In file included from /usr/include/limits.h:124:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64/lib/clang/15.0.0/include/limits.h:21:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:6:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/crtdefs.h:10:
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:75:44: error: typedef redefinition with different types ('unsigned long long' vs 'unsigned long')
__MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
                                         ^
/usr/include/stdint.h:90:27: note: previous definition is here
typedef unsigned long int       uintptr_t;
                              ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/read.c:8:
In file included from /usr/include/limits.h:195:
In file included from /usr/include/bits/posix1_lim.h:161:
In file included from /usr/include/bits/local_lim.h:38:
/usr/include/linux/limits.h:13:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
#define PATH_MAX        4096    /* # chars in a path name including nul */
      ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:20:9: note: previous definition is here
#define PATH_MAX        260
      ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:592:30: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          sample->offset = offset;
                         ~ ^~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/read.c:930:26: error: implicit conversion from 'unsigned long long' to 'uint64_t' (aka 'unsigned long') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion]
  uint64_t minOffset = UINT64_MAX;
           ~~~~~~~~~   ^~~~~~~~~~
/usr/include/stdint.h:130:23: note: expanded from macro 'UINT64_MAX'
# define UINT64_MAX             (__UINT64_C(18446744073709551615))
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:107:25: note: expanded from macro '__UINT64_C'
#  define __UINT64_C(c) c ## UL
                      ^~~~~~~
<scratch space>:60:1: note: expanded from here
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/read.c:958:48: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
      const uint64_t endOffset = startOffset + usedExtentSize;
                     ~~~~~~~~~   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/read.c:980:22: error: result of comparison of constant 18446744073709551615 with expression of type 'const uint64_t' (aka 'const unsigned long') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
  if (extentLength > SIZE_MAX) {
      ~~~~~~~~~~~~ ^ ~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/read.c:1643:30: error: result of comparison of constant 18446744073709551615 with expression of type 'uint64_t' (aka 'unsigned long') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
          if (extentLength > SIZE_MAX) {
              ~~~~~~~~~~~~ ^ ~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/read.c:1746:37: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
      colr->iccOffset = rawOffset + avifROStreamOffset(&s);
                      ~ ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/src/read.c:1940:70: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          AVIF_CHECK(avifParseColourInformationBox(prop, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2168:60: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
                                               rawOffset + avifROStreamOffset(&s),
                                               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2411:67: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          AVIF_CHECK(avifParseItemPropertiesBox(meta, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2661:93: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
                                                       rawOffset + avifROStreamOffset(&s) + VISUALSAMPLEENTRY_SIZE,
                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2701:64: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
                                                   rawOffset + avifROStreamOffset(&s),
                                                   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2721:65: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          AVIF_CHECK(avifParseSampleTableBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
                     ~~~~~~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2740:70: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          AVIF_CHECK(avifParseMediaInformationBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2786:64: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          AVIF_CHECK(avifParseMetaBox(track->meta, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, data->diag));
                     ~~~~~~~~~~~~~~~~              ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2788:59: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
          AVIF_CHECK(avifParseMediaBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, data->diag));
                     ~~~~~~~~~~~~~~~~~        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:2808:51: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
              avifParseTrackBox(data, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, imageSizeLimit, imageDimensionLimit));
              ~~~~~~~~~~~~~~~~~       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/rb/renpy-build/tmp/source/libavif/include/avif/internal.h:21:15: note: expanded from macro 'AVIF_CHECK'
      if (!(A))              \
            ^
/home/rb/renpy-build/tmp/source/libavif/src/read.c:3054:45: error: implicit conversion loses integer precision: 'unsigned long long' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
  const uint64_t maxExtent1 = dst->offset + dst->size;
                 ~~~~~~~~~~   ~~~~~~~~~~~~^~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:212: CMakeFiles/avif.dir/src/read.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/avif.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
build-libavif.windows-x86_64: process failed with 2.
args: ['nice', 'make', '-j', '12']
File "/home/rb/renpy-build/./build.py", line 203, in <module>
  main()
File "/home/rb/renpy-build/./build.py", line 199, in main
  args.function(args)
File "/home/rb/renpy-build/./build.py", line 122, in build
  task.run(context)
File "/home/rb/renpy-build/renpybuild/task.py", line 97, in run
  self.function(context)
File "/home/rb/renpy-build/tasks/libavif.py", line 25, in build
  c.run("{{ make }}")
File "/home/rb/renpy-build/renpybuild/context.py", line 328, in run
  renpybuild.run.run(command, self, verbose, quiet)
File "/home/rb/renpy-build/renpybuild/run.py", line 403, in run
  traceback.print_stack()
/usr/bin/cmake -S/home/rb/renpy-build/tmp/source/libavif -B/home/rb/renpy-build/tmp/build/libavif.windows-x86_64 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles /home/rb/renpy-build/tmp/build/libavif.windows-x86_64//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/rb/renpy-build/tmp/build/libavif.windows-x86_64'
make  -f CMakeFiles/avif.dir/build.make CMakeFiles/avif.dir/depend
make[2]: Entering directory '/home/rb/renpy-build/tmp/build/libavif.windows-x86_64'
cd /home/rb/renpy-build/tmp/build/libavif.windows-x86_64 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rb/renpy-build/tmp/source/libavif /home/rb/renpy-build/tmp/source/libavif /home/rb/renpy-build/tmp/build/libavif.windows-x86_64 /home/rb/renpy-build/tmp/build/libavif.windows-x86_64 /home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/DependInfo.cmake --color=
Dependencies file "CMakeFiles/avif.dir/src/alpha.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/avif.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/codec_aom.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/colr.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/diag.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/exif.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/io.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/mem.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/obu.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/rawdata.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/read.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/reformat.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/reformat_libsharpyuv.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/reformat_libyuv.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/scale.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/stream.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/utils.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/avif.dir/src/write.c.obj.d" is newer than depends file "/home/rb/renpy-build/tmp/build/libavif.windows-x86_64/CMakeFiles/avif.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target avif
make[2]: Leaving directory '/home/rb/renpy-build/tmp/build/libavif.windows-x86_64'
make  -f CMakeFiles/avif.dir/build.make CMakeFiles/avif.dir/build
make[2]: Entering directory '/home/rb/renpy-build/tmp/build/libavif.windows-x86_64'
[  5%] Building C object CMakeFiles/avif.dir/src/avif.c.obj
/usr/bin/ccache  /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/bin/x86_64-w64-mingw32-clang -fPIC -pthread -std=gnu17 -DAVIF_CODEC_AOM=1 -DAVIF_CODEC_AOM_DECODE=1 @CMakeFiles/avif.dir/includes_C.rsp -O3 -I/home/rb/renpy-build/tmp/install.windows-x86_64/include -DRENPY_BUILD -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wextra -Wshorten-64-to-32 -Werror -std=gnu99 -MD -MT CMakeFiles/avif.dir/src/avif.c.obj -MF CMakeFiles/avif.dir/src/avif.c.obj.d -o CMakeFiles/avif.dir/src/avif.c.obj -c /home/rb/renpy-build/tmp/source/libavif/src/avif.c
In file included from /home/rb/renpy-build/tmp/source/libavif/src/avif.c:6:
In file included from /usr/include/limits.h:124:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64/lib/clang/15.0.0/include/limits.h:21:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:6:
In file included from /home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/crtdefs.h:10:
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/corecrt.h:75:44: error: typedef redefinition with different types ('unsigned long long' vs 'unsigned long')
__MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
                                         ^
/usr/include/stdint.h:90:27: note: previous definition is here
typedef unsigned long int       uintptr_t;
                              ^
In file included from /home/rb/renpy-build/tmp/source/libavif/src/avif.c:6:
In file included from /usr/include/limits.h:195:
In file included from /usr/include/bits/posix1_lim.h:161:
In file included from /usr/include/bits/local_lim.h:38:
/usr/include/linux/limits.h:13:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
#define PATH_MAX        4096    /* # chars in a path name including nul */
      ^
/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/x86_64-w64-mingw32/include/limits.h:20:9: note: previous definition is here
#define PATH_MAX        260
      ^
2 errors generated.
make[2]: *** [CMakeFiles/avif.dir/build.make:92: CMakeFiles/avif.dir/src/avif.c.obj] Error 1
make[2]: Leaving directory '/home/rb/renpy-build/tmp/build/libavif.windows-x86_64'
make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/avif.dir/all] Error 2
make[1]: Leaving directory '/home/rb/renpy-build/tmp/build/libavif.windows-x86_64'
make: *** [Makefile:136: all] Error 2
build-libavif.windows-x86_64: process failed with 2.
args: ['make', 'VERBOSE=1']
File "/home/rb/renpy-build/./build.py", line 203, in <module>
  main()
File "/home/rb/renpy-build/./build.py", line 199, in main
  args.function(args)
File "/home/rb/renpy-build/./build.py", line 122, in build
  task.run(context)
File "/home/rb/renpy-build/renpybuild/task.py", line 97, in run
  self.function(context)
File "/home/rb/renpy-build/tasks/libavif.py", line 27, in build
  c.run("make VERBOSE=1")
File "/home/rb/renpy-build/renpybuild/context.py", line 328, in run
  renpybuild.run.run(command, self, verbose, quiet)
File "/home/rb/renpy-build/renpybuild/run.py", line 403, in run
  traceback.print_stack()

"sudo ./prepare.sh" claims that all pygame_sdl2 files are out of date

Hello. I've tried today to run renpy-build with git clone https://github.com/renpy/renpy-build and ./prepare.sh, as explained in https://github.com/renpy/renpy-build#preparing. However, the process claims that seemingly every pygame_sdl2 module that the tool itself downloaded (if I didn't see entirely wrong), are out of date:

Code results (without colours):
[dandelionsprout@fedora renpy-build]$ sudo ./prepare.sh
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already satisfied: virtualenv in /usr/lib/python2.7/site-packages (20.10.0)
Requirement already satisfied: importlib-resources>=1.0; python_version < "3.7" in /usr/lib/python2.7/site-packages (from virtualenv) (3.3.1)
Requirement already satisfied: backports.entry-points-selectable>=1.0.4 in /usr/lib/python2.7/site-packages (from virtualenv) (1.1.1)
Requirement already satisfied: pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32" in /usr/lib/python2.7/site-packages (from virtualenv) (2.3.6)
Requirement already satisfied: six<2,>=1.9.0 in /usr/lib/python2.7/site-packages (from virtualenv) (1.16.0)
Requirement already satisfied: filelock<4,>=3.2 in /usr/lib/python2.7/site-packages (from virtualenv) (3.2.1)
Requirement already satisfied: distlib<1,>=0.3.1 in /usr/lib/python2.7/site-packages (from virtualenv) (0.3.3)
Requirement already satisfied: platformdirs<3,>=2 in /usr/lib/python2.7/site-packages (from virtualenv) (2.0.2)
Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in /usr/lib/python2.7/site-packages (from virtualenv) (2.1.2)
Requirement already satisfied: zipp>=0.4; python_version < "3.8" in /usr/lib/python2.7/site-packages (from importlib-resources>=1.0; python_version < "3.7"->virtualenv) (1.2.0)
Requirement already satisfied: typing; python_version < "3.5" in /usr/lib/python2.7/site-packages (from importlib-resources>=1.0; python_version < "3.7"->virtualenv) (3.10.0.0)
Requirement already satisfied: contextlib2; python_version < "3" in /usr/lib/python2.7/site-packages (from importlib-resources>=1.0; python_version < "3.7"->virtualenv) (0.6.0.post1)
Requirement already satisfied: singledispatch; python_version < "3.4" in /usr/lib/python2.7/site-packages (from importlib-resources>=1.0; python_version < "3.7"->virtualenv) (3.7.0)
Requirement already satisfied: scandir; python_version < "3.5" in /usr/lib64/python2.7/site-packages (from pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32"->virtualenv) (1.10.0)
Requirement already satisfied: configparser>=3.5; python_version < "3" in /usr/lib/python2.7/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->virtualenv) (4.0.2)
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
HEAD is now at eebeeb3 Do not index a directory if the sdk doesn't exist.
Already up to date.
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/renpy /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
HEAD is now at 8654f8eef Add the clip transform property.
Already up to date.
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/pygame_sdl2 /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
HEAD is now at 5777335 Do not request negative swap control when postive swap control fails.
Already up to date.
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/renpyweb /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
HEAD is now at 4347b37 Fix a potential race condition where game.zip is not ready when the game starts.
Already up to date.
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already satisfied: colorama==0.3.7 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 1)) (0.3.7)
Requirement already satisfied: Cython==0.29.20 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 2)) (0.29.20)
Requirement already satisfied: future==0.18.2 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 3)) (0.18.2)
Requirement already satisfied: ipython==4.1.2 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (4.1.2)
Requirement already satisfied: Jinja==1.2 in ./tmp/virtualenv.py2/lib64/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 5)) (1.2)
Requirement already satisfied: Jinja2==2.10 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 6)) (2.10)
Requirement already satisfied: modernize==0.5 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 7)) (0.5)
Requirement already satisfied: Pygments==2.2.0 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 8)) (2.2.0)
Requirement already satisfied: python-dateutil==2.8.0 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 9)) (2.8.0)
Requirement already satisfied: pytz==2018.9 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 10)) (2018.9)
Requirement already satisfied: requests==2.20.0 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 11)) (2.20.0)
Requirement already satisfied: rsa==3.4.2 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 12)) (3.4.2)
Requirement already satisfied: six==1.12.0 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 13)) (1.12.0)
Requirement already satisfied: Sphinx==1.6.6 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 14)) (1.6.6)
Requirement already satisfied: sphinx-bootstrap-theme==0.4.9 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 15)) (0.4.9)
Requirement already satisfied: sphinxcontrib-websupport==1.0.1 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 16)) (1.0.1)
Requirement already satisfied: typing==3.6.4 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from -r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 17)) (3.6.4)
Requirement already satisfied: pexpect; sys_platform != "win32" in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (4.8.0)
Requirement already satisfied: pickleshare in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (0.7.5)
Requirement already satisfied: decorator in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (4.4.2)
Requirement already satisfied: simplegeneric>0.8 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (0.8.1)
Requirement already satisfied: traitlets in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (4.3.3)
Requirement already satisfied: setuptools>=18.5 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (44.1.1)
Requirement already satisfied: MarkupSafe>=0.23 in ./tmp/virtualenv.py2/lib64/python2.7/site-packages (from Jinja2==2.10->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 6)) (1.1.1)
Requirement already satisfied: certifi>=2017.4.17 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from requests==2.20.0->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 11)) (2021.10.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from requests==2.20.0->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 11)) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from requests==2.20.0->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 11)) (1.24.3)
Requirement already satisfied: idna<2.8,>=2.5 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from requests==2.20.0->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 11)) (2.7)
Requirement already satisfied: pyasn1>=0.1.3 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from rsa==3.4.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 12)) (0.4.8)
Requirement already satisfied: snowballstemmer>=1.1 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from Sphinx==1.6.6->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 14)) (2.2.0)
Requirement already satisfied: babel!=2.0,>=1.3 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from Sphinx==1.6.6->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 14)) (2.9.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from Sphinx==1.6.6->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 14)) (0.7.12)
Requirement already satisfied: imagesize in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from Sphinx==1.6.6->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 14)) (1.3.0)
Requirement already satisfied: docutils>=0.11 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from Sphinx==1.6.6->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 14)) (0.18.1)
Requirement already satisfied: ptyprocess>=0.5 in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from pexpect; sys_platform != "win32"->ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (0.7.0)
Requirement already satisfied: pathlib2; python_version in "2.6 2.7 3.2 3.3" in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from pickleshare->ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (2.3.6)
Requirement already satisfied: ipython-genutils in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from traitlets->ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (0.2.0)
Requirement already satisfied: enum34; python_version == "2.7" in ./tmp/virtualenv.py2/lib/python2.7/site-packages (from traitlets->ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (1.1.10)
Requirement already satisfied: scandir; python_version < "3.5" in ./tmp/virtualenv.py2/lib64/python2.7/site-packages (from pathlib2; python_version in "2.6 2.7 3.2 3.3"->pickleshare->ipython==4.1.2->-r /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/requirements.txt (line 4)) (1.10.0)
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/pygame_sdl2 /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/tmp/virtualenv.py2/include/python2.7 is not a symlink. Perhaps this script has already been run.
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/pygame_sdl2 /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
pygame_sdl2.error is out of date.
pygame_sdl2.color is out of date.
pygame_sdl2.controller is out of date.
pygame_sdl2.rect is out of date.
pygame_sdl2.rwobject is out of date.
pygame_sdl2.surface is out of date.
pygame_sdl2.display is out of date.
pygame_sdl2.event is out of date.
pygame_sdl2.locals is out of date.
pygame_sdl2.key is out of date.
pygame_sdl2.mouse is out of date.
pygame_sdl2.joystick is out of date.
pygame_sdl2.power is out of date.
pygame_sdl2.pygame_time is out of date.
pygame_sdl2.image is out of date.
pygame_sdl2.transform is out of date.
pygame_sdl2.gfxdraw is out of date.
pygame_sdl2.draw is out of date.
pygame_sdl2.font is out of date.
pygame_sdl2.mixer is out of date.
pygame_sdl2.mixer_music is out of date.
warning: src/pygame_sdl2/mixer_music.pyx:58:0: Overriding cdef method with def method.
pygame_sdl2.scrap is out of date.
pygame_sdl2.render is out of date.
running install_headers
copying src/pygame_sdl2/pygame_sdl2.h -> /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/tmp/virtualenv.py2/include/python2.7/pygame_sdl2
copying gen/pygame_sdl2.rwobject_api.h -> /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/tmp/virtualenv.py2/include/python2.7/pygame_sdl2
copying gen/pygame_sdl2.surface_api.h -> /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/tmp/virtualenv.py2/include/python2.7/pygame_sdl2
copying gen/pygame_sdl2.display_api.h -> /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/tmp/virtualenv.py2/include/python2.7/pygame_sdl2
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
/home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build/renpy /home/dandelionsprout/Downloads/renpy-7.4.11-source/renpy-build
pygame_sdl2.error is out of date.
pygame_sdl2.color is out of date.
pygame_sdl2.controller is out of date.
pygame_sdl2.rect is out of date.
pygame_sdl2.rwobject is out of date.
pygame_sdl2.surface is out of date.
pygame_sdl2.display is out of date.
pygame_sdl2.event is out of date.
pygame_sdl2.locals is out of date.
pygame_sdl2.key is out of date.
pygame_sdl2.mouse is out of date.
pygame_sdl2.joystick is out of date.
pygame_sdl2.power is out of date.
pygame_sdl2.pygame_time is out of date.
pygame_sdl2.image is out of date.
pygame_sdl2.transform is out of date.
pygame_sdl2.gfxdraw is out of date.
pygame_sdl2.draw is out of date.
pygame_sdl2.font is out of date.
pygame_sdl2.mixer is out of date.
pygame_sdl2.mixer_music is out of date.
warning: src/pygame_sdl2/mixer_music.pyx:58:0: Overriding cdef method with def method.
pygame_sdl2.scrap is out of date.
pygame_sdl2.render is out of date.
gen/pygame_sdl2.event.c:4062:18: warning: '__pyx_f_11pygame_sdl2_5event_make_mousewheel_event_sdl2' defined but not used [-Wunused-function]
 4062 | static PyObject *__pyx_f_11pygame_sdl2_5event_make_mousewheel_event_sdl2(SDL_MouseWheelEvent *__pyx_v_e) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gen/pygame_sdl2.key.c: In function '__pyx_pf_11pygame_sdl2_3key_13KeyboardState_4__init__':
gen/pygame_sdl2.key.c:1605:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 1605 |   __pyx_v_state = SDL_GetKeyboardState((&__pyx_v_self->numkeys));
      |                 ^
gen/pygame_sdl2.joystick.c: In function '__pyx_pf_11pygame_sdl2_8joystick_8Joystick_12get_name':
gen/pygame_sdl2.joystick.c:2236:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 2236 |   __pyx_v_rv = SDL_JoystickName(__pyx_v_self->joystick);
      |              ^
gen/pygame_sdl2.pygame_time.c: In function '__pyx_f_11pygame_sdl2_11pygame_time_timer_callback':
gen/pygame_sdl2.pygame_time.c:1976:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 1976 |   __pyx_v_e.type = ((int)__pyx_v_param);
      |                     ^
gen/pygame_sdl2.pygame_time.c: In function '__pyx_pf_11pygame_sdl2_11pygame_time_10set_timer':
gen/pygame_sdl2.pygame_time.c:2200:122: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 2200 | (SDL_TimerCallback)__pyx_f_11pygame_sdl2_11pygame_time_timer_callback), ((void *)((int)__pyx_t_2)));
      |                                                                          ^

gen/pygame_sdl2.image.c:609:10: fatal error: SDL_image.h: No such file or directory
  609 | #include "SDL_image.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1

It deserves mention that I had to remove the apt-get and clang lines from prepare.sh in order to get the script to run. I did at least ensure I had installed python3-jinja2, debootstrap, qemu-user-static, and some of the other listed dependencies, although the lib files mentioned in those lines seemed to have no Fedora equivalent.

Explanation for my use of Fedora:

As to why I'm trying to do this in Fedora, when the Readme say it's Ubuntu-only? I've only got one reasonably well functioning Linux installation, and it's on my RaspPi, where I'm hoping to figure out how easily both gratis and DRM-free-but-commercial Renpy games could run on ARM, which would almost triple the amount of known Linux ARM games. I had very bad experiences with Raspbian and made a distro change in June 2021.

Setup:
Distro: Fedora Workstation 35 stable
Distro architecture: aarch64
Hardware: Raspberry Pi 4 8GB

Live2dCubismCore.h

So after realizing that the tars file was completely empty and there was zero mention of it in the build readme, and after getting the tar files to proceed with compiling I stumbled into this lovely issue where the compiler realizes that Live2dCubismCore.h is not accessible. After pondering to myself why someone would just leave this out I also realized that it uses an older version of the Cubism SDK. Seems like a couple of fairly important things to mention, but what do I know?

Re-enable Wayland for Linux

Renpy 7.4.11 runs under Wayland with environment variable export SDL_VIDEODRIVER=wayland. With 7.5.0 and up this gives error: wayland not available (previously mentioned in a comment on renpy issue #3290).

My guess is this is the result of e8c4cbc changing tasks/sdl2.py so --disable-video-wayland is set unconditionally rather than when {% if c.platform == "android" %}.

Could Wayland be re-enabled? I've played several games using Wayland+7.4.11 and not noticed any issues.

Edit: It's also possible to run native Wayland versions of 7.5.x by overriding renpy's SDL with e.g. export SDL_DYNAMIC_API=/usr/lib64/libSDL2-2.0.so.0

[RAPT 8.1.3] keeplist & blocklist in Windows

I've recently been working on RAPT's keeplist.txt and blacklist.txt, which convert pattern strings into regular expressions based on specific rules. However, the path obtained by using os.path.join under Windows contains backslashes

D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\tchinese\script.rpyc
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\ukrainian\options.rpyc
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\ukrainian\screens.rpyc
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\ukrainian\common.rpyc
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\ukrainian\script.rpyc
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\ukrainian
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\japanese
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\schinese
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\tchinese
D:\Program Files\renpy-8.1.3-sdk\rapt\project/app/src/main/assets\game\tl\russian

which will cause problems for regex matching.

For example, if I want to block the game/dlc/chapter40 folder, directly filling in blocklist.txt will not match. I can only use the wildcard writing method of game**dlc**chapter40.

Broken libraries

adb8b02 - breaks launching on android, i guess it affects all 3 libraries - pyjnius, pyobjus, steam

2023-12-13 06:01:20.698  2630-2780  python                  com.package              I  Traceback (most recent call last):
2023-12-13 06:01:20.698  2630-2780  python                  com.package              I    File "/data/user/0/com.package/files/main.py", line 260, in <module>
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I      main()
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I    File "/data/user/0/com.package/files/main.py", line 256, in main
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I      renpy.bootstrap.bootstrap(renpy_base)
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I    File "renpy/bootstrap.py", line 321, in bootstrap
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I    File "renpy/__init__.py", line 406, in import_all
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I    File "renpy/loader.py", line 75, in <module>
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I    File "lib/python3.9/android/__init__.py", line 1, in <module>
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I    File "lib/python3.9/__init__.py", line 12, in <module>
2023-12-13 06:01:20.699  2630-2780  python                  com.package              I  ImportError: bad magic number in 'jnius.env': b'\xa7\r\r\n'

undefined symbol: `__isPlatformVersionAtLeast` when using MacOSX12.3.sdk in building for mac

ld64.lld: warning: Option `-stack_size' is not yet implemented. Stay tuned...
ld64.lld: warning: Option `-stack_size' is not yet implemented. Stay tuned...
ld64.lld: error: undefined symbol: __isPlatformVersionAtLeast
>>> referenced by pytime.c:705 (Python/pytime.c:705)
>>>               libpython3.9.a(pytime.o):(symbol pygettimeofday+0x2c)
>>> referenced by bootstrap_hash.c:521 (Python/bootstrap_hash.c:521)
>>>               libpython3.9.a(bootstrap_hash.o):(symbol pyurandom+0x3e)
>>> referenced by callproc.c:1482 (./Modules/_ctypes/callproc.c:1482)
>>>               libpython3.9.a(callproc.o):(symbol py_dyld_shared_cache_contains_path+0x1d)
>>> referenced 5 more times
ld64.lld: error: undefined symbol: __isPlatformVersionAtLeast
>>> referenced by pytime.c:705 (Python/pytime.c:705)
>>>               libpython3.9.a(pytime.o):(symbol pygettimeofday+0x2c)
>>> referenced by bootstrap_hash.c:521 (Python/bootstrap_hash.c:521)
>>>               libpython3.9.a(bootstrap_hash.o):(symbol pyurandom+0x3e)
>>> referenced by callproc.c:1482 (./Modules/_ctypes/callproc.c:1482)
>>>               libpython3.9.a(callproc.o):(symbol py_dyld_shared_cache_contains_path+0x1d)
>>> referenced 5 more times
clang: error: clanglinker command failed with exit code 1 (use -v to see invocation): 
error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:739:Programs/_testembed] 错误 1
make: *** 正在等待未完成的任务....
make: *** [Makefile:604:python] 错误 1
build_posix-python3.mac-x86_64-py3: process failed with 2.
args: ['nice', 'make', '-j', '12']
  File "/home/brainos/Builds/renpy-build-test1/./build.py", line 231, in <module>
    main()
  File "/home/brainos/Builds/renpy-build-test1/./build.py", line 227, in main
    args.function(args)
  File "/home/brainos/Builds/renpy-build-test1/./build.py", line 122, in build
    task.run(context)
  File "/home/brainos/Builds/renpy-build-test1/renpybuild/task.py", line 97, in run
    self.function(context)
  File "/home/brainos/Builds/renpy-build-test1/tasks/python3.py", line 123, in build_posix
    c.run("""{{ make }}""")
  File "/home/brainos/Builds/renpy-build-test1/renpybuild/context.py", line 328, in run
    renpybuild.run.run(command, self, verbose, quiet)
  File "/home/brainos/Builds/renpy-build-test1/renpybuild/run.py", line 448, in run
    traceback.print_stack()

After checking crossosx, I think newer MacOSXsdk needed to build LLVM's compiler-rt libraries first when building.

Tasks

No tasks being tracked yet.

Can't include Itch App Manifest

This doesn't work:

    build.classify('.itch.toml', 'all')

But this works:

    build.classify('anythingelse.toml', 'all')

Makes me thing there's an issue with including files that start with a dot?

Dosent work on a clean install

I tried to follow the instructions for making a clean install but there were many things that didn't work out the box, which make me thing the install instructions only work in a tampered environment. I tried to make a dockerfile from a clean image like this

FROM ubuntu:22.04

COPY . .
RUN apt-get -qq update && ./prepare.sh 

But it complained about sudo, so I ended up making a complete dockerfile but still some tasks require sudo so I would have to tamper with the other files in it, can you look into having this work from a clean install,

Basically try this Dockefile

FROM ubuntu:22.04

# see https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends
RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker
RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker

SHELL ["/bin/bash", "-xe", "-c"]
ENV RENPY_QUIET=--verbose

ARG DEBIAN_FRONTEND=noninteractive
ARG ROOT=/app
ARG BASE=$ROOT
ARG REFS=$ROOT

WORKDIR $ROOT

COPY . .

RUN apt-get -qq update && \
 apt-get -qq install \
    git build-essential ccache unzip autoconf autoconf-archive automake libtool-bin \
    lsb-release wget software-properties-common gnupg \
    python2-dev python3-dev python3-venv \
    curl \
    python3-jinja2 \
    debootstrap qemu-user-static \
    libgmp-dev libmpfr-dev libmpc-dev \
    libssl-dev libbz2-dev liblzma-dev \
    cmake clang libxml2-dev llvm \
    quilt \
    libavcodec-dev libavformat-dev \
    libswresample-dev libswscale-dev libfreetype6-dev libfribidi-dev libsdl2-dev \
    libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev && \
    apt-get autoremove -y && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN mkdir -p $ROOT/tmp && \
    wget -O llvm.sh https://apt.llvm.org/llvm.sh && \
    chmod +x llvm.sh && \
    ./llvm.sh 15 && \
    tar xzf "$BASE/prebuilt/clang_rt.tar.gz" -C /usr/lib/clang/15/lib/

RUN pushd tars && \
    wget -q https://github.com/alexey-lysiuk/macos-sdk/releases/download/12.3/MacOSX12.3.tar.xz && \
    wget -q https://github.com/growtopiajaw/iPhoneOS-SDK/releases/download/v1.0/iPhoneOS14.0.sdk.zip && \
    wget -q https://github.com/jnicholls/cross-rust/raw/main/iPhoneSimulator14.3.sdk.tar.xz && \
    wget -q https://dl.google.com/android/repository/android-ndk-r25b-linux.zip && \
    wget -q https://cubism.live2d.com/sdk-native/bin/CubismSdkForNative-4-r.6.2.zip && \
    tar -xJf MacOSX12.3.tar.xz && tar -cjf MacOSX12.3.tar.bz2 MacOSX12.3.sdk && \
    unzip iPhoneOS14.0.sdk.zip && tar -czf iPhoneOS14.0.sdk.tar.gz iPhoneOS14.0.sdk && \
    tar -xJf iPhoneSimulator14.3.sdk.tar.xz && tar -czf iPhoneSimulator14.0.sdk.tar.gz iPhoneSimulator14.3.sdk && \
    popd

RUN VENV="$ROOT/tmp/virtualenv.py3" && \
    export RENPY_DEPS_INSTALL=/usr::/usr/lib/x86_64-linux-gnu/ && \
    . $BASE/nightly/git.sh && \
    . $BASE/nightly/python.sh || true

The || true is because python.sh calls renpy/run.sh which calls renpy/modules/setup.py which fails with Could not find required library SDL2. which comes from include("SDL.h", directory="SDL2"). It's not apparent to me at what point the SDL2 folder is created. That and seeing how many things are cached make me think the install instructions only work in a tampered environnement. In my opinion there should be a CI thing running this dockerfile to check that the build process works whenever this repo or the dependencies of this repo (renpy, pygame_sdl2...) change.

Run it with docker build . --progress=plain -t renpy

Once it is built you can start it with docker run -it --name=rc renpy
Inside the shell type . tmp/virtualenv.py3/bin/activate then ./build.py. It should fail because one task requires sudo, On my local copy I removed the sudo things and it went through.
You can use docker cp to get the build artifacts.

build.py fails on trying to compile for armv7l

sebmau@sebmau-HP-Laptop-14-dk0xxx:~/temp/mmm/renpy-build$ python3 build.py --platforms linux --arch armv7l 
check-cython.linux-armv7l-py3 running in /home/sebmau/temp/mmm/renpy-build/tmp/build/cython.linux-armv7l-py3 ...
/home/sebmau/.local/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/sebmau/temp/mmm/renpy-build/tmp/build/cython.linux-armv7l-py3/test.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

unpack-env_sh.linux-armv7l running in /home/sebmau/temp/mmm/renpy-build/tmp/build/env_sh.linux-armv7l ...

install_linux_raspi-sysroot.linux-armv7l already finished.
permissions-sysroot.linux-armv7l already finished.
fix_pkgconf_prefix-sysroot.linux-armv7l already finished.
update_wayland_headers-sysroot.linux-armv7l already finished.
update_wayland_pkgconfig-sysroot.linux-armv7l already finished.
unpack-nasm.host already finished.
build-nasm.host running in /home/sebmau/temp/mmm/renpy-build/tmp/build/nasm.host ...
checking for gcc... ccache clang-15 -fuse-ld=lld -Wno-unused-command-line-argument  -std=gnu17
checking whether the C compiler works... no
configure: error: in `/home/sebmau/temp/mmm/renpy-build/tmp/build/nasm.host/nasm-2.14.02':
configure: error: C compiler cannot create executables
See `config.log' for more details
build-nasm.host: process failed with 77.
args: './configure' '--prefix=/home/sebmau/temp/mmm/renpy-build/tmp/host'
  File "/home/sebmau/temp/mmm/renpy-build/build.py", line 238, in <module>
    main()
  File "/home/sebmau/temp/mmm/renpy-build/build.py", line 227, in main
    args.function(args)
  File "/home/sebmau/temp/mmm/renpy-build/build.py", line 122, in build
    task.run(context)
  File "/home/sebmau/temp/mmm/renpy-build/renpybuild/task.py", line 94, in run
    self.function(context)
  File "/home/sebmau/temp/mmm/renpy-build/tasks/nasm.py", line 20, in build
    c.run("""{{configure}} --prefix="{{install}}" """)
  File "/home/sebmau/temp/mmm/renpy-build/renpybuild/context.py", line 331, in run
    renpybuild.run.run(command, self, verbose, quiet)
  File "/home/sebmau/temp/mmm/renpy-build/renpybuild/run.py", line 466, in run
    traceback.print_stack()
sebmau@sebmau-HP-Laptop-14-dk0xxx:~/temp/mmm/renpy-build$ 


OS: Ubuntu 23.10
Kernel: x86_64 Linux 6.5.0-27-generic
Shell: bash 5.2.15
Python3: Python 3.11.6
gcc: gcc version 13.2.0

I am trying to build the latest renpy for an armv7l architecture, and it always seems to end up with this error after running python3 build.py --platforms linux --arch armv7l. prepare.sh went without too much of a problem, although I removed python2-dev as it isn't installable easily with Ubuntu 23. I am not experienced in cross compiling or building from source in general, so apologies if this issue seems incompetent. config.log is attached. Any help is appreciated.

Python3 support

I noticed in the Issues for the original rapt project that python 3 support is/was planned imminently for renpy-build. But, I'm struggling to find any more information on the status of this. Python 3 for porting pygame to Android (and elsewhere) will be invaluable, thanks so much for your work so far!

Has python 3 support been introduced?

SDL 2.0.16 brings optimization to SDL_WaitEvent

SDL version 2.0.16 includes this commit which enables SDL_WaitEvent to actually wait for an OS event instead of polling. In addition to potentially being more power-efficient, this improvement will help with my plan to implement screen reader accessibility for Ren'Py (not quite the same as self-voicing), particularly on Windows, Mac, and iOS. The problem is that on these platforms, the accessibility API requires IPC to the thread that owns the native window, which has to go through the OS event pumping mechanism, and a single screen reader command can require several IPC round trips, so a 1ms+ delay per round trip (which is what SDL_WaitEvent previously did) is noticeable. But at the same time, polling with no delay is obviously a non-starter. So updating to a version of SDL that includes this optimization would be helpful.

PWA: additional caching options

I'm creating this issue to discuss further steps for #51 and renpy/renpy#4126.
Here are a few things we can implement, feel free to suggest more:

  • Cache the entire game for offline use
  • Cache all media we receive (not only core files) as the user progress through the story.
  • If 2nd is active, we should give the ability to purge the cache. I think core files should be kept regardless.
  • Manually select what to precache.
    We can divide all media based on their folders, many devs divide their media content into something like chapter1/example.png, or chapter2/example2.png and we can use it so the user can decide what content he'd like to save. For example, download only chapter2 content.
  • Give devs control over cache mode - core files or all media.

To implement all this, we probably need to generate a file that will include all project paths for media content during the build, because I don't think that we can access all of them from the frontend side. Maybe there's a way to get it from web assembly directly? @renpytom

RAPT space usage and post-build cleanup

RAPT doesn't clean assets after build and SDK folder quickly becomes very huge (at least x5 size of the base game).

I'm talking about:

rapt/bin/*.apk
rapt/project/app/build/outputs/apk/*/*.apk

Any reasons not to use shutil.move instead of copy? Same for moving from rapt/bin to workdir/GAME-dists.

rapt/project/app/src/main/assets/*
rapt/project/app/build/intermediates/merged_assets/release/out/*
tmp/*/android.dist/assets*

Any downsides in cleaning everything after successful build?
Again - maybe move instead of copy at some steps? (like in make_tree). That will save space required for compilation.

request for documentation renpy-build

Hello everyone,

I'm in search of comprehensive documentation that can provide insights into the Ren'Py-Build process. This documentation will greatly assist me in gaining clarity and understanding of the tool.
Thanks

Re-enable WASAPI support

Hi, I noticed that 304cbf9 has disabled wasapi because of wine. I think wine users could set SDL_AUDIODRIVER to directsound to fix this, there is no need to completely disable wasapi in tasks/sdl2.py.

And although popping sounds have been fixed in config.fadeout_audio, according to libsdl-org/SDL#3001 using the SDL WASAPI driver is the recommended method to avoid this problem on Windows.

Can WASAPI be enabled again?

New apps are required to target API level 30 (Android 11) and use the Android App Bundle publishing format.

Starting August 2021, new apps will be required to target API level 30 (Android 11) and use the Android App Bundle publishing format. Starting November 2021, all app updates will be required to target API level 30 (Android 11). Apps with a download size of more than 150 MB are now supported by Play Asset Delivery and Play Feature Delivery.

Learn more at: https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html
See also: https://developer.android.com/distribute/best-practices/develop/target-sdk
See also: https://developer.android.com/about/versions/11/behavior-changes-11

Google Play Console Screenshot


TL;DR RAPT is no longer able to upload apps to Google Play Store. Support to update them will be dropped in November.

Apple build targets result in "Failed to find a pointer-size integer type" errors

Ubuntu 22.04
All additional required source files are located in './tars'
I've followed the 23.10 readme and later installed 22.04 after reading through previous issues with Python 2 packages.

My goal is to compile for iOS and iOS Simulator. However I am running into some issues. Currently I am only able to build for Windows x86_64.

While targeting ios/arm64 I run into "Failed to find a pointer-size integer type" errors. This also happens while targeting mac/x86/arm. Is the setup process for Apple products any different? Forgive me if I am making any common mistakes.

I understand that the iOS tasks build static libraries. My end goal is to build dynamic libraries if possible. I have not made any changes as I would like to get it to build first.

I have attached the log from preparing down to building. I would appreciate any help.
prepare_build.log

check-cython.ios-arm64-py3 running in /home/rb/renpy-build/tmp/build/cython.ios-arm64-py3 ...
/home/rb/renpy-build/tmp/virtualenv.py3/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/rb/renpy-build/tmp/build/cython.ios-arm64-py3/test.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

unpack-env_sh.ios-arm64 running in /home/rb/renpy-build/tmp/build/env_sh.ios-arm64 ...

build-toolchain.cross-ios-arm64 already finished.

mockrt-toolchain.ios-arm64 already finished.
unpack-nasm.host already finished.
build-nasm.host already finished.
install-metalangle.ios-arm64-py3 already finished.
unpack-zlib.ios-arm64 already finished.
build-zlib.ios-arm64 running in /home/rb/renpy-build/tmp/build/zlib.ios-arm64 ...
Building static library libz.a version 1.2.11 with ccache clang-15 -fuse-ld=lld -Wno-unused-command-line-argument -target arm64-apple-ios13.0 --sysroot /home/rb/renpy-build/tmp/cross.ios-arm64/sdk -std=gnu17.
Checking for size_t... No.
Checking for long long... Yes.
Failed to find a pointer-size integer type.
** ./configure aborting.
build-zlib.ios-arm64: process failed with 1.
args: './configure' '--static' '--prefix=/home/rb/renpy-build/tmp/install.ios-arm64'
  File "/home/rb/renpy-build/./build.py", line 231, in <module>
    main()
  File "/home/rb/renpy-build/./build.py", line 227, in main
    args.function(args)
  File "/home/rb/renpy-build/./build.py", line 122, in build
    task.run(context)
  File "/home/rb/renpy-build/renpybuild/task.py", line 97, in run
    self.function(context)
  File "/home/rb/renpy-build/tasks/zlib.py", line 19, in build
    c.run("./configure {{ configure_cross }} --static --prefix={{install}}")
  File "/home/rb/renpy-build/renpybuild/context.py", line 331, in run
    renpybuild.run.run(command, self, verbose, quiet)
  File "/home/rb/renpy-build/renpybuild/run.py", line 452, in run
    traceback.print_stack()

Windows: Add ARM64 native support

Currently there is no arm64 native support for RenPy, this means on arm devices such as Surface Pro X, game run in x86 simulator mode, which is low effeciency.
It's time to add arm64 native support as Python3 has already support arm64.

Issues with building IOS through XCode

Im using Xcode 12.0.1 (yes im aware thats not the newest one), and when i try to compile anything, i get this error:

entry point (_main) undefined. for architecture x86_64

I'm not trying to compile onto my ipad, and am trying to compile onto a IOS Simulator (at least according to Xcode). i do have an ipad, but when i tried this before in a mac os VM it said arm64 instead of x86_64. Probably because i was trying to compile onto my ipad.

Can provide more context if needed.

Also, the "open xcode project" button never worked for me either.

RAPT build improvements discussion

RAPT's Android builds are very under-the-hood. Developers have to run the build process, then find the gradle project and make changes in order to customize their Android app at all outside of Ren'Py.

I think there are a few simple changes that could really make things easier. I'd like to run these by the community before working on any. Many of these pull from Unity's Android support flow, which is excellent. I also want to make sure nobody's working on similar changes.

  1. Allow the user to specify an existing Android SDK directory via environment variable or param. This is a QoL improvement - I really don't want multiple Android SDK installs on my machine. There are also plenty of github and gitlab actions to install those SDKs so that would make things simpler for cloud builds.
  2. Allow users to export a gradle project, instead of an APK or AAB. This allows developers to finish the build in gradle and would make the workflow for devs who are implementing SDKs to not have to exit files in the Ren'Py install directory. The directory could be in the distributions folder, and during the copy phase could simply not overwrite files if they already exist.
  3. Anything that's in android.json should be injected at build time. I was so confused when I made a test android project, then made an android build for a project from github and it had my test project's bundle ID!

Prepare fails while following exact steps on clean Ubuntu 22.04

  1. Installed a clean Ubuntu 22.04.3 into a VirtualBox (6.1) environment.
  2. Created a user "rb" as instructed and made it root.
  3. Cloned renpy-build and hit ./prepare.sh

After many lines of preparing, an error occured:

gen3/renpy.text.hbfont.c:755:10: fatal error: hb.h: No such file or directory
  755 | #include "hb.h"
      |          ^~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

Sad face. :(

Update: preparing works fine on clean install of Ubuntu 22.10.1 (besides some deprecation warnings and the like).

Content-Length is removed by Cloudflare and results in an error.

When using Cloudflare, Content-Length in the response header is removed.
Therefore, retrieving the response header of the zip file will fail.
This is a Cloudfrare specification; even if Content-Length is set, it will be removed.

https://github.com/renpy/renpy-build/blob/master/runtime/web/renpy-pre.js#L357

If Content-Length is undefined, the variable will be NaN. Finally, statusProgress.max = total; assigns NaN, which results in an error.

https://github.com/renpy/renpy-build/blob/master/runtime/web/renpy-pre.js#L192
image

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.