[win32] Fix building the pong sample on win32
This commit is contained in:
parent
b792476d36
commit
e31f6cd4ec
2
milepost
2
milepost
|
@ -1 +1 @@
|
|||
Subproject commit 21aa1bef68c3590c1898a539da4c38e3854a5a9d
|
||||
Subproject commit 36c75a55dd1d843b29691293410344a9f48a9201
|
|
@ -5,13 +5,13 @@ set wasmFlags=--target=wasm32^
|
|||
--no-standard-libraries ^
|
||||
-fno-builtin ^
|
||||
-Wl,--no-entry ^
|
||||
-Wl,--export-all ^
|
||||
-Wl,--allow-undefined ^
|
||||
-Wl,--export-dynamic ^
|
||||
-g ^
|
||||
-O2 ^
|
||||
-mbulk-memory ^
|
||||
-D__ORCA__ ^
|
||||
-I ..\.. -I ..\..\src -I ..\..\sdk -I..\..\milepost -I ..\..\milepost\src
|
||||
-isystem ..\..\cstdlib\include -I ..\..\sdk -I..\..\milepost\ext -I ..\..\milepost -I ..\..\milepost\src
|
||||
|
||||
clang %wasmFlags% -o .\module.wasm ..\..\sdk\orca.c src\main.c
|
||||
clang %wasmFlags% -o .\module.wasm ..\..\sdk\orca.c ..\..\cstdlib\src\*.c src\main.c
|
||||
|
||||
|
||||
python3 ..\..\scripts\mkapp.py --orca-dir ../.. --name Pong --icon icon.png --data-dir dir1 module.wasm
|
||||
python3 ..\..\scripts\mkapp.py --orca-dir ..\.. --name Pong --icon icon.png --resource-dir data module.wasm
|
||||
|
|
|
@ -184,15 +184,21 @@ def windows_make_app(args):
|
|||
#-----------------------------------------------------------
|
||||
#NOTE: copy wasm module and data
|
||||
#-----------------------------------------------------------
|
||||
|
||||
shutil.copy(args.module, wasm_dir + '/module.wasm')
|
||||
|
||||
if args.data_files != None:
|
||||
for data in args.data_files:
|
||||
shutil.copy(data, data_dir)
|
||||
if args.resource_files != None:
|
||||
for resource in args.resource_files:
|
||||
shutil.copytree(resource, data_dir + '/' + os.path.basename(resource), dirs_exist_ok=True)
|
||||
|
||||
if args.data_dirs != None:
|
||||
for data in args.data_dirs:
|
||||
shutil.copytree(data, data_dir + '/' + os.path.basename(data), dirs_exist_ok=True)
|
||||
if args.resource_dirs != None:
|
||||
for resource_dir in args.resource_dirs:
|
||||
for resource in os.listdir(resource_dir):
|
||||
src = resource_dir + '/' + resource
|
||||
if os.path.isdir(src):
|
||||
shutil.copytree(src, data_dir + '/' + os.path.basename(resource), dirs_exist_ok=True)
|
||||
else:
|
||||
shutil.copy(src, data_dir)
|
||||
|
||||
#-----------------------------------------------------------
|
||||
#NOTE: copy runtime resources
|
||||
|
|
Loading…
Reference in New Issue