Skip to content

Commit 64f511b

Browse files
committed
try static load ( not using builtins )
1 parent e38d38a commit 64f511b

File tree

11 files changed

+381
-125
lines changed

11 files changed

+381
-125
lines changed

buildapp.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
#!/bin/bash
2-
reset
2+
33
export ROOT=$(pwd)
44

5+
while true
6+
do
7+
echo Waiting for pygame build to complete ...
8+
9+
[ -f ${ROOT}/prebuilt/emsdk/libpygame.a ] && break
10+
sleep 1
11+
12+
[ -f ${ROOT}/prebuilt/emsdk/libpygame.a ] && break
13+
sleep 1
14+
15+
[ -f ${ROOT}/prebuilt/emsdk/libpygame.a ] && break
16+
sleep 1
17+
18+
[ -f ${ROOT}/prebuilt/emsdk/libpygame.a ] && break
19+
sleep 1
20+
21+
done
22+
reset
23+
24+
525
. ${CONFIG:-config}
626

727
EXE=python311

config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export CI=${CI:-false}
99

1010
export PYMAJOR=3
1111
export PYBUILD=${PYBUILD:-${PYMAJOR}.11}
12+
export PYMINOR=$(echo -n $PYBUILD|cut -d. -f2)
13+
1214

1315
export HOST_PREFIX=${HOST_PREFIX:-${SDKROOT}/devices/$(arch)/usr}
1416
export PREFIX=${PREFIX:-${SDKROOT}/devices/emsdk/usr}

scripts/cpython-build-host-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
. ${CONFIG:-config}
22

33
echo "
4-
*cpython-build-host-deps pip==$PIP *
4+
* cpython-build-host-deps pip==$PIP *
55
" 1>&2
66

77

scripts/cpython-build-host.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mkdir -p build/cpython-host
99
if $REBUILD
1010
then
1111
echo "
12-
* building cpython $PYBUILD $CIVER
12+
* building CPython $PYBUILD for $CIVER
1313
"
1414
else
1515
if [ -f ${PYTHON_FOR_BUILD} ]

scripts/cpython-fetch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
. ${CONFIG:-config}
44

55
echo "
6-
*cpython-fetch $PYBUILD*
6+
* cpython-fetch $PYBUILD *
77
"
88

99

@@ -31,7 +31,7 @@ then
3131
#cat $ROOT/support/compilenone.py > ./Lib/compileall.py
3232
popd
3333
else
34-
git clone --depth 1 https://github.com/python/cpython.git cpython-git
34+
git clone --no-tags --depth 1 --single-branch --branch main https://github.com/python/cpython.git cpython-git
3535
export REBUILD=true
3636
fi
3737

scripts/emsdk-fetch.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ then
8181
embuilder --pic build sdl2
8282
embuilder build sdl2
8383
rm -rf ${SDKDIR}/emsdk/upstream/emscripten/cache/ports/sdl2/SDL-*
84+
rm -rf ${SDKDIR}/emsdk/upstream/emscripten/cache/ports
85+
rm -rf ${SDKDIR}/emsdk/upstream/emscripten/cache/ports-builds
8486
rm -rf ${SDKDIR}/emsdk/upstream/emscripten/tests
8587
fi
8688

support/__EMSCRIPTEN__.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ self hosting:
6060

6161
#include <unistd.h>
6262

63-
64-
extern void PyGame_static_init();
63+
extern void Inittab_pygame();
64+
//extern PyMODINIT_FUNC PyInit_pygame_static(void);
6565

6666
static long long embed = 0;
6767

@@ -466,13 +466,8 @@ main(int argc, char **argv)
466466
#endif
467467

468468
PyImport_AppendInittab("embed", init_embed);
469-
470-
471-
PyGame_static_init();
472-
473-
//PyImport_AppendInittab("pymunk_static", PyInit__chipmunk);
474-
475-
//puts("pymain_init");
469+
//PyImport_AppendInittab("pygame_static", PyInit_pygame_static);
470+
Inittab_pygame();
476471

477472
setenv("TERM","xterm", 1);
478473
setenv("TERMINFO", "/usr/share/terminfo", 1);

0 commit comments

Comments
 (0)