• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FreeTrainの進化系を目指す


Commit MetaInfo

Revision32 (tree)
Time2015-03-22 16:19:18
Authorc477

Log Message

VS2013対応

Change Summary

Incremental Difference

--- trunk/framework/framework/plugin/PluginSerializationBinder.cs (revision 31)
+++ trunk/framework/framework/plugin/PluginSerializationBinder.cs (revision 32)
@@ -22,6 +22,12 @@
2222
2323 private PluginSerializationBinder(){
2424 AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(OnAssemblyResolve);
25+ Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();
26+ foreach (Assembly a in asms)
27+ {
28+ if (a.GlobalAssemblyCache) continue;
29+ asmcache.Add(a.CodeBase, a);
30+ }
2531 }
2632
2733 #region resolve assembly on deserialize
@@ -53,17 +59,24 @@
5359 public static Assembly SafeLoadAssembly(IFileSource f) {
5460 Assembly a = null;
5561 LocalFile lfile = f as LocalFile;
56- if (lfile != null) {
57- // load assumig from local strage.
58- a = Assembly.LoadFrom(lfile.AbsolutePath);
59- } else if (!asmcache.TryGetValue(f.Uri, out a)) {
60- // load from byte stream.
61- using (Stream stream = f.OpenRead()) {
62- byte[] dllimage = new byte[stream.Length];
63- stream.Read(dllimage, 0, dllimage.Length);
64- stream.Close();
65- a = Assembly.Load(dllimage);
62+ if (!asmcache.TryGetValue(f.Uri, out a))
63+ {
64+ if (lfile != null)
65+ {
66+ // load assumig from local strage.
67+ a = Assembly.LoadFrom(lfile.AbsolutePath);
6668 }
69+ else
70+ {
71+ // load from byte stream.
72+ using (Stream stream = f.OpenRead())
73+ {
74+ byte[] dllimage = new byte[stream.Length];
75+ stream.Read(dllimage, 0, dllimage.Length);
76+ stream.Close();
77+ a = Assembly.Load(dllimage);
78+ }
79+ }
6780 asmcache.Add(f.Uri, a);
6881 }
6982 return a;
--- trunk/framework/util/ConfigureService.cs (revision 31)
+++ trunk/framework/util/ConfigureService.cs (revision 32)
@@ -33,7 +33,7 @@
3333 static public void RegisterAssembly( Assembly asm )
3434 {
3535 list.Add(asm);
36- BuildSysInfoText();
36+ //BuildSysInfoText();
3737 }
3838
3939 #region build system information text
@@ -48,7 +48,9 @@
4848 infoText.Append("Assembly", asm.FullName);
4949 infoText.Append("CLR Version", RuntimeEnvironment.GetSystemVersion());
5050 Assembly mscore = Assembly.GetAssembly(typeof(string));
51- infoText.AppendInline(mscore.GetName().Name + " win32 version", Win32Version.GetAssemblyFileVersion(mscore));
51+ FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(mscore.Location);
52+ infoText.AppendInline(mscore.GetName().Name + " win32 version", fvi.FileVersion);
53+ //infoText.AppendInline(mscore.GetName().Name + " win32 version", Win32Version.GetAssemblyFileVersion(mscore));
5254 // using( Form f = new Form())
5355 // {
5456 // Assembly forms = Assembly.GetAssembly(f.GetType());
--- trunk/Win32Util/Win32Version.cs (revision 31)
+++ trunk/Win32Util/Win32Version.cs (revision 32)
@@ -31,6 +31,7 @@
3131 {
3232 }
3333
34+ [Obsolete("Application will shut down when build on VS2013")]
3435 unsafe static public string GetAssemblyFileVersion(Assembly target)
3536 {
3637 string fname = (new Uri(target.CodeBase)).LocalPath;