mirror of
https://github.com/egor-white/zaprett.git
synced 2026-03-22 00:18:13 +05:00
Compare commits
2 Commits
476b73a422
...
9c48a92340
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c48a92340 | ||
|
|
c04738a8d9 |
@@ -79,7 +79,7 @@ pub fn read_manifest(path: &Path) -> anyhow::Result<Manifest> {
|
||||
format!("Failed to read manifest: {}", path.display())
|
||||
})?;
|
||||
let manifest = serde_json::from_str(&content).with_context(|| {
|
||||
format!("Failed to parse mnanifest: {}", path.display())
|
||||
format!("Failed to parse manifest: {}", path.display())
|
||||
})?;
|
||||
Ok(manifest)
|
||||
}
|
||||
|
||||
@@ -113,6 +113,23 @@ _build_luajit target_arch:
|
||||
echo "LuaJIT for {{target_arch}} already built"
|
||||
fi
|
||||
|
||||
_elf-clean target_dir:
|
||||
#!/usr/bin/env bash
|
||||
TERMUX_ELF_CLEANER="{{TARGET}}/termux-elf-cleaner"
|
||||
if [ ! -f "$TERMUX_ELF_CLEANER" ]; then
|
||||
echo "Downloading termux-elf-cleaner to {{TARGET}}..."
|
||||
mkdir -p "{{TARGET}}"
|
||||
wget -q -O "$TERMUX_ELF_CLEANER" "https://github.com/termux/termux-elf-cleaner/releases/download/v3.0.1/termux-elf-cleaner"
|
||||
chmod +x "$TERMUX_ELF_CLEANER"
|
||||
fi
|
||||
BINARY="{{target_dir}}/zaprett"
|
||||
if [ -f "$BINARY" ]; then
|
||||
echo "Patching $BINARY with API {{ANDROID_API}}..."
|
||||
"$TERMUX_ELF_CLEANER" --api {{ANDROID_API}} "$BINARY"
|
||||
else
|
||||
echo "Binary $BINARY not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_install_rust_target target:
|
||||
#!/usr/bin/env bash
|
||||
@@ -149,5 +166,6 @@ build-android *args: prepare-android
|
||||
just _build_luajit $t
|
||||
just _install_rust_target $t
|
||||
NETFILTER_LIBS=$NETFILTER_LIBS-$t LUAJIT_LIBS=$LUAJIT_LIBS-$t cargo ndk -t $t --platform $ANDROID_API build {{args}}
|
||||
just _elf-clean "target/${t}/release"
|
||||
)
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user