mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
* Update build docs and migrate Android builds to Docker * Update NDK and move steps directly into Dockerfile * Fix NDK installation via script and Dockerfile * Migrate to @MrCyjaneK's existing Dockerfile (with optimizations) * Add .dockerignore and migrate Dockerfile to root of project * Revert .gitignore changes * Update Android and Linux builds and resolve Linux build issue * Fix git repo for Linux and Android build instructions * Set branch to latest release in build docs * Ensure `flutter clean` is run before building * Fix Linux completion example * Don't build Zano for Linux * Apply suggestions from code review Co-authored-by: cyan <cyjan@mrcyjanek.net> * Explicitly add automake package to Dockerfile * Improve logging on Android and Linux builds via Docker * Improve Dockerfile comments and ordering * Fix issues in macOS and iOS builds docs (thanks @MrCyjaneK) * Update docs/builds/IOS.md [skip ci] * Update docs/builds/IOS.md [skip ci] * Update docs/builds/MACOS.md [skip ci] * Update docs/builds/IOS.md [skip ci] * Fix and improve iOS and macOS build docs * Windows build doc improvements Co-authored-by: cyan <cyjan@mrcyjanek.net> * add missing dependency to Dockerfile * Update Windows build docs * More fixes and optimizations to the Windows build docs * Add git config to Windows build doc * Fix shell location/commands in Windows build doc * Fix WSL commands in Windows build doc * Apply suggestions from code review Co-authored-by: cyan <cyjan@mrcyjanek.net> --------- Co-authored-by: cyan <cyjan@mrcyjanek.net>
60 lines
2.6 KiB
Markdown
60 lines
2.6 KiB
Markdown
# Building Cake Wallet for Android
|
|
|
|
## Requirements and Setup
|
|
|
|
As we use Docker with a custom Dockerfile to build Cake Wallet, the only dependency for building Cake on your local host is the Docker Engine.
|
|
|
|
You can find the latest instructions for installing Docker on your given OS on the official website:
|
|
|
|
- <https://docs.docker.com/engine/install/>
|
|
|
|
NOTE: If building on a Mac with an M-series CPU (arm64), you may encounter segmentation faults when building. If you do, simply retry the build.
|
|
|
|
## Building Cake Wallet or Monero.com
|
|
|
|
### Using the pre-built builder image
|
|
|
|
In order to build the latest version of Cake Wallet, simply run the following:
|
|
|
|
```bash
|
|
git clone --branch main https://github.com/cake-tech/cake_wallet.git
|
|
# NOTE: Replace `main` with the latest release tag available at https://github.com/cake-tech/cake_wallet/releases/latest.
|
|
cd cake_wallet
|
|
# docker build -t ghcr.io/cake-tech/cake_wallet:main-linux . # Uncomment to build the docker image yourself instead of pulling it from the registry
|
|
docker run -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:main-linux bash -x << EOF
|
|
set -x -e
|
|
pushd scripts/android
|
|
source ./app_env.sh cakewallet
|
|
# source ./app_env.sh monero.com # Uncomment this line to build monero.com
|
|
./app_config.sh
|
|
./build_monero_all.sh
|
|
./build_mwebd.sh --dont-install
|
|
popd
|
|
pushd android/app
|
|
[[ -f key.jks ]] || keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass hunter1 -keypass hunter1
|
|
popd
|
|
flutter clean
|
|
./model_generator.sh
|
|
dart run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=hunter1 keyPassword=hunter1
|
|
dart run tool/generate_localization.dart
|
|
dart run tool/generate_new_secrets.dart
|
|
flutter build apk --release --split-per-abi
|
|
EOF
|
|
```
|
|
|
|
You should see the command complete with similar output:
|
|
|
|
```bash
|
|
Running Gradle task 'assembleRelease'... 519.1s
|
|
✓ Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (56.3MB)
|
|
✓ Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (55.8MB)
|
|
✓ Built build/app/outputs/flutter-apk/app-x86_64-release.apk (56.4MB)
|
|
```
|
|
|
|
Final builds can be found in `build/app/outputs/flutter-apk/` as seen above.
|
|
|
|
## Signing builds
|
|
|
|
While properly signing builds is outside of the scope of this guide (very few users want or need to run their own built APKs), to learn more about how to sign APKs you can check out the Zeus team's fantastic guide:
|
|
|
|
- <https://github.com/ZeusLN/zeus/blob/master/docs/ReproducibleBuilds.md#signing-apks>
|