53 lines
1.8 KiB
JSON
53 lines
1.8 KiB
JSON
{
|
|
"name": "zlib",
|
|
"res_folder": "./deploy",
|
|
"wasm": true,
|
|
"asm": true,
|
|
"run_before": null,
|
|
"run_after": "import sys;sys.path.append(\"../../../build_tools/scripts\");import base;base.configure_common_apps();base.replaceInFile(\"./deploy/zlib.js\", \"__ATPOSTRUN__=[];\", \"__ATPOSTRUN__=[function(){self.onZlibEngineInit();}];\");base.replaceInFile(\"./deploy/zlib.js\", \"function getBinaryPromise(){\", \"function getBinaryPromise2(){\");base.replaceInFile(\"./deploy/zlib_ie.js\", \"__ATPOSTRUN__=[];\", \"__ATPOSTRUN__=[function(){self.onZlibEngineInit();}];\");base.replaceInFile(\"./deploy/zlib_ie.js\", \"function getBinaryPromise(){\", \"function getBinaryPromise2(){\");base.copy_file(\"./wasm/js/index.html\", \"./deploy/index.html\");base.copy_file(\"./wasm/js/code.js\", \"./deploy/code.js\")",
|
|
"base_js_content": "./wasm/js/zlib.js",
|
|
|
|
"compiler_flags": [
|
|
"-O3",
|
|
"-fno-rtti",
|
|
"-Wno-unused-command-line-argument",
|
|
"-s ALLOW_MEMORY_GROWTH=1",
|
|
"-s FILESYSTEM=0",
|
|
"--memory-init-file 0",
|
|
"-s ENVIRONMENT='web,worker'"
|
|
],
|
|
"exported_functions": [
|
|
"_malloc",
|
|
"_free",
|
|
"_Zlib_Malloc",
|
|
"_Zlib_Free",
|
|
"_Zlib_Create",
|
|
"_Zlib_Open",
|
|
"_Zlib_Close",
|
|
"_Zlib_AddFile",
|
|
"_Zlib_RemoveFile",
|
|
"_Zlib_GetPaths",
|
|
"_Zlib_GetFile",
|
|
"_Zlib_Save"
|
|
],
|
|
"include_path": ["../src/zlib-1.2.11", "../src"],
|
|
"define": ["__linux__"],
|
|
"compile_files_array": [
|
|
{
|
|
"name": "m",
|
|
"folder": "../src/zlib-1.2.11/contrib/minizip/",
|
|
"files": ["unzip.c", "ioapi.c", "zip.c", "ioapibuf.c"]
|
|
},
|
|
{
|
|
"name": "z",
|
|
"folder": "../src/zlib-1.2.11/",
|
|
"files": ["inflate.c", "zutil.c", "adler32.c", "crc32.c", "inftrees.c", "inffast.c", "deflate.c", "trees.c"]
|
|
},
|
|
{
|
|
"name": "s",
|
|
"folder": "./",
|
|
"files": ["../src/ZipBuffer.cpp", "wasm/src/base.cpp", "../src/zlib_addon.c"]
|
|
}
|
|
]
|
|
}
|