Skip to content

Commit

Permalink
pthread js file zip into data file
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanaobrien committed Jul 24, 2023
1 parent 72ae1f3 commit 56f5627
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile.emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ endif
ifneq ($(PTHREAD), 0)
LDFLAGS += -s WASM_MEM_MAX=1073741824 -pthread -s PTHREAD_POOL_SIZE=$(PTHREAD)
CFLAGS += -pthread
HAVE_THREADS=1
HAVE_THREADS=0
else
HAVE_THREADS=0
endif
Expand Down
18 changes: 10 additions & 8 deletions dist-scripts/dist-cores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ for f in `ls -v *_${platform}.${EXT}`; do
async=1
heap_mem=536870912
elif [ $name = "ppsspp" ] ; then
gles3=1
async=1
pthread=12
heap_mem=536870912
elif [ $name = "scummvm" ] ; then
async=1
Expand Down Expand Up @@ -364,14 +363,17 @@ for f in `ls -v *_${platform}.${EXT}`; do
core=${name}
fi

if [ $wasm = 0 ]; then
7z a ${out_dir}/${core}-asmjs.data ../${name}_libretro.js.mem ../${name}_libretro.js
rm ../${name}_libretro.js.mem
if [ $pthread != 0 ] ; then
7z a ${out_dir}/${core}-wasm.data ../${name}_libretro.wasm ../${name}_libretro.js ../${name}_libretro.worker.js
else
7z a ${out_dir}/${core}-wasm.data ../${name}_libretro.wasm ../${name}_libretro.js
rm ../${name}_libretro.wasm
if [ $wasm = 0 ]; then
7z a ${out_dir}/${core}-asmjs.data ../${name}_libretro.js.mem ../${name}_libretro.js
rm ../${name}_libretro.js.mem
else
7z a ${out_dir}/${core}-wasm.data ../${name}_libretro.wasm ../${name}_libretro.js
rm ../${name}_libretro.wasm
fi
fi

rm ../${name}_libretro.js


Expand Down

0 comments on commit 56f5627

Please sign in to comment.