From 2aa1dea5126290ee6dadc0884a3d8e2791be04ef Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sat, 15 Mar 2025 18:57:24 -0300 Subject: add everything so far --- gui/build_script.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 gui/build_script.sh (limited to 'gui/build_script.sh') diff --git a/gui/build_script.sh b/gui/build_script.sh new file mode 100755 index 0000000..5d7c649 --- /dev/null +++ b/gui/build_script.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +s_EXPORTED_FUNCTIONS="-s EXPORTED_FUNCTIONS=_init,_render" + +shared_flags="-Oz -flto -fno-inline -fno-unroll-loops -mnontrapping-fptoint" +compile_flags="$shared_flags --std=c23" +link_flags="$shared_flags -s MALLOC=emmalloc -s ASSERTIONS=0 -s INITIAL_MEMORY=65536 -s TOTAL_STACK=16384 -s STANDALONE_WASM=1 -s PURE_WASI=1 -s STACK_OVERFLOW_CHECK=0 -s WASM_BIGINT=1 -s ABORTING_MALLOC=0 -s MEMORY_GROWTH_GEOMETRIC_STEP=0 -s ALLOW_MEMORY_GROWTH=1" + +emcc --no-entry $s_EXPORTED_FUNCTIONS $link_flags $compile_flags -o radio-receiver.wasm radio-receiver.c + +mkdir -p ../src/main/resources/assets/pirate-radio/guis +cp radio-receiver.wasm ../src/main/resources/assets/pirate-radio/guis/radio-receiver.wasm + +exit 0 -- cgit 1.4.1