Skip to content

Commit 9f4d362

Browse files
authored
Merge pull request #1103 from Unity-Technologies/set-default-build-deps
Set using stevedoreBuildDeps as default
2 parents e1b2f98 + 27b913e commit 9f4d362

9 files changed

+31
-81
lines changed

.gitlab-ci.yml

-9
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ build_win:
122122
- windows
123123
script:
124124
- git submodule update --init --recursive
125-
- cd external/buildscripts
126-
- ./bee.exe
127-
- cd ../..
128125
- perl external/buildscripts/build_runtime_win64.pl --stevedorebuilddeps=1
129126
- mkdir -p incomingbuilds/win64
130127
- cp -r builds/* incomingbuilds/win64/
@@ -143,9 +140,6 @@ build_win_x86:
143140
- windows
144141
script:
145142
- git submodule update --init --recursive
146-
- cd external/buildscripts
147-
- ./bee.exe
148-
- cd ../..
149143
- perl external/buildscripts/build_runtime_win.pl --stevedorebuilddeps=1
150144
- mkdir -p incomingbuilds/win32
151145
- cp -r builds/* incomingbuilds/win32/
@@ -164,9 +158,6 @@ build_win_bare_minimum:
164158
- windows
165159
script:
166160
- git submodule update --init --recursive
167-
- cd external/buildscripts
168-
- ./bee.exe
169-
- cd ../..
170161
- perl external/buildscripts/build_unityscript_bareminimum_win.pl
171162
- mkdir -p incomingbuilds/bareminimum
172163
- cp -r builds/* incomingbuilds/bareminimum/

external/buildscripts/build.pl

+21-11
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
my $tizen=0;
6565
my $tizenEmulator=0;
6666
my $windowsSubsystemForLinux=0;
67-
my $stevedoreBuildDeps=0;
67+
my $stevedoreBuildDeps=1;
6868

6969
# Handy troubleshooting/niche options
7070
my $skipMonoMake=0;
@@ -304,20 +304,30 @@
304304

305305
if (!(-d "$externalBuildDeps"))
306306
{
307-
if (not $checkoutonthefly)
307+
if($stevedoreBuildDeps)
308308
{
309-
print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n");
309+
print(">>> Running bee to download build-deps...\n");
310+
chdir($buildscriptsdir) eq 1 or die ("failed to chdir to $buildscriptsdir directory\n");
311+
system("./bee") eq 0 or die ("failed to run bee\n");
312+
chdir("$monoroot") eq 1 or die ("failed to chdir to $monoroot\n");
310313
}
314+
else
315+
{
316+
if (not $checkoutonthefly)
317+
{
318+
print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n");
319+
}
311320

312-
# Check out on the fly
313-
print(">>> Checking out mono build dependencies to : $externalBuildDeps\n");
314-
my $repo = "https://ono.unity3d.com/unity-extra/mono-build-deps";
315-
print(">>> Cloning $repo at $externalBuildDeps\n");
316-
my $checkoutResult = system("hg", "clone", $repo, "$externalBuildDeps");
321+
# Check out on the fly
322+
print(">>> Checking out mono build dependencies to : $externalBuildDeps\n");
323+
my $repo = "https://ono.unity3d.com/unity-extra/mono-build-deps";
324+
print(">>> Cloning $repo at $externalBuildDeps\n");
325+
my $checkoutResult = system("hg", "clone", $repo, "$externalBuildDeps");
317326

318-
if ($checkoutOnTheFly && $checkoutResult ne 0)
319-
{
320-
die("failed to checkout mono build dependencies\n");
327+
if ($checkoutOnTheFly && $checkoutResult ne 0)
328+
{
329+
die("failed to checkout mono build dependencies\n");
330+
}
321331
}
322332

323333
# Only clean up if the dir exists. Otherwise abs_path will return empty string

external/buildscripts/build_classlibs_osx.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
my $clean = 1;
1313
my $mcsOnly = 0;
1414
my $skipMonoMake = 0;
15-
my $stevedoreBuildDeps=0;
15+
my $stevedoreBuildDeps=1;
1616

1717
# Handy troubleshooting/niche options
1818

external/buildscripts/build_runtime_android.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
my $androidArch = "";
1212
my $clean = 1;
1313
my $windowsSubsystemForLinux = 0;
14-
my $stevedoreBuildDeps = 0;
14+
my $stevedoreBuildDeps = 1;
1515

1616
GetOptions(
1717
"androidarch=s"=>\$androidArch,
@@ -28,5 +28,5 @@
2828
}
2929
else
3030
{
31-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--androidarch=$androidArch", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for $androidArch\n");
31+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--androidarch=$androidArch", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux", "--stevedorebuilddeps=$stevedoreBuildDeps") eq 0 or die ("Failed building mono for $androidArch\n");
3232
}

external/buildscripts/build_runtime_linux.pl

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
88
my $monoroot = abs_path($monoroot);
99
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
11-
my $stevedoreBuildDeps = 0;
10+
my $stevedoreBuildDeps = 1;
1211
my $build64 = 0;
1312

1413
GetOptions(

external/buildscripts/build_runtime_osx.pl

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
88
my $monoroot = abs_path($monoroot);
99
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
11-
my $stevedoreBuildDeps=0;
10+
my $stevedoreBuildDeps=1;
1211

1312
GetOptions(
1413
'stevedorebuilddeps=i'=>\$stevedoreBuildDeps,

external/buildscripts/build_runtime_win.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
88
my $monoroot = abs_path($monoroot);
99
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
my $stevedoreBuildDeps = 0;
10+
my $stevedoreBuildDeps = 1;
1111

1212
GetOptions(
1313
"stevedorebuilddeps=i"=>\$stevedoreBuildDeps,

external/buildscripts/build_runtime_win64.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
my $monoroot = abs_path($monoroot);
99
my $buildScriptsRoot = "$monoroot/external/buildscripts";
1010

11-
my $stevedoreBuildDeps = 0;
11+
my $stevedoreBuildDeps = 1;
1212

1313
GetOptions(
1414
"stevedorebuilddeps=i"=>\$stevedoreBuildDeps,

external/buildscripts/build_win_no_cygwin.pl

+3-52
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
my $winMonoRoot = $monoroot;
3838
my $msBuildVersion = "14.0";
3939
my $buildDeps = "";
40-
my $stevedoreBuildDeps=0;
40+
my $stevedoreBuildDeps=1;
4141
4242
print(">>> Build All Args = @ARGV\n");
4343
@@ -98,58 +98,9 @@
9898
9999
if ($build)
100100
{
101-
if ($existingMonoRootPath eq "")
101+
if (!(-d "$externalBuildDeps"))
102102
{
103-
print(">>> No existing mono supplied. Checking for external...\n");
104-
105-
if (!(-d "$externalBuildDeps"))
106-
{
107-
if (not $checkoutonthefly)
108-
{
109-
print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n");
110-
}
111-
112-
# Check out on the fly
113-
print(">>> Checking out mono build dependencies to : $externalBuildDeps\n");
114-
my $repo = "https://ono.unity3d.com/unity-extra/mono-build-deps";
115-
print(">>> Cloning $repo at $externalBuildDeps\n");
116-
my $checkoutResult = system("hg", "clone", $repo, "$externalBuildDeps");
117-
118-
if ($checkoutOnTheFly && $checkoutResult ne 0)
119-
{
120-
die("failed to checkout mono build dependencies\n");
121-
}
122-
}
123-
124-
if (-d "$existingExternalMono")
125-
{
126-
print(">>> External mono found at : $existingExternalMono\n");
127-
128-
if (-d "$existingExternalMono/builds")
129-
{
130-
print(">>> Mono already extracted at : $existingExternalMono/builds\n");
131-
}
132-
133-
if (!(-d "$existingExternalMono/builds"))
134-
{
135-
# We need to extract builds.zip
136-
print(">>> Extracting mono builds.zip...\n");
137-
my $SevenZip = "$externalBuildDeps/7z/win64/7za.exe";
138-
print(">>> Using 7z : $SevenZip\n");
139-
system("$SevenZip", "x", "$existingExternalMono/builds.zip", "-o$existingExternalMono") eq 0 or die("Failed extracting mono builds.zip\n");
140-
}
141-
142-
$existingMonoRootPath = "$existingExternalMono/builds";
143-
}
144-
else
145-
{
146-
print(">>> No external mono found. Trusting a new enough mono is in your PATH.\n");
147-
}
148-
}
149-
150-
if ($existingMonoRootPath ne "" && !(-d $existingMonoRootPath))
151-
{
152-
die("Existing mono not found at : $existingMonoRootPath\n");
103+
print(">>> mono-build-deps is not required for windows runtime builds...\n");
153104
}
154105
155106
system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--msbuildversion=$msBuildVersion", "--clean=$clean", "--debug=$debug", "--gc=bdwgc") eq 0 or die ('failed building mono bdwgc with VS\n');

0 commit comments

Comments
 (0)