cmd/ebitenmobile: bug fix: wrong path was used

Updates #2937
This commit is contained in:
Hajime Hoshi 2024-03-27 12:30:08 +09:00
parent 0ab4538fa1
commit 25a814d561

View File

@ -251,7 +251,7 @@ func doBind(args []string, flagset *flag.FlagSet, buildOS string) error {
// TODO: strings.Title is used here for the consistency with gomobile (see cmd/gomobile/bind_iosapp.go). // TODO: strings.Title is used here for the consistency with gomobile (see cmd/gomobile/bind_iosapp.go).
// As strings.Title is deprecated, golang.org/x/text/cases should be used. // As strings.Title is deprecated, golang.org/x/text/cases should be used.
frameworkNameBase = strings.Title(frameworkNameBase) frameworkNameBase = strings.Title(frameworkNameBase)
dir := filepath.Join(buildO, name, frameworkNameBase+".framework", "Versions", "A") dir := filepath.Join(buildO, name, frameworkNameBase+".framework")
if err := os.WriteFile(filepath.Join(dir, "Headers", prefixUpper+"EbitenViewController.h"), []byte(replacePrefixes(objcH)), 0644); err != nil { if err := os.WriteFile(filepath.Join(dir, "Headers", prefixUpper+"EbitenViewController.h"), []byte(replacePrefixes(objcH)), 0644); err != nil {
return err return err