mirror of
				https://github.com/tailscale/tailscale.git
				synced 2025-10-31 08:11:32 +01:00 
			
		
		
		
	On Windows arm64 we are going to need to ship two different GUI builds; one for Win10 (GOARCH=386) and one for Win11 (GOARCH=amd64, tags += winui). Due to quirks in MSI packaging, they cannot both share the same filename. This requires some fixes in places where we have hardcoded "tailscale-ipn" as the GUI filename. We also do some cleanup in clientupdate to ensure that autoupdates will continue to work correctly with the temporary "-winui" package variant. Fixes #17480 Updates https://github.com/tailscale/corp/issues/29940 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			700 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			700 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright (c) Tailscale Inc & AUTHORS
 | |
| // SPDX-License-Identifier: BSD-3-Clause
 | |
| 
 | |
| package version
 | |
| 
 | |
| import (
 | |
| 	"path/filepath"
 | |
| 	"strings"
 | |
| )
 | |
| 
 | |
| // prepExeNameForCmp strips any extension and arch suffix from exe, and
 | |
| // lowercases it.
 | |
| func prepExeNameForCmp(exe, arch string) string {
 | |
| 	baseNoExt := strings.ToLower(strings.TrimSuffix(filepath.Base(exe), filepath.Ext(exe)))
 | |
| 	archSuffix := "-" + arch
 | |
| 	return strings.TrimSuffix(baseNoExt, archSuffix)
 | |
| }
 | |
| 
 | |
| func checkPreppedExeNameForGUI(preppedExeName string) bool {
 | |
| 	return preppedExeName == "tailscale-ipn" || preppedExeName == "tailscale-gui"
 | |
| }
 | |
| 
 | |
| func isGUIExeName(exe, arch string) bool {
 | |
| 	return checkPreppedExeNameForGUI(prepExeNameForCmp(exe, arch))
 | |
| }
 |