mirror of
https://github.com/expo/bsdiff.git
synced 2026-11-14 17:49:03 -10:00
Merge "bsdiff: Redo the gyp file" am: 3fd227d2fb
am: e0ac332854
Change-Id: Idf1426a4b5cbd1e8f2760687b8c5fdd16309ce2a
This commit is contained in:
commit
3dfa6f67fe
2 files changed
+57
-48
No files matched your search
+54
-48
@@ -28,32 +28,22 @@
|
||||
'<(platform2_root)/../aosp/external',
|
||||
],
|
||||
},
|
||||
'variables': {
|
||||
'bspatch_sources': [
|
||||
'bspatch.cc',
|
||||
'bz2_decompressor.cc',
|
||||
'buffer_file.cc',
|
||||
'extents.cc',
|
||||
'extents_file.cc',
|
||||
'file.cc',
|
||||
'memory_file.cc',
|
||||
'patch_reader.cc',
|
||||
'sink_file.cc',
|
||||
'utils.cc',
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
# bsdiff library
|
||||
# bsdiff static library
|
||||
{
|
||||
'target_name': 'libbsdiff',
|
||||
'type': 'shared_library',
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lbz2',
|
||||
'-lbrotlienc',
|
||||
'-ldivsufsort',
|
||||
'-ldivsufsort64',
|
||||
],
|
||||
'target_name': 'libbsdiff-static',
|
||||
'type': 'static_library',
|
||||
'cflags!': ['-fPIE'],
|
||||
'cflags': ['-fPIC'],
|
||||
'all_dependent_settings': {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lbz2',
|
||||
'-lbrotlienc',
|
||||
'-ldivsufsort',
|
||||
'-ldivsufsort64',
|
||||
],
|
||||
},
|
||||
},
|
||||
'sources': [
|
||||
'brotli_compressor.cc',
|
||||
@@ -69,6 +59,14 @@
|
||||
'suffix_array_index.cc',
|
||||
],
|
||||
},
|
||||
# bsdiff shared library
|
||||
{
|
||||
'target_name': 'libbsdiff',
|
||||
'type': 'shared_library',
|
||||
'dependencies': [
|
||||
'libbsdiff-static',
|
||||
],
|
||||
},
|
||||
# bsdiff executable
|
||||
{
|
||||
'target_name': 'bsdiff',
|
||||
@@ -80,18 +78,39 @@
|
||||
'bsdiff_main.cc',
|
||||
],
|
||||
},
|
||||
# bspatch library
|
||||
# bspatch static library
|
||||
{
|
||||
'target_name': 'libbspatch-static',
|
||||
'type': 'static_library',
|
||||
'cflags!': ['-fPIE'],
|
||||
'cflags': ['-fPIC'],
|
||||
'all_dependent_settings': {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lbz2',
|
||||
'-lbrotlidec',
|
||||
],
|
||||
},
|
||||
},
|
||||
'sources': [
|
||||
'bspatch.cc',
|
||||
'buffer_file.cc',
|
||||
'bz2_decompressor.cc',
|
||||
'extents.cc',
|
||||
'extents_file.cc',
|
||||
'file.cc',
|
||||
'memory_file.cc',
|
||||
'patch_reader.cc',
|
||||
'sink_file.cc',
|
||||
'utils.cc',
|
||||
],
|
||||
},
|
||||
# bspatch shared library
|
||||
{
|
||||
'target_name': 'libbspatch',
|
||||
'type': 'shared_library',
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lbz2',
|
||||
'-lbrotlidec',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(bspatch_sources)',
|
||||
'dependencies': [
|
||||
'libbspatch-static',
|
||||
],
|
||||
},
|
||||
# bspatch executable
|
||||
@@ -109,25 +128,12 @@
|
||||
'conditions': [
|
||||
['USE_test == 1', {
|
||||
'targets': [
|
||||
# bspatch static library for test
|
||||
{
|
||||
'target_name': 'libbspatch_test',
|
||||
'type': 'static_library',
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lbz2',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(bspatch_sources)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'bsdiff_unittest',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'libbsdiff',
|
||||
'libbspatch_test',
|
||||
'libbsdiff-static',
|
||||
'libbspatch-static',
|
||||
'../common-mk/testrunner.gyp:testrunner',
|
||||
],
|
||||
'variables': {
|
||||
|
||||
@@ -9,18 +9,21 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "bsdiff/common.h"
|
||||
#include "bsdiff/patch_writer_interface.h"
|
||||
|
||||
namespace bsdiff {
|
||||
|
||||
// Create a patch writer compatible with upstream's "BSDIFF40" patch format
|
||||
// using bz2 as a compressor.
|
||||
BSDIFF_EXPORT
|
||||
std::unique_ptr<PatchWriterInterface> CreateBsdiffPatchWriter(
|
||||
const std::string& patch_filename);
|
||||
|
||||
// Create a patch writer compatible with Android Play Store bsdiff patches,
|
||||
// uncompressed. The data will be written to the passed |patch| vector, which
|
||||
// must be valid until Close() is called or this patch is destroyed.
|
||||
BSDIFF_EXPORT
|
||||
std::unique_ptr<PatchWriterInterface> CreateEndsleyPatchWriter(
|
||||
std::vector<uint8_t>* patch);
|
||||
|
||||
|
||||
Reference in new issue
Block a user