Skip to content

Commit

Permalink
Copy files using ROBOCOPY
Browse files Browse the repository at this point in the history
  • Loading branch information
bear101 committed Mar 1, 2025
1 parent 2dd2acc commit 17065d1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
7 changes: 3 additions & 4 deletions Library/TeamTalkLib/build/webrtc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ if (MSVC)
endif()

configure_file(${CMAKE_CURRENT_LIST_DIR}/webrtc_cfg_win.bat_sample ${CMAKE_CURRENT_BINARY_DIR}/webrtc_cfg_win.bat)
configure_file(${CMAKE_CURRENT_LIST_DIR}/webrtc_copy_win.bat_sample ${CMAKE_CURRENT_BINARY_DIR}/webrtc_copy_win.bat)

ExternalProject_Add(webrtc-src
DOWNLOAD_COMMAND ${WEBRTC_FETCH_CMD1}
Expand All @@ -110,10 +111,8 @@ if (MSVC)
BUILD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/webrtc_cfg_win.bat
COMMAND CALL ninja -v -C <INSTALL_DIR>\\lib\\debug teamtalk
COMMAND CALL ninja -v -C <INSTALL_DIR>\\lib\\release teamtalk
INSTALL_COMMAND cd ${WEBRTC_SOURCE_ROOT}
COMMAND DEL /S /Q ${WEBRTC_INSTALL_ROOT_NATIVE}\\include
COMMAND XCOPY *.h /S ${WEBRTC_INSTALL_ROOT_NATIVE}\\include
COMMAND XCOPY *.inc /S ${WEBRTC_INSTALL_ROOT_NATIVE}\\include
INSTALL_COMMAND ${CMAKE_COMMAND} -E rm -rf ${WEBRTC_INSTALL_ROOT}/include
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/webrtc_copy_win.bat
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/debug/obj/modules/audio_processing/teamtalk.lib
<INSTALL_DIR>/lib/release/obj/modules/audio_processing/teamtalk.lib
DEPENDS depot-tools
Expand Down
4 changes: 1 addition & 3 deletions Library/TeamTalkLib/build/webrtc/depottools-win.bat_sample
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
IF NOT "%ERRORLEVEL%" == "0" GOTO fail
SET PATH=%PATH%;@DEPOTTOOLS_DIR_NATIVE@
SET PATH=@DEPOTTOOLS_DIR_NATIVE@;%PATH%
IF NOT "%ERRORLEVEL%" == "0" GOTO fail
CD @WEBRTC_FETCH_PATH_NATIVE@
IF NOT "%ERRORLEVEL%" == "0" GOTO fail
fetch.bat --nohooks webrtc
IF NOT "%ERRORLEVEL%" == "0" GOTO fail
gclient sync --with_branch_heads --with_tags
IF NOT "%ERRORLEVEL%" == "0" GOTO fail

cd @WEBRTC_SOURCE_ROOT_NATIVE@
IF NOT "%ERRORLEVEL%" == "0" GOTO fail
Expand Down
2 changes: 1 addition & 1 deletion Library/TeamTalkLib/build/webrtc/webrtc_cfg_win.bat_sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
SET PATH=%PATH%;@DEPOTTOOLS_DIR_NATIVE@
SET PATH=@DEPOTTOOLS_DIR_NATIVE@;%PATH%
9 changes: 9 additions & 0 deletions Library/TeamTalkLib/build/webrtc/webrtc_copy_win.bat_sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ROBOCOPY @WEBRTC_SOURCE_ROOT_NATIVE@ @WEBRTC_INSTALL_ROOT_NATIVE@\include *.h /S
IF NOT "%ERRORLEVEL%" == "1" GOTO fail
ROBOCOPY @WEBRTC_SOURCE_ROOT_NATIVE@ @WEBRTC_INSTALL_ROOT_NATIVE@\include *.inc /S
IF NOT "%ERRORLEVEL%" == "1" GOTO fail

EXIT /B 0

:fail
EXIT /B 1

0 comments on commit 17065d1

Please sign in to comment.