diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ef8dd9..3ce4094 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,8 +62,6 @@ build_windows: - dnf -y install wine wget p7zip sed dos2unix - unix2dos *.txt - unix2dos files_example/*.txt files_example/*/*.txt - - sed -i 's/C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\vcvars64.bat/.\\sdk_standalone\\set_vars64.bat/g' build_env_x64.bat - - sed -i 's/C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\vcvars32.bat/.\\sdk_standalone\\set_vars32.bat/g' build_env_x86.bat - sed -i 's/..\\vcpkg\\packages\\/.\\/g' build_set_protobuf_directories.bat - wget 'https://gitlab.com/Mr_Goldberg/goldberg_emulator/uploads/48db8f434a193aae872279dc4f5dde6a/sdk_standalone.7z' - wget 'https://gitlab.com/Mr_Goldberg/goldberg_emulator/uploads/0119304e030098b4821d73170fe52084/protobuf_x64-windows-static.7z' diff --git a/build_env_x64.bat b/build_env_x64.bat index 128cc2e..89656d5 100755 --- a/build_env_x64.bat +++ b/build_env_x64.bat @@ -7,6 +7,7 @@ set VS_Base_Path=C:\Program Files (x86) if exist "%VS_Base_Path%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" goto vs2019 if exist "%VS_Base_Path%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" goto vs2017 if exist "%VS_Base_Path%\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" goto vs14 +if exist ".\sdk_standalone\set_vars64.bat" goto gitlabci :vs2019 call "%VS_Base_Path%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" @@ -19,4 +20,8 @@ goto batend :vs14 call "%VS_Base_Path%\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" goto batend + +:gitlabci +call ".\sdk_standalone\set_vars64.bat" +goto batend :batend diff --git a/build_env_x86.bat b/build_env_x86.bat index cc2d46e..093b198 100755 --- a/build_env_x86.bat +++ b/build_env_x86.bat @@ -7,6 +7,7 @@ set VS_Base_Path=C:\Program Files (x86) if exist "%VS_Base_Path%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" goto vs2019 if exist "%VS_Base_Path%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" goto vs2017 if exist "%VS_Base_Path%\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat" goto vs14 +if exist ".\sdk_standalone\set_vars32.bat" goto gitlabci :vs2019 call "%VS_Base_Path%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" @@ -19,4 +20,8 @@ goto batend :vs14 call "%VS_Base_Path%\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat" goto batend + +:gitlabci +call ".\sdk_standalone\set_vars32.bat" +goto batend :batend diff --git a/build_set_protobuf_directories.bat b/build_set_protobuf_directories.bat index 7d8fbd5..bf81456 100755 --- a/build_set_protobuf_directories.bat +++ b/build_set_protobuf_directories.bat @@ -1,10 +1,20 @@ +@echo off +cd /d "%~dp0" SET PROTOBUF_X86_DIRECTORY=..\vcpkg\packages\protobuf_x86-windows-static SET PROTOBUF_X64_DIRECTORY=..\vcpkg\packages\protobuf_x64-windows-static + rem location of protoc in protobuf directories: -SET PROTOC_DIRECTORY=\tools\protobuf\protoc.exe +SET PROTOC_X86_EXE=%PROTOBUF_X86_DIRECTORY%\tools\protobuf\protoc.exe +SET PROTOC_X64_EXE=%PROTOBUF_X64_DIRECTORY%\tools\protobuf\protoc.exe + +if exist "%PROTOBUF_X86_DIRECTORY%\lib\libprotobuf-lite.lib" ( +SET PROTOBUF_X86_LIBRARY=%PROTOBUF_X86_DIRECTORY%\lib\libprotobuf-lite.lib +) else ( +SET PROTOBUF_X86_LIBRARY=%PROTOBUF_X86_DIRECTORY%\lib\libprotobuf.lib +) if exist "%PROTOBUF_X64_DIRECTORY%\lib\libprotobuf-lite.lib" ( -SET PROTOBUF_LIBRARY=\lib\libprotobuf-lite.lib +SET PROTOBUF_X64_LIBRARY=%PROTOBUF_X64_DIRECTORY%\lib\libprotobuf-lite.lib ) else ( -SET PROTOBUF_LIBRARY=\lib\libprotobuf.lib +SET PROTOBUF_X64_LIBRARY=%PROTOBUF_X64_DIRECTORY%\lib\libprotobuf.lib )