Skip to content

Commit

Permalink
no opt rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Dec 15, 2024
1 parent 8f93851 commit c97df80
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 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.71.0bi
SDK_VERSION: 3.1.73.2bi
SYS_PYTHON: /usr/bin/python3
PACKAGES: emsdk pygame
BUILD_STATIC: emsdk
Expand All @@ -15,6 +15,7 @@ jobs:
CYTHON: Cython-3.0.11-py2.py3-none-any.whl
LD_VENDOR: -sUSE_GLFW=3


steps:
- uses: actions/[email protected]
- name: pygame-wasm-builder prepare
Expand Down
11 changes: 4 additions & 7 deletions scripts/build-loader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ if $STATIC
then
echo "building static loader"
else
export PACKAGES=${BUILD_STATIC:-emsdk hpy _ctypes}
export PACKAGES=${BUILD_STATIC:-"emsdk hpy _ctypes"}

echo "building dynamic loader
Expand Down Expand Up @@ -246,7 +246,7 @@ touch ${INT_TEST} ${INC_TEST} ${LNK_TEST} ${MAIN_TEST}

# -L${SDKROOT}/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic only !

if emcc -fPIC -std=gnu99 -D__PYDK__=1 -DNDEBUG $MIMALLOC $CPY_CFLAGS $CF_SDL $CPOPTS \
if emcc -D__PYGBAG__ -fPIC -std=gnu99 -DNDEBUG $MIMALLOC $CPY_CFLAGS $CF_SDL $CPOPTS \
-DINC_TEST=$INC_TEST -DMAIN_TEST=$MAIN_TEST \
-c -fwrapv -Wall -Werror=implicit-function-declaration -fvisibility=hidden \
-I${PYDIR}/internal -I${PYDIR} -I./support -I./external/hpy/hpy/devel/include -DPy_BUILD_CORE \
Expand All @@ -265,7 +265,6 @@ then
# --preload-file ${REQUIREMENTS}@/data/data/org.python/assets/site-packages \
# --preload-file ${ROOT}/support/xterm@/etc/termcap \


# TODO: test -sWEBGL2_BACKWARDS_COMPATIBILITY_EMULATION

# --use-port=contrib.glfw3
Expand Down Expand Up @@ -323,15 +322,13 @@ then
# -std=gnu99 -std=c++23
# EXTRA_EXPORTED_RUNTIME_METHODS => EXPORTED_RUNTIME_METHODS after 3.1.52


PG=/pgdata
cat > final_link.sh <<END
#!/bin/bash
. $SDKROOT/emsdk/emsdk_env.sh
emcc \\
emcc -D__PYGBAG__ \\
$FINAL_OPTS \\
$LOPTS \\
-D__PYDK__=1 -DNDEBUG \\
-DNDEBUG \\
-sTOTAL_MEMORY=256MB -sSTACK_SIZE=8MB -sALLOW_TABLE_GROWTH -sALLOW_MEMORY_GROWTH \\
-sEXPORTED_RUNTIME_METHODS=FS,print \\
$CF_SDL \\
Expand Down
2 changes: 2 additions & 0 deletions src/pygbag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

VERSION = "0.9.2"

__version__ = VERSION

# hack to test git cdn build without upgrading pygbag
# beware can have side effects when file packager behaviour must change !
if "--git" in sys.argv:
Expand Down
4 changes: 4 additions & 0 deletions support/__EMSCRIPTEN__.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,10 @@ main(int argc, char **argv)
// rich
setenv("FORCE_COLOR", "1", 1);

// termtk
setenv("TERMTK_FORCESERIAL", "1", 1);


/*
puts(" ---------- pymain_init ------------");
_PyArgv args = {
Expand Down

0 comments on commit c97df80

Please sign in to comment.