sisong / HDiffPatch

a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; runs fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Other
1.52k stars 280 forks source link

iOS项目使用的产物 #355

Closed Tommywangh closed 1 year ago

Tommywangh commented 1 year ago

有iOS项目使用的产物,用macos的报错

sisong commented 1 year ago

有什么错误可以发上来?
使用场景是如何的? (比如是否需要diff?是否需要压缩?单文件?)
iOS上建议直接将需要的C\C++源代码文件添加到项目中使用。
可以借鉴: HDiffPatch\builds\xcode\HDiffPatch.xcworkspace

Tommywangh commented 1 year ago

1.HDiffPatch\builds\xcode\HDiffPatch.xcworkspace这个我编译mac os没问题,切换成iOS报错,

image

2、使用场景就是用来合并zip包,用patch能力。

sisong commented 1 year ago

这两天我会尝试更新一个版本,发布iOS的静态库

Tommywangh commented 1 year ago

太棒了,期待,Android这边已经用so试过了,zip的合并速度和patch大小确实比BsDiff有优势

sisong commented 1 year ago

@Tommywangh 我上传了iOS的测试SDK,你可以试试看: https://github.com/sisong/HDiffPatch/releases/tag/v4.6.6 中的 iOS_SDK_hpatchz

Tommywangh commented 1 year ago

好的,收到~

Tommywangh commented 1 year ago
image

这个.a不包含libmd5、lzma、zstd这些嘛,.a引入工程会报错

Tommywangh commented 1 year ago

是在build里打出来的产物,只把.a和两个.h拖入,会报符号表的错误

sisong commented 1 year ago

libbz2 库需要自己添加到项目中。
lzma那个缺失是个问题,源代码我加到.a中了。
md5和zstd相关函数也找不到吗?(也已经加了) 编译出错时,是编译的模拟器版本还是真机版本?

你用的.a文件是最新发布版本里的吗? 新的对此应该有修复了

Tommywangh commented 1 year ago

是用的最新的 我再试一下 用的真机版本

Tommywangh commented 1 year ago
image

这是拖入项目的SDK,还是报错:hpatchz/libbz2.a(blocksort.o), building for iOS, but linking in object file built for macOS, file 'hpatchz/libbz2.a' for architecture arm64

sisong commented 1 year ago

关于libbz2库
你试试从项目 TARGETS 的 Build Phases -> Linked Framework and Libraries 中用 + 添加名称 libbz2.tbd

Tommywangh commented 1 year ago

libbz2.tbd这个我拉libbz2没看到有这个,可以出一个空工程的接入嘛iOS这块,方面加个wx或者群嘛我跟您请教下

sisong commented 1 year ago

我发布了新版本 https://github.com/sisong/HDiffPatch/releases/download/v4.6.7/hdiffpatch_v4.6.7_bin_hpatchz_xcode_SDK.zip

可以给我发邮件,地址见readme中的最后留的联系人地址

sisong commented 1 year ago

发布的 SDK 真机测试没有问题了