fdroid metadata
This commit is contained in:
parent
074802c2f8
commit
45bd6b38a2
|
@ -0,0 +1,9 @@
|
|||
sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
|
||||
mv /tmp/out.toml native/zcash-sync/Cargo.toml
|
||||
cargo ndk --target arm64-v8a build --release --features=dart_ffi
|
||||
mkdir -p ./packages/warp_api_ffi/android/src/main/jniLibs/arm64-v8a
|
||||
cp ./target/aarch64-linux-android/release/libwarp_api_ffi.so ./packages/warp_api_ffi/android/src/main/jniLibs/arm64-v8a/
|
||||
cargo ndk --target armeabi-v7a build --release --features=dart_ffi
|
||||
mkdir -p ./packages/warp_api_ffi/android/src/main/jniLibs/armeabi-v7a
|
||||
cp ./target/armv7-linux-androideabi/release/libwarp_api_ffi.so ./packages/warp_api_ffi/android/src/main/jniLibs/armeabi-v7a/
|
||||
flutter build apk
|
|
@ -17,13 +17,13 @@
|
|||
FROM hhanh00/builder_zwallet as builder
|
||||
|
||||
ENV ANDROID_SDK_ROOT /root/Android/sdk
|
||||
ENV ANDROID_NDK_HOME $ANDROID_SDK_ROOT/android-ndk-r21e
|
||||
ENV ANDROID_NDK_HOME /root/Android/sdk/ndk/25.1.8937393
|
||||
ENV PATH $PATH:$ANDROID_SDK_ROOT/platform-tools:/root/flutter/bin
|
||||
|
||||
COPY . /zwallet
|
||||
|
||||
RUN git config --global --add safe.directory /root/flutter
|
||||
RUN --mount=type=secret,id=pwd cd /zwallet && ./configure.sh zcash && ./build.sh
|
||||
RUN --mount=type=secret,id=pwd cd /zwallet && ./configure.sh && ./build-android.sh
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /root
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
##syntax=docker/dockerfile:1.2
|
||||
FROM ubuntu:jammy-20221101 as builder
|
||||
|
||||
COPY . /root/zwallet
|
||||
|
||||
WORKDIR /root
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y sudo curl git
|
||||
RUN bash zwallet/misc/vagrant/build-ubuntu.sh /root/zwallet
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /root
|
||||
COPY --from=builder /root/zwallet/build/app/outputs/flutter-apk/app-release.apk ./
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
adb uninstall me.hanh.ywallet
|
||||
bundletool build-apks --overwrite --bundle=build/app/outputs/bundle/release/app-release.aab --output=/tmp/app.apks --ks=docker/zwallet.jks --ks-key-alias=hanh --ks-pass=pass:$JKS_PASSWORD
|
||||
bundletool install-apks --adb=/usr/bin/adb --apks=/tmp/app.apks
|
||||
bundletool install-apks --adb=$ANDROID_SDK_ROOT/platform-tools/adb --apks=/tmp/app.apks
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
FLUTTER_VERSION=3.3.7
|
||||
FLUTTER_VERSION=3.3.10
|
||||
|
||||
ROOT_DIR=$1
|
||||
if [ "$ROOT_DIR" == "" ]; then
|
||||
|
@ -13,30 +13,32 @@ if [ "$DL_DIR" == "" ]; then
|
|||
DL_DIR="/tmp"
|
||||
fi
|
||||
|
||||
sudo pacman -Sy --noconfirm unzip jdk8-openjdk wget
|
||||
sudo pacman -Sy --noconfirm unzip jdk11-openjdk
|
||||
|
||||
wget -qP $DL_DIR -N https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
||||
wget -qP $DL_DIR -N https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip
|
||||
wget -qP $DL_DIR -N https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_$FLUTTER_VERSION-stable.tar.xz
|
||||
mkdir $HOME/.zcash-params
|
||||
curl https://download.z.cash/downloads/sapling-output.params --output $HOME/.zcash-params/sapling-output.params
|
||||
curl https://download.z.cash/downloads/sapling-spend.params --output $HOME/.zcash-params/sapling-spend.params
|
||||
|
||||
wget -qP $DL_DIR -N https://download.z.cash/downloads/sapling-output.params
|
||||
wget -qP $DL_DIR -N https://download.z.cash/downloads/sapling-spend.params
|
||||
export ANDROID_HOME=$ROOT_DIR/Android/sdk
|
||||
mkdir -p $ANDROID_HOME
|
||||
export ANDROID_SDK_ROOT=$ANDROID_HOME
|
||||
|
||||
mkdir -p $ROOT_DIR/Android/sdk
|
||||
export ANDROID_SDK_ROOT=$ROOT_DIR/Android/sdk
|
||||
pushd $ROOT_DIR
|
||||
curl https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip --output $DL_DIR/cmd-tools.zip
|
||||
unzip -o $DL_DIR/cmd-tools.zip
|
||||
cd cmdline-tools/bin
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT --licenses
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" "cmdline-tools;latest"
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "build-tools;30.0.3" "cmake;3.18.1"
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "ndk;25.1.8937393"
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platforms;android-33"
|
||||
rm $DL_DIR/cmd-tools.zip
|
||||
popd
|
||||
|
||||
(cd $ROOT_DIR;unzip -o $DL_DIR/commandlinetools-linux-7583922_latest.zip;
|
||||
cd cmdline-tools/bin &&
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT --licenses &&
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" "platforms;android-31")
|
||||
curl https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_$FLUTTER_VERSION-stable.tar.xz --output $DL_DIR/flutter.tar.xz
|
||||
tar x -C $ROOT_DIR -f $DL_DIR/flutter.tar.xz
|
||||
rm $DL_DIR/flutter.tar.xz
|
||||
|
||||
(cd $ANDROID_SDK_ROOT;unzip -o $DL_DIR/android-ndk-r21e-linux-x86_64.zip)
|
||||
(cd $ROOT_DIR;tar xvf $DL_DIR/flutter_linux_$FLUTTER_VERSION-stable.tar.xz)
|
||||
|
||||
mkdir -p $HOME/.zcash-params
|
||||
cp $DL_DIR/sapling-output.params $DL_DIR/sapling-spend.params $HOME/.zcash-params
|
||||
|
||||
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/android-ndk-r21e
|
||||
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.1.8937393
|
||||
export PATH=$PATH:$ROOT_DIR/flutter/bin
|
||||
|
||||
rm $DL_DIR/android-ndk-r21e-linux-x86_64.zip $DL_DIR/commandlinetools-linux-7583922_latest.zip $DL_DIR/flutter_linux_$FLUTTER_VERSION-stable.tar.xz
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
sudo pacman -Sy --noconfirm git cmake rustup
|
||||
rustup install stable
|
||||
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
|
||||
cargo install --force cargo-make cargo-ndk
|
||||
rustup target add aarch64-linux-android armv7-linux-androideabi
|
||||
cargo install --force cargo-ndk
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
Categories:
|
||||
- Money
|
||||
License: MIT
|
||||
WebSite: https://ywallet.app
|
||||
SourceCode: https://github.com/hhanh00/zwallet
|
||||
|
||||
AutoName: YWallet
|
||||
Description: Crypto Wallet and Private Messenger for Ycash and Zcash
|
||||
|
||||
RepoType: git
|
||||
Repo: https://github.com/hhanh00/zwallet.git
|
||||
|
||||
Builds:
|
||||
- versionName: 1.2.17
|
||||
versionCode: 347
|
||||
commit: fdroid
|
||||
submodules: true
|
||||
sudo:
|
||||
- apt-get update || apt-get update
|
||||
- apt-get install cmake build-essential
|
||||
init:
|
||||
- mkdir -p $HOME/.zcash-params
|
||||
- curl https://download.z.cash/downloads/sapling-output.params --output $HOME/.zcash-params/sapling-output.params
|
||||
- curl https://download.z.cash/downloads/sapling-spend.params --output $HOME/.zcash-params/sapling-spend.params
|
||||
output: build/app/outputs/flutter-apk/app-release.apk
|
||||
srclibs:
|
||||
- rustup@1.25.1
|
||||
prebuild:
|
||||
- $$rustup$$/rustup-init.sh -y
|
||||
- source $HOME/.cargo/env
|
||||
- rustup target add aarch64-linux-android armv7-linux-androideabi
|
||||
- cargo install --force cargo-ndk
|
||||
- curl https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.3.10-stable.tar.xz
|
||||
--output $HOME/flutter.tar.xz
|
||||
- tar x -C $HOME -f $HOME/flutter.tar.xz
|
||||
- rm $HOME/flutter.tar.xz
|
||||
- export PATH=$PATH:$HOME/flutter/bin
|
||||
- ./configure.sh
|
||||
- sed -e 's/rlib/cdylib/' < native/zcash-sync/Cargo.toml >/tmp/out.toml
|
||||
- mv /tmp/out.toml native/zcash-sync/Cargo.toml
|
||||
- rm -rf flutter_zxing/src/zxing/test
|
||||
build:
|
||||
- source $HOME/.cargo/env
|
||||
- export PATH=$PATH:$HOME/flutter/bin
|
||||
- export JKS_PASSWORD=dummy
|
||||
- cargo ndk --target arm64-v8a build --release --features=dart_ffi
|
||||
- mkdir -p ./packages/warp_api_ffi/android/src/main/jniLibs/arm64-v8a
|
||||
- cp ./target/aarch64-linux-android/release/libwarp_api_ffi.so ./packages/warp_api_ffi/android/src/main/jniLibs/arm64-v8a/
|
||||
- rm -rf target/aarch64-linux-android
|
||||
- cargo ndk --target armeabi-v7a build --release --features=dart_ffi
|
||||
- mkdir -p ./packages/warp_api_ffi/android/src/main/jniLibs/armeabi-v7a
|
||||
- cp ./target/armv7-linux-androideabi/release/libwarp_api_ffi.so ./packages/warp_api_ffi/android/src/main/jniLibs/armeabi-v7a/
|
||||
- rm -rf target/armv7-linux-androideabi
|
||||
- rm -rf $HOME/.cargo
|
||||
- rm -rf $HOME/.rustup
|
||||
- rm -rf $ANDROID_HOME/emulator
|
||||
- rm -rf target/
|
||||
- flutter build apk
|
||||
ndk: r25b
|
||||
|
||||
AutoUpdateMode: None
|
||||
UpdateCheckMode: None
|
|
@ -0,0 +1,7 @@
|
|||
root = get_env PROJECT_ROOT
|
||||
cargo = set ${root}/native/zcash-sync/Cargo.toml
|
||||
toml = readfile ${cargo}
|
||||
crate_type = set "cdylib"
|
||||
val = replace ${toml} "rlib" ${crate_type}
|
||||
result = writefile ${cargo} ${val}
|
||||
assert ${result}
|
|
@ -0,0 +1,11 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "ubuntu/jammy64"
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = 8192
|
||||
vb.cpus = 4
|
||||
end
|
||||
config.vm.provision "shell" do |s|
|
||||
s.path = "provision.sh"
|
||||
s.args = "ua"
|
||||
end
|
||||
end
|
|
@ -0,0 +1,39 @@
|
|||
sudo apt-get update
|
||||
sudo apt-get -y install build-essential unzip default-jre cmake
|
||||
|
||||
cd $HOME
|
||||
|
||||
mkdir .zcash-params
|
||||
curl https://download.z.cash/downloads/sapling-output.params --output .zcash-params/sapling-output.params
|
||||
curl https://download.z.cash/downloads/sapling-spend.params --output .zcash-params/sapling-spend.params
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source ".cargo/env"
|
||||
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
|
||||
cargo install --force cargo-make cargo-ndk
|
||||
|
||||
curl https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip --output cmd-tools.zip
|
||||
mkdir Android
|
||||
export ANDROID_SDK_ROOT=$HOME/Android/sdk
|
||||
unzip cmd-tools.zip
|
||||
pushd cmdline-tools/bin
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT --licenses
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" "cmdline-tools;latest"
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "build-tools;30.0.3" "cmake;3.18.1"
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "ndk;25.1.8937393"
|
||||
yes | ./sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platforms;android-33"
|
||||
popd
|
||||
rm cmd-tools.zip
|
||||
|
||||
curl https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.3.10-stable.tar.xz --output flutter.tar.xz
|
||||
tar xf flutter.tar.xz
|
||||
rm flutter.tar.xz
|
||||
|
||||
export PATH=$PATH:$HOME/flutter/bin:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin
|
||||
git config --global --add safe.directory $HOME/flutter
|
||||
|
||||
pushd $1
|
||||
cp docker/zwallet-sample.jks docker/zwallet.jks
|
||||
export JKS_PASSWORD=zwallet
|
||||
./configure.sh
|
||||
./build.sh
|
||||
popd
|
|
@ -0,0 +1,5 @@
|
|||
git clone https://github.com/hhanh00/zwallet.git $HOME/zwallet
|
||||
cd $HOME/zwallet
|
||||
git checkout $1
|
||||
git submodule update --init --recursive
|
||||
source misc/vagrant/build-ubuntu.sh $PWD
|
Loading…
Reference in New Issue