Skip to content

Commit 3eba83e

Browse files
authored
Merge pull request #1387 from Unity-Technologies/update-vs-projects
Update vs projects to visual studio 19
2 parents 27bf7d2 + da09e53 commit 3eba83e

37 files changed

+172
-179
lines changed

.yamato/Build Windows x64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Windows x64
22

33
agent:
44
type: Unity::VM
5-
image: platform-foundation/windows-mono-bokken:latest
5+
image: platform-foundation/windows-vs2019-il2cpp-bokken:stable
66
flavor: b1.xlarge
77

88
commands:

.yamato/Build Windows x86.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Windows x86
22

33
agent:
44
type: Unity::VM
5-
image: platform-foundation/windows-mono-bokken:latest
5+
image: platform-foundation/windows-vs2019-il2cpp-bokken:stable
66
flavor: b1.xlarge
77

88
commands:

external/buildscripts/build.pl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
my $targetArch = "";
5656
my $winPerl = "";
5757
my $winMonoRoot = "";
58-
my $msBuildVersion = "14.0";
5958
my $buildDeps = "";
6059
my $android=0;
6160
my $androidArch = "";
@@ -106,7 +105,6 @@
106105
'shortprefix=i'=>\$shortPrefix,
107106
'winperl=s'=>\$winPerl,
108107
'winmonoroot=s'=>\$winMonoRoot,
109-
'msbuildversion=s'=>\$msBuildVersion,
110108
'checkoutonthefly=i'=>\$checkoutOnTheFly,
111109
'builddeps=s'=>\$buildDeps,
112110
'forcedefaultbuilddeps=i'=>\$forceDefaultBuildDeps,
@@ -1354,7 +1352,7 @@
13541352
{
13551353
if ($^O eq "cygwin")
13561354
{
1357-
system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--msbuildversion=$msBuildVersion", "--clean=$clean", "--debug=$debug") eq 0 or die ('failed building mono with VS\n');
1355+
system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--clean=$clean", "--debug=$debug") eq 0 or die ('failed building mono with VS\n');
13581356

13591357
# Copy over the VS built stuff that we want to use instead into the prefix directory
13601358
my $archNameForBuild = $arch32 ? 'Win32' : 'x64';

external/buildscripts/build_runtime_vs.pl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use strict;
2+
use warnings;
13
sub CompileVCProj;
24
use Cwd 'abs_path';
35
use Getopt::Long;
@@ -9,7 +11,7 @@
911
print ">>> PATH in Build VS = $ENV{PATH}\n\n";
1012

1113
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
12-
my $monoroot = abs_path($monoroot);
14+
$monoroot = abs_path($monoroot);
1315
my $buildsroot = "$monoroot/builds";
1416
my $buildMachine = $ENV{UNITY_THISISABUILDMACHINE};
1517

@@ -18,14 +20,12 @@
1820
my $arch32 = 0;
1921
my $debug = 0;
2022
my $gc = "bdwgc";
21-
my $msBuildVersion = "";
2223

2324
GetOptions(
2425
'build=i'=>\$build,
2526
'clean=i'=>\$clean,
2627
'arch32=i'=>\$arch32,
2728
'debug=i'=>\$debug,
28-
'msbuildversion=s'=>\$msBuildVersion,
2929
'gc=s'=>\$gc,
3030
) or die ("illegal cmdline options");
3131

@@ -38,20 +38,22 @@ sub CompileVCProj
3838
{
3939
my $sln = shift;
4040
my $config;
41+
my $vsInstallRoot = $ENV{"ProgramFiles(x86)"} . "/Microsoft Visual Studio";
4142

42-
my $msbuild = $ENV{"ProgramFiles(x86)"}."/MSBuild/$msBuildVersion/Bin/MSBuild.exe";
43-
44-
if (($ENV{YAMATO_PROJECT_ID}) || ($ENV{USERNAME} eq "bokken"))
43+
my $msbuild = "$vsInstallRoot/2019/Professional/MSBuild/Current/Bin/MSBuild.exe";
44+
45+
if (!(-e -x $msbuild))
4546
{
46-
$msbuild = $ENV{"ProgramFiles(x86)"}."/Microsoft Visual Studio/2017/Professional/MSBuild/15.0/Bin/MSBuild.exe";
47+
print (">>> Unable to find executable MSBuild for vs19 at: $msbuild\nFalling back to vs17\n");
48+
$msbuild = "$vsInstallRoot/2017/Professional/MSBuild/15.0/Bin/MSBuild.exe";
4749
}
4850

4951
$config = $debug ? "Debug" : "Release";
5052
my $arch = $arch32 ? "Win32" : "x64";
5153
my $target = $clean ? "/t:Clean,Build" :"/t:Build";
5254
my $properties = "/p:Configuration=$config;Platform=$arch;MONO_TARGET_GC=$gc";
5355

54-
print ">>> $msbuild $properties $target $sln\n\n";
56+
print (">>> $msbuild $properties $target $sln\n\n");
5557
system($msbuild, $properties, $target, $sln) eq 0
5658
or die("MSBuild failed to build $sln\n");
5759
}

external/buildscripts/build_win_no_cygwin.pl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@
3535
my $arch32 = 0;
3636
my $winPerl = "perl";
3737
my $winMonoRoot = $monoroot;
38-
my $msBuildVersion = "14.0";
3938
my $buildDeps = "";
4039
my $stevedoreBuildDeps=1;
4140
42-
if($ENV{YAMATO_PROJECT_ID} || ($ENV{USERNAME} eq "bokken"))
43-
{
44-
$msBuildVersion = "15.0";
45-
}
46-
4741
print(">>> Build All Args = @ARGV\n");
4842
4943
GetOptions(
@@ -55,7 +49,6 @@
5549
'existingmono=s'=>\$existingMonoRootPath,
5650
'winperl=s'=>\$winPerl,
5751
'winmonoroot=s'=>\$winMonoRoot,
58-
'msbuildversion=s'=>\$msBuildVersion,
5952
'checkoutonthefly=i'=>\$checkoutOnTheFly,
6053
'builddeps=s'=>\$buildDeps,
6154
'forcedefaultbuilddeps=i'=>\$forceDefaultBuildDeps,
@@ -108,8 +101,8 @@
108101
print(">>> mono-build-deps is not required for windows runtime builds...\n");
109102
}
110103
111-
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');
112-
system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--msbuildversion=$msBuildVersion", "--clean=$clean", "--debug=$debug", "--gc=sgen") eq 0 or die ('failed building mono sgen with VS\n');
104+
system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--clean=$clean", "--debug=$debug", "--gc=bdwgc") eq 0 or die ('failed building mono bdwgc with VS\n');
105+
system("$winPerl", "$winMonoRoot/external/buildscripts/build_runtime_vs.pl", "--build=$build", "--arch32=$arch32", "--clean=$clean", "--debug=$debug", "--gc=sgen") eq 0 or die ('failed building mono sgen with VS\n');
113106
114107
if (!(-d "$monoroot\\tmp"))
115108
{

mcs/jay/jay.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
<ProjectGuid>{5D485D32-3B9F-4287-AB24-C8DA5B89F537}</ProjectGuid>
1515
<RootNamespace>jay</RootNamespace>
1616
<Keyword>Win32Proj</Keyword>
17-
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
17+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
1818
</PropertyGroup>
1919
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2020
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
2121
<ConfigurationType>Application</ConfigurationType>
2222
<CharacterSet>MultiByte</CharacterSet>
23-
<PlatformToolset>v140</PlatformToolset>
23+
<PlatformToolset>v142</PlatformToolset>
2424
</PropertyGroup>
2525
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2626
<ConfigurationType>Application</ConfigurationType>
2727
<CharacterSet>MultiByte</CharacterSet>
28-
<PlatformToolset>v140</PlatformToolset>
28+
<PlatformToolset>v142</PlatformToolset>
2929
</PropertyGroup>
3030
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
3131
<ImportGroup Label="ExtensionSettings">

msvc/build-all.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@
2121
<PropertyGroup Label="Globals">
2222
<ProjectGuid>{5362490B-8516-44EE-9987-014C015A080A}</ProjectGuid>
2323
<RootNamespace>buildall</RootNamespace>
24-
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
24+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2525
</PropertyGroup>
2626
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2727
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2828
<ConfigurationType>Utility</ConfigurationType>
2929
<UseDebugLibraries>true</UseDebugLibraries>
30-
<PlatformToolset>v140</PlatformToolset>
30+
<PlatformToolset>v142</PlatformToolset>
3131
<CharacterSet>MultiByte</CharacterSet>
3232
</PropertyGroup>
3333
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3434
<ConfigurationType>Utility</ConfigurationType>
3535
<UseDebugLibraries>false</UseDebugLibraries>
36-
<PlatformToolset>v140</PlatformToolset>
36+
<PlatformToolset>v142</PlatformToolset>
3737
<WholeProgramOptimization>true</WholeProgramOptimization>
3838
<CharacterSet>MultiByte</CharacterSet>
3939
</PropertyGroup>
4040
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4141
<ConfigurationType>Utility</ConfigurationType>
4242
<UseDebugLibraries>true</UseDebugLibraries>
43-
<PlatformToolset>v140</PlatformToolset>
43+
<PlatformToolset>v142</PlatformToolset>
4444
<CharacterSet>MultiByte</CharacterSet>
4545
</PropertyGroup>
4646
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4747
<ConfigurationType>Utility</ConfigurationType>
4848
<UseDebugLibraries>false</UseDebugLibraries>
49-
<PlatformToolset>v140</PlatformToolset>
49+
<PlatformToolset>v142</PlatformToolset>
5050
<WholeProgramOptimization>true</WholeProgramOptimization>
5151
<CharacterSet>MultiByte</CharacterSet>
5252
</PropertyGroup>

msvc/build-init.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,32 @@
2525
<PropertyGroup Label="Globals">
2626
<ProjectGuid>{92AE7622-5F58-4234-9A26-9EC71876B3F4}</ProjectGuid>
2727
<RootNamespace>buildinit</RootNamespace>
28-
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
28+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2929
</PropertyGroup>
3030
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3131
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3232
<ConfigurationType>Utility</ConfigurationType>
3333
<UseDebugLibraries>true</UseDebugLibraries>
34-
<PlatformToolset>v140</PlatformToolset>
34+
<PlatformToolset>v142</PlatformToolset>
3535
<CharacterSet>MultiByte</CharacterSet>
3636
</PropertyGroup>
3737
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3838
<ConfigurationType>Utility</ConfigurationType>
3939
<UseDebugLibraries>false</UseDebugLibraries>
40-
<PlatformToolset>v140</PlatformToolset>
40+
<PlatformToolset>v142</PlatformToolset>
4141
<WholeProgramOptimization>true</WholeProgramOptimization>
4242
<CharacterSet>MultiByte</CharacterSet>
4343
</PropertyGroup>
4444
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4545
<ConfigurationType>Utility</ConfigurationType>
4646
<UseDebugLibraries>true</UseDebugLibraries>
47-
<PlatformToolset>v140</PlatformToolset>
47+
<PlatformToolset>v142</PlatformToolset>
4848
<CharacterSet>MultiByte</CharacterSet>
4949
</PropertyGroup>
5050
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
5151
<ConfigurationType>Utility</ConfigurationType>
5252
<UseDebugLibraries>false</UseDebugLibraries>
53-
<PlatformToolset>v140</PlatformToolset>
53+
<PlatformToolset>v142</PlatformToolset>
5454
<WholeProgramOptimization>true</WholeProgramOptimization>
5555
<CharacterSet>MultiByte</CharacterSet>
5656
</PropertyGroup>

msvc/build-install.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@
2121
<PropertyGroup Label="Globals">
2222
<ProjectGuid>{A9DC644B-9171-4FCD-BF21-2CC6D055FC40}</ProjectGuid>
2323
<RootNamespace>buildinstall</RootNamespace>
24-
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
24+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2525
</PropertyGroup>
2626
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2727
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2828
<ConfigurationType>Utility</ConfigurationType>
2929
<UseDebugLibraries>true</UseDebugLibraries>
30-
<PlatformToolset>v140</PlatformToolset>
30+
<PlatformToolset>v142</PlatformToolset>
3131
<CharacterSet>MultiByte</CharacterSet>
3232
</PropertyGroup>
3333
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3434
<ConfigurationType>Utility</ConfigurationType>
3535
<UseDebugLibraries>false</UseDebugLibraries>
36-
<PlatformToolset>v140</PlatformToolset>
36+
<PlatformToolset>v142</PlatformToolset>
3737
<WholeProgramOptimization>true</WholeProgramOptimization>
3838
<CharacterSet>MultiByte</CharacterSet>
3939
</PropertyGroup>
4040
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4141
<ConfigurationType>Utility</ConfigurationType>
4242
<UseDebugLibraries>true</UseDebugLibraries>
43-
<PlatformToolset>v140</PlatformToolset>
43+
<PlatformToolset>v142</PlatformToolset>
4444
<CharacterSet>MultiByte</CharacterSet>
4545
</PropertyGroup>
4646
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4747
<ConfigurationType>Utility</ConfigurationType>
4848
<UseDebugLibraries>false</UseDebugLibraries>
49-
<PlatformToolset>v140</PlatformToolset>
49+
<PlatformToolset>v142</PlatformToolset>
5050
<WholeProgramOptimization>true</WholeProgramOptimization>
5151
<CharacterSet>MultiByte</CharacterSet>
5252
</PropertyGroup>

msvc/build-package.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@
2121
<PropertyGroup Label="Globals">
2222
<ProjectGuid>{B6E563B8-7F57-4F7F-9439-F2405D4E2522}</ProjectGuid>
2323
<RootNamespace>buildpackage</RootNamespace>
24-
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
24+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2525
</PropertyGroup>
2626
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2727
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2828
<ConfigurationType>Utility</ConfigurationType>
2929
<UseDebugLibraries>true</UseDebugLibraries>
30-
<PlatformToolset>v140</PlatformToolset>
30+
<PlatformToolset>v142</PlatformToolset>
3131
<CharacterSet>MultiByte</CharacterSet>
3232
</PropertyGroup>
3333
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3434
<ConfigurationType>Utility</ConfigurationType>
3535
<UseDebugLibraries>false</UseDebugLibraries>
36-
<PlatformToolset>v140</PlatformToolset>
36+
<PlatformToolset>v142</PlatformToolset>
3737
<WholeProgramOptimization>true</WholeProgramOptimization>
3838
<CharacterSet>MultiByte</CharacterSet>
3939
</PropertyGroup>
4040
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4141
<ConfigurationType>Utility</ConfigurationType>
4242
<UseDebugLibraries>true</UseDebugLibraries>
43-
<PlatformToolset>v140</PlatformToolset>
43+
<PlatformToolset>v142</PlatformToolset>
4444
<CharacterSet>MultiByte</CharacterSet>
4545
</PropertyGroup>
4646
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4747
<ConfigurationType>Utility</ConfigurationType>
4848
<UseDebugLibraries>false</UseDebugLibraries>
49-
<PlatformToolset>v140</PlatformToolset>
49+
<PlatformToolset>v142</PlatformToolset>
5050
<WholeProgramOptimization>true</WholeProgramOptimization>
5151
<CharacterSet>MultiByte</CharacterSet>
5252
</PropertyGroup>

0 commit comments

Comments
 (0)