-
Notifications
You must be signed in to change notification settings - Fork 7
/
build_web_common.bat
32 lines (28 loc) · 1.14 KB
/
build_web_common.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
setlocal enableDelayedExpansion
set "do_blender_export=0"
set "do_codegen=0"
for %%A in (%*) do (
if "%%~A"=="blender_export" ( set "do_blender_export=1" )
if "%%~A"=="codegen" ( set "do_codegen=1" )
)
if "%do_blender_export%"=="1" ( call blender_export.bat || goto :error )
if "%do_codegen%"=="1" ( call run_codegen.bat || goto :error )
copy marketing_page\favicon.ico %OUTPUT_FOLDER%\favicon.ico
copy Hamburger.png %OUTPUT_FOLDER%\Hamburger.ico
copy discord.svg %OUTPUT_FOLDER%\discord.svg
copy assets\PalanquinDark-Regular.ttf %OUTPUT_FOLDER%\PalanquinDark-Regular.ttf
@REM copy main.c %OUTPUT_FOLDER%\main.c || goto :error
@echo off
emcc ^
-sEXPORTED_FUNCTIONS=_main,_end_text_input,_stop_controlling_input,_start_controlling_input,_read_from_save_data,_dump_save_data,_is_receiving_text_input^
-sEXPORTED_RUNTIME_METHODS=ccall,cwrap^
-s USE_WEBGL2=1^
-s INITIAL_MEMORY=62914560^
-s ALLOW_MEMORY_GROWTH -s TOTAL_STACK=15728640^
%FLAGS%^
-Ithirdparty -Igen main.c -o %OUTPUT_FOLDER%\index.html --preload-file assets --shell-file web_template.html || goto :error
@echo off
goto :EOF
:error
echo Failed to build
exit /B %ERRORLEVEL%