From 72cf3f2315da61c5f2adb9d5cf1730765c27faad Mon Sep 17 00:00:00 2001 From: Lennon Day-Reynolds Date: Tue, 5 Mar 2024 11:42:00 -0800 Subject: [PATCH] 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 9f3f48bb6..16bfde0d1 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 6215adbfe..5e3874a37 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)