From 41861a0f3d9fb388d479ee122088c4e85eb85079 Mon Sep 17 00:00:00 2001 From: Konstantin Koch Date: Sat, 5 Sep 2015 12:37:48 +0200 Subject: [PATCH] fix build which was changes in last commit and fix AlphaTestEffectSample project file --- Samples/AlphaTestEffectSample.sln | 25 ++- .../AlphaTestEffectSample.csproj | 110 +++++------- .../AlphaTestEffectSample_Linux.csproj | 144 --------------- .../AlphaTestEffectSample_PSVita.csproj | 164 ------------------ .../AlphaTestEffectSample_WindowsMetro.csproj | 124 ------------- Samples/AlphaTestEffectSample/app.config | 3 + Tools/ContentBuilder/BuildHelper.cs | 17 +- Tools/ContentBuilder/Program.cs | 7 +- Tools/ContentBuilder/Resources.Designer.cs | 11 +- Tools/ContentBuilder/Resources.de.resx | 3 - Tools/ContentBuilder/Resources.resx | 3 - .../ANXVisualStudioPackage/BuildAppDomain.cs | 2 +- .../Nodes/ContentProjectNode.cs | 10 +- 13 files changed, 88 insertions(+), 535 deletions(-) delete mode 100644 Samples/AlphaTestEffectSample/AlphaTestEffectSample_Linux.csproj delete mode 100644 Samples/AlphaTestEffectSample/AlphaTestEffectSample_PSVita.csproj delete mode 100644 Samples/AlphaTestEffectSample/AlphaTestEffectSample_WindowsMetro.csproj create mode 100644 Samples/AlphaTestEffectSample/app.config diff --git a/Samples/AlphaTestEffectSample.sln b/Samples/AlphaTestEffectSample.sln index 69c90314..5a4f9812 100644 --- a/Samples/AlphaTestEffectSample.sln +++ b/Samples/AlphaTestEffectSample.sln @@ -1,12 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "AlphaTestEffectSample\AlphaTestEffectSample.csproj", "{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}" -EndProject Project("{75EFAE60-726E-430F-8661-4CF9ABD1306C}") = "SampleContent", "SampleContent\SampleContent.cproj", "{75EFAE60-726E-430F-8661-4CF9ABD1306C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "AlphaTestEffectSample\AlphaTestEffectSample.csproj", "{E1A73436-CD1C-41B8-9295-8F1C20740063}" + ProjectSection(ProjectDependencies) = postProject + {75EFAE60-726E-430F-8661-4CF9ABD1306C} = {75EFAE60-726E-430F-8661-4CF9ABD1306C} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,12 +20,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Any CPU.ActiveCfg = Debug|x86 - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.ActiveCfg = Debug|x86 - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Any CPU.ActiveCfg = Release|x86 - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.ActiveCfg = Release|x86 {75EFAE60-726E-430F-8661-4CF9ABD1306C}.Debug|Any CPU.ActiveCfg = Debug|Windows {75EFAE60-726E-430F-8661-4CF9ABD1306C}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows {75EFAE60-726E-430F-8661-4CF9ABD1306C}.Debug|Mixed Platforms.Build.0 = Debug|Windows @@ -31,6 +28,16 @@ Global {75EFAE60-726E-430F-8661-4CF9ABD1306C}.Release|Mixed Platforms.ActiveCfg = Release|XBox 360 {75EFAE60-726E-430F-8661-4CF9ABD1306C}.Release|Mixed Platforms.Build.0 = Release|XBox 360 {75EFAE60-726E-430F-8661-4CF9ABD1306C}.Release|x86.ActiveCfg = Release|XBox 360 + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Debug|x86.ActiveCfg = Debug|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Release|Any CPU.Build.0 = Release|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {E1A73436-CD1C-41B8-9295-8F1C20740063}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Samples/AlphaTestEffectSample/AlphaTestEffectSample.csproj b/Samples/AlphaTestEffectSample/AlphaTestEffectSample.csproj index ca7b6bd9..22427f31 100644 --- a/Samples/AlphaTestEffectSample/AlphaTestEffectSample.csproj +++ b/Samples/AlphaTestEffectSample/AlphaTestEffectSample.csproj @@ -1,98 +1,78 @@  - + + - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605} Debug - x86 + AnyCPU + {E1A73436-CD1C-41B8-9295-8F1C20740063} WinExe Properties AlphaTestEffectSample AlphaTestEffectSample v4.0 + 512 Client - anx.ico - GameThumbnail.png - publish\ - + + AnyCPU true full false - bin\x86\Debug - TRACE;DEBUG;WINDOWS; + bin\Debug\ + DEBUG;TRACE prompt 4 - true - false - x86 - false - + + AnyCPU pdbonly true - bin\x86\Release - TRACE;WINDOWS + bin\Release\ + TRACE prompt 4 - true - false - x86 - true + + + Always - - + + ..\..\bin\Debug\ANX.Framework.dll + + + ..\..\bin\Debug\ANX.InputSystem.Standard.dll + + + ..\..\bin\Debug\ANX.PlatformSystem.Windows.dll + + + ..\..\bin\Debug\ANX.RenderSystem.Windows.DX10.dll + + + + + + + + - - False - ..\..\bin\Debug\ANX.Framework.dll - - - False - ..\..\bin\Debug\ANX.InputDevices.Windows.XInput.dll - - - False - ..\..\bin\Debug\ANX.InputSystem.Standard.dll - - - False - ..\..\bin\Debug\ANX.PlatformSystem.Windows.dll - - - False - ..\..\bin\Debug\ANX.RenderSystem.GL3.dll - - - False - ..\..\bin\Debug\ANX.RenderSystem.Windows.DX10.dll - - - False - ..\..\bin\Debug\ANX.RenderSystem.Windows.DX11.dll - - - False - ..\..\bin\Debug\ANX.SoundSystem.Windows.XAudio.dll - - + - + - xcopy ..\SampleContent\bin\$(ConfigurationName)\ $(OutDir) /D /E /Y + xcopy $(ProjectDir)..\SampleContent\bin\$(ConfigurationName) $(TargetDir)SampleContent\ /D /E /Y - + \ No newline at end of file diff --git a/Samples/AlphaTestEffectSample/AlphaTestEffectSample_Linux.csproj b/Samples/AlphaTestEffectSample/AlphaTestEffectSample_Linux.csproj deleted file mode 100644 index be229b86..00000000 --- a/Samples/AlphaTestEffectSample/AlphaTestEffectSample_Linux.csproj +++ /dev/null @@ -1,144 +0,0 @@ - - - - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605} - Debug - x86 - Exe - Properties - AlphaTestEffectSample - AlphaTestEffectSample - v4.0 - v4.0 - Windows - HiDef - 307d58b8-3323-4e02-8fe4-e77d276cbaa0 - Game - anx.ico - GameThumbnail.png - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\x86\Debug - WINDOWS;TRACE;DEBUG;LINUX; - prompt - 4 - true - false - x86 - false - - - pdbonly - true - bin\x86\Release - WINDOWS;TRACE;LINUX; - prompt - 4 - true - false - x86 - true - - - - False - - - False - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} - ANX.Framework - - - {49066074-3B7B-4A55-B122-6BD33AB73558} - ANX.InputSystem.Standard - - - {EB8258E0-6741-4DB9-B756-1EBDF67B1ED6} - ANX.RenderSystem.GL3 - - - {FA6E229D-4504-47B1-8A23-2D3FCC13F778} - SampleContent - Content - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 und x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 4.0 - true - - - - - \ No newline at end of file diff --git a/Samples/AlphaTestEffectSample/AlphaTestEffectSample_PSVita.csproj b/Samples/AlphaTestEffectSample/AlphaTestEffectSample_PSVita.csproj deleted file mode 100644 index 1584b28e..00000000 --- a/Samples/AlphaTestEffectSample/AlphaTestEffectSample_PSVita.csproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605} - {69878862-DA7D-4DC6-B0A1-50D8FAB4242F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - x86 - Exe - Properties - AlphaTestEffectSample - AlphaTestEffectSample - v4.0 - Windows - HiDef - 307d58b8-3323-4e02-8fe4-e77d276cbaa0 - Game - anx.ico - GameThumbnail.png - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - 10.0.0 - 2.0 - - - true - full - false - bin\x86\Debug - WINDOWS;TRACE;DEBUG;PSVITA; - prompt - 4 - true - false - x86 - false - - - pdbonly - true - bin\x86\Release - WINDOWS;TRACE;PSVITA; - prompt - 4 - true - false - x86 - true - - - - False - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - - {6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35} - ANX.Framework - - - {60D08399-244F-46A3-91F1-4CFD26D961A3} - ANX.InputDevices.Windows.XInput - - - {49066074-3B7B-4A55-B122-6BD33AB73558} - ANX.InputSystem.Standard - - - {068EB2E9-963C-4E1B-8831-E25011F11FFE} - ANX.PlatformSystem.Windows - - - {EB8258E0-6741-4DB9-B756-1EBDF67B1ED6} - ANX.RenderSystem.GL3 - - - {5BE49183-2F6F-4527-AC90-D816911FCF90} - ANX.RenderSystem.Windows.DX10 - - - {B30DE9C2-0926-46B6-8351-9AF276C472D5} - ANX.RenderSystem.Windows.DX11 - - - {6A582788-C4D2-410C-96CD-177F75712D65} - ANX.SoundSystem.Windows.XAudio - - - {FA6E229D-4504-47B1-8A23-2D3FCC13F778} - SampleContent - Content - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 und x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 4.0 - true - - - - - \ No newline at end of file diff --git a/Samples/AlphaTestEffectSample/AlphaTestEffectSample_WindowsMetro.csproj b/Samples/AlphaTestEffectSample/AlphaTestEffectSample_WindowsMetro.csproj deleted file mode 100644 index 3f47b5b7..00000000 --- a/Samples/AlphaTestEffectSample/AlphaTestEffectSample_WindowsMetro.csproj +++ /dev/null @@ -1,124 +0,0 @@ - - - - {0005BDAA-F232-45C3-8D37-7E4FF7A1F605} - {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - x86 - AppContainerExe - Properties - AlphaTestEffectSample - AlphaTestEffectSample - en-US - 512 - Test_TemporaryKey.pfx - 12 - 8.1 - - - true - full - false - bin\x86\Debug\ModernUI - WINDOWS;TRACE;DEBUG;WINDOWSMETRO; - prompt - 4 - false - x86 - - - pdbonly - true - bin\x86\Release\ModernUI - WINDOWS;TRACE;WINDOWSMETRO; - prompt - 4 - false - x86 - - - - False - - - False - - - False - - - False - - - False - - - False - - - - - - - - - - - - - - {FA6E229D-4504-47B1-8A23-2D3FCC13F778} - SampleContent - Content - - - {6899f0c9-70b9-4eb0-9dd3-e598d4be3e35} - ANX.Framework - - - {49066074-3b7b-4a55-b122-6bd33ab73558} - ANX.InputSystem.Standard - - - {6a582788-c4d2-410c-96cd-177f75712d65} - ANX.SoundSystem.Windows.XAudio - - - - - - - - Designer - - - - - - - - 11.0 - - - - - {628ab80a-b1b9-4878-a810-7a58d4840f60} - ANX.InputDevices.Windows.ModernUI - - - {04f6041e-475e-4b2a-a889-6a33eabd718b} - ANX.PlatformSystem.Metro - - - {ff0ab665-2796-4354-9630-76c2751db3c2} - ANX.RenderSystem.Windows.Metro - - - \ No newline at end of file diff --git a/Samples/AlphaTestEffectSample/app.config b/Samples/AlphaTestEffectSample/app.config new file mode 100644 index 00000000..e2a5a187 --- /dev/null +++ b/Samples/AlphaTestEffectSample/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Tools/ContentBuilder/BuildHelper.cs b/Tools/ContentBuilder/BuildHelper.cs index ce19749d..2a9f1127 100644 --- a/Tools/ContentBuilder/BuildHelper.cs +++ b/Tools/ContentBuilder/BuildHelper.cs @@ -11,25 +11,32 @@ namespace ContentBuilder { public static class BuildHelper { - public static Uri GetAnxFrameworkPath() + public static bool TryGetAnxFrameworkPath(out Uri path) { + path = null; #if WINDOWS var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); var key = hklm.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\ANX.Framework", false); + if (key == null) + return false; + var value = key.GetValue(null) as string; if (value == null) - throw new KeyNotFoundException(Resources.AnxFrameworkRegistryNotFound); + return false; else - return new Uri(value); + { + path = new Uri(value); + return true; + } #else - return null; + return false; #endif } public static string GetOutputFileName(string outputDirectory, BuildItem buildItem) { - return Path.Combine(outputDirectory, Path.GetDirectoryName(buildItem.AssetName), Path.GetFileNameWithoutExtension(buildItem.AssetName) + ContentManager.Extension); + return Path.Combine(outputDirectory, Path.GetDirectoryName(buildItem.SourceFilename), buildItem.AssetName + ContentManager.Extension); } internal static string CreateSafeFileName(string text) diff --git a/Tools/ContentBuilder/Program.cs b/Tools/ContentBuilder/Program.cs index 32e07f58..4048cdf4 100644 --- a/Tools/ContentBuilder/Program.cs +++ b/Tools/ContentBuilder/Program.cs @@ -436,7 +436,12 @@ namespace ContentBuilder private static void LoadReferences(IEnumerable referencedAssemblies, string currentDirectory, ContentBuildLogger buildLogger) { List searchPaths = new List(); - searchPaths.Add(BuildHelper.GetAnxFrameworkPath()); + + Uri anxFrameworkPath; + if (BuildHelper.TryGetAnxFrameworkPath(out anxFrameworkPath)) + { + searchPaths.Add(anxFrameworkPath); + } searchPaths.Add(new Uri(currentDirectory)); Uri ownDirectory = new Uri(TrailingSlash(Path.GetDirectoryName(typeof(Program).Assembly.Location)), UriKind.Absolute); diff --git a/Tools/ContentBuilder/Resources.Designer.cs b/Tools/ContentBuilder/Resources.Designer.cs index 69593aa5..c720cbfb 100644 --- a/Tools/ContentBuilder/Resources.Designer.cs +++ b/Tools/ContentBuilder/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.34014 +// Laufzeitversion:4.0.30319.42000 // // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // der Code erneut generiert wird. @@ -60,15 +60,6 @@ namespace ContentBuilder { } } - /// - /// Sucht eine lokalisierte Zeichenfolge, die Unable to find registry key for ANX Framework. ähnelt. - /// - internal static string AnxFrameworkRegistryNotFound { - get { - return ResourceManager.GetString("AnxFrameworkRegistryNotFound", resourceCulture); - } - } - /// /// Sucht eine lokalisierte Zeichenfolge, die could not find file '{0}' to import. skipping. ähnelt. /// diff --git a/Tools/ContentBuilder/Resources.de.resx b/Tools/ContentBuilder/Resources.de.resx index 8932aeb8..acdb1db2 100644 --- a/Tools/ContentBuilder/Resources.de.resx +++ b/Tools/ContentBuilder/Resources.de.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Der Registrierungsschlüssel für ANX Framework kann nicht gefunden werden. - Datei '{0}' konnt nicht gefunden werden. Überspringe. diff --git a/Tools/ContentBuilder/Resources.resx b/Tools/ContentBuilder/Resources.resx index fe8ac0fd..89c21d06 100644 --- a/Tools/ContentBuilder/Resources.resx +++ b/Tools/ContentBuilder/Resources.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Unable to find registry key for ANX Framework. - could not find file '{0}' to import. skipping. diff --git a/Visual Studio/ANXVisualStudioPackage/BuildAppDomain.cs b/Visual Studio/ANXVisualStudioPackage/BuildAppDomain.cs index 74ec638c..6b45e990 100644 --- a/Visual Studio/ANXVisualStudioPackage/BuildAppDomain.cs +++ b/Visual Studio/ANXVisualStudioPackage/BuildAppDomain.cs @@ -516,7 +516,7 @@ namespace ANX.Framework.Build foreach (var buildItem in buildItems) { - if (buildCache.IsValid(buildItem, new Uri(BuildHelper.GetOutputFileName(activeConfiguration.OutputDirectory, buildItem)))) + if (buildCache.IsValid(buildItem, new Uri(BuildHelper.GetOutputFileName(activeConfiguration.OutputDirectory, buildItem), UriKind.Relative))) return false; } diff --git a/Visual Studio/ANXVisualStudioPackage/Nodes/ContentProjectNode.cs b/Visual Studio/ANXVisualStudioPackage/Nodes/ContentProjectNode.cs index 4067cb48..f40f4cbb 100644 --- a/Visual Studio/ANXVisualStudioPackage/Nodes/ContentProjectNode.cs +++ b/Visual Studio/ANXVisualStudioPackage/Nodes/ContentProjectNode.cs @@ -493,13 +493,11 @@ namespace ANX.Framework.VisualStudio.Nodes { buildDomain.SearchPaths.Clear(); buildDomain.SearchPaths.Add(new Uri(this.ProjectHome)); - try + + Uri anxFrameworkPath; + if (BuildHelper.TryGetAnxFrameworkPath(out anxFrameworkPath)) { - buildDomain.SearchPaths.Add(BuildHelper.GetAnxFrameworkPath()); - } - catch (Exception exc) - { - Console.WriteLine(exc.Message); + buildDomain.SearchPaths.Add(anxFrameworkPath); } buildDomain.Initialize(this.ProjectGuid.ToString());