initial readme created
Tanner Silva committed
Mar 17, 2021 at 19:45 UTC
0397e98387d2ddc143561c08045f79d2baccb6cb
1 file changed
+134
-3
README.md
+134
-3
@@ -1,5 +1,136 @@
1
-# Cake Wallet
1
+# CakeWallet - Open Source Bitcoin and Monero Wallet
2
3
-The project description, motivation, build scripts, instructions, tests will be added soon (February 2021);
3
+## Requirements and Setup
4
5
-Copyright (c) 2021 Cake Technologies LLC.
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
+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