diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a5f8b4f..8e9c679 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-22.04
env:
- SDK_VERSION: 3.1.60.0bi
+ SDK_VERSION: 3.1.61.0bi
SYS_PYTHON: /usr/bin/python3
PACKAGES: emsdk hpy pygame
BUILD_STATIC: emsdk hpy
diff --git a/packages.d/pygame/pygame.sh b/packages.d/pygame/pygame.sh
index 16ec533..541c235 100755
--- a/packages.d/pygame/pygame.sh
+++ b/packages.d/pygame/pygame.sh
@@ -32,12 +32,12 @@ else
# update cython
TEST_CYTHON=$($HPY -m cython -V 2>&1)
- if echo $TEST_CYTHON| grep -q 3.0.1$
+ if echo $TEST_CYTHON| grep -q 3.0.10$
then
echo " * not upgrading cython $TEST_CYTHON
" 1>&2
else
- echo " * upgrading cython $TEST_CYTHON to 3.0.1
+ echo " * upgrading cython $TEST_CYTHON to 3.0.10
" 1>&2
#$SYS_PYTHON -m pip install --user --upgrade git+https://github.com/cython/cython.git
CYTHON=${CYTHON:-Cython-3.0.10-py2.py3-none-any.whl}
@@ -77,6 +77,9 @@ then
pushd $(pwd)/pygame-wasm
fi
+ # to upstream after tests
+ # done wget -O- https://patch-diff.githubusercontent.com/raw/pmp-p/pygame-ce-wasm/pull/7.diff | patch -p1
+
#unsure
wget -O- https://patch-diff.githubusercontent.com/raw/pmp-p/pygame-ce-wasm/pull/3.diff | patch -p1
@@ -167,6 +170,19 @@ index e33eae33..f5f6697e 100644
END
+ if echo $PYBUILD|grep -q 3.13$
+ then
+ echo "
+
+
+============================================
+ Forcing cython regen for 3.13+
+============================================
+
+
+"
+ rm src_c/_sdl2/sdl2.c src_c/_sdl2/audio.c src_c/_sdl2/mixer.c src_c/_sdl2/controller_old.c src_c/_sdl2/video.c
+ fi
else
pushd $(pwd)/pygame-wasm
diff --git a/scripts/build-loader.sh b/scripts/build-loader.sh
index 60c499f..14353b4 100755
--- a/scripts/build-loader.sh
+++ b/scripts/build-loader.sh
@@ -297,6 +297,10 @@ then
LDFLAGS="$LDFLAGS $cpylib"
done
+
+ LDFLAGS="$LDFLAGS $(cat $LNK_TEST) -lembind"
+
+
echo "
LDFLAGS=$LDFLAGS
@@ -327,9 +331,8 @@ emcc \\
--preload-file ${DYNLOAD}@/usr/lib/python${PYBUILD}/lib-dynload \\
--preload-file ${REQUIREMENTS}@/data/data/org.python/assets/site-packages \\
-o ${DIST_DIR}/${DISTRO}${PYMAJOR}${PYMINOR}/${MODE}.js build/${MODE}.o \\
- $LDFLAGS \\
- $(cat $LNK_TEST) \\
- -lembind
+ $LDFLAGS
+
END
chmod +x ./final_link.sh
diff --git a/src/pygbag/optimizing.py b/src/pygbag/optimizing.py
index a13012c..9e3835d 100644
--- a/src/pygbag/optimizing.py
+++ b/src/pygbag/optimizing.py
@@ -31,6 +31,7 @@
"wav": "ogg",
"bmp": "png",
"mp3": "ogg",
+ "xm" : "ogg",
}
@@ -86,6 +87,9 @@ def translated(fn):
if fp.suffix == ".mp3":
...
+ if fp.suffix == ".xm":
+ ...
+
if fp.suffix == ".wav":
...
diff --git a/src/pygbag/support/cross/aio/pep0723.py b/src/pygbag/support/cross/aio/pep0723.py
index 8359d72..f3c3531 100644
--- a/src/pygbag/support/cross/aio/pep0723.py
+++ b/src/pygbag/support/cross/aio/pep0723.py
@@ -224,7 +224,7 @@ async def async_repos():
rewritecdn = "http://localhost:8000/archives/repo/"
if rewritecdn:
- print(f"""230: {platform.window.location.href} {rewritecdn=}""")
+ print(f"""230: {rewritecdn=}""")
for idx, repo in enumerate(Config.pkg_repolist):
repo["-CDN-"] = rewritecdn
@@ -277,9 +277,9 @@ async def pip_install(pkg, sysconf={}):
for repo in Config.pkg_repolist:
if pkg in repo:
wheel_url = f"{repo['-CDN-']}{repo[pkg]}#"
-
- # try to get a pure python wheel from pypi
- if not wheel_url:
+ break
+ else:
+ # try to get a pure python wheel from pypi
try:
async with fopen(f"https://pypi.org/simple/{pkg}/") as html:
if html:
@@ -305,6 +305,9 @@ async def pip_install(pkg, sysconf={}):
HISTORY.append(pkg)
except:
print("324: INVALID", pkg, "from", wheel_url)
+ else:
+ print(f"309: no provider found for {pkg}")
+
PYGAME = 0
diff --git a/static/default.tmpl b/static/default.tmpl
index 89bfd12..b2576c9 100644
--- a/static/default.tmpl
+++ b/static/default.tmpl
@@ -3,7 +3,7 @@
print("""
Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk
Pygbag Version : {{cookiecutter.version}}
- Template Version : 0.9.0
+ Template Version : 0.9.1
Python : {{cookiecutter.PYBUILD}}
CDN URL : {{cookiecutter.cdn}}
Screen : {{cookiecutter.width}}x{{cookiecutter.height}}
@@ -259,8 +259,6 @@ config = {
-
-
diff --git a/support/__EMSCRIPTEN__.c b/support/__EMSCRIPTEN__.c
index 5382b47..c407352 100644
--- a/support/__EMSCRIPTEN__.c
+++ b/support/__EMSCRIPTEN__.c
@@ -1072,13 +1072,13 @@ main(int argc, char **argv)
EM_ASM({
- const FD_BUFFER_MAX = $0;
- const shm_stdin = $1;
- const shm_rawinput = $2;
- const shm_rcon = $3;
+ globalThis.FD_BUFFER_MAX = $0;
+ globalThis.shm_stdin = $1;
+ globalThis.shm_rawinput = $2;
+ globalThis.shm_rcon = $3;
Module.printErr = Module.print;
- const is_worker = (typeof WorkerGlobalScope !== 'undefined') && self instanceof WorkerGlobalScope;
+ globalThis.is_worker = (typeof WorkerGlobalScope !== 'undefined') && self instanceof WorkerGlobalScope;
function jswasm_load(script, aio) {
if (!aio) aio=false;
@@ -1135,17 +1135,11 @@ EM_ASM({
} else {
console.error("PyMain: BrowserFS not found");
}
- if ($4) {
- SYSCALLS.getStreamFromFD(0).tty = true;
- SYSCALLS.getStreamFromFD(1).tty = true;
- SYSCALLS.getStreamFromFD(2).tty = false;
- }
}
}
-}, FD_BUFFER_MAX, io_shm[0], io_shm[IO_RAW], io_shm[IO_RCON], CPY);
-
+}, FD_BUFFER_MAX, io_shm[0], io_shm[IO_RAW], io_shm[IO_RCON]);
PyRun_SimpleString("import sys, os, json, builtins, time");
PyRun_SimpleString("sys.ps1 = ''");