Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

替换预编译 JNI 库为 ZT 源码编译 / Replace pre-built JNI library #32

Closed
kaaass opened this issue Nov 29, 2022 · 4 comments · Fixed by #55
Closed

替换预编译 JNI 库为 ZT 源码编译 / Replace pre-built JNI library #32

kaaass opened this issue Nov 29, 2022 · 4 comments · Fixed by #55
Labels
enhancement New feature or request feature track

Comments

@kaaass
Copy link
Owner

kaaass commented Nov 29, 2022

描述

目前 Zerotier Fix 仍然在仓库中使用预编译的 JNI 库。这种分发方式使得 Zerotier Fix 目前无法做到完全的源码编译,因而降低了项目的透明度。此外,目前 Zerotier Fix 源码库中仍包含部分 ZT SDK 源码。这可能会造成 SDK 与 JNI 库对应的版本不一致,并且还有可能造成潜在的 LICENSE 问题。因此,本 Feature 旨在实现如下内容:

  1. 替换预编译的 JNI 库为从 ZT 源码编译
  2. 从目前仓库托管的源码树中移除 ZT SDK 相关的源码,转而在编译前从 Zerotier 官方仓库中获取对应版本的代码

相关 Issue

@kaaass kaaass added enhancement New feature or request feature track labels Nov 29, 2022
@kaaass kaaass added this to To do in Next (v1.1) Nov 29, 2022
@maryjeck
Copy link

老大,yyds

@sffxzzp
Copy link
Contributor

sffxzzp commented Feb 18, 2023

参考 #31,用 Github Actions 搞了个自动编译 apk,目前可以打包 1.10.6。
地址见:https://github.com/sffxzzp/ZerotierFix-Build

根据 ZeroTierOne#77c7f9,Zerotier Core 应该是已经切换到 CMake 来编译了。
但目前尝试了几次,不太会弄,所以还是用的 ndk-build。
现在使用 CMake 编译,已经可以编译通过,并且初步测试正常。

编译的时候出的几个问题,我的解决方法也很糙,供作者参考,希望能有帮助。

@kaaass
Copy link
Owner Author

kaaass commented Feb 18, 2023

感谢 @sffxzzp 提供的参考~我看看具体要怎么引入更好

@kaaass
Copy link
Owner Author

kaaass commented Jul 10, 2023

本 Issue 已在 #55 中实现,预计在下个更新中发布。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature track
Projects
Development

Successfully merging a pull request may close this issue.

3 participants