/[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

revision 138 by william, Fri May 11 11:27:43 2012 UTC revision 812 by william, Tue Apr 15 14:52:10 2014 UTC
# Line 25  namespace MSBuild_CurrentVersion Line 25  namespace MSBuild_CurrentVersion
25    
26              string version_file = "current-version.txt";              string version_file = "current-version.txt";
27              string full_path = string.Format(@"{0}\{1}", asm_path,version_file);              string full_path = string.Format(@"{0}\{1}", asm_path,version_file);
28              using (FileStream fs = new FileStream(full_path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))              FileInfo fi = new FileInfo(full_path);
29                if (fi.Exists) fi.Delete();
30                using (FileStream fs = new FileStream(full_path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite))
31              {              {
32                  StreamWriter sw = new StreamWriter(fs);                  StreamWriter sw = new StreamWriter(fs);
33                  sw.AutoFlush = true;                  sw.AutoFlush = true;
# Line 40  namespace MSBuild_CurrentVersion Line 42  namespace MSBuild_CurrentVersion
42                      //if (ns.Contains("CorePlugins")) { ns = string.Format("{0}.{1}", t.Namespace, t.Name); }                      //if (ns.Contains("CorePlugins")) { ns = string.Format("{0}.{1}", t.Namespace, t.Name); }
43                      //if (ns.Contains("Be.Windows.Forms")) { ns = pair.Key; }                      //if (ns.Contains("Be.Windows.Forms")) { ns = pair.Key; }
44                      FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);                      FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);
45                      Console.WriteLine(string.Format("    {0} v{1}-{2}", pair.Key, fvi.FileVersion, GetAssemblyArchitecture(asm)));                      string version = fvi.FileVersion;
46                      sw.WriteLine(string.Format("    {0} v{1}-{2}", pair.Key, fvi.FileVersion, GetAssemblyArchitecture(asm)));  #if DEBUG
47                        version = string.Format("{0}", version);
48                        
49    #endif
50    #if RELEASE
51                       version = version.Replace("-debug", "-release");
52    #endif
53    
54                        Console.WriteLine(string.Format("    {0} v{1}-{2}", pair.Key, version, GetAssemblyArchitecture(asm)));
55                       sw.WriteLine(string.Format("    {0} v{1}-{2}", pair.Key, version, GetAssemblyArchitecture(asm)));
56                  }                  }
57                  sw.Close();                                  sw.Close();                
58              }              }
# Line 65  namespace MSBuild_CurrentVersion Line 76  namespace MSBuild_CurrentVersion
76              #region assemblies              #region assemblies
77              dict.Add("RomCheater.Core.dll", typeof(RomCheater.Core.dummy));              dict.Add("RomCheater.Core.dll", typeof(RomCheater.Core.dummy));
78              dict.Add("RomCheater.exe", typeof(RomCheater.Main));                          dict.Add("RomCheater.exe", typeof(RomCheater.Main));            
79              dict.Add("RomCheater.Logging.dll", typeof(RomCheater.Logging.logger));              dict.Add("RomCheater.Logging.dll", typeof(RomCheater.Logging.LoggingConstants));
80              dict.Add("RomCheater.PluginFramework.dll", typeof(RomCheater.PluginFramework.dummy));              dict.Add("RomCheater.PluginFramework.dll", typeof(RomCheater.PluginFramework.dummy));
81              dict.Add("RomCheater.UserSettingsSupport.dll", typeof(RomCheater.UserSettingsSupport.SettingSubscriber));              dict.Add("RomCheater.UserSettingsSupport.dll", typeof(RomCheater.UserSettingsSupport.SettingSubscriber));
82              dict.Add("RomCheater.CorePlugins.dll", typeof(RomCheater.CorePlugins.Config.GenericConfig));              dict.Add("RomCheater.CorePlugins.dll", typeof(RomCheater.CorePlugins.Config.GenericConfig));
# Line 79  namespace MSBuild_CurrentVersion Line 90  namespace MSBuild_CurrentVersion
90              dict.Add("Be.Windows.Forms.HexBox.dll", typeof(Be.Windows.Forms.HexBox));              dict.Add("Be.Windows.Forms.HexBox.dll", typeof(Be.Windows.Forms.HexBox));
91              dict.Add("Utilities.TransparentControls.dll", typeof(Utilities.TransparentControls.Win32));              dict.Add("Utilities.TransparentControls.dll", typeof(Utilities.TransparentControls.Win32));
92              dict.Add("ManagedWinapi.dll", typeof(ManagedWinapi.ClipboardNotifier));              dict.Add("ManagedWinapi.dll", typeof(ManagedWinapi.ClipboardNotifier));
93              //dict.Add("WeifenLuo.WinFormsUI.Docking.dll", typeof(WeifenLuo.WinFormsUI.Docking.DockPanel));              dict.Add("WeifenLuo.WinFormsUI.Docking.dll", typeof(WeifenLuo.WinFormsUI.Docking.DockPanel));
94              #endregion              #endregion
95    
96              #endregion              #endregion

Legend:
Removed from v.138  
changed lines
  Added in v.812

  ViewVC Help
Powered by ViewVC 1.1.22