dev
md 92 lines 3.57 KB
Rendered Raw
1 # Building Cake Wallet for Windows
2
3 ## Requirements and Setup
4
5 The following are the system requirements to build Cake Wallet for your Windows PC.
6
7 ```txt
8 Windows 10 or later (64-bit), x86-64 based
9 Flutter 3.27.4
10 ```
11
12 ### 1. Installing Flutter
13
14 Install Flutter, specifically version `3.27.4` by following the [official docs](https://docs.flutter.dev/get-started/install/windows).
15
16 In order for Flutter to function, you'll also need to enable Developer Mode:
17
18 Start Menu > search for "Run" > type `ms-settings:developers`, and turn on Developer Mode.
19
20 NOTE: as `3.27.4` is not the latest version, you'll need to download it from <https://docs.flutter.dev/release/archive> instead of the link in the docs above.
21
22 ### 2. Install Development Tools
23
24 Install Git for Windows and Visual Studio 2022:
25
26 1. Follow the [Development Tools](https://docs.flutter.dev/get-started/install/windows/desktop#development-tools) installation instructions
27 1. NOTE: Be sure to install the `Desktop Development with C++` workload in Visual Studio as outlined in the docs.
28 2. Add `git` to your path by going to Start Menu > search "environment" > Environment Variables > double-click Path > Add `C:\Program Files\Git\bin\` on a new line.
29
30 Lastly, you'll need to install Nuget separately:
31
32 1. Download the exe from <https://dist.nuget.org/win-x86-commandline/latest/nuget.exe>
33 2. Create a new directory, `C:\Program Files\Nuget\`
34 3. Move or copy the `nuget.exe` binary you just downloaded into the newly created directory above.
35 4. Add `nuget` to your path by going to Start Menu > search "environment" > Environment Variables > double-click Path > Add `C:\Program Files\Nuget\` on a new line.
36
37 ### 3. Installing WSL (Windows Subsystem for Linux)
38
39 For building Monero dependencies, it is required to install Windows [WSL](https://learn.microsoft.com/en-us/windows/wsl) and required packages for WSL (Ubuntu).
40
41 1. Open a Powershell window by going to the Start Menu and searching for "Powershell"
42 2. Install WSL with the command `wsl --install`
43 3. Install the necessary Ubuntu dependencies
44
45 ```powershell
46 wsl --install
47 wsl sudo apt update
48 wsl sudo apt install -y autoconf build-essential ccache cmake curl gcc gcc-mingw-w64-x86-64 git g++ g++-mingw-w64-x86-64 gperf lbzip2 libtool make pkg-config pigz
49 ```
50
51 ### 4. Installing Rust
52
53 Install Rust and other Rust-related dependencies using [rustup.rs](https://rustup.rs/#) by running the following command:
54
55 ```bash
56 wsl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
57 ```
58
59 ### 5. Acquiring the Cake Wallet source code
60
61 Download the latest release tag of Cake Wallet and enter the source code directory:
62
63 ```powershell
64 git clone https://github.com/cake-tech/cake_wallet.git --branch main
65 cd cake_wallet
66 ```
67
68 NOTE: Replace `main` with the latest release tag available at <https://github.com/cake-tech/cake_wallet/releases/latest>.
69
70 ### 6. Build Monero, monero_c, and dependencies
71
72 To use Monero in Cake Wallet, you must build the Monero_C wrapper which will be used by monero.dart package.
73
74 Run the following in a WSL terminal window (set the Git username and email as desired):
75
76 ```powershell
77 wsl
78 git config --global user.email "builds@cakewallet.com"
79 git config --global user.name "builds"
80 ./build_all.sh
81 ```
82
83 ### 7. Configure and build Cake Wallet application
84
85 To configure the application, run the following:
86
87 ```powershell
88 exit
89 .\cakewallet.bat
90 ```
91
92 After running the script above, you should get `Cake Wallet.zip` in the project's root directory which will contain `CakeWallet.exe` and other needed files for running the application. Now you can extract files from `Cake Wallet.zip` archive and run the application.