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

View file

@ -1,7 +1,5 @@
# Running From Source (Work in progress) # 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. 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.
Note that the instructions are generic and will work on any platform.
# 1. Prerequisites # 1. Prerequisites
Linux: Linux:
@ -12,7 +10,7 @@ macOS:
```bash ```bash
xcode-select --install 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 # 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. 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. Download the source file `Picocrypt.go` from above or `git clone` this repository.
# 4. Get Resources # 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: Go to where `Picocrypt.go` is located and create a go.mod:
```bash ```bash
go mod init Picocrypt go mod init Picocrypt
``` ```
# 5. Install Picocrypt's Go Dependencies # 5. Install Dependencies
Install each of the following modules via `go get -u -v`: Install each of the following modules via `go get -u -v`:
```bash ```bash
golang.org/x/crypto 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 github.com/HACKERALERT/zxcvbn-go@v0.0.0-20210730224720-b29e9dba62c2
``` ```
# 6. Tidy the Modules: # 6. Build From Source
Tidy the modules:
```bash ```bash
go mod tidy go mod tidy
``` ```
Build Picocrypt from source:
# 7. Build From Source
- Windows: <code>go build -ldflags "-s -w -H=windowsgui -extldflags=-static" Picocrypt.go</code> - Windows: <code>go build -ldflags "-s -w -H=windowsgui -extldflags=-static" Picocrypt.go</code>
- macOS: <code>go build -ldflags "-s -w" Picocrypt.go</code> - macOS: <code>go build -ldflags "-s -w" Picocrypt.go</code>
- Linux: <code>go build -ldflags "-s -w" Picocrypt.go</code> - Linux: <code>go build -ldflags "-s -w" Picocrypt.go</code>
# 8. You are now complete. # 7. Done!
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. 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!