1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using Bee . Core ;
4
- using Bee . Stevedore ;
5
- using Bee . Stevedore . Program ;
6
- using Unity . BuildSystem . NativeProgramSupport ;
4
+ using Bee . Core . Stevedore ;
7
5
8
6
namespace BuildProgram
9
7
{
10
8
public class BuildProgram
11
9
{
12
- private static readonly Dictionary < string , Tuple < string , string > > Artifacts = new Dictionary < string , Tuple < string , string > > ( ) ;
10
+ private static readonly List < StevedoreArtifact > StevedoreArtifacts = new List < StevedoreArtifact > ( ) ;
13
11
14
12
internal static void Main ( )
15
13
{
14
+ var manifest = "manifest.stevedore" ;
15
+
16
+ Backend . Current . StevedoreSettings = new StevedoreSettings
17
+ {
18
+ Manifest = { manifest } ,
19
+ //EnforceManifest = true,
20
+ } ;
21
+
16
22
RegisterCommonArtifacts ( ) ;
17
23
18
24
if ( Platform . HostPlatform is WindowsPlatform )
@@ -33,96 +39,44 @@ internal static void Main()
33
39
}
34
40
}
35
41
36
- foreach ( var artifact in Artifacts )
37
- {
38
- var name = artifact . Key ;
39
- var id = artifact . Value . Item1 ;
40
- var repo = new RepoName ( artifact . Value . Item2 ) ;
41
-
42
- Console . WriteLine ( $ ">>> Registering artifact { name } ") ;
43
- var stevedoreArtifact = new StevedoreArtifact ( repo , new ArtifactId ( id ) ) ;
44
- Backend . Current . Register ( stevedoreArtifact ) ;
45
- }
42
+ foreach ( var artifact in StevedoreArtifacts )
43
+ {
44
+ Console . WriteLine ( $ ">>> Registering artifact { artifact . ArtifactName } ") ;
45
+ artifact . UnpackToUnusualLocation ( $ "artifacts/Stevedore/{ artifact . ArtifactName } ") ;
46
+ }
46
47
}
47
48
48
49
private static void RegisterCommonArtifacts ( )
49
50
{
50
- Artifacts . Add ( "MonoBleedingEdge" ,
51
- new Tuple < string , string > (
52
- "MonoBleedingEdge/b8ea873d69f_11313119e2f8a79ea5d21056a99e6a4346037cfb9915548344409bede6995c84.7z" ,
53
- "unity-internal" ) ) ;
54
-
55
- Artifacts . Add ( "reference-assemblies" ,
56
- new Tuple < string , string > (
57
- "reference-assemblies/1.0_fc1889ab066ec621a44e51c666d750590b0496d8284b4420e1119c26ce0c7462.7z" ,
58
- "unity-internal" ) ) ;
51
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "MonoBleedingEdge" ) ) ;
52
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "reference-assemblies" ) ) ;
59
53
}
60
54
61
55
private static void RegisterWindowsArtifacts ( )
62
56
{
63
- Artifacts . Add ( "android-ndk-windows-x86_64" ,
64
- new Tuple < string , string > (
65
- "android-ndk-windows-x86_64/r16b_4c6b39939b29dfd05e27c97caf588f26b611f89fe95aad1c987278bd1267b562.7z" ,
66
- "unity-internal" ) ) ;
57
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "android-ndk-windows-x86_64" ) ) ;
67
58
}
68
59
69
60
private static void RegisterOSXArtifacts ( )
70
61
{
71
- Artifacts . Add ( "android-ndk-darwin-x86_64" ,
72
- new Tuple < string , string > (
73
- "android-ndk-darwin-x86_64/r16b_9654a692ed97713e35154bfcacb0028fdc368128d636326f9644ed83eec5d88b.7z" ,
74
- "unity-internal" ) ) ;
75
-
76
- Artifacts . Add ( "MacBuildEnvironment" ,
77
- new Tuple < string , string > (
78
- "mac-toolchain-11_0/12.2-12B5018i_351c773fb8a192039fe0f0e962314b888102b0718c734ad54f3906c0caeed1c9.zip" ,
79
- "unity-internal" ) ) ;
80
-
81
- Artifacts . Add ( "mono-build-tools-extra" ,
82
- new Tuple < string , string > (
83
- "mono-build-tools-extra/9de3c42ef81ec4f79b53e7db32d390227d8c43c4_fa9931c37b7a4ca636eb9e0e48252c4cb591caaa9b77c41b75795037868c1256.7z" ,
84
- "unity-internal" ) ) ;
62
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "android-ndk-darwin-x86_64" ) ) ;
63
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "mac-toolchain-11_0" ) ) ;
64
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "mono-build-tools-extra" ) ) ;
85
65
}
86
66
87
67
private static void RegisterLinuxArtifacts ( )
88
68
{
89
- Artifacts . Add ( "android-ndk-linux-x86_64" ,
90
- new Tuple < string , string > (
91
- "android-ndk-linux-x86_64/r16b_bcdea4f5353773b2ffa85b5a9a2ae35544ce88ec5b507301d8cf6a76b765d901.7z" ,
92
- "unity-internal" ) ) ;
93
-
94
- Artifacts . Add ( "linux-sdk-20170609" ,
95
- new Tuple < string , string > (
96
- "linux-sdk-20170609/9df1e3b3b120_9a3a0847d5b3767579e908b5a9ce050936617b1b9275a79a8b71bb3229998957.7z" ,
97
- "unity-internal" ) ) ;
69
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "android-ndk-linux-x86_64" ) ) ;
70
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "linux-sdk-20170609" ) ) ;
98
71
}
99
72
100
73
private static void RegisterCommonNonWindowsArtifacts ( )
101
74
{
102
- Artifacts . Add ( "libtool-src" ,
103
- new Tuple < string , string > (
104
- "libtool-src/2.4.6_49a0ed204b3b24572e044400cd05513f611bcca6ced0d0816a57ac3b17376257.7z" ,
105
- "public" ) ) ;
106
-
107
- Artifacts . Add ( "texinfo-src" ,
108
- new Tuple < string , string > (
109
- "texinfo-src/4.8_975b9657ebef8a4fe3897047ca450b757a0a956b05399dc813f63e84829bac6a.7z" ,
110
- "public" ) ) ;
111
-
112
- Artifacts . Add ( "automake-src" ,
113
- new Tuple < string , string > (
114
- "automake-src/1.16.1_d281b950e26265f55f0a63188a8c6388e638b354b7ed80d186690119cbc4f953.7z" ,
115
- "public" ) ) ;
116
-
117
- Artifacts . Add ( "autoconf-src" ,
118
- new Tuple < string , string > (
119
- "autoconf-src/2.69_0e4ba7a0363c68ad08a7d138b228596aecdaea68e1d8b8eefc645e6ac8fc85c7.7z" ,
120
- "public" ) ) ;
121
-
122
- Artifacts . Add ( "libgdiplus-mac" ,
123
- new Tuple < string , string > (
124
- "libgdiplus-mac/9df1e3b3b120_4cf7c08770db93922f54f38d2461b9122cddc898db58585864446e70c5ad3057.7z" ,
125
- "unity-internal" ) ) ;
75
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "libtool-src" ) ) ;
76
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "texinfo-src" ) ) ;
77
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "automake-src" ) ) ;
78
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "autoconf-src" ) ) ;
79
+ StevedoreArtifacts . Add ( new StevedoreArtifact ( "libgdiplus-mac" ) ) ;
126
80
}
127
81
}
128
82
}
0 commit comments