Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows build config #1

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ After that you can build and serve the demo like this:

Access the demo at http://127.0.0.1:8000/demo.html

### Windows version


build.bat && cd build && python -m http.server && cd ..


## Clean up

unalias serve-dir
Expand Down
26 changes: 26 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
SET EMCC=docker run -t --rm -v %cd%:/src projectm-emscripten-builder emcc

IF EXIST build\ (
rmdir /S /Q build\
)
mkdir build

%EMCC% ^
-I /usr/local/include ^
-l embind ^
-o build/projectm.js ^
-s ALLOW_MEMORY_GROWTH=1 ^
-s ENVIRONMENT=web ^
-s EXPORTED_FUNCTIONS=_add_audio_data ^
-s EXPORTED_RUNTIME_METHODS=ccall ^
-s EXPORT_NAME=createModule ^
-s FULL_ES2=1 -s FULL_ES3=1 ^
-s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2 ^
-s MODULARIZE=1 ^
--embed-file textures ^
--embed-file presets ^
demo.cpp /usr/local/lib/libprojectM-4.a

copy demo.html build\
copy demo.js build\
copy demo.mp3 build\