summaryrefslogtreecommitdiff
path: root/modules/VC8WorkspaceCreator.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2006-11-22 19:36:12 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2006-11-22 19:36:12 +0000
commita074d9d2320cd4478227c253fadc2d049ca26f63 (patch)
treef945fad25b15de95cbe47be0615fe0e189de1787 /modules/VC8WorkspaceCreator.pm
parentcb0e34c074e74768c7d1793dff6f5c2130800d2c (diff)
downloadMPC-a074d9d2320cd4478227c253fadc2d049ca26f63.tar.gz
ChangeLogTag: Wed Nov 22 19:34:29 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/VC8WorkspaceCreator.pm')
-rw-r--r--modules/VC8WorkspaceCreator.pm100
1 files changed, 50 insertions, 50 deletions
diff --git a/modules/VC8WorkspaceCreator.pm b/modules/VC8WorkspaceCreator.pm
index c35e38dd..651b2207 100644
--- a/modules/VC8WorkspaceCreator.pm
+++ b/modules/VC8WorkspaceCreator.pm
@@ -26,47 +26,11 @@ my(%lang_map) = ('cplusplus' => 'Visual C#',
'csharp' => 'Visual C#',
'vb' => 'Visual Basic',
'java' => 'Visual J#');
-my(@configs) = ('Debug', 'Release');
# ************************************************************
# Subroutine Section
# ************************************************************
-sub add_webapps {
- my($self) = shift;
- my($webappdirs) = shift;
- my($projects) = $self->get_projects();
- my($project_info) = $self->get_project_info();
-
- $self->{'vc8webapps'} = {} if (!defined $self->{'vc8webapps'});
- foreach my $webappdir (@$webappdirs) {
- # Add the website to the list of project names
- my($pname) = $webappdir;
- $pname =~ s/\//\\/g;
- $pname .= '\\' if ($pname !~ /\\$/);
- push(@$projects, $pname);
-
- # Generate the GUID for the website. We have to explicitly
- # create a new project using $webappdir as the 'project_name'.
- my($guid) = GUID::generate($self->workspace_file_name(),
- $pname,
- $self->getcwd());
-
- # Add the website project to the 'project_info'.
- @{$project_info->{$pname}} = ($pname,
- '',
- $guid,
- 'website');
- foreach my $cpu ('.NET', 'Any CPU') {
- foreach my $configuration (@configs) {
- push(@{$project_info->{$pname}}, "$configuration|$cpu");
- }
- }
-
- $self->{'vc8webapps'}->{$guid} = $pname;
- }
-}
-
sub pre_workspace {
my($self) = shift;
my($fh) = shift;
@@ -84,6 +48,24 @@ sub pre_workspace {
'# ', $self->create_command_line_string($0, @ARGV), $crlf;
}
+sub adjust_names {
+ my($self) = shift;
+ my($name) = shift;
+ my($proj) = shift;
+ my($lang) = shift;
+
+ if ($lang eq 'website') {
+ $proj = $self->mpc_basename($proj);
+ $proj =~ s/\.vcproj$//;
+ $proj .= '\\';
+ $name .= '\\';
+ }
+ else {
+ $proj =~ s/\//\\/g;
+ }
+ return $name, $proj;
+}
+
sub get_short_config_name {
my($self) = shift;
my($cfg) = shift;
@@ -116,34 +98,52 @@ sub allow_empty_dependencies {
}
sub print_inner_project {
- my($self) = shift;
+ my($self) = shift;
my($fh) = shift;
my($gen) = shift;
my($currguid) = shift;
my($deps) = shift;
my($name) = shift;
my($name_to_guid_map) = shift;
+ my($proj_language) = shift;
+ my($cfgs) = shift;
- if (defined $self->{'vc8webapps'}->{$currguid}) {
+ if ($proj_language eq 'website') {
my($crlf) = $self->crlf();
my($language) = $self->get_language();
- my($directory) = ($self->{'vc8webapps'}->{$currguid} eq '.\\' ?
- $self->get_workspace_name() . '\\' :
- $self->{'vc8webapps'}->{$currguid});
+ my($directory) = ($name eq '.\\' ?
+ $self->get_workspace_name() . '\\' : $name);
my($notrail) = $directory;
$notrail =~ s/\\$//;
# Print the website project.
print $fh "\tProjectSection(WebsiteProperties) = preProject", $crlf;
- foreach my $config (@configs) {
- print $fh "\t\t$config.AspNetCompiler.VirtualPath = \"/$notrail\"", $crlf,
- "\t\t$config.AspNetCompiler.PhysicalPath = \"$directory\"", $crlf,
- "\t\t$config.AspNetCompiler.TargetPath = \"PrecompiledWeb\\$directory\"", $crlf,
- "\t\t$config.AspNetCompiler.Updateable = \"true\"", $crlf,
- "\t\t$config.AspNetCompiler.ForceOverwrite = \"true\"", $crlf,
- "\t\t$config.AspNetCompiler.FixedNames = \"true\"", $crlf,
- "\t\t$config.AspNetCompiler.Debug = \"",
- ($config =~ /debug/i ? 'True' : 'False'), "\"", $crlf;
+
+ my($references) = undef;
+ foreach my $dep (@$deps) {
+ if (defined $$name_to_guid_map{$dep}) {
+ $references = 'ProjectReferences = "' if (!defined $references);
+ $references .= "{$$name_to_guid_map{$dep}}|$dep;";
+ }
+ }
+ if (defined $references) {
+ print $fh $references, '"', $crlf;
+ }
+
+ my(%cfg_seen) = ();
+ foreach my $config (@$cfgs) {
+ $config =~ s/\|.*//;
+ if (!$cfg_seen{$config}) {
+ print $fh "\t\t$config.AspNetCompiler.VirtualPath = \"/$notrail\"", $crlf,
+ "\t\t$config.AspNetCompiler.PhysicalPath = \"$directory\"", $crlf,
+ "\t\t$config.AspNetCompiler.TargetPath = \"PrecompiledWeb\\$directory\"", $crlf,
+ "\t\t$config.AspNetCompiler.Updateable = \"true\"", $crlf,
+ "\t\t$config.AspNetCompiler.ForceOverwrite = \"true\"", $crlf,
+ "\t\t$config.AspNetCompiler.FixedNames = \"true\"", $crlf,
+ "\t\t$config.AspNetCompiler.Debug = \"",
+ ($config =~ /debug/i ? 'True' : 'False'), "\"", $crlf;
+ $cfg_seen{$config} = 1;
+ }
}
print $fh "\t\tVWDPort = \"1573\"", $crlf,
"\t\tDefaultWebSiteLanguage = \"", $lang_map{$language}, "\"", $crlf,