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 +```