more instruction

Tanner Silva committed Mar 20, 2021 at 21:40 UTC 4fca2681d0d51758f93ee8b0118fe1f6b368531b
2 files changed +140 -132
README.md
+4 -132
@@ -1,136 +1,8 @@
1 -# CakeWallet - Open Source Bitcoin and Monero Wallet
1 +# CakeWallet for Android and iOS
2
3 -## Requirements and Setup
3 +## Open Source Monero and Bitcoin Wallet
4
5 -The following are the system requirements to build CakeWallet for your Android device.
5
7 -```
8 -Ubuntu >= 16.04
9 -Android SDK 28
10 -Android NDK 17c
11 -Flutter 1.22.6
12 -```
6 +More instructions to follow
7
14 -## Building CakeWallet on Android
15 -
16 -These steps will help you configure and execute a build of CakeWallet from its source code.
17 -
18 -### 1. Installing Package Dependencies
19 -
20 -CakeWallet cannot be built without the following packages installed on your build system.
21 -
22 -- unzip
23 -
24 -- automake
25 -
26 -- build-essential
27 -
28 -- file
29 -
30 -- pkg-config
31 -
32 -- git
33 -
34 -- python
35 -
36 -- libtool
37 -
38 -- libtinfo5
39 -
40 -- cmake
41 -
42 -- openjdk-8-jre-headless
43 -
44 -You may easily install them on your build sytem with the following command:
45 -
46 -`$ sudo apt-get install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless`
47 -
48 -### 2. Installing Android Studio and Android toolchain
49 -
50 -You may download and install the latest version of Android Studio [here](https://developer.android.com/studio#downloads). After installing, start Android Studio, and go through the "Setup Wizard." This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by CakeWallet. **Be sure you are installing SDK version 28 or later when stepping through the wizard**
51 -
52 -### 3. Installing Flutter
53 -
54 -The easiest way to install Flutter is by using the `snap` package manager. Other means of installing Flutter on your system can be found [here](https://flutter.dev/docs/get-started/install/linux).
55 -
56 -`$ sudo snap install flutter --classic`
57 -
58 -### 4. Verify Installations
59 -
60 -Verify that the Android toolchain, Flutter, and Android Studio have been correctly installed on your system with the following command:
61 -
62 -`$ flutter doctor`
63 -
64 -The output of this command will appear like this, indicating successful installations. If there are problems with your installation, they **must** be corrected before proceeding.
65 -```
66 -Doctor summary (to see all details, run flutter doctor -v):
67 -[✓] Flutter (Channel beta, 2.0.2, on Linux, locale en_US.UTF-8)
68 -[✓] Android toolchain - develop for Android devices (Android SDK version 28)
69 -[✓] Android Studio (version 4.0)
70 -```
71 -
72 -### 5. Generate a secure keystore for Android
73 -
74 -`$ keytool -genkey -v -keystore $HOME/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key`
75 -
76 -You will be prompted to create two passwords. First you will be prompted for the "store password", followed by a "key password" towards the end of the creation process. **TAKE NOTE OF THESE PASSWORDS!** You will need them in later steps.
77 -
78 -### 6. Acquiring the CakeWallet Source Code
79 -
80 -Create the directory that will be use to store the CakeWallet source...
81 -
82 -```
83 -$ sudo mkdir -p /opt/android
84 -$ sudo chown $USER /opt/android
85 -$ cd /opt/android
86 -```
87 -
88 -..and download the source code into that directory.
89 -
90 -`$ git clone https://github.com/cake-tech/cake_wallet.git --branch deploy`
91 -
92 -Proceed into the source code before proceeding with the next steps:
93 -
94 -`$ cd cake_wallet/scripts/android/`
95 -
96 -### 7. Installing Android NDK
97 -
98 -`$ ./install_ndk.sh`
99 -
100 -### 8. Execute Build & Setup Commands for CakeWallet
101 -
102 -Build the Monero libraries and their dependencies:
103 -
104 -`$ ./build_all.sh`
105 -
106 -Now the dependencies need to be copied into the CakeWallet project with this command:
107 -
108 -`$ ./copy_monero_deps.sh`
109 -
110 -It is now time to change back to the base directory of the CakeWallet source code:
111 -
112 -`$ cd ../../`
113 -
114 -Install Flutter package dependencies with this command:
115 -
116 -`$ flutter pub get`
117 -
118 -Your CakeWallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command:
119 -
120 -`$ flutter packages pub run tool/generate_new_secrets.dart`
121 -
122 -Next, we must generate key properties based on the secure keystore you generated for Android (in step 5). **MODIFY THE FOLLOWING COMMAND** with the "store password" and "key password" you assigned when creating your keystore (in step 5).
123 -
124 -`$ flutter packages pub run tool/generate_android_key_properties.dart keyAlias=key storeFile=$HOME/key.jks storePassword=<store password> keyPassword=<key password>`
125 -
126 -**REMINDER:** The *above* command will **not** succeed unless you replaced the `storePassword` and `keyPassword` variables with the correct passwords for your keystore.
127 -
128 -Lastly, we will generate mobx models for the project.
129 -
130 -`$ flutter packages pub run build_runner build --delete-conflicting-outputs`
131 -
132 -### 9. Build!
133 -
134 -`$ flutter build apk —release`
135 -
136 -Copyright (c) 2021 Cake Technologies LLC.
\ No newline at end of file
8 +For instructions on how to build for Android: please view file `howto-build-android.md`
\ No newline at end of file
howto-build-android.md new
+136
@@ -0,0 +1,136 @@
1 +# Building CakeWallet for Android
2 +
3 +## Requirements and Setup
4 +
5 +The following are the system requirements to build CakeWallet for your Android device.
6 +
7 +```
8 +Ubuntu >= 16.04
9 +Android SDK 28
10 +Android NDK 17c
11 +Flutter 1.22.6
12 +```
13 +
14 +## Building CakeWallet on Android
15 +
16 +These steps will help you configure and execute a build of CakeWallet from its source code.
17 +
18 +### 1. Installing Package Dependencies
19 +
20 +CakeWallet cannot be built without the following packages installed on your build system.
21 +
22 +- unzip
23 +
24 +- automake
25 +
26 +- build-essential
27 +
28 +- file
29 +
30 +- pkg-config
31 +
32 +- git
33 +
34 +- python
35 +
36 +- libtool
37 +
38 +- libtinfo5
39 +
40 +- cmake
41 +
42 +- openjdk-8-jre-headless
43 +
44 +You may easily install them on your build sytem with the following command:
45 +
46 +`$ sudo apt-get install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless`
47 +
48 +### 2. Installing Android Studio and Android toolchain
49 +
50 +You may download and install the latest version of Android Studio [here](https://developer.android.com/studio#downloads). After installing, start Android Studio, and go through the "Setup Wizard." This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by CakeWallet. **Be sure you are installing SDK version 28 or later when stepping through the wizard**
51 +
52 +### 3. Installing Flutter
53 +
54 +CakeWallet requires **EXACTLY** Flutter version `1.22.6` to build properly.
55 +
56 +To install this version of Flutter on your Ubuntu system, please use [these instructions](https://flutter.dev/docs/get-started/install/linux#install-flutter-manually).
57 +
58 +### 4. Verify Installations
59 +
60 +Verify that the Android toolchain, Flutter, and Android Studio have been correctly installed on your system with the following command:
61 +
62 +`$ flutter doctor`
63 +
64 +The output of this command will appear like this, indicating successful installations. If there are problems with your installation, they **must** be corrected before proceeding.
65 +```
66 +Doctor summary (to see all details, run flutter doctor -v):
67 +[✓] Flutter (Channel beta, 2.0.2, on Linux, locale en_US.UTF-8)
68 +[✓] Android toolchain - develop for Android devices (Android SDK version 28)
69 +[✓] Android Studio (version 4.0)
70 +```
71 +
72 +### 5. Generate a secure keystore for Android
73 +
74 +`$ keytool -genkey -v -keystore $HOME/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key`
75 +
76 +You will be prompted to create two passwords. First you will be prompted for the "store password", followed by a "key password" towards the end of the creation process. **TAKE NOTE OF THESE PASSWORDS!** You will need them in later steps.
77 +
78 +### 6. Acquiring the CakeWallet Source Code
79 +
80 +Create the directory that will be use to store the CakeWallet source...
81 +
82 +```
83 +$ sudo mkdir -p /opt/android
84 +$ sudo chown $USER /opt/android
85 +$ cd /opt/android
86 +```
87 +
88 +..and download the source code into that directory.
89 +
90 +`$ git clone https://github.com/cake-tech/cake_wallet.git --branch deploy`
91 +
92 +Proceed into the source code before proceeding with the next steps:
93 +
94 +`$ cd cake_wallet/scripts/android/`
95 +
96 +### 7. Installing Android NDK
97 +
98 +`$ ./install_ndk.sh`
99 +
100 +### 8. Execute Build & Setup Commands for CakeWallet
101 +
102 +Build the Monero libraries and their dependencies:
103 +
104 +`$ ./build_all.sh`
105 +
106 +Now the dependencies need to be copied into the CakeWallet project with this command:
107 +
108 +`$ ./copy_monero_deps.sh`
109 +
110 +It is now time to change back to the base directory of the CakeWallet source code:
111 +
112 +`$ cd ../../`
113 +
114 +Install Flutter package dependencies with this command:
115 +
116 +`$ flutter pub get`
117 +
118 +Your CakeWallet binary will be built with cryptographic salts, which are used for secure encryption of your data. You may generate these secret salts with the following command:
119 +
120 +`$ flutter packages pub run tool/generate_new_secrets.dart`
121 +
122 +Next, we must generate key properties based on the secure keystore you generated for Android (in step 5). **MODIFY THE FOLLOWING COMMAND** with the "store password" and "key password" you assigned when creating your keystore (in step 5).
123 +
124 +`$ flutter packages pub run tool/generate_android_key_properties.dart keyAlias=key storeFile=$HOME/key.jks storePassword=<store password> keyPassword=<key password>`
125 +
126 +**REMINDER:** The *above* command will **not** succeed unless you replaced the `storePassword` and `keyPassword` variables with the correct passwords for your keystore.
127 +
128 +Lastly, we will generate mobx models for the project.
129 +
130 +`$ flutter packages pub run build_runner build --delete-conflicting-outputs`
131 +
132 +### 9. Build!
133 +
134 +`$ flutter build apk —release`
135 +
136 +Copyright (c) 2021 Cake Technologies LLC.
\ No newline at end of file