Skip to content

Commit

Permalink
bump sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 8, 2024
1 parent 8cd5077 commit 9da289f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-loader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
8 changes: 5 additions & 3 deletions src/pygbag/support/cross/__EMSCRIPTEN__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
12 changes: 10 additions & 2 deletions src/pygbag/support/cross/aio/pep0723.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class Config:
"python_i18n": "i18n",
"pillow": "PIL",
"pyglm" : "glm",
"opencv_python" : "cv2",
}


Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 9da289f

Please sign in to comment.