-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
windows-bundle.bat
42 lines (35 loc) · 1.63 KB
/
windows-bundle.bat
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
set dirName=gpshell-bundle
del /F /S /Q %dirName% > NUL
rmdir /S /Q %dirName%
mkdir %dirName%
for /f %%f in ('dir /a /b gpshell-binary-*.zip') do set gpshellZip=%%f
tar -xf %gpshellZip% -C %dirName%
tar -xf zlib-1.2.8/zlib-1.2.8.zip -C %dirName%
rem get gpshell directory
set dirNamegpshell=""
for /f %%d in ('dir /ad /b %dirName%\gpshell-binary*') do set dirNamegpshell=%dirName%\%%d
copy "%dirNamegpshell%\lib\globalplatform.dll" "%dirNamegpshell%\bin"
copy "%dirNamegpshell%\lib\gppcscconnectionplugin.dll" "%dirNamegpshell%\bin"
copy "C:\Program Files (x86)\OpenSSL-Win32\libcrypto*.dll" "%dirNamegpshell%\bin"
copy "C:\Program Files (x86)\OpenSSL-Win32\libssl*.dll" "%dirNamegpshell%\bin"
copy "C:\Program Files (x86)\OpenSSL-Win32\libeay*.dll" "%dirNamegpshell%\bin"
copy "C:\Program Files (x86)\OpenSSL-Win32\bin\legacy*.dll" "%dirNamegpshell%\bin"
copy zlib-1.2.8\win32-build\zlibwapi.dll "%dirNamegpshell%\bin"
rem when build directory is used
copy ..\zlib-1.2.8\win32-build\zlibwapi.dll "%dirNamegpshell%\bin"
rem copy redistributable runtime files
set curDir=%CD%
pushd "%VCToolsRedistDir%%VSCMD_ARG_TGT_ARCH%"
for /r %%a in (vcruntime*.dll) do copy "%%a" "%curDir%\%dirNamegpshell%\bin"
popd
del /F %dirNamegpshell%\doc\CMakeLists.txt > NUL
del /F %dirNamegpshell%\doc\README.md > NUL
del /F /S /Q %dirNamegpshell%\doc\html > NUL
rmdir /s /Q %dirNamegpshell%\doc\html
del /F /S /Q %dirNamegpshell%\include > NUL
rmdir /s /Q %dirNamegpshell%\include
del /F /S /Q %dirNamegpshell%\lib > NUL
rmdir /s /Q %dirNamegpshell%\lib
del /F /S /Q %dirName%\zlib-1.2.8 > NUL
rmdir /s /Q %dirName%\zlib-1.2.8
tar -a -c -C %dirNamegpshell% -f %dirName%\%gpshellZip% *