mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-24 01:42:05 +01:00
ebiten: rename BuildTag -> BuildConstraints
This commit is contained in:
parent
5c0c084b6e
commit
11398f3bb5
22
genkeys.go
22
genkeys.go
@ -576,7 +576,7 @@ const uiGLFWKeysTmpl = `{{.License}}
|
|||||||
|
|
||||||
{{.DoNotEdit}}
|
{{.DoNotEdit}}
|
||||||
|
|
||||||
{{.BuildTag}}
|
{{.BuildConstraints}}
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
@ -594,7 +594,7 @@ const uiJSKeysTmpl = `{{.License}}
|
|||||||
|
|
||||||
{{.DoNotEdit}}
|
{{.DoNotEdit}}
|
||||||
|
|
||||||
{{.BuildTag}}
|
{{.BuildConstraints}}
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ const glfwKeysTmpl = `{{.License}}
|
|||||||
|
|
||||||
{{.DoNotEdit}}
|
{{.DoNotEdit}}
|
||||||
|
|
||||||
{{.BuildTag}}
|
{{.BuildConstraints}}
|
||||||
|
|
||||||
package glfw
|
package glfw
|
||||||
|
|
||||||
@ -626,7 +626,7 @@ const mobileAndroidKeysTmpl = `{{.License}}
|
|||||||
|
|
||||||
{{.DoNotEdit}}
|
{{.DoNotEdit}}
|
||||||
|
|
||||||
{{.BuildTag}}
|
{{.BuildConstraints}}
|
||||||
|
|
||||||
package ebitenmobileview
|
package ebitenmobileview
|
||||||
|
|
||||||
@ -644,7 +644,7 @@ const mobileIOSKeysTmpl = `{{.License}}
|
|||||||
|
|
||||||
{{.DoNotEdit}}
|
{{.DoNotEdit}}
|
||||||
|
|
||||||
{{.BuildTag}}
|
{{.BuildConstraints}}
|
||||||
|
|
||||||
package ebitenmobileview
|
package ebitenmobileview
|
||||||
|
|
||||||
@ -799,20 +799,20 @@ func main() {
|
|||||||
|
|
||||||
// The build tag can't be included in the templates because of `go vet`.
|
// The build tag can't be included in the templates because of `go vet`.
|
||||||
// Pass the build tag and extract this in the template to make `go vet` happy.
|
// Pass the build tag and extract this in the template to make `go vet` happy.
|
||||||
buildTag := ""
|
buildConstraints := ""
|
||||||
switch path {
|
switch path {
|
||||||
case filepath.Join("internal", "glfw", "keys.go"):
|
case filepath.Join("internal", "glfw", "keys.go"):
|
||||||
buildTag = "//go:build darwin || freebsd || linux || netbsd || openbsd || windows"
|
buildConstraints = "//go:build darwin || freebsd || linux || netbsd || openbsd || windows"
|
||||||
case filepath.Join("internal", "ui", "keys_mobile.go"):
|
case filepath.Join("internal", "ui", "keys_mobile.go"):
|
||||||
buildTag = "//go:build android || ios"
|
buildConstraints = "//go:build android || ios"
|
||||||
case filepath.Join("internal", "ui", "keys_glfw.go"):
|
case filepath.Join("internal", "ui", "keys_glfw.go"):
|
||||||
buildTag = "//go:build !android && !ios && !js && !nintendosdk && !playstation5"
|
buildConstraints = "//go:build !android && !ios && !js && !nintendosdk && !playstation5"
|
||||||
}
|
}
|
||||||
// NOTE: According to godoc, maps are automatically sorted by key.
|
// NOTE: According to godoc, maps are automatically sorted by key.
|
||||||
if err := tmpl.Execute(f, struct {
|
if err := tmpl.Execute(f, struct {
|
||||||
License string
|
License string
|
||||||
DoNotEdit string
|
DoNotEdit string
|
||||||
BuildTag string
|
BuildConstraints string
|
||||||
UIKeyNameToJSCode map[string]string
|
UIKeyNameToJSCode map[string]string
|
||||||
EbitengineKeyNames []string
|
EbitengineKeyNames []string
|
||||||
EbitengineKeyNamesWithoutOld []string
|
EbitengineKeyNamesWithoutOld []string
|
||||||
@ -826,7 +826,7 @@ func main() {
|
|||||||
}{
|
}{
|
||||||
License: license,
|
License: license,
|
||||||
DoNotEdit: doNotEdit,
|
DoNotEdit: doNotEdit,
|
||||||
BuildTag: buildTag,
|
BuildConstraints: buildConstraints,
|
||||||
UIKeyNameToJSCode: uiKeyNameToJSCode,
|
UIKeyNameToJSCode: uiKeyNameToJSCode,
|
||||||
EbitengineKeyNames: ebitengineKeyNames,
|
EbitengineKeyNames: ebitengineKeyNames,
|
||||||
EbitengineKeyNamesWithoutOld: ebitengineKeyNamesWithoutOld,
|
EbitengineKeyNamesWithoutOld: ebitengineKeyNamesWithoutOld,
|
||||||
|
Loading…
Reference in New Issue
Block a user