0
0
mirror of https://github.com/netdata/netdata.git synced 2024-11-21 15:28:05 +00:00
netdata_netdata/packaging/windows/protoc.bat
Austin S. Hemmelgarn 9e575dbec8
Add Widnows CI jobs. (#18187)
* Initial Windows CI support.

This also adds a proper set of production-focused packaging scripts
for working with building Netdata on Windows.

* Pivot to using existing tooling and fixing that up as required.

* General script cleanup.

* Auto-detect location of repository based on script location.

This makes the scripts properly independent of the current working
directory, allowing them to be more resilient to possible changes in the
build environment.

* Make dependency handling entirely separate from build.

* Remove development-only packages from dependency list.

They only waste time in CI, and it’s reasonable to assume that anybody
who needs them can install them themselves, just like we do with all
other platforms.

* Use absolute path for makensis.

This way it actually works without needing manual modification of the
environment.

* Add PowerShell scripts to invoke the build and package scripts.

* Clean up build directory handling.

* Fix fetching of msys2 installer.

* Further cleanup.

* Tidy up build output

* Provide proper output grouping in GitHub Actions.

* Use correct command name for makensis.

* Fix installer script path.

* Do not try to install MSYS2 using Chocolatey.

* Fix CPU architecture check.

* Add more detailed messages for MSYS2 install.

* Fix release fetching logic.

* Further release check logic fixes.

* Complete Windows CI support.

* Move second update pass into dependency handling script.

* Fix handling of icon for Windows installer.

* Default to using a working configuration for release builds.

And provide a way to pass extra options to CMake without needing to
modify the script.

* Fix expansion of optionally defined variable.
2024-07-18 13:28:45 -04:00

10 lines
412 B
Batchfile

@echo off
::
:: The problem with /usr/bin/protoc is that it accepts colon separated (:) paths at its parameters.
:: This makes C:/ being parsed as 2 paths: C and /, which of course both fail.
:: To overcome this problem, we use bash_execute.sh, which replaces all occurences of C: with /c.
::
set "batch_dir=%~dp0"
set "batch_dir=%batch_dir:\=/%"
C:\msys64\usr\bin\bash.exe %batch_dir%/bash_execute.sh protoc %*