2021-09-20 21:00:55 +08:00
|
|
|
//go:build windows
|
2020-11-25 19:01:53 +08:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package platform
|
|
|
|
|
|
|
|
import "path/filepath"
|
|
|
|
|
|
|
|
func ExpandEnv(s string) string {
|
|
|
|
// TODO
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
func LineSeparator() string {
|
|
|
|
return "\r\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetToolLocation(file string) string {
|
2023-10-28 18:21:57 -04:00
|
|
|
toolPath := NewEnvFlag(ToolLocation).GetValue(getExecutableDir)
|
2020-11-25 19:01:53 +08:00
|
|
|
return filepath.Join(toolPath, file+".exe")
|
|
|
|
}
|
|
|
|
|
2025-03-24 16:26:48 +03:30
|
|
|
// GetAssetLocation searches for `file` in the env dir and the executable dir
|
2020-11-25 19:01:53 +08:00
|
|
|
func GetAssetLocation(file string) string {
|
2023-10-28 18:21:57 -04:00
|
|
|
assetPath := NewEnvFlag(AssetLocation).GetValue(getExecutableDir)
|
2020-11-25 19:01:53 +08:00
|
|
|
return filepath.Join(assetPath, file)
|
|
|
|
}
|
2025-03-24 16:26:48 +03:30
|
|
|
|
|
|
|
// GetCertLocation searches for `file` in the env dir and the executable dir
|
|
|
|
func GetCertLocation(file string) string {
|
|
|
|
certPath := NewEnvFlag(CertLocation).GetValue(getExecutableDir)
|
|
|
|
return filepath.Join(certPath, file)
|
|
|
|
}
|