diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4da74a..c80dd92 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.65.5bi + SDK_VERSION: 3.1.65.8bi SYS_PYTHON: /usr/bin/python3 PACKAGES: emsdk hpy pygame BUILD_STATIC: emsdk hpy diff --git a/scripts/build-loader.sh b/scripts/build-loader.sh index 40d5d91..5ced255 100755 --- a/scripts/build-loader.sh +++ b/scripts/build-loader.sh @@ -18,7 +18,7 @@ then fi fi -ln -s $(pwd)/src/pygbag $(pwd)/pygbag +ln -sf $(pwd)/src/pygbag $(pwd)/pygbag pushd src/pygbag/support cp -r _xterm_parser ${SDKROOT}/prebuilt/emsdk/common/site-packages/ diff --git a/src/pygbag/support/cross/__EMSCRIPTEN__.py b/src/pygbag/support/cross/__EMSCRIPTEN__.py index d147968..39cbf2b 100644 --- a/src/pygbag/support/cross/__EMSCRIPTEN__.py +++ b/src/pygbag/support/cross/__EMSCRIPTEN__.py @@ -245,19 +245,21 @@ async def process(self): ROOTDIR = f"/data/data/{sys.argv[0]}/assets" -def explore(root): +def explore(root, verbose=False): global prelist, preloading + import embed + if preloading < 0: preloading = 0 - import shutil - for current, dirnames, filenames in os.walk(root): for filename in filenames: if filename.endswith(".so"): preloading += 1 src = f"{current}/{filename}" + if verbose: + print(f"# 260: preload {src=}") embed.preload(src) diff --git a/src/pygbag/support/cross/aio/pep0723.py b/src/pygbag/support/cross/aio/pep0723.py index 5fa5749..d0785ab 100644 --- a/src/pygbag/support/cross/aio/pep0723.py +++ b/src/pygbag/support/cross/aio/pep0723.py @@ -73,6 +73,7 @@ class Config: "python_i18n": "i18n", "pillow": "PIL", "pyglm" : "glm", + "opencv_python" : "cv2", } @@ -201,7 +202,7 @@ async def async_repos(): print("200: async_repos", Config.PKG_INDEXES) for repo in Config.PKG_INDEXES: - idx = f"{repo}index-090-{abitag}.json" + idx = f"{repo}index-0.9.2-{abitag}.json" try: async with fopen(idx, "r", encoding="UTF-8") as index: try: @@ -435,8 +436,15 @@ async def check_list(code=None, filename=None): if not aio.cross.simulator: import platform import asyncio + print(f'# 439: Scanning {sconf["platlib"]} for WebAssembly library') + platform.explore(sconf["platlib"], verbose=True) + for compilation in range(1+embed.preloading()): - platform.explore(sconf["platlib"]) + await asyncio.sleep(0) + if embed.preloading()<=0: + break + else: + print("# 442: ERROR: remaining wasm {embed.preloading()}") await asyncio.sleep(0) do_patches()