mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
cmd/ebitenmobile: bug fix: the first character of a framework name must be an upper case
Updates #2192
This commit is contained in:
parent
7fdbb4a5d5
commit
4ba0ab6e3a
@ -237,8 +237,12 @@ func doBind(args []string, flagset *flag.FlagSet, buildOS string) error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
frameworkName := filepath.Base(buildO)
|
frameworkName := filepath.Base(buildO)
|
||||||
frameworkName = frameworkName[:len(frameworkName)-len(".xcframework")] + ".framework"
|
frameworkNameBase := frameworkName[:len(frameworkName)-len(".xcframework")]
|
||||||
dir := filepath.Join(buildO, name, frameworkName, "Versions", "A")
|
// The first character must be an upper case (#2192).
|
||||||
|
// 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.
|
||||||
|
frameworkNameBase = strings.Title(frameworkNameBase)
|
||||||
|
dir := filepath.Join(buildO, name, frameworkNameBase+".framework", "Versions", "A")
|
||||||
|
|
||||||
if err := ioutil.WriteFile(filepath.Join(dir, "Headers", prefixUpper+"EbitenViewController.h"), []byte(replacePrefixes(objcH)), 0644); err != nil {
|
if err := ioutil.WriteFile(filepath.Join(dir, "Headers", prefixUpper+"EbitenViewController.h"), []byte(replacePrefixes(objcH)), 0644); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user