# Installation from source

  1. Install the latest stable version of GoLang (opens new window) and NodeJS (opens new window)
  2. Download the source code:
    git clone https://github.com/NightMan-1/QVNote
  3. Go to the source folder and install the dependencies:
npm install
export CGO_ENABLED=1; go mod download
export GO111MODULE=off; go get -u github.com/go-bindata/go-bindata/...
export GO111MODULE=off; go get -u github.com/josephspurrier/goversioninfo/cmd/goversioninfo

  1. Prepare frontend:
npm run build
cd templates && go-bindata -o ../bindata.go -fs ./... ../icon.ico && cd ..
  1. Building MacOS binary:
mkdir QVNote.app; mkdir QVNote.app/Contents; mkdir QVNote.app/Contents/MacOS; mkdir QVNote.app/Contents/Resources
cp Info.plist QVNote.app/Contents; cp icon.icns QVNote.app/Contents/Resources
export CGO_ENABLED=1; export GOOS=darwin; export GOARCH=amd64; go build -o QVNote.app/Contents/MacOS/QVNote && chmod a+x QVNote.app/Contents/MacOS/QVNote
  1. Building Linux binary:
export CGO_ENABLED=0; export GOOS=linux; export GOARCH=amd64; go build -o qvnote-linux-x64 && chmod a+x qvnote-linux-x64
  1. Building Windows binary:
export CGO_ENABLED=0; export GOOS=windows; export GOARCH=amd64; go build -a -gcflags=all="-l -B" -ldflags="-w -s -H windowsgui" -o QVNote-windows-x64.exe