|
Lines 125-130
my $xcodeVersion;
Tools/Scripts/webkitdirs.pm_sec1
|
| 125 |
my $programFilesPath; |
125 |
my $programFilesPath; |
| 126 |
my $vcBuildPath; |
126 |
my $vcBuildPath; |
| 127 |
my $vsInstallDir; |
127 |
my $vsInstallDir; |
|
|
128 |
my $msBuildInstallDir; |
| 128 |
my $vsVersion; |
129 |
my $vsVersion; |
| 129 |
my $windowsSourceDir; |
130 |
my $windowsSourceDir; |
| 130 |
my $winVersion; |
131 |
my $winVersion; |
|
Lines 515-520
sub visualStudioInstallDir
Tools/Scripts/webkitdirs.pm_sec2
|
| 515 |
return $vsInstallDir; |
516 |
return $vsInstallDir; |
| 516 |
} |
517 |
} |
| 517 |
|
518 |
|
|
|
519 |
sub msBuildInstallDir |
| 520 |
{ |
| 521 |
return $msBuildInstallDir if defined $msBuildInstallDir; |
| 522 |
|
| 523 |
$msBuildInstallDir = File::Spec->catdir(programFilesPath(), "MSBuild", "12.0", "Bin"); |
| 524 |
chomp($msBuildInstallDir = `cygpath "$msBuildInstallDir"`) if isCygwin(); |
| 525 |
|
| 526 |
return $msBuildInstallDir; |
| 527 |
} |
| 528 |
|
| 518 |
sub visualStudioVersion |
529 |
sub visualStudioVersion |
| 519 |
{ |
530 |
{ |
| 520 |
return $vsVersion if defined $vsVersion; |
531 |
return $vsVersion if defined $vsVersion; |
|
Lines 531-537
sub determineConfigurationForVisualStudi
Tools/Scripts/webkitdirs.pm_sec3
|
| 531 |
return if defined $configurationForVisualStudio; |
542 |
return if defined $configurationForVisualStudio; |
| 532 |
determineConfiguration(); |
543 |
determineConfiguration(); |
| 533 |
# FIXME: We should detect when Debug_All or Production has been chosen. |
544 |
# FIXME: We should detect when Debug_All or Production has been chosen. |
| 534 |
$configurationForVisualStudio = $configuration . (isWin64() ? "|x64" : "|Win32"); |
545 |
$configurationForVisualStudio = "/p:Configuration=" . $configuration; |
| 535 |
} |
546 |
} |
| 536 |
|
547 |
|
| 537 |
sub usesPerConfigurationBuildDirectory |
548 |
sub usesPerConfigurationBuildDirectory |
|
Lines 1564-1581
sub setupCygwinEnv()
Tools/Scripts/webkitdirs.pm_sec4
|
| 1564 |
return if $vcBuildPath; |
1575 |
return if $vcBuildPath; |
| 1565 |
|
1576 |
|
| 1566 |
my $programFilesPath = programFilesPath(); |
1577 |
my $programFilesPath = programFilesPath(); |
| 1567 |
$vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com)); |
1578 |
my $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com)); |
| 1568 |
if (-e $vcBuildPath) { |
1579 |
if (-e $visualStudioPath) { |
| 1569 |
# Visual Studio is installed; |
1580 |
# Visual Studio is installed; |
| 1570 |
if (visualStudioVersion() eq "12") { |
1581 |
if (visualStudioVersion() eq "12") { |
| 1571 |
$vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe)); |
1582 |
$visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe)); |
| 1572 |
} |
1583 |
} |
| 1573 |
} else { |
1584 |
} else { |
| 1574 |
# Visual Studio not found, try VC++ Express |
1585 |
# Visual Studio not found, try VC++ Express |
| 1575 |
$vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe)); |
1586 |
$visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe)); |
| 1576 |
if (! -e $vcBuildPath) { |
1587 |
if (! -e $visualStudioPath) { |
| 1577 |
print "*************************************************************\n"; |
1588 |
print "*************************************************************\n"; |
| 1578 |
print "Cannot find '$vcBuildPath'\n"; |
1589 |
print "Cannot find '$visualStudioPath'\n"; |
| 1579 |
print "Please execute the file 'vcvars32.bat' from\n"; |
1590 |
print "Please execute the file 'vcvars32.bat' from\n"; |
| 1580 |
print "'$programFilesPath\\Microsoft Visual Studio 12.0\\VC\\bin\\'\n"; |
1591 |
print "'$programFilesPath\\Microsoft Visual Studio 12.0\\VC\\bin\\'\n"; |
| 1581 |
print "to setup the necessary environment variables.\n"; |
1592 |
print "to setup the necessary environment variables.\n"; |
|
Lines 1590-1595
sub setupCygwinEnv()
Tools/Scripts/webkitdirs.pm_sec5
|
| 1590 |
print "WEBKIT_LIBRARIES is set to: ", $ENV{"WEBKIT_LIBRARIES"}, "\n"; |
1601 |
print "WEBKIT_LIBRARIES is set to: ", $ENV{"WEBKIT_LIBRARIES"}, "\n"; |
| 1591 |
# FIXME (125180): Remove the following temporary 64-bit support once official support is available. |
1602 |
# FIXME (125180): Remove the following temporary 64-bit support once official support is available. |
| 1592 |
print "WEBKIT_64_SUPPORT is set to: ", $ENV{"WEBKIT_64_SUPPORT"}, "\n" if isWin64(); |
1603 |
print "WEBKIT_64_SUPPORT is set to: ", $ENV{"WEBKIT_64_SUPPORT"}, "\n" if isWin64(); |
|
|
1604 |
|
| 1605 |
# We will actually use MSBuild to build WebKit, but we need to find the Visual Studio install (above) to make |
| 1606 |
# sure we use the right options. |
| 1607 |
$vcBuildPath = File::Spec->catfile(msBuildInstallDir(), qw(MSBuild.exe)); |
| 1608 |
if (! -e $vcBuildPath) { |
| 1609 |
print "*************************************************************\n"; |
| 1610 |
print "Cannot find '$vcBuildPath'\n"; |
| 1611 |
print "Please make sure execute that the Microsoft .NET Framework SDK\n"; |
| 1612 |
print "is installed on this machine.\n"; |
| 1613 |
print "*************************************************************\n"; |
| 1614 |
die; |
| 1615 |
} |
| 1593 |
} |
1616 |
} |
| 1594 |
|
1617 |
|
| 1595 |
sub dieIfWindowsPlatformSDKNotInstalled |
1618 |
sub dieIfWindowsPlatformSDKNotInstalled |
|
Lines 1655-1666
sub buildVisualStudioProject
Tools/Scripts/webkitdirs.pm_sec6
|
| 1655 |
|
1678 |
|
| 1656 |
chomp($project = `cygpath -w "$project"`) if isCygwin(); |
1679 |
chomp($project = `cygpath -w "$project"`) if isCygwin(); |
| 1657 |
|
1680 |
|
| 1658 |
my $action = "/build"; |
1681 |
my $action = "/t:build"; |
| 1659 |
if ($clean) { |
1682 |
if ($clean) { |
| 1660 |
$action = "/clean"; |
1683 |
$action = "/t:clean"; |
| 1661 |
} |
1684 |
} |
| 1662 |
|
1685 |
|
| 1663 |
my @command = ($vcBuildPath, $project, $action, $config); |
1686 |
my $platform = "/p:Platform=" . (isWin64() ? "x64" : "Win32"); |
|
|
1687 |
my $logFile = File::Spec->catdir($baseProductDir, $configuration, "BuildOutput.htm"); |
| 1688 |
chomp($logFile = `cygpath -w "$logFile"`) if isCygwin(); |
| 1689 |
my $logging = "/flp:LogFile=" . $logFile . ";Verbosity=minimal"; |
| 1690 |
|
| 1691 |
my @command = ($vcBuildPath, "/verbosity:minimal", $project, $action, $config, $platform, "/fl", $logging); |
| 1664 |
|
1692 |
|
| 1665 |
print join(" ", @command), "\n"; |
1693 |
print join(" ", @command), "\n"; |
| 1666 |
return system @command; |
1694 |
return system @command; |