1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

update xml files project

This commit is contained in:
Kevin Glynn 2010-12-29 13:32:30 +01:00
parent 959c489922
commit 3a91ff3ac5
6 changed files with 323 additions and 12 deletions

View File

@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cs2j", "src\cs2j\cs2j.csproj", "{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime", "src\Antlr.Runtime\Antlr3.Runtime.csproj", "{CF15D0D5-BE72-4F98-B70F-229ABA1DF0E8}"
@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NDesk.Options", "src\NDesk.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cs2jTemplateGen", "src\cs2jTemplateGen\cs2jTemplateGen.csproj", "{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpdateTxFiles", "UpdateTxFiles\UpdateTxFiles.csproj", "{4B69CC57-FAC3-464F-9103-5187421DB85F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -22,6 +24,18 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4B69CC57-FAC3-464F-9103-5187421DB85F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B69CC57-FAC3-464F-9103-5187421DB85F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B69CC57-FAC3-464F-9103-5187421DB85F}.Default|Any CPU.ActiveCfg = Debug|Any CPU
{4B69CC57-FAC3-464F-9103-5187421DB85F}.Default|Any CPU.Build.0 = Debug|Any CPU
{4B69CC57-FAC3-464F-9103-5187421DB85F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B69CC57-FAC3-464F-9103-5187421DB85F}.Release|Any CPU.Build.0 = Release|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Default|Any CPU.ActiveCfg = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Default|Any CPU.Build.0 = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Release|Any CPU.Build.0 = Release|Any CPU
{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}.Default|Any CPU.ActiveCfg = Debug|Any CPU
@ -38,19 +52,13 @@ Global
{E6ACBB37-AF38-45E1-B399-0CEE63809A15}.Default|Any CPU.Build.0 = Debug|Any CPU
{E6ACBB37-AF38-45E1-B399-0CEE63809A15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6ACBB37-AF38-45E1-B399-0CEE63809A15}.Release|Any CPU.Build.0 = Release|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Default|Any CPU.ActiveCfg = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Default|Any CPU.Build.0 = Debug|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = src\cs2j\cs2j.csproj
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("UpdateTxFiles")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.IO;
using NDesk.Options;
using RusticiSoftware.Translator.CLR;
using RusticiSoftware.Translator.Utils;
using System.Xml.Serialization;
namespace UpdateTxFiles
{
class MainClass
{
private const string VERSION = "2010.1.1";
private static int Verbosity = 0;
private static DirectoryHT<TypeRepTemplate> oldAppEnv = new DirectoryHT<TypeRepTemplate>(null);
private static DirectoryHT<TypeRepTemplate> newAppEnv = new DirectoryHT<TypeRepTemplate>(null);
public delegate void FileProcessor(string fName);
private static void showVersion()
{
Console.Out.WriteLine(Path.GetFileNameWithoutExtension(System.Environment.GetCommandLineArgs()[0]) + ": " + VERSION);
}
private static void showUsage()
{
Console.Out.WriteLine("Usage: " + Path.GetFileNameWithoutExtension(System.Environment.GetCommandLineArgs()[0]));
Console.Out.WriteLine(" [-help] (this usage message)");
Console.Out.WriteLine(" [-v] (be [somewhat more] verbose, repeat for more verbosity)");
Console.Out.WriteLine(" [-inxmldir <root of old .NET Framework Class Library translations>+] (can be multiple directories, separated by semi-colons)");
Console.Out.WriteLine(" [-outxmkdir <root of new .NET Framework Class Library translations>+] ");
Environment.Exit(0);
}
public static void Main (string[] args)
{
long startTime = DateTime.Now.Ticks;
IList<string> remArgs = new List<string>();
IList<string> inDirs = new List<string>();
string outDir = "";
// Use a try/catch block for parser exceptions
try
{
// if we have at least one command-line argument
if (args.Length > 0)
{
OptionSet p = new OptionSet ()
.Add ("v", v => Verbosity++)
.Add ("version", v => showVersion())
.Add ("help|h|?", v => showUsage())
.Add ("inxmldir=", dir => inDirs.Add(Path.Combine(Directory.GetCurrentDirectory(), dir)))
.Add ("outxmldir=", dir => outDir = Path.Combine(Directory.GetCurrentDirectory(), dir))
;
remArgs = p.Parse (args);
// Load .Net templates
foreach (string r in inDirs)
doFile(r, ".xml", addOldNetTranslation, null);
foreach (KeyValuePair<string,TypeRepTemplate> de in oldAppEnv)
{
String xmlFName = Path.Combine(outDir,
((string)de.Key).Replace('.', Path.DirectorySeparatorChar) + ".xml");
String xmlFDir = Path.GetDirectoryName(xmlFName);
if (!Directory.Exists(xmlFDir))
{
Directory.CreateDirectory(xmlFDir);
}
XmlSerializer s = new XmlSerializer(de.Value.GetType());
TextWriter w = new StreamWriter(xmlFName);
s.Serialize(w, de.Value);
w.Close();
}
}
else
{
showUsage();
}
}
catch (System.Exception e)
{
Console.Error.WriteLine("exception: " + e);
Console.Error.WriteLine(e.StackTrace); // so we can get stack trace
}
double elapsedTime = ((DateTime.Now.Ticks - startTime) / TimeSpan.TicksPerMillisecond) / 1000.0;
if (Verbosity >= 1)
{
System.Console.Out.WriteLine("Total run time was {0} seconds.", elapsedTime);
}
}
// Call processFile on all files below f that have the given extension
public static void doFile(string root, string ext, FileProcessor processFile, IList<string> excludes)
{
string canonicalPath = Path.GetFullPath(root);
// If this is a directory, walk each file/dir in that directory
if (excludes == null || !excludes.Contains(canonicalPath.ToLower()))
{
if (Directory.Exists(canonicalPath))
{
string[] files = Directory.GetFileSystemEntries(canonicalPath);
for (int i = 0; i < files.Length; i++)
doFile(Path.Combine(canonicalPath, files[i]), ext, processFile, excludes);
}
else if ((Path.GetFileName(canonicalPath).Length > ext.Length) && canonicalPath.Substring(canonicalPath.Length - ext.Length).Equals(ext))
{
if (Verbosity >= 2) Console.WriteLine(" " + canonicalPath);
try
{
processFile(canonicalPath);
}
catch (Exception e)
{
Console.Error.WriteLine("\nCannot process file: " + canonicalPath);
Console.Error.WriteLine("exception: " + e);
}
}
}
}
// Here's where we do the real work...
public static void addOldNetTranslation(string fullName)
{
Stream s = new FileStream(fullName, FileMode.Open, FileAccess.Read);
TypeRepTemplate t = TypeRepTemplate.newInstance(s);
oldAppEnv[t.TypeName] = t;
}
}
}

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{4B69CC57-FAC3-464F-9103-5187421DB85F}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>UpdateTxFiles</RootNamespace>
<AssemblyName>UpdateTxFiles</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\src\cs2j\cs2j.csproj">
<Project>{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}</Project>
<Name>cs2j</Name>
</ProjectReference>
<ProjectReference Include="..\src\NDesk.Options\NDesk.Options.csproj">
<Project>{E6ACBB37-AF38-45E1-B399-0CEE63809A15}</Project>
<Name>NDesk.Options</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

@ -1 +1,40 @@
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>10.0.0</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{E6ACBB37-AF38-45E1-B399-0CEE63809A15}</ProjectGuid> <OutputType>Library</OutputType> <RootNamespace>NDesk.Options</RootNamespace> <AssemblyName>NDesk.Options</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug</OutputPath> <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Release</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs" /> <Compile Include="Options.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E6ACBB37-AF38-45E1-B399-0CEE63809A15}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NDesk.Options</RootNamespace>
<AssemblyName>NDesk.Options</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Options.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1 +1,52 @@
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>10.0.0</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}</ProjectGuid> <OutputType>Exe</OutputType> <RootNamespace>cs2jTemplateGen</RootNamespace> <AssemblyName>cs2jTemplateGen</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug</OutputPath> <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Externalconsole>true</Externalconsole> <Commandlineparameters>-dll /Users/keving/gitrepos/cs2j/CSharpTranslator/antlr3/cs2jTest/bin/Debug/cs2jTest.dll cs2jTest.Various.Features.Various</Commandlineparameters> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Release</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Externalconsole>true</Externalconsole> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Main.cs" /> <Compile Include="AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\cs2j\cs2j.csproj"> <Project>{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}</Project> <Name>cs2j</Name> </ProjectReference> <ProjectReference Include="..\NDesk.Options\NDesk.Options.csproj"> <Project>{E6ACBB37-AF38-45E1-B399-0CEE63809A15}</Project> <Name>NDesk.Options</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CC80B16E-0700-4AA5-ABA0-ADBCD9316952}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>cs2jTemplateGen</RootNamespace>
<AssemblyName>cs2jTemplateGen</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
<Commandlineparameters>-dll /Users/keving/gitrepos/cs2j/CSharpTranslator/antlr3/cs2jTest/bin/Debug/cs2jTest.dll cs2jTest.Various.Features.Various</Commandlineparameters>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\cs2j\cs2j.csproj">
<Project>{CE961AC5-C8D4-41B3-AAF3-23FA8FAEE8AD}</Project>
<Name>cs2j</Name>
</ProjectReference>
<ProjectReference Include="..\NDesk.Options\NDesk.Options.csproj">
<Project>{E6ACBB37-AF38-45E1-B399-0CEE63809A15}</Project>
<Name>NDesk.Options</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>