From a598f0ee03d85fa7a58f3fb16de9b7560fce52b9 Mon Sep 17 00:00:00 2001 From: Mykola Khyliuk Date: Mon, 12 Sep 2022 01:05:40 +0200 Subject: [PATCH] Implement build-portable-windows.bat --- tools/build-portable-windows.bat | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/build-portable-windows.bat b/tools/build-portable-windows.bat index e69de29..cec6a0b 100644 --- a/tools/build-portable-windows.bat +++ b/tools/build-portable-windows.bat @@ -0,0 +1,26 @@ +@echo off + +SET DIR=%~dp0 +cd %DIR\.. +SET PROJECT_ROOT=%cd% +SET PORTABLE_DIR_REL_PATH="build\portable" +SET PORTABLE_ARCHIVE_NAME="usbrelaymodule-portable" + +rd /s /q build\ 2>nul +mkdir build && cd build + +cmake -G "Visual Studio 17 2022" -A Win32 .. +cmake --build . --config Release + +cd %PROJECT_ROOT% + +mkdir %PORTABLE_DIR_REL_PATH% + +copy build\app-cli\Release\getrelay.exe %PORTABLE_DIR_REL_PATH% +copy build\app-cli\Release\setrelay.exe %PORTABLE_DIR_REL_PATH% +copy build\libusbrelaymodule\Release\usbrelaymodule.dll %PORTABLE_DIR_REL_PATH% +copy external\hidapi\windows\Release\hidapi.dll %PORTABLE_DIR_REL_PATH% + +cd %PORTABLE_DIR_REL_PATH% + +tar -czf ../%PORTABLE_ARCHIVE_NAME%.tar.gz * \ No newline at end of file