2019-09-06 11:43:14 -04:00
|
|
|
//+build !darwin
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"golang.org/x/image/font/gofont/goregular"
|
|
|
|
"golang.org/x/image/font/sfnt"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2019-09-19 17:28:15 -04:00
|
|
|
log(Info, "Android start")
|
2019-09-10 11:31:57 -04:00
|
|
|
var err error
|
2019-09-06 11:43:14 -04:00
|
|
|
regular, err = sfnt.Parse(goregular.TTF)
|
|
|
|
if err != nil {
|
|
|
|
log(Fatal, "Cannot parse default font: ", err)
|
|
|
|
}
|
2019-09-19 17:28:15 -04:00
|
|
|
confDir = app.DataDir()
|
2019-09-06 11:43:14 -04:00
|
|
|
if _, err := os.Stat(confDir); os.IsNotExist(err) {
|
|
|
|
err = os.MkdirAll(confDir, 0700)
|
|
|
|
if err != nil {
|
|
|
|
log(Info, "Cannot create configuration directory ", confDir)
|
|
|
|
log(Fatal, err)
|
|
|
|
} else {
|
|
|
|
log(Info, "Configuration directory created")
|
|
|
|
}
|
2019-09-19 17:28:15 -04:00
|
|
|
} else {
|
|
|
|
log(Info, "Configuration directory found")
|
2019-09-06 11:43:14 -04:00
|
|
|
}
|
|
|
|
}
|