ndk met problems

This commit is contained in:
eventlOwOp
2024-05-11 16:45:47 +08:00
parent 752bf18c52
commit 2dc1b755cd
2 changed files with 11 additions and 16 deletions
+5 -5
View File
@@ -53,7 +53,7 @@ jobs:
cd .. cd ..
cd ZeroTierOne cd ZeroTierOne
make --silent -j $(nproc) ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp" make --silent -j $(nproc) ZT_SSO_SUPPORTED=0 ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp"
cd .. cd ..
mkdir -p magisk/zerotier/lib mkdir -p magisk/zerotier/lib
@@ -78,16 +78,13 @@ jobs:
cd ZeroTierOne cd ZeroTierOne
make clean make clean
# sed -i "s/armv7ve/armv7a/g" make-linux.mk # sed -i "s/armv7ve/armv7a/g" make-linux.mk
make -j $(nproc) ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp" make -j $(nproc) ZT_SSO_SUPPORTED=0 ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp"
cd .. cd ..
cp ZeroTierOne/zerotier-one magisk/zerotier/ cp ZeroTierOne/zerotier-one magisk/zerotier/
cd magisk cd magisk
zip -q -r ../zerotier-magisk-arm-gcc.zip . zip -q -r ../zerotier-magisk-arm-gcc.zip .
# - name: Debugging with tmate
# uses: mxschmitt/action-tmate@v3.18
- name: Get Date - name: Get Date
id: date id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
@@ -104,3 +101,6 @@ jobs:
name: SNAPSHOT-GCC-${{ steps.date.outputs.date }} name: SNAPSHOT-GCC-${{ steps.date.outputs.date }}
draft: false draft: false
prerelease: true prerelease: true
- name: Debugging with tmate
uses: mxschmitt/action-tmate@v3.18
+6 -11
View File
@@ -22,8 +22,6 @@ _stop() {
kill -9 $pid kill -9 $pid
ret=$? ret=$?
rm -rf ./run/pid
if [ $ret -eq 0 ]; then if [ $ret -eq 0 ]; then
log "stopped zerotier-one" log "stopped zerotier-one"
return 0 return 0
@@ -37,7 +35,7 @@ _stop() {
_join() { _join() {
nid=$(cat $network_id_path) nid=$(cat $network_id_path)
./zerotier-cli -D./home join $nid > $zerotier_log 2>&1 ./zerotier-cli -D./home join $nid >> $zerotier_log 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
log "join network failed" log "join network failed"
@@ -52,7 +50,7 @@ _join() {
_leave() { _leave() {
nid=$(cat $network_id_path) nid=$(cat $network_id_path)
./zerotier-cli -D./home leave $nid > $zerotier_log 2>&1 ./zerotier-cli -D./home leave $nid >> $zerotier_log 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
log "leave network failed" log "leave network failed"
@@ -64,13 +62,11 @@ _leave() {
return 0 return 0
} }
__start() { __start() {
nohup ./zerotier-one -d home > $zerotier_log 2>&1 & nohup ./zerotier-one -d home >> $zerotier_log 2>&1 &
sleep 1 sleep 1
pid=$(pidof zerotier-one) pid=$(pidof zerotier-one)
echo $pid > ./run/pid
} }
_start() { _start() {
if pid=$(pidof zerotier-one); then if pid=$(pidof zerotier-one); then
@@ -84,7 +80,9 @@ _start() {
} }
cd /data/adb/zerotier cd /data/adb/zerotier
rm -f $daemon_log rm -f ./run/*
mkfifo $pipe
ip rule add from all lookup main pref 1 ip rule add from all lookup main pref 1
export LD_LIBRARY_PATH=/data/adb/zerotier/lib export LD_LIBRARY_PATH=/data/adb/zerotier/lib
@@ -92,9 +90,6 @@ __start
sleep 1 sleep 1
_join _join
rm -f $pipe
mkfifo $pipe
while true while true
do do
if read line < $pipe; then if read line < $pipe; then