-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcopyDllToBuildDir.bat
More file actions
77 lines (62 loc) · 4.31 KB
/
copyDllToBuildDir.bat
File metadata and controls
77 lines (62 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@echo off
echo "Copying dlls to execution directory"
rem 获取项目CMakeLists.txt文件所在目录的名称,用于新建构建目录
for /f "delims=" %%i in ("%cd%") do set CURRENT_DIR_NAME=%%~ni
rem 到项目CMakeLists.txt文件所在目录的上级目录
cd..
rem 获取当前目录,%cd%与%~dp0的区别在于获取的目录尾部少了“\”
set CURRENT_DIR=%cd%
echo [INFO] CURRENT_DIR = "%CURRENT_DIR%"
rem 设置需要外部构建的目录名称,在源文件目录后面加“_build”
set PROJECT_NAME=%CURRENT_DIR_NAME%_build
rem 设置外部构建的完整路径
set CURRENT_NEW_DIR=%CURRENT_DIR%\%PROJECT_NAME%
echo [INFO] CURRENT_NEW_DIR = "%CURRENT_NEW_DIR%"
cd /d %~dp0
::--Release
xcopy .\externals\3rdParty\bin\glew32.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\freeimage.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\msvcp140_app.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\vcruntime140_app.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\log4cplusU.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icudt74.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icuin74.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icuio74.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icuuc74.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
::----debug
xcopy .\externals\3rdParty\bin\glew32.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\freeimage.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\msvcp140_app.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\vcruntime140_app.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\log4cplusU.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icudt74.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icuin74.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icuio74.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy .\externals\3rdParty\bin\icuuc74.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
::--Release
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Core.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Gui.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5OpenGL.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Widgets.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Network.dll %CURRENT_NEW_DIR%\x64\Release /s /e /c /y /h /r
::----debug
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Core.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Gui.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5OpenGL.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Widgets.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Network.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r
::拷贝source/resource目录下所有的资源到bin目录
xcopy .\Designer\Data\*.* %CURRENT_NEW_DIR%\x64\Release\Data /E /I /H /Y
xcopy .\Designer\Data\*.* %CURRENT_NEW_DIR%\x64\Debug\Data /E /I /H /Y
::拷贝Externals/3rdParty/runtime(sdk)
:: /I:避免提示 “Does ... specify a file name or directory name on the target…”
:: /E:拷贝子目录(包含空目录)
:: /Y:覆盖不提示
:: /S:拷贝子目录(不含空目录)
:: /H:包含隐藏/系统文件
xcopy .\Externals\3rdParty\runtime\*.* %CURRENT_NEW_DIR%\x64\Release\runtime /E /I /H /Y
xcopy .\Externals\3rdParty\runtime\*.* %CURRENT_NEW_DIR%\x64\Debug\runtime /E /I /H /Y
xcopy .\Externals\3rdParty\sdk\*.* %CURRENT_NEW_DIR%\x64\Release\sdk /E /I /H /Y
xcopy .\Externals\3rdParty\sdk\*.* %CURRENT_NEW_DIR%\x64\Debug\sdk /E /I /H /Y
pause
exit