Update README.md

This commit is contained in:
Evan Su 2021-08-07 19:14:35 -04:00 committed by GitHub
parent 51daf7e246
commit d50cf312c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 13 deletions

View File

@ -1,7 +1,5 @@
# 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. I'll assume that you are familiar with the Go language.
Note that the instructions are generic and will work on any platform.
# Running From Source
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. I'll assume that you are familiar with the Go language and how to deal with modules.
# 1. Prerequisites
Linux:
@ -12,7 +10,7 @@ macOS:
```bash
xcode-select --install
```
Windows: [TDM-GCC](https://jmeubank.github.io/tdm-gcc/)
Windows: A C compiler, ideally [TDM-GCC](https://jmeubank.github.io/tdm-gcc/)
# 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.
@ -21,15 +19,15 @@ Download the corresponding installer for Go from <a href="https://golang.org/dl"
Download the source file `Picocrypt.go` from above or `git clone` this repository.
# 4. Get Resources
Place all the files in the `resources/` directory in the same directory as `Picocrypt.go`.
Place all the files in the `resources` directory above into the same directory as `Picocrypt.go`.
# 5. Create a go.mod:
# 5. Create a go.mod
Go to where `Picocrypt.go` is located and create a go.mod:
```bash
go mod init Picocrypt
```
# 5. Install Picocrypt's Go Dependencies
# 5. Install Dependencies
Install each of the following modules via `go get -u -v`:
```bash
golang.org/x/crypto
@ -41,15 +39,15 @@ github.com/HACKERALERT/browser@v0.0.0-20210730230128-85901a8dd82f
github.com/HACKERALERT/zxcvbn-go@v0.0.0-20210730224720-b29e9dba62c2
```
# 6. Tidy the Modules:
# 6. Build From Source
Tidy the modules:
```bash
go mod tidy
```
# 7. Build From Source
Build Picocrypt from source:
- Windows: <code>go build -ldflags "-s -w -H=windowsgui -extldflags=-static" Picocrypt.go</code>
- macOS: <code>go build -ldflags "-s -w" Picocrypt.go</code>
- Linux: <code>go build -ldflags "-s -w" Picocrypt.go</code>
# 8. You are now complete.
You should now see a built executable (`Picocrypt.exe`/`Picocrypt`) in your directory. You can run it by double-clicking or executing it in your terminal.
# 7. Done!
You should now see a compiled executable (`Picocrypt.exe`/`Picocrypt`) in your directory. You can run it by double-clicking or executing it in your terminal. That wasn't too hard, right? Enjoy!