- ProjectConverter is now able to:
-- conditionally convert project types (controlled by cli argument) -- convert all projects of one or many solutions (passed as cli argument) -- prepared to work with single project files (exception currently) To get the old behaviour you have to call: ProjectConverter /linux /psvita /windowsmetro ../../ANX.Framework.sln
This commit is contained in:
parent
2e25fe4d6b
commit
9d456d1019
@ -31,8 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SoundSystems", "SoundSystem
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.SoundSystem.Windows.XAudio", "SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio_WindowsMetro.csproj", "{6A582788-C4D2-410C-96CD-177F75712D65}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xinput", "Samples\Xinput\Xinput_WindowsMetro.csproj", "{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsGame", "Samples\WindowsGame\WindowsGame_WindowsMetro.csproj", "{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectConverter", "Tools\ProjectConverter\ProjectConverter.csproj", "{B5209A04-B2F8-4033-A5E7-545BE771214C}"
|
||||
@ -283,17 +281,6 @@ Global
|
||||
{6A582788-C4D2-410C-96CD-177F75712D65}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6A582788-C4D2-410C-96CD-177F75712D65}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{6A582788-C4D2-410C-96CD-177F75712D65}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Debug|x86.Build.0 = Debug|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Release|x86.ActiveCfg = Release|x86
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F}.Release|x86.Build.0 = Release|x86
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
@ -715,7 +702,6 @@ Global
|
||||
{AAA20E99-A897-4C91-A23E-D02B8F08ACA5} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{BC79B021-10E4-4D01-945A-7048FFF53A22} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{FA6E229D-4504-47B1-8A23-2D3FCC13F778} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{45D6F4DE-5BB6-4E86-8C44-F9CA307AE43F} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{A42413A9-5189-40CB-AACA-D50F24865431} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{05233BB1-444F-43F6-A3DF-B82AA924E094} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
|
@ -1,7 +1,11 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using ProjectConverter.Platforms;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
@ -11,17 +15,62 @@ namespace ProjectConverter
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
static Converter[] converters = new Converter[] { new LinuxConverter(), new MetroConverter(), new PsVitaConverter() };
|
||||
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Converter converter = new LinuxConverter();
|
||||
converter.ConvertAllProjects("../../ANX.Framework.sln");
|
||||
//
|
||||
// To restore "old" behaviour use:
|
||||
// ProjectConverter /linux /psvita /windowsmetro ../../ANX.Framework.sln
|
||||
//
|
||||
|
||||
converter = new PsVitaConverter();
|
||||
converter.ConvertAllProjects("../../ANX.Framework.sln");
|
||||
List<string> switches = new List<string>();
|
||||
Dictionary<string, string> keyValueParameters = new Dictionary<string,string>();
|
||||
List<string> files = new List<string>();
|
||||
|
||||
converter = new MetroConverter();
|
||||
converter.ConvertAllProjects("../../ANX.Framework.sln");
|
||||
foreach (string arg in args)
|
||||
{
|
||||
if (arg.StartsWith("/") || arg.StartsWith("-"))
|
||||
{
|
||||
if (arg.Contains("="))
|
||||
{
|
||||
string[] parts = arg.Split('=');
|
||||
keyValueParameters[parts[0].Trim().ToLowerInvariant()] = parts[1].Trim().ToLowerInvariant();
|
||||
}
|
||||
else
|
||||
{
|
||||
switches.Add(arg.Substring(1).Trim().ToLowerInvariant());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(arg))
|
||||
{
|
||||
files.Add(arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string file in files)
|
||||
{
|
||||
string fileExt = Path.GetExtension(file).ToLowerInvariant();
|
||||
|
||||
foreach (Converter converter in converters)
|
||||
{
|
||||
if (switches.Contains(converter.Postfix.ToLowerInvariant()))
|
||||
{
|
||||
switch (fileExt)
|
||||
{
|
||||
case ".sln":
|
||||
converter.ConvertAllProjects(file);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException("unsupported file type '" + fileExt + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user