Skip to content

Commit 37954c0

Browse files
committed
update Windows build script for GO111MODULE
1 parent 53d9391 commit 37954c0

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
- [Jupyter Notebook](http://jupyter.readthedocs.io/en/latest/install.html) or [nteract](https://nteract.io/desktop)
4545
- [ZeroMQ 4.X.X](http://zeromq.org/intro:get-the-software) - for convenience, pre-built Windows binaries (v4.2.1) are included in the zmq-win directory.
4646
- [pkg-config](https://en.wikipedia.org/wiki/Pkg-config)
47+
- [git](https://git-scm.com/download) - usually already present on Linux and Mac OS X. If not present, follow the instructions at [https://git-scm.com/download](https://git-scm.com/download)
48+
On Windows, it can also be installed as part of MinGW as described below.
4749

4850
### Linux
4951

@@ -58,7 +60,7 @@ $ sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kerne
5860

5961
Manual installation from GOPATH, also works with Go 1.11
6062
```sh
61-
$ env GO111MODULE=off go get -d github.com/gopherdata/gophernotes
63+
$ env GO111MODULE=off go get -d -u github.com/gopherdata/gophernotes
6264
$ cd "$(go env GOPATH)"/src/github.com/gopherdata/gophernotes
6365
$ env GO111MODULE=on go install
6466
$ mkdir -p ~/.local/share/jupyter/kernels/gophernotes
@@ -97,7 +99,7 @@ $ sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kerne
9799

98100
Manual installation from GOPATH, also works with Go 1.11
99101
```sh
100-
$ env GO111MODULE=off go get -d github.com/gopherdata/gophernotes
102+
$ env GO111MODULE=off go get -d -u github.com/gopherdata/gophernotes
101103
$ cd "$(go env GOPATH)"/src/github.com/gopherdata/gophernotes
102104
$ env GO111MODULE=on go install
103105
$ mkdir -p ~/Library/Jupyter/kernels/gophernotes
@@ -136,6 +138,7 @@ Then:
136138

137139
```
138140
REM Download w/o building.
141+
set GO111MODULE=off
139142
go get -d -u github.com/gopherdata/gophernotes
140143
cd %GOPATH%\src\github.com\gopherdata\gophernotes\zmq-win
141144

zmq-win/build.bat

+22-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
@echo off
2-
setlocal
3-
4-
if not [%1]==[386]; if not [%1]==[amd64] (
5-
echo Usage: %~n0 386^|amd64
6-
goto QUIT
7-
)
8-
set target=%1
9-
10-
REM get the bat's directory path, and replace \ with /
11-
set mydir=%~dp0
12-
set mydir=%mydir:\=/%
13-
14-
set CGO_CFLAGS=-I %mydir%include
15-
set CGO_LDFLAGS=-L %mydir%lib-%target% -l zmq
16-
17-
go build -tags zmq_4_x github.com/gopherdata/gophernotes
18-
19-
:QUIT
20-
endlocal
21-
echo on
1+
@echo off
2+
setlocal
3+
4+
if not [%1]==[386]; if not [%1]==[amd64] (
5+
echo Usage: %~n0 386^|amd64
6+
goto QUIT
7+
)
8+
set target=%1
9+
10+
REM get the bat's directory path, and replace \ with /
11+
set mydir=%~dp0
12+
set mydir=%mydir:\=/%
13+
14+
set CGO_CFLAGS=-I %mydir%include
15+
set CGO_LDFLAGS=-L %mydir%lib-%target% -l zmq
16+
set GO111MODULE=on
17+
18+
go build -tags zmq_4_x github.com/gopherdata/gophernotes
19+
20+
:QUIT
21+
endlocal
22+
echo on

0 commit comments

Comments
 (0)