Skip to content

Commit a598f0e

Browse files
committed
Implement build-portable-windows.bat
1 parent 6437c93 commit a598f0e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tools/build-portable-windows.bat

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@echo off
2+
3+
SET DIR=%~dp0
4+
cd %DIR\..
5+
SET PROJECT_ROOT=%cd%
6+
SET PORTABLE_DIR_REL_PATH="build\portable"
7+
SET PORTABLE_ARCHIVE_NAME="usbrelaymodule-portable"
8+
9+
rd /s /q build\ 2>nul
10+
mkdir build && cd build
11+
12+
cmake -G "Visual Studio 17 2022" -A Win32 ..
13+
cmake --build . --config Release
14+
15+
cd %PROJECT_ROOT%
16+
17+
mkdir %PORTABLE_DIR_REL_PATH%
18+
19+
copy build\app-cli\Release\getrelay.exe %PORTABLE_DIR_REL_PATH%
20+
copy build\app-cli\Release\setrelay.exe %PORTABLE_DIR_REL_PATH%
21+
copy build\libusbrelaymodule\Release\usbrelaymodule.dll %PORTABLE_DIR_REL_PATH%
22+
copy external\hidapi\windows\Release\hidapi.dll %PORTABLE_DIR_REL_PATH%
23+
24+
cd %PORTABLE_DIR_REL_PATH%
25+
26+
tar -czf ../%PORTABLE_ARCHIVE_NAME%.tar.gz *

0 commit comments

Comments
 (0)