From c894aa86adf5704992cd5f51e429c825582f3ca6 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 15 Jun 2016 11:02:09 +0200 Subject: [PATCH] added mdoc to the tools --- bootstrapper.ps1 | 9 +++++++++ build.cake | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bootstrapper.ps1 b/bootstrapper.ps1 index e5135d40..a8324421 100644 --- a/bootstrapper.ps1 +++ b/bootstrapper.ps1 @@ -14,6 +14,7 @@ Param( $TOOLS_DIR = Join-Path $PSScriptRoot "tools" $NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" +$MDOC_EXE = Join-Path $TOOLS_DIR "mdoc/mdoc.exe" $PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" $CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" $XC_EXE = Join-Path $TOOLS_DIR "xamarin-component.exe" @@ -45,6 +46,14 @@ if (!(Test-Path $NUGET_EXE)) { Throw "Could not find NuGet.exe" } +# Make sure mdoc exists where we expect it. +if (!(Test-Path $MDOC_EXE)) { + Invoke-WebRequest -Uri http://www.go-mono.com/archive/mdoc-net-2010-01-04.zip -OutFile (Join-Path $TOOLS_DIR "mdoc.zip") + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory((Join-Path $TOOLS_DIR "mdoc.zip"), ($TOOLS_DIR)) + Rename-Item (Join-Path $TOOLS_DIR "mdoc-net-2010-01-04") (Join-Path $TOOLS_DIR "mdoc") +} + # Make sure xamarin-component exists where we expect it. if (!(Test-Path $XC_EXE)) { Invoke-WebRequest -Uri https://components.xamarin.com/submit/xpkg -OutFile (Join-Path $TOOLS_DIR "xpkg.zip") diff --git a/build.cake b/build.cake index 9b5e4ab8..b5a61026 100644 --- a/build.cake +++ b/build.cake @@ -61,8 +61,7 @@ FilePath GetMDocPath () if (IsRunningOnUnix ()) { mdocPath = "/Library/Frameworks/Mono.framework/Versions/Current/bin/mdoc"; } else { - DirectoryPath progFiles = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86); - mdocPath = progFiles.CombineWithFilePath ("Mono/bin/mdoc.bat"); + mdocPath = GetToolPath ("../mdoc/mdoc.exe"); } if (!FileExists (mdocPath)) { mdocPath = "mdoc"; @@ -999,6 +998,9 @@ Task ("CI") Task ("Windows-CI") .IsDependentOn ("externals") .IsDependentOn ("libs") + .IsDependentOn ("docs") + .IsDependentOn ("nuget") + .IsDependentOn ("component") .IsDependentOn ("tests") .IsDependentOn ("samples");