From 77ca7d355f683fbf5378b5828f87ef87b5cfc531 Mon Sep 17 00:00:00 2001 From: leathl Date: Tue, 29 Dec 2009 21:49:01 +0000 Subject: [PATCH] ForwardMii 1.02 git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@14 eddbe33b-e435-4246-ac25-f5eb65f9a13c --- ForwardMii-Plugin/ForwardMii.cs | 2 +- ForwardMii-Plugin/ForwardMii_GX.cs | 19 ++++++++++++++++++- ForwardMii-Plugin/Properties/AssemblyInfo.cs | 8 ++++---- ForwardMii-Plugin/Readme_ForwardMii.txt | 3 +++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ForwardMii-Plugin/ForwardMii.cs b/ForwardMii-Plugin/ForwardMii.cs index 6d23c42..b337dce 100644 --- a/ForwardMii-Plugin/ForwardMii.cs +++ b/ForwardMii-Plugin/ForwardMii.cs @@ -21,7 +21,7 @@ namespace ForwardMii { public class ForwardMii_Plugin { - const string version = "1.01"; //Hint for myself: Never use a char in the Version (UpdateCheck)! + const string version = "1.02"; //Hint for myself: Never use a char in the Version (UpdateCheck)! public static string GetVersion() { diff --git a/ForwardMii-Plugin/ForwardMii_GX.cs b/ForwardMii-Plugin/ForwardMii_GX.cs index 0d0822c..2094e36 100644 --- a/ForwardMii-Plugin/ForwardMii_GX.cs +++ b/ForwardMii-Plugin/ForwardMii_GX.cs @@ -21,6 +21,8 @@ using System.Diagnostics; using System.Drawing; using System.IO; using System.Reflection; +using System.Text; +using System.Runtime.InteropServices; namespace ForwardMii { @@ -145,11 +147,26 @@ namespace ForwardMii } } + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + static extern uint GetShortPathName([MarshalAs(UnmanagedType.LPTStr)] string lpszLongPath, + [MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpszShortPath, uint cchBuffer); + + public static string GetShortPathName(string longPath) + { + uint size = 256; + StringBuilder buffer = new StringBuilder((int)size); + uint result = GetShortPathName(longPath, buffer, size); + return buffer.ToString(); + } + private bool Compile() { try { - ProcessStartInfo makeI = new ProcessStartInfo("make", "-C " + TempDir); + string tempDir = TempDir; + if (tempDir.Contains(" ")) { tempDir = GetShortPathName(tempDir); } + + ProcessStartInfo makeI = new ProcessStartInfo("make", "-C " + tempDir); makeI.UseShellExecute = false; makeI.CreateNoWindow = true; diff --git a/ForwardMii-Plugin/Properties/AssemblyInfo.cs b/ForwardMii-Plugin/Properties/AssemblyInfo.cs index a4693b5..933195f 100644 --- a/ForwardMii-Plugin/Properties/AssemblyInfo.cs +++ b/ForwardMii-Plugin/Properties/AssemblyInfo.cs @@ -25,9 +25,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("ForwardMii")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ForwardMii")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyCopyright("Copyright © Leathl 2009")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -49,5 +49,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.0")] -[assembly: AssemblyFileVersion("1.0.1.0")] +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] diff --git a/ForwardMii-Plugin/Readme_ForwardMii.txt b/ForwardMii-Plugin/Readme_ForwardMii.txt index 98367c8..5266ccf 100644 --- a/ForwardMii-Plugin/Readme_ForwardMii.txt +++ b/ForwardMii-Plugin/Readme_ForwardMii.txt @@ -11,6 +11,9 @@ the CustomizeMii project page. ----------------------------------------------------------------------------------------- Changelog: +Version 1.02 + - Compiling now works, if a space is in your Windows Username + Version 1.01 - Fixed bug that caused an object error while creating forwarders