-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c63518
commit b1a43b0
Showing
236 changed files
with
44,552 additions
and
7,195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build/* | ||
data/* | ||
dist/* | ||
target/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
target | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
node_modules | ||
|
||
data | ||
|
||
build | ||
.cargo | ||
|
||
.DS_Store | ||
|
||
# generated Typescript types from Rust | ||
bindings | ||
|
||
staging-config | ||
|
||
dist | ||
.nymvpn | ||
windows/x86_64* | ||
*.wixobj | ||
*.wixpdb | ||
*.msi | ||
mkcert* | ||
|
||
nymvpn-oss-licenses.html | ||
nymvpn-oss-licenses-rust.html | ||
third-party-licenses.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"svg.preview.background": "editor" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Building nymvpn app | ||
|
||
## Install build dependencies | ||
|
||
### Common for all Platforms | ||
|
||
``` | ||
cargo install cargo-deb | ||
cargo install cargo-generate-rpm | ||
cargo install --force cargo-make | ||
cargo install sd | ||
cargo install ripgrep | ||
cargo install cargo-about | ||
``` | ||
|
||
### Linux | ||
|
||
``` | ||
apt install build-essential \ | ||
pkg-config \ | ||
libgtk-3-dev \ | ||
libssl-dev \ | ||
libsoup2.4-dev \ | ||
libjavascriptcoregtk-4.0-dev \ | ||
libwebkit2gtk-4.0-dev \ | ||
libmnl-dev \ | ||
libnftnl-dev \ | ||
protobuf-compiler \ | ||
zip \ | ||
``` | ||
|
||
Install protoc on x86_64/amd64 machines | ||
``` | ||
# x86_64 | ||
curl -Lo protoc-3.19.1-linux-x86_64.zip \ | ||
https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protoc-3.19.1-linux-x86_64.zip && \ | ||
unzip protoc-3.19.1-linux-x86_64.zip -d /tmp && \ | ||
mv /tmp/bin/protoc /usr/bin/protoc && \ | ||
rm protoc-3.19.1-linux-x86_64.zip | ||
``` | ||
|
||
Install protoc on arm64 machines | ||
``` | ||
# aarch64 | ||
curl -Lo protoc-3.19.1-linux-aarch_64.zip \ | ||
https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protoc-3.19.1-linux-aarch_64.zip && \ | ||
unzip protoc-3.19.1-linux-aarch_64.zip -d /tmp && \ | ||
sudo mv /tmp/bin/protoc /usr/bin/protoc && \ | ||
rm protoc-3.19.1-linux-aarch_64.zip | ||
``` | ||
|
||
### macOS | ||
``` | ||
brew install protobuf | ||
``` | ||
|
||
### Windows | ||
TODO | ||
|
||
## Build Debian package | ||
|
||
``` | ||
cargo make deb | ||
``` | ||
|
||
## Build RPM package | ||
|
||
``` | ||
cargo make rpm | ||
``` | ||
|
||
## Build macOS package | ||
|
||
``` | ||
cargo make pkg | ||
``` | ||
|
||
To codesign for distribution provide following environment variables: | ||
|
||
``` | ||
APPLE_TEAM_ID=... | ||
APPLICATION_SIGNING_IDENTITY=... | ||
INSTALLER_SIGNING_IDENTITY=... | ||
cargo make pkg | ||
``` | ||
|
||
## Build installer for Windows | ||
|
||
``` | ||
cargo make msi | ||
``` | ||
|
||
To codesign for distribution: | ||
|
||
``` | ||
SIGN=true cargo make msi | ||
``` | ||
|
||
## Building for Production for Linux | ||
|
||
### Build the Builder | ||
|
||
Build the Docker image to build nymvpn app. | ||
``` | ||
cd nymvpn-packages | ||
cargo make builder | ||
``` | ||
|
||
This will output `tag.txt`, commit it into source code. | ||
|
||
### Build .deb and .rpm | ||
|
||
This step uses builder Docker image with tag in `nymvpn-packages/tag.txt`. The final rpm and deb packages will be stored in `dist` directory. | ||
|
||
``` | ||
# For host platform | ||
cargo make linux | ||
# For target platform | ||
cargo make -e TARGET=aarch64-unknown-linux-gnu linux | ||
``` |
Oops, something went wrong.