/[RomCheater]/trunk/MSBuild_CurrentVersion/Program.cs
ViewVC logotype

Diff of /trunk/MSBuild_CurrentVersion/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/MSBuild_CurrentVersion/Program.cs	2012/05/10 18:12:06	117
+++ trunk/MSBuild_CurrentVersion/Program.cs	2014/04/15 19:35:55	823
@@ -25,7 +25,9 @@
 
             string version_file = "current-version.txt";
             string full_path = string.Format(@"{0}\{1}", asm_path,version_file);
-            using (FileStream fs = new FileStream(full_path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
+            FileInfo fi = new FileInfo(full_path);
+            if (fi.Exists) fi.Delete();
+            using (FileStream fs = new FileStream(full_path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite))
             {
                 StreamWriter sw = new StreamWriter(fs);
                 sw.AutoFlush = true;
@@ -40,8 +42,17 @@
                     //if (ns.Contains("CorePlugins")) { ns = string.Format("{0}.{1}", t.Namespace, t.Name); }
                     //if (ns.Contains("Be.Windows.Forms")) { ns = pair.Key; }
                     FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);
-                    Console.WriteLine(string.Format("    {0} v{1} {2}", pair.Key, fvi.FileVersion, GetAssemblyArchitecture(asm)));
-                    sw.WriteLine(string.Format("    {0} v{1} {2}", pair.Key, fvi.FileVersion, GetAssemblyArchitecture(asm)));
+                    string version = fvi.FileVersion;
+#if DEBUG
+                    version = string.Format("{0}", version);
+                    
+#endif
+#if RELEASE
+                   version = version.Replace("-debug", "-release");
+#endif
+
+                    Console.WriteLine(string.Format("    {0} v{1}-{2}", pair.Key, version, GetAssemblyArchitecture(asm)));
+                   sw.WriteLine(string.Format("    {0} v{1}-{2}", pair.Key, version, GetAssemblyArchitecture(asm)));
                 }
                 sw.Close();                
             }
@@ -53,9 +64,9 @@
 
             foreach (ProcessorAssemblyArchitecture arch in attributes)
             {
-                return arch.ProcessorArchitecture;
+                return arch.Architecture;
             }
-            return ProcessorAssemblyArchitecture.Undefined;
+            return ProcessorAssemblyArchitecture.GetProcessorArchitecture(t);
         }
 
         static Dictionary<string, Type> CreateAssemblyDictonary()
@@ -63,9 +74,9 @@
             Dictionary<string, Type> dict = new Dictionary<string, Type>();
 
             #region assemblies
-            dict.Add("RomCheater.exe", typeof(RomCheater.Main));
-            
-            dict.Add("RomCheater.Logging.dll", typeof(RomCheater.Logging.logger));
+            dict.Add("RomCheater.Core.dll", typeof(RomCheater.Core.dummy));
+            dict.Add("RomCheater.exe", typeof(RomCheater.Main));            
+            dict.Add("RomCheater.Logging.dll", typeof(RomCheater.Logging.LoggingConstants));
             dict.Add("RomCheater.PluginFramework.dll", typeof(RomCheater.PluginFramework.dummy));
             dict.Add("RomCheater.UserSettingsSupport.dll", typeof(RomCheater.UserSettingsSupport.SettingSubscriber));
             dict.Add("RomCheater.CorePlugins.dll", typeof(RomCheater.CorePlugins.Config.GenericConfig));
@@ -78,6 +89,9 @@
             #region deps
             dict.Add("Be.Windows.Forms.HexBox.dll", typeof(Be.Windows.Forms.HexBox));
             dict.Add("Utilities.TransparentControls.dll", typeof(Utilities.TransparentControls.Win32));
+            dict.Add("ManagedWinapi.dll", typeof(ManagedWinapi.ClipboardNotifier));
+            dict.Add("WeifenLuo.WinFormsUI.Docking.dll", typeof(WeifenLuo.WinFormsUI.Docking.DockPanel));
+            dict.Add("Enterprise.Logging.dll", typeof(Enterprise.Logging.gLog));
             #endregion
 
             #endregion

 

  ViewVC Help
Powered by ViewVC 1.1.22