Skip to content

Commit

Permalink
added mdoc to the tools
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Jun 15, 2016
1 parent 2ec0981 commit c894aa8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions bootstrapper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down
6 changes: 4 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -999,6 +998,9 @@ Task ("CI")
Task ("Windows-CI")
.IsDependentOn ("externals")
.IsDependentOn ("libs")
.IsDependentOn ("docs")
.IsDependentOn ("nuget")
.IsDependentOn ("component")
.IsDependentOn ("tests")
.IsDependentOn ("samples");

Expand Down

0 comments on commit c894aa8

Please sign in to comment.