From 2dfdc31a44abe38251437e0fa847b5e0b08af79b Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 25 Apr 2023 17:55:46 -0500 Subject: [PATCH 1/2] build docs update emphasize that android studio must be manually installed before setup.sh is run --- docs/building.md | 52 +++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/docs/building.md b/docs/building.md index 879008f09..78556038b 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,23 +1,31 @@ # Building +## Prerequisites -Here you will find instructions on how to install the necessary tools for building and running the app. - -### Prerequisites - -- The OS'es supported for building is Ubuntu (20.04) and Fedora (37 - Work In Progress) +- The only OS supported for building is Ubuntu (20.04) - A machine with at least 100 GB of Storage +- [Android Studio](https://developer.android.com/studio) [its dependencies](https://developer.android.com/studio/install#64bit-libs) -The following prerequisites can be installed with the setup script [`scripts/setup.sh`](./../scripts/setup.sh) or manually as described below: +### Android Studio +Android Studio is the recommended IDE for development, not just for launching on Android devices and emulators but also for Linux desktop development. It is used for Android builds which can be otherwise be made from the commandline but which are not scripted yet. -- Flutter 3.7.11 [(install manually or with git, do not install with snap)](https://docs.flutter.dev/get-started/install) -- Dart SDK Requirement (>=2.19.0, up until <3.0.0) (normally included with a flutter install) -- Android setup ([Android Studio](https://developer.android.com/studio) and subsequent dependencies) +Follow instructions here [https://developer.android.com/studio/install#linux](https://developer.android.com/studio/install#linux) or install via snap: +``` +# setup android studio +sudo apt install -y openjdk-11-jdk +sudo snap install android-studio --classic +``` -### Scripted setup +Use Tools > SDK Manager to install the SDK Tools > SDK Platforms > Android 11.0 (R) (API 30), SDK Tools > NDK, SDK Tools > Android SDK command line tools, and SDK Tools > CMake -[`scripts/setup.sh`](./../scripts/setup.sh) is provided as a tool to set up installation for building: download the script and run it anywhere. This script should skip the entire [Manual setup](#manual-setup) section below and prepare you for [running](#running). It will set up the stack_wallet repository in `~/projects/stack_wallet` and build it there. +Then install the Flutter plugin and restart the IDE. In Android Studio's options for the Flutter language, enable auto format on save to match the project's code style. If you have problems with the Dart SDK, make sure to run `flutter` in a terminal to download it (use `source ~/.bashrc` to update your environment variables if you're still using the same terminal from which you ran `setup.sh`) -### Manual setup +Make a Pixel 4 (API 30) x86_64 emulator with 2GB of storage space for emulation + +## Scripted setup + +[`scripts/setup.sh`](./../scripts/setup.sh) is provided as a tool to set up installation for building: download the script and run it anywhere. This script should skip the entire [Manual setup](#manual-setup) section below and prepare you for [running](#running). It will set up the stack_wallet repository in `~/projects/stack_wallet` and build it there. You will still need to install Android Studio manually as described above. + +## Manual setup > If you have installed with script, skip to [running](#running) @@ -105,10 +113,6 @@ cd scripts/linux/ cd ../.. ``` -#### Fedora (37) (Work In Progress) - -This is a work in progress, please use Ubuntu for now. - ## Running ### Android Plug in your android device or use the emulator available via Android Studio and then run the following commands: @@ -125,19 +129,3 @@ Plug in your android device or use the emulator available via Android Studio and flutter pub get Linux flutter run linux ``` - -## Android Studio -Android Studio is the recommended IDE for development, not just for launching on Android devices and emulators but also for Linux desktop development. - -Follow instructions here [https://developer.android.com/studio/install#linux](https://developer.android.com/studio/install#linux) or install via snap: -``` -# setup android studio -sudo apt install -y openjdk-11-jdk -sudo snap install android-studio --classic -``` - -Use Tools > SDK Manager to install the SDK Tools > Android SDK (API 30), SDK Tools > NDK, SDK Tools > Android SDK command line tools, and SDK Tools > CMake - -Then install the Flutter plugin and restart the IDE. In Android Studio's options for the Flutter language, enable auto format on save to match the project's code style. If you have problems with the Dart SDK, make sure to run `flutter` in a terminal to download it (use `source ~/.bashrc` to update your environment variables if you're still using the same terminal from which you ran `setup.sh`) - -Make a Pixel 4 (API 30) x86_64 emulator with 2GB of storage space for emulation From 17e6cf97cf763e91e2202c758a8a6e90e5e7ef90 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Tue, 25 Apr 2023 18:02:45 -0500 Subject: [PATCH 2/2] build linux plugins too --- scripts/setup.sh | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 scripts/setup.sh diff --git a/scripts/setup.sh b/scripts/setup.sh old mode 100644 new mode 100755 index 8be59f8c4..cfbe9a6c2 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -49,3 +49,5 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro cd $STACK_WALLET cd scripts/android ./build_all.sh +cd ../linux +./build_all.sh