# Installation from source
- Install the latest stable version of GoLang (opens new window) and NodeJS (opens new window)
- Download the source code:
git clone https://github.com/NightMan-1/QVNote
- 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
- Prepare frontend:
npm run build
cd templates && go-bindata -o ../bindata.go -fs ./... ../icon.ico && cd ..
- 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
- 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
- Building Windows binary:
goversioninfo
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