From 80aa5152526e7d9205f869524ed4737f01b182a6 Mon Sep 17 00:00:00 2001 From: Lennon Day-Reynolds Date: Tue, 5 Mar 2024 11:09:33 -0800 Subject: [PATCH 1/2] fix include + link paths for ARM64 --- windows/ZeroTierOne/ZeroTierOne.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index 37f7916124..6215adbfe1 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -623,7 +623,7 @@ false true true - $(SolutionDir)\..\ext;$(SolutionDir)\..\rustybits\target;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\ext;$(SolutionDir)\..\ext\prometheus-cpp-lite-1.0\core\include;$(SolutionDir)\..\ext\prometheus-cpp-lite-1.0\simpleapi\include;$(SolutionDir)\..\rustybits\target;%(AdditionalIncludeDirectories) ZT_SSO_ENABLED=1;ZT_EXPORT;FD_SETSIZE=1024;STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="apply";ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;WIN32;NOMINMAX;ZT_BUILD_PLATFORM=2;ZT_BUILD_ARCHITECTURE=2;%(PreprocessorDefinitions) MultiThreaded NotSet @@ -651,7 +651,7 @@ true wbemuuid.lib;wsock32.lib;ws2_32.lib;Iphlpapi.lib;Rpcrt4.lib;zeroidc.lib;bcrypt.lib;userenv.lib;crypt32.lib;secur32.lib;ncrypt.lib;ntdll.lib;%(AdditionalDependencies) false - $(SolutionDir)..\rustybits\target\x86_64-pc-windows-msvc\release\;%(AdditionalLibraryDirectories) + $(SolutionDir)..\rustybits\target\aarch64-pc-windows-msvc\release\;%(AdditionalLibraryDirectories) From 8e0bb74d9188d07b536962cd8cd553be7fd488fe Mon Sep 17 00:00:00 2001 From: Lennon Day-Reynolds Date: Tue, 5 Mar 2024 11:42:00 -0800 Subject: [PATCH 2/2] add Debug target fixes + README examples to run a custom binary --- windows/README.md | 26 +++++++++++++++++++++++++ windows/ZeroTierOne/ZeroTierOne.vcxproj | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/windows/README.md b/windows/README.md index 9f3f48bb66..16bfde0d1c 100644 --- a/windows/README.md +++ b/windows/README.md @@ -1,3 +1,29 @@ This folder contains the Windows driver code, Windows-specific service code, and the Microsoft Visual Studio projects and "solution" for doing Windows builds. This code may also build with MinGW but this hasn't been tested. + +## Building + +``` +MSBuild ZeroTierOne.sln /property:Configuration=Release /property:Platform=ARM64 +``` + +(substitute e.g. `Debug`, `x64`, etc. as needed above, or use Visual Studio to select a target) + +## Testing + +PowerShell admin session #1 inside `\windows\Build\\`: + +``` +PS C:\Users\\ZeroTierOne\windows\Build\ARM64\Release> .\zerotier-one_arm64.exe -p9994 -C C:\\ +Starting Control Plane... +Starting V6 Control Plane... +``` + +Session #2: +``` +PS C:\Users\\ZeroTierOne\windows\Build\ARM64\Release> zerotier-cli.bat -p9994 -D"\Users\rcode\scratch\zt1_home\" info +info c3e46fa070 1.12.2 ONLINE +PS C:\Users\\code\ZeroTierOne\windows\Build\ARM64\Release> zerotier-cli.bat -p9994 -D"\Users\\scratch\zt1_home\" join ebe7fbd4458bde97 +200 join OK PS C:\Users\\code\ZeroTierOne\windows\Build\ARM64\Release> +``` diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index 6215adbfe1..5e3874a37b 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -480,7 +480,7 @@ Level3 Disabled true - $(SolutionDir)\..\ext;$(SolutionDir)\..\rustybits\target;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\ext;$(SolutionDir)\..\ext\prometheus-cpp-lite-1.0\core\include;$(SolutionDir)\..\ext\prometheus-cpp-lite-1.0\simpleapi\include;$(SolutionDir)\..\rustybits\target;%(AdditionalIncludeDirectories) ZT_EXPORT;FD_SETSIZE=1024;NOMINMAX;STATICLIB;WIN32;ZT_TRACE;ZT_RULES_ENGINE_DEBUGGING;ZT_USE_MINIUPNPC;MINIUPNP_STATICLIB;ZT_SOFTWARE_UPDATE_DEFAULT="disable";%(PreprocessorDefinitions) true 4996 @@ -495,7 +495,7 @@ wbemuuid.lib;wsock32.lib;ws2_32.lib;Iphlpapi.lib;Rpcrt4.lib;zeroidc.lib;bcrypt.lib;userenv.lib;crypt32.lib;secur32.lib;ncrypt.lib;ntdll.lib;%(AdditionalDependencies) false "notelemetry.obj" %(AdditionalOptions) - $(SolutionDir)..\rustybits\target\x86_64-pc-windows-msvc\debug\;%(AdditionalLibraryDirectories) + $(SolutionDir)..\rustybits\target\aarch64-pc-windows-msvc\debug\;%(AdditionalLibraryDirectories)