Skip to content

Commit 0940f04

Browse files
authored
Merge pull request #791 from Unity-Technologies/unity-master-fix-mono-build-deps
Use new MonoBleedingEdge builds.zip for bootstrap Mono.
2 parents 3191b8a + 2e82f4d commit 0940f04

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

external/buildscripts/build.pl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,23 @@
181181
# abs_path ends up returning an empty string
182182
$externalBuildDeps = abs_path($externalBuildDeps) if (-d $externalBuildDeps);
183183

184-
my $existingExternalMonoRoot = "$externalBuildDeps/mono";
184+
my $existingExternalMonoRoot = "$externalBuildDeps/MonoBleedingEdge";
185185
my $existingExternalMono = "";
186+
my $existingExternalMonoBinDir = "";
186187
my $monoHostArch = "";
187188
my $monoprefix = "$monoroot/tmp";
188189
my $runningOnWindows=0;
189190
if($^O eq "linux")
190191
{
191192
$monoHostArch = $arch32 ? "i686" : "x86_64";
192-
$existingExternalMono = "$existingExternalMonoRoot/linux";
193+
$existingExternalMono = "$existingExternalMonoRoot";
194+
$existingExternalMonoBinDir = "bin-linux64";
193195
}
194196
elsif($^O eq 'darwin')
195197
{
196198
$monoHostArch = $arch32 ? "i386" : "x86_64";
197-
$existingExternalMono = "$existingExternalMonoRoot/osx";
199+
$existingExternalMono = "$existingExternalMonoRoot";
200+
$existingExternalMonoBinDir = "bin";
198201

199202
# From Massi: I was getting failures in install_name_tool about space
200203
# for the commands being too small, and adding here things like
@@ -211,7 +214,8 @@
211214
else
212215
{
213216
$monoHostArch = "i686";
214-
$existingExternalMono = "$existingExternalMonoRoot/win";
217+
$existingExternalMono = "$existingExternalMonoRoot";
218+
$existingExternalMonoBinDir = "bin-x64";
215219
$runningOnWindows = 1;
216220

217221
# We only care about an existing mono if we need to build.
@@ -317,10 +321,10 @@
317321
{
318322
# We need to extract builds.zip
319323
print(">>> Extracting mono builds.zip...\n");
320-
system("unzip", "$existingExternalMono/builds.zip", "-d", "$existingExternalMono") eq 0 or die("failed to extract mono builds.zip\n");
324+
system("unzip", "$existingExternalMono/builds.zip", "-d", "$existingExternalMono/builds") eq 0 or die("failed to extract mono builds.zip\n");
321325
}
322326

323-
$existingMonoRootPath = "$existingExternalMono/builds";
327+
$existingMonoRootPath = "$existingExternalMono/builds/monodistribution";
324328
}
325329
else
326330
{
@@ -1242,7 +1246,7 @@
12421246
}
12431247

12441248
print ">>> Existing Mono : $existingMonoRootPath\n\n";
1245-
$ENV{'PATH'} = "$existingMonoRootPath/bin:$ENV{'PATH'}";
1249+
$ENV{'PATH'} = "$existingMonoRootPath/$existingExternalMonoBinDir:$ENV{'PATH'}";
12461250

12471251
print ">>> PATH before Build = $ENV{PATH}\n\n";
12481252

0 commit comments

Comments
 (0)