Fixes for pdf

This commit is contained in:
Oleg Korshul
2024-09-04 14:51:31 +03:00
parent 1cf1d16cf5
commit ceeaff9585
3 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,8 @@ base.configure_common_apps()
base.replaceInFile("../../../../Common/3dParty/icu/icu/source/common/udata.cpp", "\n{\n#ifdef BUILDING_WASM_MODULE\nreturn NULL;\n#endif\n UDataMemory tData;", "\n{\n UDataMemory tData;")
base.replaceInFile("../../../../DesktopEditor/cximage/png/pnglibconf.h", "//#define PNG_CONSOLE_IO_SUPPORTED", "#define PNG_CONSOLE_IO_SUPPORTED")
base.replaceInFile("../../../../Common/3dParty/openssl/openssl/crypto/sha/sha512.c", "const SHA_LONG64 *W = (const SHA_LONG64*)in;", "const SHA_LONG64 *W = in;")
# finalize
base.replaceInFile("./deploy/drawingfile.js", "function getBinaryPromise(", "function getBinaryPromise2(")
base.replaceInFile("./deploy/drawingfile.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")

View File

@ -36,4 +36,6 @@ if not base.is_dir("freetype-2.10.4"):
common.apply_patch("./freetype-2.10.4/builds/unix/ftsystem.c", "./wasm/patches/ftsystem.patch")
base.replaceInFile("../../../../Common/3dParty/icu/icu/source/common/udata.cpp", "\n{\n UDataMemory tData;", "\n{\n#ifdef BUILDING_WASM_MODULE\nreturn NULL;\n#endif\n UDataMemory tData;")
base.replaceInFile("../../../../DesktopEditor/cximage/png/pnglibconf.h", "#define PNG_CONSOLE_IO_SUPPORTED", "//#define PNG_CONSOLE_IO_SUPPORTED")
base.replaceInFile("../../../../DesktopEditor/cximage/png/pnglibconf.h", "#define PNG_CONSOLE_IO_SUPPORTED", "//#define PNG_CONSOLE_IO_SUPPORTED")
base.replaceInFile("../../../../Common/3dParty/openssl/openssl/crypto/sha/sha512.c", "const SHA_LONG64 *W = in;", "const SHA_LONG64 *W = (const SHA_LONG64*)in;")

View File

@ -273,6 +273,8 @@ CFile.prototype._getGlyphs = function(pageIndex)
res.result = new Uint8Array(len);
res.result.set(textCommandsSrc);
}
else
res.result = [];
return res;
};