From 6d8fd7379b5172fabb5a96cf3ec6850dd3c7e0e9 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 5 Mar 2019 00:03:03 +0900 Subject: [PATCH] Updated Installation (markdown) --- Installation.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Installation.md b/Installation.md index d5f9203..33b1946 100644 --- a/Installation.md +++ b/Installation.md @@ -13,7 +13,7 @@ go get github.com/gopherjs/gopherjs go get github.com/gopherjs/gopherwasm/js ``` -# Modules (Go 1.11 and later) +# Modules As of Go 1.11, modules are introduced. You can work with Ebiten without GOPATH environment variable. If you want to use Ebiten with modules, execute these commands with Go 1.11: @@ -31,3 +31,32 @@ go mod init example.com/m # `go run` installs related libraries automatically. go run . ``` + +# Run examples + +Let's execute an example to check installation finished correctly. + +## Without modules + +On POSIX: + +``` +cd $HOME/go/src/github.com/hajimehoshi/ebiten +go run -tags=example ./examples/rotate +``` + +On Windows: + +``` +cd %HOME%\go\src\github.com\hajimehoshi\ebiten +go run -tags=example ./examples/rotate +``` + +## With modules + +``` +mkdir test +go mod init example.com/m +go get github.com/hajimehoshi/ebiten +go run -tags=example github.com/hajimehoshi/ebiten/rotate/main.go +```