mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
cmd/ebitenmobile: Enable to specify a local gomobile
This commit is contained in:
parent
f4fff5439e
commit
5ec3113aa2
@ -106,6 +106,14 @@ func prepareGomobileCommands() error {
|
||||
if err := runGo("get", "golang.org/x/mobile@"+gomobileHash); err != nil {
|
||||
return err
|
||||
}
|
||||
if localgm := os.Getenv("EBITENMOBILE_GOMOBILE"); localgm != "" {
|
||||
if !filepath.IsAbs(localgm) {
|
||||
localgm = filepath.Join(pwd, localgm)
|
||||
}
|
||||
if err := runGo("mod", "edit", "-replace=golang.org/x/mobile="+localgm); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := runGo("build", "-o", exe(filepath.Join("bin", "gomobile")), "golang.org/x/mobile/cmd/gomobile"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -12,6 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// ebitenmobile is a wrapper of gomobile for Ebiten.
|
||||
//
|
||||
// For the usage, see https://ebiten.org/documents/mobile.html.
|
||||
//
|
||||
// gomobile's version is fixed by ebitenmobile.
|
||||
// You can specify gomobile's version by EBITENMOBILE_GOMOBILE environment variable.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
Loading…
Reference in New Issue
Block a user