Emscripten: add SFX and music to the data file
This commit is contained in:
@@ -332,6 +332,7 @@ if(EMSCRIPTEN)
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_BINARY_DIR}/lang@/lang")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/ai@/ai")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/game@/game")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/TimGM6mb.sf2@/usr/share/sounds/sf2/TimGM6mb.sf2")
|
||||
|
||||
# We use IDBFS for persistent storage.
|
||||
target_link_libraries(WASM::WASM INTERFACE "-lidbfs.js")
|
||||
|
||||
@@ -30,11 +30,30 @@ embuilder build liblzma
|
||||
embuilder build --lto liblzma
|
||||
|
||||
mkdir -p baseset
|
||||
|
||||
[ -e baseset/opengfx-0.6.1.tar ] || {
|
||||
wget https://cdn.openttd.org/opengfx-releases/0.6.1/opengfx-0.6.1-all.zip || exit 1
|
||||
unzip opengfx-0.6.1-all.zip || exit 1
|
||||
rm opengfx-0.6.1-all.zip
|
||||
mv opengfx-0.6.1.tar baseset/
|
||||
mv opengfx-0.6.1.tar baseset/ || exit 1
|
||||
}
|
||||
|
||||
[ -e baseset/opensfx-1.0.1.tar ] || {
|
||||
wget https://cdn.openttd.org/opensfx-releases/1.0.1/opensfx-1.0.1-all.zip || exit 1
|
||||
unzip opensfx-1.0.1-all.zip || exit 1
|
||||
rm opensfx-1.0.1-all.zip
|
||||
mv opensfx-1.0.1.tar baseset/ || exit 1
|
||||
}
|
||||
|
||||
[ -e baseset/openmsx-0.4.0.tar ] || {
|
||||
wget https://cdn.openttd.org/openmsx-releases/0.4.0/openmsx-0.4.0-all.zip || exit 1
|
||||
unzip openmsx-0.4.0-all.zip || exit 1
|
||||
rm openmsx-0.4.0-all.zip
|
||||
mv openmsx-0.4.0.tar baseset/ || exit 1
|
||||
}
|
||||
|
||||
[ -e TimGM6mb.sf2 ] || {
|
||||
wget 'https://sourceforge.net/p/mscore/code/HEAD/tree/trunk/mscore/share/sound/TimGM6mb.sf2?format=raw' || exit 1
|
||||
}
|
||||
|
||||
[ -e Makefile ] || emcmake cmake .. -DHOST_BINARY_DIR=$(pwd)/build-host -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPTION_USE_ASSERTS=OFF || exit 1
|
||||
|
||||
Reference in New Issue
Block a user