Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/sentencepiece.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Gao <zhaogao@microsoft.com>2018-12-13 01:57:27 +0300
committerGary Gao <zhaogao@microsoft.com>2018-12-13 01:57:27 +0300
commit97481c09c7210baf7aa649272d202c67e11602b2 (patch)
tree6596307899b3a5626e133e09e336df31ac52741b
parent1a38d26a13cc67b1aae641d4983b624bef6d5305 (diff)
Modify bat file to:zhaogao/modify_batch_file
1. download protobuf-cpp-<version>.zip file using powershell 2. bakup CMakeLists.txt and override with CMakeLists_minexport in both the root and src folder
-rw-r--r--test.bat5
-rw-r--r--test_minexport.bat9
2 files changed, 9 insertions, 5 deletions
diff --git a/test.bat b/test.bat
index 5b42508..01c5f2f 100644
--- a/test.bat
+++ b/test.bat
@@ -8,11 +8,12 @@ set PATH=c:\Program Files\Git\usr\bin;c:\MinGW\bin;%PATH%
set CURRENT_PATH=%~dp0
set LIBRARY_PATH=%CURRENT_PATH%build\root
+powershell -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('https://github.com/google/protobuf/releases/download/v%PROTOBUF_VERSION%/protobuf-cpp-%PROTOBUF_VERSION%.zip', '.\protobuf-cpp-%PROTOBUF_VERSION%.zip') }"
+
mkdir build
cd build
-curl -O -L https://github.com/google/protobuf/releases/download/v%PROTOBUF_VERSION%/protobuf-cpp-%PROTOBUF_VERSION%.zip
-unzip protobuf-cpp-%PROTOBUF_VERSION%.zip
+unzip ..\protobuf-cpp-%PROTOBUF_VERSION%.zip
cd protobuf-%PROTOBUF_VERSION%\cmake
cmake . -A %PLATFORM% -DCMAKE_INSTALL_PREFIX=%LIBRARY_PATH% || goto :error
cmake --build . --config Release --target install || goto :error
diff --git a/test_minexport.bat b/test_minexport.bat
index d007d08..03e16e1 100644
--- a/test_minexport.bat
+++ b/test_minexport.bat
@@ -16,12 +16,15 @@ set PATH=c:\Program Files\Git\usr\bin;c:\MinGW\bin;%PATH%
set CURRENT_PATH=%~dp0
set LIBRARY_PATH=%CURRENT_PATH%build\root
+rename CMakeLists.txt CMakeLists.txt.stock
+rename src\CMakeLists.txt CMakeLists.txt.stock
+copy CMakeLists_minexport.txt CMakeLists.txt
+copy src\CMakeLists_minexport.txt src\CMakeLists.txt
+
mkdir build
-copy protobuf-cpp-%PROTOBUF_VERSION%.zip build
cd build
-rem curl -O -L https://github.com/google/protobuf/releases/download/v%PROTOBUF_VERSION%/protobuf-cpp-%PROTOBUF_VERSION%.zip
-unzip protobuf-cpp-%PROTOBUF_VERSION%.zip
+unzip ..\protobuf-cpp-%PROTOBUF_VERSION%.zip
cd protobuf-%PROTOBUF_VERSION%\cmake
cmake . -A %PLATFORM% -DCMAKE_INSTALL_PREFIX=%LIBRARY_PATH% -DBUILD_SHARED_LIBS=true -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DCMAKE_SYSTEM_VERSION=8.1 || goto :error
rem cmake . -A %PLATFORM% -DCMAKE_INSTALL_PREFIX=%LIBRARY_PATH% || goto :error