-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement build-portable-windows.bat
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 * |