mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-20 02:42:50 +01:00
add lib of DBUS
This commit is contained in:
@@ -7,9 +7,32 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/cuu/gogame/display"
|
||||
|
||||
|
||||
"../../sysgo"
|
||||
)
|
||||
|
||||
func SkinMap(orig_file_or_dir string) string {
|
||||
DefaultSkin := "default"
|
||||
ret := ""
|
||||
if strings.HasPrefix(orig_file_or_dir, "..") {
|
||||
ret = strings.Replace(orig_file_or_dir,"..","../skin/"+sysgo.SKIN,-1)
|
||||
if FileExists(ret) == false {
|
||||
ret = strings.Replace(orig_file_or_dir,"..", "../skin/"+DefaultSkin)
|
||||
}
|
||||
}else {
|
||||
ret = "../skin/"+sysgo.SKIN+"/sysgo/"+orig_file_or_dir
|
||||
if FileExists(ret) == false {
|
||||
ret = "../skin/"+DefaultSkin+"/sysgo/"+orig_file_or_dir
|
||||
}
|
||||
}
|
||||
|
||||
if FileExists(ret) {
|
||||
return ret
|
||||
}else { // if not existed both in default or custom skin ,return where it is
|
||||
return orig_file_or_dir
|
||||
}
|
||||
}
|
||||
|
||||
func CmdClean(cmdpath string) string {
|
||||
spchars := "\\`$();|{}&'\"*?<>[]!^~-#\n\r "
|
||||
for _,v:= range spchars {
|
||||
|
||||
Reference in New Issue
Block a user