Skip to content

Commit a0d3dcd

Browse files
committed
add Bullet3
1 parent 4ebfb30 commit a0d3dcd

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

scripts/emsdk-fetch.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ then
2222
./emsdk install ${EMFLAVOUR:-latest}
2323
./emsdk activate ${EMFLAVOUR:-latest}
2424
pushd upstream/emscripten
25-
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/20281"
25+
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/20281 dylink.js : handle ** argument case"
2626
wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/20281.diff
2727
patch -p1 < 20281.diff
2828

29-
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/17956"
29+
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/17956 file corruption when using emscripten_run_preload_plugins with BrowserFS"
3030
wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/17956.diff
3131

3232
if patch -p1 < 17956.diff
@@ -47,9 +47,11 @@ then
4747
# patch -p1 < emsdk_emcc.patch
4848

4949

50-
# fix mouse position for 3D canvas
50+
echo "FIXME: Applying https://github.com/emscripten-core/emscripten/pull/20442 fix mouse position for 3D canvas"
51+
pushd upstream/emscripten
5152
wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/20442.diff
5253
patch -p1 < 20442.diff
54+
popd
5355

5456
# https://github.com/paradust7/minetest-wasm/blob/main/emsdk_dirperms.patch
5557
patch -p1 <<END
@@ -154,6 +156,9 @@ END
154156
embuilder --pic build $one
155157
done
156158

159+
160+
# maybe rewrite that in python and move it to emcc.py
161+
157162
cat > emsdk/upstream/emscripten/emcc <<END
158163
#!/bin/bash
159164

sources.wasm/bullet3.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
4+
. ${CONFIG:-config}
5+
6+
. scripts/emsdk-fetch.sh
7+
8+
9+
if pushd ${ROOT}/src
10+
then
11+
if [ -d bullet3 ]
12+
then
13+
echo -n
14+
else
15+
git clone --recursive --no-tags --depth 1 --single-branch --branch master https://github.com/bulletphysics/bullet3
16+
fi
17+
18+
mkdir -p $ROOT/build/bullet3
19+
20+
pushd $ROOT/build/bullet3
21+
emcmake cmake ../../src/bullet3 -DCMAKE_INSTALL_PREFIX=$PREFIX \
22+
-DBUILD_SHARED_LIBS=NO -DUSE_DOUBLE_PRECISION=NO \
23+
-DBUILD_EXTRAS=NO -DBUILD_CPU_DEMOS=NO -DBUILD_PYBULLET=NO -DBUILD_ENET=NO \
24+
-DBUILD_CLSOCKET=NO -DUSE_GRAPHICAL_BENCHMARK=NO \
25+
-DBUILD_OPENGL3_DEMOS=NO -DBUILD_BULLET2_DEMOS=NO -DBUILD_UNIT_TESTS=NO
26+
emmake make install
27+
popd
28+
29+
popd
30+
fi
31+

0 commit comments

Comments
 (0)