mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-06 07:54:29 +01:00
Updated Installation (markdown)
parent
8de471c939
commit
6d8fd7379b
@ -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
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user