-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.cake
85 lines (74 loc) · 2.43 KB
/
build.cake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
var target = Argument("target", "Test");
var configuration = Argument("configuration", "Debug");
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Clean")
.WithCriteria(c => HasArgument("rebuild"))
.Does(() =>
{
CleanDirectory("./WesternSpace/bin");
CleanDirectory("./XnaXmlContentPipeline/bin");
CleanDirectory("./XnaXmlContentReader/bin");
});
Task("DownloadDependencies")
.WithCriteria(() => IsRunningOnMacOs())
.Does(() =>
{
StartProcess("sh", new ProcessSettings{
Arguments = "./mgfxc_build_dependencies.sh"
});
StartProcess("sh", new ProcessSettings{
Arguments = "./mgfxc_wine_setup.sh"
});
// Set MGFXC_WINE_PATH for building shaders on macOS and Linux
System.Environment.SetEnvironmentVariable("MGFXC_WINE_PATH", EnvironmentVariable("HOME") + "/.winemonogame");
});
Task("BuildXnaXmlContentReader")
//.IsDependentOn("Clean")
.Does(() =>
{
DotNetRestore("./XnaXmlContentReader/XnaXmlContentReader.csproj");
DotNetBuild("./XnaXmlContentReader/XnaXmlContentReader.csproj", new DotNetBuildSettings
{
Configuration = configuration,
});
//PackDotnet(".XnaXmlContentReader/XnaXmlContentReader.csproj");
});
Task("BuildXnaXmlContentPipeline")
.IsDependentOn("BuildXnaXmlContentReader")
.Does(() =>
{
DotNetRestore("./XnaXmlContentPipeline/XnaXmlContentPipeline.csproj");
DotNetBuild("./XnaXmlContentPipeline/XnaXmlContentPipeline.csproj", new DotNetBuildSettings
{
Configuration = configuration,
});
//PackDotnet("./XnaXmlContentPipeline/XnaXmlContentPipeline.csproj.csproj");
});
Task("Build")
.IsDependentOn("DownloadDependencies")
.IsDependentOn("BuildXnaXmlContentReader")
.IsDependentOn("BuildXnaXmlContentPipeline")
.Does(() =>
{
DotNetRestore("./WesternSpace/WesternSpace.csproj");
DotNetBuild("./WesternSpace/WesternSpace.csproj", new DotNetBuildSettings
{
Configuration = configuration,
});
});
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
// DotNetTest("./Ironstag.sln", new DotNetTestSettings
// {
// Configuration = configuration,
// NoBuild = true,
// });
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);