From 4eca8d3dae13fc8388db02311a14bb941fc35e31 Mon Sep 17 00:00:00 2001 From: atavism Date: Tue, 17 Mar 2026 05:21:49 -0700 Subject: [PATCH 1/3] Add support for windows arm64 --- Makefile | 120 +++++++++++++++++++-------- windows/packaging/exe/inno_setup.iss | 22 ++++- 2 files changed, 104 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index 3a055b2376..8958d898d5 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,11 @@ endif WINDOWS_SERVICE_NAME := lanternsvc.exe WINDOWS_SERVICE_SRC := ./$(LANTERN_CORE)/cmd/lanternsvc -WINDOWS_SERVICE_BUILD := $(BIN_DIR)/windows-amd64/$(WINDOWS_SERVICE_NAME) +WINDOWS_SERVICE_BUILD_AMD64 := $(BIN_DIR)/windows-amd64/$(WINDOWS_SERVICE_NAME) +WINDOWS_SERVICE_BUILD_ARM64 := $(BIN_DIR)/windows-arm64/$(WINDOWS_SERVICE_NAME) +WINDOWS_SERVICE_BUILD := $(WINDOWS_SERVICE_BUILD_AMD64) +WINDOWS_SERVICE_BUILD_ARM64_RELEASE = $(WINDOWS_RELEASE_DIR)/arm64/$(WINDOWS_SERVICE_NAME) +WINDOWS_SERVICE_CGO_ENABLED ?= 0 WINDOWS_LIB := $(LANTERN_LIB_NAME).dll WINDOWS_LIB_AMD64 := $(BIN_DIR)/windows-amd64/$(WINDOWS_LIB) @@ -73,13 +77,16 @@ WINDOWS_LIB_ARM64 := $(BIN_DIR)/windows-arm64/$(WINDOWS_LIB) WINDOWS_LIB_BUILD := $(BIN_DIR)/windows/$(WINDOWS_LIB) WINDOWS_DEBUG_DIR := $(BUILD_DIR)/windows/x64/runner/Debug WINDOWS_RELEASE_DIR := $(BUILD_DIR)/windows/x64/runner/Release -WINTUN_ARCH ?= amd64 WINTUN_VERSION ?= 0.14.1 WINTUN_BASE_URL := https://wwW.wintun.net WINTUN_BUILDS_URL := $(WINTUN_BASE_URL)/builds -WINTUN_OUT_DIR ?= windows/third_party/wintun/bin/$(WINTUN_ARCH) -WINTUN_DLL := $(WINTUN_OUT_DIR)/wintun.dll +WINTUN_OUT_DIR_AMD64 := windows/third_party/wintun/bin/amd64 +WINTUN_OUT_DIR_ARM64 := windows/third_party/wintun/bin/arm64 +WINTUN_DLL_AMD64 := $(WINTUN_OUT_DIR_AMD64)/wintun.dll +WINTUN_DLL_ARM64 := $(WINTUN_OUT_DIR_ARM64)/wintun.dll +WINTUN_DLL := $(WINTUN_DLL_AMD64) WINTUN_DLL_RELEASE := $(WINDOWS_RELEASE_DIR)/wintun.dll +WINTUN_DLL_RELEASE_ARM64 := $(WINDOWS_RELEASE_DIR)/arm64/wintun.dll WINTUN_DLL_DEBUG := $(WINDOWS_DEBUG_DIR)/wintun.dll @@ -330,9 +337,11 @@ verify-linux-package: ./scripts/ci/verify_linux_package.sh $(LINUX_INSTALLER_DEB) # Windows Build -.PHONY: build-lanternsvc-windows windows-service-build \ - copy-lanternsvc-release copy-lanternsvc-debug \ - wintun clean-wintun copy-wintun-release copy-wintun-debug +.PHONY: build-lanternsvc-windows build-lanternsvc-windows-arm64 \ + windows-service-build windows-service-build-amd64 windows-service-build-arm64 \ + copy-lanternsvc-release copy-lanternsvc-release-arm64 copy-lanternsvc-debug \ + wintun wintun-amd64 wintun-arm64 clean-wintun \ + copy-wintun-release copy-wintun-release-arm64 copy-wintun-debug .PHONY: install-windows-deps install-windows-deps: @@ -354,57 +363,100 @@ windows-arm64: $(MAKE) desktop-lib GOOS=$(WINDOWS_GOOS) GOARCH=$(WINDOWS_GOARCH) LIB_NAME=$(WINDOWS_LIB_ARM64) CGO_LDFLAGS="$(WINDOWS_CGO_LDFLAGS)" .PHONY: build-lanternsvc-windows -build-lanternsvc-windows: $(WINDOWS_SERVICE_BUILD) +build-lanternsvc-windows: $(WINDOWS_SERVICE_BUILD_AMD64) -$(WINDOWS_SERVICE_BUILD): windows-service-build +.PHONY: build-lanternsvc-windows-arm64 +build-lanternsvc-windows-arm64: $(WINDOWS_SERVICE_BUILD_ARM64) -windows-service-build: - $(call MKDIR_P,$(dir $(WINDOWS_SERVICE_BUILD))) - CGO_LDFLAGS="$(WINDOWS_CGO_LDFLAGS)" go build -v -trimpath -tags "$(TAGS)" \ +windows-service-build: windows-service-build-amd64 + +windows-service-build-amd64: $(WINDOWS_SERVICE_BUILD_AMD64) + +windows-service-build-arm64: $(WINDOWS_SERVICE_BUILD_ARM64) + +$(WINDOWS_SERVICE_BUILD_AMD64): + $(call MKDIR_P,$(dir $(WINDOWS_SERVICE_BUILD_AMD64))) + GOOS=windows GOARCH=amd64 CGO_ENABLED=$(WINDOWS_SERVICE_CGO_ENABLED) go build -v -trimpath -tags "$(TAGS)" \ -ldflags "$(EXTRA_LDFLAGS)" \ - -o $(WINDOWS_SERVICE_BUILD) $(WINDOWS_SERVICE_SRC) - @echo "Built Windows service: $(WINDOWS_SERVICE_BUILD)" + -o $(WINDOWS_SERVICE_BUILD_AMD64) $(WINDOWS_SERVICE_SRC) + @echo "Built Windows service (amd64): $(WINDOWS_SERVICE_BUILD_AMD64)" -copy-lanternsvc-release: $(WINDOWS_SERVICE_BUILD) +$(WINDOWS_SERVICE_BUILD_ARM64): + $(call MKDIR_P,$(dir $(WINDOWS_SERVICE_BUILD_ARM64))) + GOOS=windows GOARCH=arm64 CGO_ENABLED=$(WINDOWS_SERVICE_CGO_ENABLED) go build -v -trimpath -tags "$(TAGS)" \ + -ldflags "$(EXTRA_LDFLAGS)" \ + -o $(WINDOWS_SERVICE_BUILD_ARM64) $(WINDOWS_SERVICE_SRC) + @echo "Built Windows service (arm64): $(WINDOWS_SERVICE_BUILD_ARM64)" + +copy-lanternsvc-release: $(WINDOWS_SERVICE_BUILD_AMD64) $(call MKDIR_P,$(WINDOWS_RELEASE_DIR)) - $(call COPY_FILE,$(WINDOWS_SERVICE_BUILD),$(WINDOWS_RELEASE_DIR)/$(WINDOWS_SERVICE_NAME)) + $(call COPY_FILE,$(WINDOWS_SERVICE_BUILD_AMD64),$(WINDOWS_RELEASE_DIR)/$(WINDOWS_SERVICE_NAME)) + +copy-lanternsvc-release-arm64: $(WINDOWS_SERVICE_BUILD_ARM64) + $(call MKDIR_P,$(dir $(WINDOWS_SERVICE_BUILD_ARM64_RELEASE))) + $(call COPY_FILE,$(WINDOWS_SERVICE_BUILD_ARM64),$(WINDOWS_SERVICE_BUILD_ARM64_RELEASE)) -copy-lanternsvc-debug: $(WINDOWS_SERVICE_BUILD) +copy-lanternsvc-debug: $(WINDOWS_SERVICE_BUILD_AMD64) $(call MKDIR_P,$(WINDOWS_DEBUG_DIR)) - $(call COPY_FILE,$(WINDOWS_SERVICE_BUILD),$(WINDOWS_DEBUG_DIR)/$(WINDOWS_SERVICE_NAME)) + $(call COPY_FILE,$(WINDOWS_SERVICE_BUILD_AMD64),$(WINDOWS_DEBUG_DIR)/$(WINDOWS_SERVICE_NAME)) + +wintun: wintun-amd64 -wintun: $(WINTUN_DLL) +wintun-amd64: $(WINTUN_DLL_AMD64) + +wintun-arm64: $(WINTUN_DLL_ARM64) clean-wintun: - @$(call RM_RF,$(WINTUN_OUT_DIR)) + @$(call RM_RF,$(WINTUN_OUT_DIR_AMD64)) + @$(call RM_RF,$(WINTUN_OUT_DIR_ARM64)) -$(WINTUN_DLL): - $(call MKDIR_P,$(WINTUN_OUT_DIR)) +$(WINTUN_DLL_AMD64): + $(call MKDIR_P,$(WINTUN_OUT_DIR_AMD64)) + @ver='$(WINTUN_VERSION)'; \ + zip='$(WINTUN_OUT_DIR_AMD64)/wintun-'$$ver'.zip'; \ + url='$(WINTUN_BUILDS_URL)/wintun-'$$ver'.zip'; \ + echo "Using Wintun $$ver"; \ + curl -fsSL -o "$$zip" "$$url"; \ + mkdir -p '$(WINTUN_OUT_DIR_AMD64)/_unz'; \ + tar -xf "$$zip" -C "$(WINTUN_OUT_DIR_AMD64)/_unz" "wintun/bin/amd64/wintun.dll" \ + || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR_AMD64)/_unz'"; \ + cp -f "$(WINTUN_OUT_DIR_AMD64)/_unz/wintun/bin/amd64/wintun.dll" "$(WINTUN_DLL_AMD64)"; \ + rm -rf "$(WINTUN_OUT_DIR_AMD64)/_unz"; \ + echo "Installed: $(WINTUN_DLL_AMD64)"; + +$(WINTUN_DLL_ARM64): + $(call MKDIR_P,$(WINTUN_OUT_DIR_ARM64)) @ver='$(WINTUN_VERSION)'; \ - zip='$(WINTUN_OUT_DIR)/wintun-'$$ver'.zip'; \ + zip='$(WINTUN_OUT_DIR_ARM64)/wintun-'$$ver'.zip'; \ url='$(WINTUN_BUILDS_URL)/wintun-'$$ver'.zip'; \ echo "Using Wintun $$ver"; \ curl -fsSL -o "$$zip" "$$url"; \ - mkdir -p '$(WINTUN_OUT_DIR)/_unz'; \ - tar -xf "$$zip" -C "$(WINTUN_OUT_DIR)/_unz" "wintun/bin/$(WINTUN_ARCH)/wintun.dll" \ - || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR)/_unz'"; \ - cp -f "$(WINTUN_OUT_DIR)/_unz/wintun/bin/$(WINTUN_ARCH)/wintun.dll" "$(WINTUN_DLL)"; \ - rm -rf "$(WINTUN_OUT_DIR)/_unz"; \ - echo "Installed: $(WINTUN_DLL)"; + mkdir -p '$(WINTUN_OUT_DIR_ARM64)/_unz'; \ + tar -xf "$$zip" -C "$(WINTUN_OUT_DIR_ARM64)/_unz" "wintun/bin/arm64/wintun.dll" \ + || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR_ARM64)/_unz'"; \ + cp -f "$(WINTUN_OUT_DIR_ARM64)/_unz/wintun/bin/arm64/wintun.dll" "$(WINTUN_DLL_ARM64)"; \ + rm -rf "$(WINTUN_OUT_DIR_ARM64)/_unz"; \ + echo "Installed: $(WINTUN_DLL_ARM64)"; .PHONY: copy-wintun-release copy-wintun-debug -copy-wintun-release: $(WINTUN_DLL) +copy-wintun-release: $(WINTUN_DLL_AMD64) $(call MKDIR_P,$(WINDOWS_RELEASE_DIR)) - $(call COPY_FILE,$(WINTUN_DLL),$(WINTUN_DLL_RELEASE)) + $(call COPY_FILE,$(WINTUN_DLL_AMD64),$(WINTUN_DLL_RELEASE)) + +copy-wintun-release-arm64: $(WINTUN_DLL_ARM64) + $(call MKDIR_P,$(dir $(WINTUN_DLL_RELEASE_ARM64))) + $(call COPY_FILE,$(WINTUN_DLL_ARM64),$(WINTUN_DLL_RELEASE_ARM64)) -copy-wintun-debug: $(WINTUN_DLL) +copy-wintun-debug: $(WINTUN_DLL_AMD64) $(call MKDIR_P,$(WINDOWS_DEBUG_DIR)) - $(call COPY_FILE,$(WINTUN_DLL),$(WINTUN_DLL_DEBUG)) + $(call COPY_FILE,$(WINTUN_DLL_AMD64),$(WINTUN_DLL_DEBUG)) .PHONY: prepare-windows-release -prepare-windows-release: build-lanternsvc-windows wintun +prepare-windows-release: build-lanternsvc-windows build-lanternsvc-windows-arm64 wintun-amd64 wintun-arm64 $(MAKE) copy-lanternsvc-release + $(MAKE) copy-lanternsvc-release-arm64 $(MAKE) copy-wintun-release + $(MAKE) copy-wintun-release-arm64 .PHONY: windows-debug windows-debug: windows diff --git a/windows/packaging/exe/inno_setup.iss b/windows/packaging/exe/inno_setup.iss index 6540da7c1b..d493b9b204 100644 --- a/windows/packaging/exe/inno_setup.iss +++ b/windows/packaging/exe/inno_setup.iss @@ -265,8 +265,8 @@ SolidCompression=yes WizardStyle=modern PrivilegesRequired=admin PrivilegesRequiredOverridesAllowed=dialog -ArchitecturesAllowed=x64 -ArchitecturesInstallIn64BitMode=x64 +ArchitecturesAllowed=x64 arm64 +ArchitecturesInstallIn64BitMode=x64 arm64 SetupLogging=yes UninstallLogging=yes @@ -297,7 +297,7 @@ Filename: "{sys}\sc.exe"; Parameters: "delete ""{#SvcName}"""; Flags: runhidden ; Create service Filename: "{sys}\sc.exe"; \ - Parameters: "create ""{#SvcName}"" binPath= ""{app}\lanternsvc.exe"" start= delayed-auto DisplayName= ""{#SvcDisplayName}"""; \ + Parameters: "create ""{#SvcName}"" binPath= ""{code:ServiceExecutablePath}"" start= delayed-auto DisplayName= ""{#SvcDisplayName}"""; \ Flags: runhidden Filename: "{sys}\sc.exe"; Parameters: "failure ""{#SvcName}"" reset= 60 actions= restart/5000/restart/5000/""""/5000"; Flags: runhidden Filename: "{sys}\sc.exe"; Parameters: "failureflag ""{#SvcName}"" 1"; Flags: runhidden @@ -318,9 +318,23 @@ Filename: "{sys}\sc.exe"; Parameters: "delete ""{#SvcName}"""; Flags: runhidden Type: filesandordirs; Name: "{#ProgramDataDir}" [Code] +function IsWindowsArm64: Boolean; +begin + Result := (Pos('ARM64', UpperCase(GetEnv('PROCESSOR_ARCHITECTURE'))) > 0) or + (Pos('ARM64', UpperCase(GetEnv('PROCESSOR_ARCHITEW6432'))) > 0); +end; + +function ServiceExecutablePath(Param: String): String; +begin + if IsWindowsArm64 then + Result := ExpandConstant('{app}\arm64\lanternsvc.exe') + else + Result := ExpandConstant('{app}\lanternsvc.exe'); +end; + function InitializeSetup: Boolean; begin Dependency_AddWebView2; Dependency_AddVC2015To2022; Result := True; -end; \ No newline at end of file +end; From 29567ae9ac982af9b42b9c253889c65eabb09f45 Mon Sep 17 00:00:00 2001 From: atavism Date: Wed, 18 Mar 2026 14:34:53 -0700 Subject: [PATCH 2/3] Use Inno ARM64 detection for Windows service path --- windows/packaging/exe/inno_setup.iss | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/windows/packaging/exe/inno_setup.iss b/windows/packaging/exe/inno_setup.iss index d493b9b204..26c2799cfa 100644 --- a/windows/packaging/exe/inno_setup.iss +++ b/windows/packaging/exe/inno_setup.iss @@ -265,8 +265,8 @@ SolidCompression=yes WizardStyle=modern PrivilegesRequired=admin PrivilegesRequiredOverridesAllowed=dialog -ArchitecturesAllowed=x64 arm64 -ArchitecturesInstallIn64BitMode=x64 arm64 +ArchitecturesAllowed=x64compatible arm64 +ArchitecturesInstallIn64BitMode=x64compatible arm64 SetupLogging=yes UninstallLogging=yes @@ -318,16 +318,13 @@ Filename: "{sys}\sc.exe"; Parameters: "delete ""{#SvcName}"""; Flags: runhidden Type: filesandordirs; Name: "{#ProgramDataDir}" [Code] -function IsWindowsArm64: Boolean; -begin - Result := (Pos('ARM64', UpperCase(GetEnv('PROCESSOR_ARCHITECTURE'))) > 0) or - (Pos('ARM64', UpperCase(GetEnv('PROCESSOR_ARCHITEW6432'))) > 0); -end; - function ServiceExecutablePath(Param: String): String; +var + Arm64ServicePath: String; begin - if IsWindowsArm64 then - Result := ExpandConstant('{app}\arm64\lanternsvc.exe') + Arm64ServicePath := ExpandConstant('{app}\arm64\lanternsvc.exe'); + if IsArm64 and FileExists(Arm64ServicePath) then + Result := Arm64ServicePath else Result := ExpandConstant('{app}\lanternsvc.exe'); end; From 44a79155d3f12b52abd6b6762e297b41afdbcaa6 Mon Sep 17 00:00:00 2001 From: atavism Date: Thu, 19 Mar 2026 15:03:12 -0700 Subject: [PATCH 3/3] code review updates --- Makefile | 22 +++++++++++----------- windows/packaging/exe/inno_setup.iss | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 35244aa924..7c8e994f8b 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,6 @@ WINDOWS_SERVICE_SRC := ./$(LANTERN_CORE)/cmd/lanternsvc WINDOWS_SERVICE_BUILD_AMD64 := $(BIN_DIR)/windows-amd64/$(WINDOWS_SERVICE_NAME) WINDOWS_SERVICE_BUILD_ARM64 := $(BIN_DIR)/windows-arm64/$(WINDOWS_SERVICE_NAME) WINDOWS_SERVICE_BUILD := $(WINDOWS_SERVICE_BUILD_AMD64) -WINDOWS_SERVICE_BUILD_ARM64_RELEASE = $(WINDOWS_RELEASE_DIR)/arm64/$(WINDOWS_SERVICE_NAME) WINDOWS_SERVICE_CGO_ENABLED ?= 0 WINDOWS_LIB := $(LANTERN_LIB_NAME).dll @@ -77,6 +76,7 @@ WINDOWS_LIB_ARM64 := $(BIN_DIR)/windows-arm64/$(WINDOWS_LIB) WINDOWS_LIB_BUILD := $(BIN_DIR)/windows/$(WINDOWS_LIB) WINDOWS_DEBUG_DIR := $(BUILD_DIR)/windows/x64/runner/Debug WINDOWS_RELEASE_DIR := $(BUILD_DIR)/windows/x64/runner/Release +WINDOWS_SERVICE_BUILD_ARM64_RELEASE := $(WINDOWS_RELEASE_DIR)/arm64/$(WINDOWS_SERVICE_NAME) WINTUN_VERSION ?= 0.14.1 WINTUN_BASE_URL := https://wwW.wintun.net WINTUN_BUILDS_URL := $(WINTUN_BASE_URL)/builds @@ -417,12 +417,12 @@ $(WINTUN_DLL_AMD64): url='$(WINTUN_BUILDS_URL)/wintun-'$$ver'.zip'; \ echo "Using Wintun $$ver"; \ curl -fsSL -o "$$zip" "$$url"; \ - mkdir -p '$(WINTUN_OUT_DIR_AMD64)/_unz'; \ + $(call MKDIR_P,$(WINTUN_OUT_DIR_AMD64)/_unz); \ tar -xf "$$zip" -C "$(WINTUN_OUT_DIR_AMD64)/_unz" "wintun/bin/amd64/wintun.dll" \ - || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR_AMD64)/_unz'"; \ - cp -f "$(WINTUN_OUT_DIR_AMD64)/_unz/wintun/bin/amd64/wintun.dll" "$(WINTUN_DLL_AMD64)"; \ - rm -rf "$(WINTUN_OUT_DIR_AMD64)/_unz"; \ - echo "Installed: $(WINTUN_DLL_AMD64)"; + || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR_AMD64)/_unz'"; + $(call COPY_FILE,$(WINTUN_OUT_DIR_AMD64)/_unz/wintun/bin/amd64/wintun.dll,$(WINTUN_DLL_AMD64)) + $(call RM_RF,$(WINTUN_OUT_DIR_AMD64)/_unz) + @echo "Installed: $(WINTUN_DLL_AMD64)"; $(WINTUN_DLL_ARM64): $(call MKDIR_P,$(WINTUN_OUT_DIR_ARM64)) @@ -431,12 +431,12 @@ $(WINTUN_DLL_ARM64): url='$(WINTUN_BUILDS_URL)/wintun-'$$ver'.zip'; \ echo "Using Wintun $$ver"; \ curl -fsSL -o "$$zip" "$$url"; \ - mkdir -p '$(WINTUN_OUT_DIR_ARM64)/_unz'; \ + $(call MKDIR_P,$(WINTUN_OUT_DIR_ARM64)/_unz); \ tar -xf "$$zip" -C "$(WINTUN_OUT_DIR_ARM64)/_unz" "wintun/bin/arm64/wintun.dll" \ - || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR_ARM64)/_unz'"; \ - cp -f "$(WINTUN_OUT_DIR_ARM64)/_unz/wintun/bin/arm64/wintun.dll" "$(WINTUN_DLL_ARM64)"; \ - rm -rf "$(WINTUN_OUT_DIR_ARM64)/_unz"; \ - echo "Installed: $(WINTUN_DLL_ARM64)"; + || powershell -NoProfile -Command "Expand-Archive -Force -LiteralPath '$$zip' -DestinationPath '$(WINTUN_OUT_DIR_ARM64)/_unz'"; + $(call COPY_FILE,$(WINTUN_OUT_DIR_ARM64)/_unz/wintun/bin/arm64/wintun.dll,$(WINTUN_DLL_ARM64)) + $(call RM_RF,$(WINTUN_OUT_DIR_ARM64)/_unz) + @echo "Installed: $(WINTUN_DLL_ARM64)"; .PHONY: copy-wintun-release copy-wintun-debug copy-wintun-release: $(WINTUN_DLL_AMD64) diff --git a/windows/packaging/exe/inno_setup.iss b/windows/packaging/exe/inno_setup.iss index 26c2799cfa..a9375480a5 100644 --- a/windows/packaging/exe/inno_setup.iss +++ b/windows/packaging/exe/inno_setup.iss @@ -318,7 +318,7 @@ Filename: "{sys}\sc.exe"; Parameters: "delete ""{#SvcName}"""; Flags: runhidden Type: filesandordirs; Name: "{#ProgramDataDir}" [Code] -function ServiceExecutablePath(Param: String): String; +function ServiceExecutablePath(_Param: String): String; var Arm64ServicePath: String; begin