Picocrypt/src/README.md

44 lines
2.5 KiB
Markdown
Raw Normal View History

2021-06-01 04:38:56 +02:00
# Running From Source (Work in progress)
If you would like to run Picocrypt from source, or an executable isn't available for your platform, you've come to the right place. Running from source is very simple, and I've made it even easier with these simple instructions. Note that the instructions are generic and will work on any platform.
2021-05-29 21:38:13 +02:00
2021-06-01 18:02:56 +02:00
# 1. Prerequisites
Linux:
```bash
sudo apt-get install -y gcc make curl git tar wget xz-utils libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libxxf86vm-dev libgtk-3-dev xdg-utils && sudo apt-get install -y libglx-dev || echo "" && sudo apt-get install -y xclip || sudo apt-get install xsel
2021-05-29 21:38:13 +02:00
```
2021-06-01 18:02:56 +02:00
macOS (make sure <a href="https://brew.sh/">Homebrew</a> is installed):
```bash
sudo xcode-select --install && brew install glfw3 glew
2021-06-01 18:02:56 +02:00
```
Windows: No prerequisites
# 2. Install the Go Programming Language
Download the corresponding installer for Go from <a href="https://golang.org/dl">here</a>, or from your package manager. Go 1.16 or higher is recommended.
# 3. Get the Source Files
Download the source file `Picocrypt.go` from above or `git clone` this repository.
2021-06-02 04:27:55 +02:00
# 4. Initialize Go:
2021-06-01 23:55:04 +02:00
Go to where `Picocrypt.go` is located and initialize Go:
2021-05-29 21:38:13 +02:00
```bash
2021-06-02 04:27:55 +02:00
go mod init Picocrypt
2021-05-29 21:38:13 +02:00
```
2021-06-01 18:02:56 +02:00
2021-06-01 23:55:04 +02:00
# 5. Install Picocrypt's Go Dependencies
2021-05-29 21:38:13 +02:00
```bash
2021-06-01 23:55:04 +02:00
go get -u -v github.com/pkg/browser && go get -u -v github.com/zeebo/blake3 && go get -u -v golang.org/x/crypto/sha3 && go get -u -v golang.org/x/crypto/argon2 && go get -u -v github.com/AllenDang/giu@v0.5.4 && go get -u -v github.com/OpenDiablo2/dialog && go get -u -v golang.org/x/crypto/blake2b && go get -u -v golang.org/x/crypto/blake2s && go get -u -v github.com/atotto/clipboard && go get -u -v github.com/klauspost/reedsolomon && go get -u -v golang.org/x/crypto/chacha20poly1305 && go get -u -v github.com/HACKERALERT/Picocypher/monocypher
2021-05-29 21:38:13 +02:00
```
2021-06-01 23:55:04 +02:00
Note: if macOS prompts you to install clang, do so and run the command again
2021-06-02 04:27:55 +02:00
# 6. Tidy the Modules:
```bash
go mod tidy
```
# 7. Build From Source
- Windows: <code>go build -ldflags "-s -w -H=windowsgui -extldflags=-static" Picocrypt.go</code>
2021-06-01 18:02:56 +02:00
- macOS: <code>go build -ldflags "-s -w" Picocrypt.go</code>
- Linux: <code>go build -ldflags "-s -w" Picocrypt.go</code>
2021-06-02 04:27:55 +02:00
# 8. You are now complete.
2021-06-01 18:02:56 +02:00
You should now see a built executable (`Picocrypt.exe`/`Picocrypt.app`/`Picocrypt`) in your directory. You can run it by double-clicking or executing it in your terminal. If you're on Windows, go and download the `sdelete64.exe` from the list above and place it in the same directory as `Picocrypt.exe`.