From d71cd65dbc6699a9ff73befda4fc3707de2a5545 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Wed, 1 Dec 2021 10:34:00 +0100 Subject: [PATCH] Chore: Update developer guide with instructions building from Windows (#42390) In addition, removess copying of local directory in Dockerfile since that directory normally doesn't exist. --- Dockerfile | 1 - contribute/developer-guide.md | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a4badb48d41..e3768bfc032 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,6 @@ RUN apk add --no-cache gcc g++ make WORKDIR /grafana COPY go.mod go.sum embed.go Makefile build.go package.json ./ -COPY ./local/* ./local/ COPY cue cue COPY packages/grafana-schema packages/grafana-schema COPY public/app/plugins public/app/plugins diff --git a/contribute/developer-guide.md b/contribute/developer-guide.md index 98bd113929d..1ea45276b16 100644 --- a/contribute/developer-guide.md +++ b/contribute/developer-guide.md @@ -81,7 +81,23 @@ When you log in for the first time, Grafana asks you to change your password. The Grafana backend includes SQLite which requires GCC to compile. So in order to compile Grafana on Windows you need to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download). Eventually, if you use [Scoop](https://scoop.sh), you can install GCC through that. -You can simply build the back-end as follows: `go run build.go build`. The Grafana binaries will be in bin\\windows-amd64. +You can build the back-end as follows: + +1. Follow the [instructions](https://github.com/google/wire#installing) to install the Wire tool. +2. Generate code using Wire: + +``` +# Normally Wire tool installed at $GOPATH/bin/wire.exe + gen -tags oss ./pkg/server ./pkg/cmd/grafana-cli/runner +``` + +3. Build the Grafana binaries: + +``` +go run build.go build +``` + +The Grafana binaries will be in bin\\windows-amd64. Alternately, if you wish to use the `make` command, install [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm) and use it in a Unix shell (f.ex. Git Bash). ## Test Grafana