Skip to content

Commit

Permalink
Implement build-portable-windows.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
nkh-lab committed Sep 11, 2022
1 parent 6437c93 commit a598f0e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tools/build-portable-windows.bat
Original file line number Diff line number Diff line change
@@ -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 *

0 comments on commit a598f0e

Please sign in to comment.