forked from microsoft/azure-pipelines-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
################################################################################ | ||
## File: Install-MinGW.ps1 | ||
## Team: CI-X | ||
## Desc: Install GNU tools for Windows to C:\tools\mingw64 | ||
################################################################################ | ||
|
||
Import-Module -Name PathHelpers -Force | ||
|
||
choco install -y mingw | ||
$installDir = "C:\tools\mingw64\bin" | ||
Add-MachinePathItem $installDir | ||
|
||
# Hard link mingw32-make.exe to make.exe, which is a more discoverable name | ||
# and so the same command line can be used on Windows as on macOS and Linux | ||
New-Item -Path $installDir -ItemType HardLink -Name "make.exe" -Value "$installDir\mingw32-make.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
if (Get-Command -Name 'g++') | ||
{ | ||
Write-Host "g++ is successfully installed:" | ||
g++ --version | Write-Host | ||
} | ||
else | ||
{ | ||
Write-Host "g++ is not on PATH" | ||
exit 1 | ||
} | ||
|
||
if (Get-Command -Name 'make') | ||
{ | ||
Write-Host "make is successfully installed:" | ||
make --version | Write-Host | ||
} | ||
else | ||
{ | ||
Write-Host "make is not on PATH" | ||
exit 1 | ||
} | ||
|
||
# Adding description of the software to Markdown | ||
|
||
# `g++ --version` gives output like: | ||
# g++.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 | ||
# Copyright (C) 2015 Free Software Foundation, Inc. | ||
# This is free software; see the source for copying conditions. There is NO | ||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
$SoftwareName = "MinGW" | ||
$(g++ --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" | ||
$minGwVersion = $matches[0] | ||
|
||
$Description = @" | ||
_Version:_ $minGwVersion<br/> | ||
_Environment:_ | ||
* PATH: contains location of the MinGW 'bin' directory | ||
"@ | ||
|
||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters