Build with shared LZMA lib
This commit is contained in:
@@ -259,12 +259,6 @@
|
|||||||
<file name="${LEGACY_SRC_DIR}/common/poly2tri/Poly2Tri.cpp" />
|
<file name="${LEGACY_SRC_DIR}/common/poly2tri/Poly2Tri.cpp" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<file name="${LEGACY_SRC_DIR}/lzma/LzFind.c" />
|
|
||||||
<file name="${LEGACY_SRC_DIR}/lzma/LzmaDec.c" />
|
|
||||||
<file name="${LEGACY_SRC_DIR}/lzma/LzmaEnc.c" />
|
|
||||||
<file name="${LEGACY_SRC_DIR}/lzma/LzFindMt.c" if="windows" />
|
|
||||||
<file name="${LEGACY_SRC_DIR}/lzma/Threads.c" if="windows" />
|
|
||||||
|
|
||||||
<file name="${HXCPP}/project/libs/zlib/ZLib.cpp" if="ios" />
|
<file name="${HXCPP}/project/libs/zlib/ZLib.cpp" if="ios" />
|
||||||
|
|
||||||
</files>
|
</files>
|
||||||
@@ -284,6 +278,7 @@
|
|||||||
<files id="native-toolkit-curl" if="LEGACY_CURL" />
|
<files id="native-toolkit-curl" if="LEGACY_CURL" />
|
||||||
<files id="native-toolkit-jpeg" />
|
<files id="native-toolkit-jpeg" />
|
||||||
<files id="native-toolkit-freetype" />
|
<files id="native-toolkit-freetype" />
|
||||||
|
<files id="native-toolkit-lzma" />
|
||||||
<files id="native-toolkit-ogg" if="LEGACY_OPENAL" />
|
<files id="native-toolkit-ogg" if="LEGACY_OPENAL" />
|
||||||
<files id="native-toolkit-openal" if="LEGACY_OPENAL" unless="android || ios || blackberry || tizen" />
|
<files id="native-toolkit-openal" if="LEGACY_OPENAL" unless="android || ios || blackberry || tizen" />
|
||||||
<files id="native-toolkit-openal-android" if="android" />
|
<files id="native-toolkit-openal-android" if="android" />
|
||||||
|
|||||||
@@ -14,18 +14,24 @@ namespace nme
|
|||||||
inline unsigned int READ_LE32(unsigned char *ptr) { return ((unsigned int)READ_LE16(ptr + 0) << 0) | ((unsigned int)READ_LE16(ptr + 2) << 16); }
|
inline unsigned int READ_LE32(unsigned char *ptr) { return ((unsigned int)READ_LE16(ptr + 0) << 0) | ((unsigned int)READ_LE16(ptr + 2) << 16); }
|
||||||
inline UInt64 READ_LE64(unsigned char *ptr) { return ((UInt64)READ_LE32(ptr + 0) << 0) | ((UInt64)READ_LE32(ptr + 4) << 32); }
|
inline UInt64 READ_LE64(unsigned char *ptr) { return ((UInt64)READ_LE32(ptr + 0) << 0) | ((UInt64)READ_LE32(ptr + 4) << 32); }
|
||||||
|
|
||||||
extern "C" {
|
//extern "C" {
|
||||||
SRes lzma_Progress(void *p, UInt64 inSize, UInt64 outSize) {
|
//SRes lzma_Progress(void *p, UInt64 inSize, UInt64 outSize) {
|
||||||
return SZ_OK;
|
//return SZ_OK;
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
|
//void *lzma_Alloc(void *p, size_t size) {
|
||||||
|
//return malloc(size);
|
||||||
|
//}
|
||||||
|
//void lzma_Free(void *p, void *address) { /* address can be 0 */
|
||||||
|
//if (address == NULL) return;
|
||||||
|
//free(address);
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
|
||||||
void *lzma_Alloc(void *p, size_t size) {
|
extern "C" {
|
||||||
return malloc(size);
|
SRes lzma_Progress(void *p, UInt64 inSize, UInt64 outSize);
|
||||||
}
|
void *lzma_Alloc(void *p, size_t size);
|
||||||
void lzma_Free(void *p, void *address) { /* address can be 0 */
|
void lzma_Free(void *p, void *address);
|
||||||
if (address == NULL) return;
|
|
||||||
free(address);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lzma::Encode(buffer input_buffer, buffer output_buffer)
|
void Lzma::Encode(buffer input_buffer, buffer output_buffer)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<set name="LIME_JPEG" value="1" />
|
<set name="LIME_JPEG" value="1" />
|
||||||
<set name="LIME_FREETYPE" value="1" />
|
<set name="LIME_FREETYPE" value="1" />
|
||||||
<set name="LIME_HARFBUZZ" value="1" />
|
<set name="LIME_HARFBUZZ" value="1" />
|
||||||
|
<set name="LIME_LZMA" value="1" />
|
||||||
<!-- <set name="LIME_NEKO" value="1" if="linux" /> -->
|
<!-- <set name="LIME_NEKO" value="1" if="linux" /> -->
|
||||||
<set name="LIME_OGG" value="1" />
|
<set name="LIME_OGG" value="1" />
|
||||||
<set name="LIME_OPENAL" value="1" />
|
<set name="LIME_OPENAL" value="1" />
|
||||||
@@ -203,16 +204,17 @@
|
|||||||
|
|
||||||
</files>
|
</files>
|
||||||
|
|
||||||
<include name="lib/cairo/files.xml" if="LIME_CAIRO" />
|
<include name="lib/cairo/files.xml" />
|
||||||
<include name="lib/curl/files.xml" />
|
<include name="lib/curl/files.xml" />
|
||||||
<include name="lib/freetype/files.xml" />
|
<include name="lib/freetype/files.xml" />
|
||||||
<include name="lib/harfbuzz/files.xml" />
|
<include name="lib/harfbuzz/files.xml" />
|
||||||
<include name="lib/jpeg/files.xml" />
|
<include name="lib/jpeg/files.xml" />
|
||||||
|
<include name="lib/lzma/files.xml" />
|
||||||
<include name="lib/neko/files.xml" />
|
<include name="lib/neko/files.xml" />
|
||||||
<include name="lib/ogg/files.xml" />
|
<include name="lib/ogg/files.xml" />
|
||||||
<include name="lib/openal/files.xml" />
|
<include name="lib/openal/files.xml" />
|
||||||
<include name="lib/openal-android/files.xml" if="android" />
|
<include name="lib/openal-android/files.xml" if="android" />
|
||||||
<include name="lib/pixman/files.xml" if="LIME_PIXMAN" />
|
<include name="lib/pixman/files.xml" />
|
||||||
<include name="lib/png/files.xml" />
|
<include name="lib/png/files.xml" />
|
||||||
<include name="lib/sdl/files.xml" />
|
<include name="lib/sdl/files.xml" />
|
||||||
<include name="lib/vorbis/files.xml" />
|
<include name="lib/vorbis/files.xml" />
|
||||||
@@ -231,6 +233,7 @@
|
|||||||
<files id="native-toolkit-jpeg" if="LIME_JPEG" />
|
<files id="native-toolkit-jpeg" if="LIME_JPEG" />
|
||||||
<files id="native-toolkit-freetype" if="LIME_FREETYPE" />
|
<files id="native-toolkit-freetype" if="LIME_FREETYPE" />
|
||||||
<files id="native-toolkit-harfbuzz" if="LIME_HARFBUZZ" />
|
<files id="native-toolkit-harfbuzz" if="LIME_HARFBUZZ" />
|
||||||
|
<files id="native-toolkit-lzma" if="LIME_LZMA" />
|
||||||
<files id="native-toolkit-neko" if="LIME_NEKO" />
|
<files id="native-toolkit-neko" if="LIME_NEKO" />
|
||||||
<files id="native-toolkit-ogg" if="LIME_OGG" />
|
<files id="native-toolkit-ogg" if="LIME_OGG" />
|
||||||
<files id="native-toolkit-openal" if="LIME_OPENAL" unless="mac || iphone || android || emscripten" />
|
<files id="native-toolkit-openal" if="LIME_OPENAL" unless="mac || iphone || android || emscripten" />
|
||||||
|
|||||||
Reference in New Issue
Block a user