Self-install into canonical layout on both platforms, --no-copy to opt out
Windows: --install-service creates %ProgramFiles%\gpu-turnstile and %ProgramData%\gpu-turnstile, copies the exe and (if absent) the env file in, and registers the copy. Linux: binary goes to /var/lib/gpu-turnstile (not /usr/local/sbin: replacing a running binary needs directory write, which must not be granted on a shared system dir to a sandboxed service). --no-copy registers the current location as-is on both platforms.
This commit is contained in:
@@ -28,8 +28,8 @@ func Run(run func(ctx context.Context) error) error {
|
||||
return run(ctx)
|
||||
}
|
||||
|
||||
// Install is unsupported on non-Windows platforms.
|
||||
func Install(string) error { return errUnsupported }
|
||||
// Install is unsupported on non-Windows, non-Linux platforms.
|
||||
func Install(string, bool) error { return errUnsupported }
|
||||
|
||||
// Remove is unsupported on non-Windows platforms.
|
||||
func Remove() error { return errUnsupported }
|
||||
|
||||
Reference in New Issue
Block a user