Merge branch 'main' into superpong
This commit is contained in:
commit
4578c8d767
|
@ -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