diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-01 18:45:53 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-01 18:45:53 +0000 |
commit | 1e4e7674064d807fc413621621c47f85b06ef07e (patch) | |
tree | fe6fc49d3066eb26f6f971e9ea285c4c888d0848 | |
parent | 1d9e34445ad8fb2972088cb82f944f456670574f (diff) | |
download | ATCD-1e4e7674064d807fc413621621c47f85b06ef07e.tar.gz |
Finally got VC7 project and solutions to work
-rw-r--r-- | bin/MakeProjectCreator/modules/ProjectCreator.pm | 14 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/TemplateParser.pm | 6 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/VC7ProjectCreator.pm | 21 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm | 45 | ||||
-rw-r--r-- | bin/MakeProjectCreator/templates/vc7.mpd | 13 |
5 files changed, 64 insertions, 35 deletions
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm index 6e1b66028fd..76ec7e3ebc9 100644 --- a/bin/MakeProjectCreator/modules/ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm @@ -1167,6 +1167,11 @@ sub update_project_info { my($value) = ""; my($arr) = ($append && defined $$pi[0] ? pop(@$pi) : []); + ## Set up the hash table when we are starting a new project_info + if ($append == 0) { + $self->{'project_info_hash_table'} = {}; + } + ## Append the values of all names into one string my(@narr) = @$names; for(my $i = 0; $i <= $#narr; $i++) { @@ -1177,17 +1182,16 @@ sub update_project_info { } ## If we haven't seen this value yet, put it on the array - if (!defined $self->{'last_info_seen'} || - "@narr" ne $self->{'last_info_seen'}) { + if (!defined $self->{'project_info_hash_table'}->{"@narr $value"}) { + $self->{'project_info_hash_table'}->{"@narr $value"} = 1; $self->save_project_value("@narr", $value); push(@$arr, $value); } - ## Save the last info name seen, so we don't add duplicates above. - $self->{'last_info_seen'} = "@narr"; - ## Always push the array back onto the project_info push(@$pi, $arr); + + return $value; } diff --git a/bin/MakeProjectCreator/modules/TemplateParser.pm b/bin/MakeProjectCreator/modules/TemplateParser.pm index b75d33c5470..02719ac71c2 100644 --- a/bin/MakeProjectCreator/modules/TemplateParser.pm +++ b/bin/MakeProjectCreator/modules/TemplateParser.pm @@ -594,7 +594,11 @@ sub collect_data { $prjc->update_project_info($self, 1, ['depends']); ## VC7 Projects need to know the GUID. - $prjc->update_project_info($self, 1, ['guid']); + ## We need to save this value in our know values + ## since each guid will be different. We need this to + ## correspond to the same guid used in the workspace. + my($guid) = $prjc->update_project_info($self, 1, ['guid']); + $self->{'values'}->{'guid'} = $guid; } diff --git a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm index 16240bfb340..4fe9830933c 100644 --- a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm @@ -22,11 +22,28 @@ use vars qw(@ISA); # Subroutine Section # ************************************************************ -sub specific_lookup { +sub translate_value { my($self) = shift; my($key) = shift; + my($val) = shift; + + if ($key eq 'depends' && $val ne "") { + my($arr) = $self->create_array($val); + my($app) = ""; + $val = ""; + foreach my $entry (@$arr) { + $val .= "\"" . $self->project_file_name($entry) . "\" "; + } + $val =~ s/\s+$//; + } + return $val; +} + + +sub specific_lookup { + my($self) = shift; + my($tag) = shift; my($val) = undef; - my($tag) = $self->project_file_name($key); if (defined $self->{'guid_names'} && defined $self->{'guid_names'}->{$tag}) { diff --git a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm index f4c074f00f7..9ece2156f1f 100644 --- a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm @@ -12,7 +12,6 @@ package VC7WorkspaceCreator; use strict; -use GUID; use VC7ProjectCreator; use WorkspaceCreator; @@ -55,13 +54,15 @@ sub write_comps { my($fh) = shift; my($gen) = shift; my($projects) = $self->get_projects(); - my($ggen) = new GUID(); - my($guid) = $ggen->generate($self->workspace_file_name()); + my($guid) = '8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942'; my($pjs) = $self->get_project_info(); + my(@list) = $self->sort_dependencies($projects, $pjs); my($crlf) = $self->crlf(); + ## $guid above is the VC7 Project GUID. It should not change. + ## Project Information - foreach my $project (@$projects) { + foreach my $project (@list) { my($pi) = $$pjs{$project}; my($name, $deps, $pguid) = @$pi; @@ -74,10 +75,10 @@ sub write_comps { ## Project Configurations print $fh "Global$crlf" . - " GlobalSection(SolutionConfiguration) = preSolution$crlf"; + "\tGlobalSection(SolutionConfiguration) = preSolution$crlf"; my(%configs) = (); - foreach my $project (@$projects) { + foreach my $project (@list) { my($pi) = $$pjs{$project}; my($name, $deps, $pguid, @cfgs) = @$pi; foreach my $cfg (@cfgs) { @@ -87,14 +88,14 @@ sub write_comps { } my($count) = 0; foreach my $key (sort keys %configs) { - print $fh " ConfigName.$count = $key$crlf"; + print $fh "\t\tConfigName.$count = $key$crlf"; $count++; } ## Project Dependencies - print $fh " EndGlobalSection$crlf" . - " GlobalSection(ProjectDependencies) = postSolution$crlf"; - foreach my $project (@$projects) { + print $fh "\tEndGlobalSection$crlf" . + "\tGlobalSection(ProjectDependencies) = postSolution$crlf"; + foreach my $project (@list) { my($pi) = $$pjs{$project}; my($name, $deps, $pguid) = @$pi; if (defined $deps && $deps ne "") { @@ -106,31 +107,31 @@ sub write_comps { $val = $dep; } if ($pguid ne $val) { - print $fh " {$pguid}.$i = {$val}$crlf"; + print $fh "\t\t{$pguid}.$i = {$val}$crlf"; $i++; } } } } - print $fh " EndGlobalSection$crlf" . - " GlobalSection(ProjectConfiguration) = postSolution$crlf"; + print $fh "\tEndGlobalSection$crlf" . + "\tGlobalSection(ProjectConfiguration) = postSolution$crlf"; ## Project Configuration Names - foreach my $project (@$projects) { + foreach my $project (@list) { my($pi) = $$pjs{$project}; my($name, $deps, $pguid, @cfgs) = @$pi; - foreach my $cfg (@cfgs) { + foreach my $cfg (sort @cfgs) { my($c) = $cfg; $c =~ s/\|.*//; - print $fh " {$pguid}.$c.ActiveCfg = $cfg$crlf" . - " {$pguid}.$c.Build.0 = $cfg$crlf"; + print $fh "\t\t{$pguid}.$c.ActiveCfg = $cfg$crlf" . + "\t\t{$pguid}.$c.Build.0 = $cfg$crlf"; } } - print $fh " EndGlobalSection$crlf" . - " GlobalSection(ExtensibilityGlobals) = postSolution$crlf" . - " EndGlobalSection$crlf" . - " GlobalSection(ExtensibilityAddIns) = postSolution$crlf" . - " EndGlobalSection$crlf" . + print $fh "\tEndGlobalSection$crlf" . + "\tGlobalSection(ExtensibilityGlobals) = postSolution$crlf" . + "\tEndGlobalSection$crlf" . + "\tGlobalSection(ExtensibilityAddIns) = postSolution$crlf" . + "\tEndGlobalSection$crlf" . "EndGlobal$crlf"; } diff --git a/bin/MakeProjectCreator/templates/vc7.mpd b/bin/MakeProjectCreator/templates/vc7.mpd index fdb09e2617c..956b1b2c260 100644 --- a/bin/MakeProjectCreator/templates/vc7.mpd +++ b/bin/MakeProjectCreator/templates/vc7.mpd @@ -34,7 +34,9 @@ <%if(pch_header)%> UsePrecompiledHeader="3" PrecompiledHeaderThrough="<%pch_header%>" - PrecompiledHeaderFile="<%intermediate_dir%>\<%noextension(pch_header)%>.pch" +<%if(pch_source)%> + PrecompiledHeaderFile="<%intermediate_dir%>\<%noextension(pch_source)%>.pch" +<%endif%> <%endif%> AssemblerListingLocation="<%intermediate_dir%>" ObjectFile="<%intermediate_dir%>" @@ -43,6 +45,7 @@ <%endif%> WarningLevel="<%warning_level("3")%>" SuppressStartupBanner="TRUE" + Detect64BitPortabilityProblems="<%detect64("FALSE")%>" <%if(debug)%> DebugInformationFormat="<%debug_format("3")%>" <%endif%> @@ -60,15 +63,15 @@ AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" <%if(debug)%> GenerateDebugInformation="TRUE" -<%endif%> <%if(pdb)%> ProgramDatabaseFileName="<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%><%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%><%endif%><%if(type_is_static)%><%output_dir%>\<%staticdname%><%lib_modifier%><%endif%>.pdb" <%endif%> +<%endif%> SubSystem="<%subsystem("2")%>" <%if(type_is_dynamic)%> ImportLibrary="<%sharedname%><%lib_modifier%>.lib" <%endif%> - /> +/> <Tool Name="VCPostBuildEventTool"/> <Tool @@ -138,7 +141,7 @@ Name="VCCustomBuildTool" Description="Invoking TAO_IDL Compiler on <%idl_file%>" CommandLine="<%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> <%idl_file%>" - Outputs="<%noextension(idl_file)%>C.h;<%noextension(idl_file)%>C.i;<%noextension(idl_file)%>C.cpp;<%noextension(idl_file)%>S.h;<%noextension(idl_file)%>S.i;<%noextension(idl_file)%>S.cpp;<%noextension(idl_file)%>S_T.h;<%noextension(idl_file)%>S_T.i;<%noextension(idl_file)%>S_T.cpp" + Outputs="<%noextension(idl_file)%>C.h;<%noextension(idl_file)%>C.i;<%noextension(idl_file)%>C.cpp;<%noextension(idl_file)%>S.h;<%noextension(idl_file)%>S.i;<%noextension(idl_file)%>S.cpp;<%noextension(idl_file)%>S_T.h;<%noextension(idl_file)%>S_T.i;<%noextension(idl_file)%>S_T.cpp"/> </FileConfiguration> <%endfor%> </File> @@ -177,7 +180,7 @@ <%endif%> <%if(documentation_files)%> <Filter - Name="Documentation Files" + Name="Documentation" Filter=""> <%foreach(documentation_files)%> <File |