Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ stages:
parameters:
configuration: $(ApkTestConfiguration)

- script: mono $(System.DefaultWorkingDirectory)/build-tools/xaprepare/xaprepare/bin/$(ApkTestConfiguration)/xaprepare.exe --s=Required --auto-provision=yes --auto-provision-uses-sudo=yes --no-emoji --run-mode=CI
- script: mono $(System.DefaultWorkingDirectory)/build-tools/xaprepare/xaprepare/bin/$(ApkTestConfiguration)/xaprepare.exe --s=Required --auto-provision=yes --auto-provision-uses-sudo=yes --no-emoji --no-mingw-w64 --run-mode=CI
displayName: install required brew tools and prepare java.interop

- script: mono $(System.DefaultWorkingDirectory)/build-tools/xaprepare/xaprepare/bin/$(ApkTestConfiguration)/xaprepare.exe --s=EmulatorTestDependencies --no-emoji --run-mode=CI
Expand Down
5 changes: 5 additions & 0 deletions build-tools/xaprepare/xaprepare/Application/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ public bool IsRunningOnHostedAzureAgent {
}
}

/// <summary>
/// Do not install mingw-w64 with brew on MacOS, default false
/// </summary>
public bool NoMingwW64 { get; set; } = false;

static Context ()
{
Instance = new Context ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ partial class MacOS

new HomebrewProgram ("make"),

new HomebrewProgram ("mingw-w64") {
MinimumVersion = "7.0.0_2",
MaximumVersion = "7.0.0_3",
Pin = true,
},

new HomebrewProgram ("ninja"),
new HomebrewProgram ("p7zip", "7za"),

Expand All @@ -31,9 +25,17 @@ partial class MacOS
},
};

static readonly HomebrewProgram mingw = new HomebrewProgram ("mingw-w64") {
MinimumVersion = "7.0.0_2",
MaximumVersion = "7.0.0_3",
Pin = true,
};

protected override void InitializeDependencies ()
{
Dependencies.AddRange (programs);
if (!Context.Instance.NoMingwW64)
Dependencies.Add (mingw);
}
}
}
3 changes: 3 additions & 0 deletions build-tools/xaprepare/xaprepare/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ sealed class ParsedOptions
public bool ShowHelp { get; set; } = false;
public bool DumpProps { get; set; } = false;
public bool NoEmoji { get; set; } = !Configurables.Defaults.UseEmoji;
public bool NoMingwW64 { get; set; } = false;
public bool ForceRuntimesBuild { get; set; } = false;
public string? HashAlgorithm { get; set; }
public uint MakeConcurrency { get; set; } = 0;
Expand Down Expand Up @@ -89,6 +90,7 @@ static async Task<int> Run (string[] args)
{"d|dump-properties", "Dump values of all the defined properties to the screen", v => parsedOptions.DumpProps = true },
{"j|make-concurrency=", "Number of concurrent jobs for make to run. A positive integer or 0 for the default. Defaults to the number of CPUs/cores", v => parsedOptions.MakeConcurrency = EnsureUInt (v, "Invalid Make concurrency value") },
{"no-emoji", "Do not use any emoji characters in the output", v => parsedOptions.NoEmoji = true },
{"no-mingw-w64", "Do not install mingw-w64 compiler", v => parsedOptions.NoMingwW64 = true },
{"r|run-mode=", $"Specify the execution mode: {GetExecutionModes()}. See documentation for mode descriptions. Default: {Configurables.Defaults.ExecutionMode}", v => parsedOptions.ExecutionMode = ParseExecutionMode (v)},
{"f|build-runtimes", $"Build runtimes even if the bundle/archives are available.", v => parsedOptions.ForceRuntimesBuild = true },
{"H|hash-algorithm=", "Use the specified hash algorithm instead of the default {Configurables.Defaults.HashAlgorithm}", v => parsedOptions.HashAlgorithm = v?.Trim () },
Expand Down Expand Up @@ -130,6 +132,7 @@ static async Task<int> Run (string[] args)

Context.Instance.MakeConcurrency = parsedOptions.MakeConcurrency;
Context.Instance.NoEmoji = parsedOptions.NoEmoji;
Context.Instance.NoMingwW64 = parsedOptions.NoMingwW64;
Context.Instance.ExecutionMode = parsedOptions.ExecutionMode;
Context.Instance.ForceRuntimesBuild = parsedOptions.ForceRuntimesBuild;
Context.Instance.LoggingVerbosity = parsedOptions.Verbosity;
Expand Down