summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2006-01-19 18:33:29 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2006-01-19 18:33:29 +0000
commit2dbaf5ff3839841367870824169c2a13820e759c (patch)
treefbbbaa93d39db24adbc3524de2a0cc0cdc447caf
parenta37d2158cb9d0c95b7f1f59a401f8102527cb4db (diff)
downloadMPC-2dbaf5ff3839841367870824169c2a13820e759c.tar.gz
ChangeLogTag: Thu Jan 19 12:30:18 2006 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--modules/VC71ProjectCreator.pm15
-rw-r--r--modules/VC7ProjectCreator.pm11
-rw-r--r--modules/VC7WorkspaceCreator.pm46
-rw-r--r--modules/VC8ProjectCreator.pm26
-rw-r--r--templates/vc7csharp.mpd3
-rw-r--r--templates/vc7vb.mpd3
-rw-r--r--templates/vc8csharp.mpd112
-rw-r--r--templates/vc8csharp.mpt23
8 files changed, 177 insertions, 62 deletions
diff --git a/modules/VC71ProjectCreator.pm b/modules/VC71ProjectCreator.pm
index 5f880e42..4423ebb2 100644
--- a/modules/VC71ProjectCreator.pm
+++ b/modules/VC71ProjectCreator.pm
@@ -18,15 +18,20 @@ use vars qw(@ISA);
@ISA = qw(VC7ProjectCreator);
# ************************************************************
+# Data Section
+# ************************************************************
+
+my(%config) = ('vcversion' => '7.10',
+ 'forloopscope' => 'TRUE',
+ );
+
+# ************************************************************
# Subroutine Section
# ************************************************************
sub get_configurable {
- my($self) = shift;
- my($name) = shift;
- my(%config) = ('vcversion' => '7.10',
- 'forloopscope' => 'TRUE',
- );
+ my($self) = shift;
+ my($name) = shift;
return $config{$name};
}
diff --git a/modules/VC7ProjectCreator.pm b/modules/VC7ProjectCreator.pm
index e533047b..791fc111 100644
--- a/modules/VC7ProjectCreator.pm
+++ b/modules/VC7ProjectCreator.pm
@@ -46,6 +46,10 @@ my(%info) = ('cplusplus' => {'ext' => '.vcproj',
},
);
+my(%config) = ('vcversion' => '7.00',
+ 'forloopscope' => 'TRUE',
+ );
+
# ************************************************************
# Subroutine Section
# ************************************************************
@@ -81,11 +85,8 @@ sub get_and_symbol {
sub get_configurable {
- my($self) = shift;
- my($name) = shift;
- my(%config) = ('vcversion' => '7.00',
- 'forloopscope' => 'TRUE',
- );
+ my($self) = shift;
+ my($name) = shift;
return $config{$name};
}
diff --git a/modules/VC7WorkspaceCreator.pm b/modules/VC7WorkspaceCreator.pm
index b4d32edd..1454dfca 100644
--- a/modules/VC7WorkspaceCreator.pm
+++ b/modules/VC7WorkspaceCreator.pm
@@ -155,11 +155,6 @@ sub write_comps {
print $fh "Project(\"{$pguid}\") = \"$name\", \"$cpy\", \"{$guid}\"$crlf";
$self->print_inner_project($fh, $gen, $guid, $deps, $name, \%name_to_guid_map);
print $fh "EndProject$crlf";
-
- if ($deps ne '' &&
- ($language eq 'csharp' || $language eq 'vb')) {
- $self->add_references($project, $pguid, $deps, \%name_to_guid_map);
- }
}
print $fh "Global$crlf",
@@ -234,45 +229,4 @@ sub print_additional_sections {
}
-sub add_references {
- my($self) = shift;
- my($proj) = shift;
- my($pguid) = shift;
- my($deps) = shift;
- my($gmap) = shift;
- my($crlf) = $self->crlf();
- my($fh) = new FileHandle();
- my($outdir) = $self->get_outdir();
-
- if (open($fh, "$outdir/$proj")) {
- my($write) = 0;
- my(@read) = ();
- while(<$fh>) {
- if (/MPC\s+ADD\s+REFERENCES/) {
- $write = 1;
- my($darr) = $self->create_array($deps);
- foreach my $dep (@$darr) {
- push(@read, " <Reference$crlf",
- " Name = \"$dep\"$crlf",
- " Project = \"{$$gmap{$dep}}\"$crlf",
- " Package = \"{$pguid}\"$crlf",
- " />$crlf");
- }
- }
- else {
- push(@read, $_);
- }
- }
- close($fh);
-
- if ($write && open($fh, ">$outdir/$proj")) {
- foreach my $line (@read) {
- print $fh $line;
- }
- close($fh);
- }
- }
-}
-
-
1;
diff --git a/modules/VC8ProjectCreator.pm b/modules/VC8ProjectCreator.pm
index 4d2d636b..fe0168e3 100644
--- a/modules/VC8ProjectCreator.pm
+++ b/modules/VC8ProjectCreator.pm
@@ -24,8 +24,18 @@ my(%info) = ('cplusplus' => {'ext' => '.vcproj',
'lib' => 'vc8lib',
'template' => 'vc8',
},
+ 'csharp' => {'ext' => '.csproj',
+ 'dllexe' => 'vc8csharp',
+ 'libexe' => 'vc8csharp',
+ 'dll' => 'vc8csharp',
+ 'lib' => 'vc8csharp',
+ 'template' => 'vc8csharp',
+ },
);
+my(%config) = ('vcversion' => '8.00',
+ );
+
# ************************************************************
# Subroutine Section
# ************************************************************
@@ -33,8 +43,6 @@ my(%info) = ('cplusplus' => {'ext' => '.vcproj',
sub get_configurable {
my($self) = shift;
my($name) = shift;
- my(%config) = ('vcversion' => '8.00',
- );
return $config{$name};
}
@@ -48,4 +56,18 @@ sub get_info_hash {
return $self->SUPER::get_info_hash($key);
}
+sub translate_value {
+ my($self) = shift;
+ my($key) = shift;
+ my($val) = shift;
+
+ if ($key eq 'platform' && $val eq 'AnyCPU') {
+ ## Microsoft uses AnyCPU in the project file, but
+ ## uses Any CPU in the solution file.
+ $val = 'Any CPU';
+ }
+
+ return $val;
+}
+
1;
diff --git a/templates/vc7csharp.mpd b/templates/vc7csharp.mpd
index f574b372..229bbb14 100644
--- a/templates/vc7csharp.mpd
+++ b/templates/vc7csharp.mpd
@@ -2,7 +2,7 @@
<CSHARP
ProjectType = "Local"
ProductVersion = "<%prversion("7.10.3077")%>"
- SchemaVersion = "<%schemaversion("2.0)%>"
+ SchemaVersion = "<%schemaversion("2.0")%>"
ProjectGuid = "{<%guid%>}"
<%if(scc)%>
SccProjectName = "<%scc%>"
@@ -81,7 +81,6 @@
AssemblyName = "<%lib%>"
/>
<%endfor%>
- <!-- MPC ADD REFERENCES -->
</References>
</Build>
<Files>
diff --git a/templates/vc7vb.mpd b/templates/vc7vb.mpd
index 647f5f5f..addc256b 100644
--- a/templates/vc7vb.mpd
+++ b/templates/vc7vb.mpd
@@ -2,7 +2,7 @@
<VisualBasic
ProjectType = "Local"
ProductVersion = "<%prversion("7.10.3077")%>"
- SchemaVersion = "<%schemaversion("2.0)%>"
+ SchemaVersion = "<%schemaversion("2.0")%>"
ProjectGuid = "{<%guid%>}"
<%if(scc)%>
SccProjectName = "<%scc%>"
@@ -77,7 +77,6 @@
AssemblyName = "<%lib%>"
/>
<%endfor%>
- <!-- MPC ADD REFERENCES -->
</References>
</Build>
<Files>
diff --git a/templates/vc8csharp.mpd b/templates/vc8csharp.mpd
new file mode 100644
index 00000000..4a7de84e
--- /dev/null
+++ b/templates/vc8csharp.mpd
@@ -0,0 +1,112 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion><%prversion("8.0.50727")%></ProductVersion>
+ <SchemaVersion><%schemaversion("2.0")%></SchemaVersion>
+ <ProjectGuid>{<%guid%>}</ProjectGuid>
+<%foreach(configurations)%>
+<%if(forfirst)%>
+ <Configuration Condition=" '$(Configuration)' == '' "><%configuration%></Configuration>
+<%endif%>
+<%endfor%>
+<%foreach(platforms)%>
+<%if(forfirst)%>
+ <Platform Condition=" '$(Platform)' == '' "><%platform%></Platform>
+<%endif%>
+<%endfor%>
+<%if(ico_files)%>
+<%foreach(ico_files)%>
+<%if(forfirst)%>
+ <ApplicationIcon><%ico_file%></ApplicationIcon>
+<%endif%>
+<%endfor%>
+<%endif%>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+<%if(exename || sharedname || staticname)%>
+ <AssemblyName><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%></AssemblyName>
+<%endif%>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+<%if(exename || sharedname || staticname)%>
+ <OutputType><%if(exename)%><%if(winapp)%>Win<%endif%>Exe<%else%>Library<%endif%></OutputType>
+<%endif%>
+ <RootNamespace>
+ </RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject><%startupobject%></StartupObject>
+ <ReferencePath><%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%></ReferencePath>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+<%foreach(platforms)%>
+<%foreach(configurations)%>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == '<%configuration%>|<%platform%>' ">
+<%if(exename || sharedname || staticname)%>
+ <OutputPath><%if(exename)%><%if(install)%><%install%><%else%>.\<%output_dir%><%endif%><%else%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%output_dir%><%endif%>\</OutputPath>
+<%endif%>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants><%foreach(defines common_defines macros)%><%define%><%fornotlast(";")%><%endfor%></DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols><%if(optimize)%>false<%else%>true<%endif%></DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize><%if(optimize)%>true<%else%>false<%endif%></Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType><%if(optimize)%>none<%else%>full<%endif%></DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+<%endfor%>
+<%endfor%>
+ <ItemGroup>
+<%foreach(sort(libs))%>
+ <Reference Include="<%libname_prefix%><%lib%>">
+ <Name><%libname_prefix%><%lib%></Name>
+ </Reference>
+<%endfor%>
+<%foreach(lib, sort(lit_libs pure_libs))%>
+ <Reference Include="<%lib%>">
+ <Name><%lib%></Name>
+ </Reference>
+<%endfor%>
+ </ItemGroup>
+ <ItemGroup>
+<%foreach(source_files)%>
+ <Compile Include="<%source_file%>">
+ <SubType><%if(flag_overrides(source_file, subtype))%><%flag_overrides(source_file, subtype)%><%else%>Code<%endif%></SubType>
+ </Compile>
+<%endfor%>
+<%foreach(ico_files)%>
+ <Content Include="<%ico_file%>" />
+<%endfor%>
+<%foreach(config_files)%>
+ <None Include="<%config_file%>" />
+<%endfor%>
+<%foreach(documentation_files)%>
+ <None Include="<%documentation_file%>" />
+<%endfor%>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/templates/vc8csharp.mpt b/templates/vc8csharp.mpt
new file mode 100644
index 00000000..36e9700a
--- /dev/null
+++ b/templates/vc8csharp.mpt
@@ -0,0 +1,23 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "common"
+conditional_include "windowscommon"
+
+configurations = Debug Release
+platforms = AnyCPU
+common_defines = TRACE
+
+Release {
+ optimize = 1
+ defines =
+ output_dir = Release
+}
+
+Debug {
+ optimize =
+ defines = DESIGN DEBUG
+ output_dir = Debug
+}
+
+conditional_include "user_vc8csharp"