Skip to content

All your computers and your phone/iPhone, working as one desk. Screens, apps, files, clipboard, calls, texts, notifications, mouse and keyboard, shared between Mac, Windows, Linux , Android, Web and ios / ipados . Free and open source. No account, no cloud, and no shared network needed.

1.6 KB
Raw Blame
@echo off
rem TwinDesk — Copyright (C) 2026 inukaasith. GPL-3.0, see LICENSE.
rem The Full KVM build only (docs/full-kvm.md): bin\twindesk-fullkvm.exe, the service and its setup
rem (service\*.cs), with the .NET Framework C# compiler (C# 5 only), as windows-helper\build.cmd.
rem windows-helper\build.cmd calls this when TWINDESK_EDITION=full-kvm.
setlocal
set CSC=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\csc.exe
set BIN=%~dp0bin
if not exist "%BIN%" mkdir "%BIN%"
"%CSC%" /nologo /optimize+ /platform:anycpu /target:exe /out:"%BIN%\twindesk-fullkvm.exe" ^
  /r:System.ServiceProcess.dll /r:System.Web.Extensions.dll /r:System.Core.dll "%~dp0service\*.cs" || exit /b 1
rem Biometric unlock's credential provider (unlock\TwinDeskUnlock.cpp): bin\TwinDeskUnlock.dll, with the Visual C++
rem compiler (found through vswhere). Without it the build goes on and Biometric unlock isn't offered on Windows.
set VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
if not exist "%VSWHERE%" (echo note: no Visual Studio, no TwinDeskUnlock.dll & exit /b 0)
for /f "usebackq delims=" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VSDIR=%%i
if not defined VSDIR (echo note: no Visual C++, no TwinDeskUnlock.dll & exit /b 0)
call "%VSDIR%\VC\Auxiliary\Build\vcvars64.bat" >nul || exit /b 1
cl /nologo /LD /O2 /EHsc /std:c++17 /W3 /DUNICODE /D_UNICODE /Fo"%BIN%\\" "%~dp0unlock\TwinDeskUnlock.cpp" /Fe"%BIN%\TwinDeskUnlock.dll" /link /DEF:"%~dp0unlock\TwinDeskUnlock.def" || exit /b 1
del "%BIN%\TwinDeskUnlock.lib" "%BIN%\TwinDeskUnlock.exp" "%BIN%\TwinDeskUnlock.obj" 2>nul