github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/common/platform/windows.go (about)

     1  // +build windows
     2  
     3  package platform
     4  
     5  import "path/filepath"
     6  
     7  func ExpandEnv(s string) string {
     8  	// TODO
     9  	return s
    10  }
    11  
    12  func LineSeparator() string {
    13  	return "\r\n"
    14  }
    15  
    16  func GetToolLocation(file string) string {
    17  	const name = "v2ray.location.tool"
    18  	toolPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir)
    19  	return filepath.Join(toolPath, file+".exe")
    20  }
    21  
    22  // GetAssetLocation search for `file` in the excutable dir
    23  func GetAssetLocation(file string) string {
    24  	const name = "v2ray.location.asset"
    25  	assetPath := NewEnvFlag(name).GetValue(getExecutableDir)
    26  	return filepath.Join(assetPath, file)
    27  }