build docs update

emphasize that android studio must be manually installed before setup.sh is run
This commit is contained in:
sneurlax 2023-04-25 17:55:46 -05:00
parent 7fb851905c
commit 2dfdc31a44

View file

@ -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