Put back the crappy dll copying for now. There are other changes that require c# 12 which is a part of dotnet 8 and the use of System.Drawing.Common in dotnet 8 is entirely unsupported now. I may just have to live with this and get the System.Drawing porting work out of the way.

This commit is contained in:
Mike Dickson 2024-04-25 09:33:59 -04:00
parent 39da0872ea
commit 0281196fbd
4 changed files with 42 additions and 44 deletions

View file

@ -103,28 +103,27 @@ namespace OpenSim
m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
}
// NOPE
// // temporay set the platform dependent System.Drawing.Common.dll
// string targetdll = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
// "System.Drawing.Common.dll");
// string src = targetdll + (Util.IsWindows() ? ".win" : ".linux");
// try
// {
// if (!File.Exists(targetdll))
// File.Copy(src, targetdll);
// else
// {
// FileInfo targetInfo = new(targetdll);
// FileInfo srcInfo = new(src);
// if(targetInfo.Length != srcInfo.Length)
// File.Copy(src, targetdll, true);
// }
// }
// catch (Exception e)
// {
// m_log.Error("Failed to copy System.Drawing.Common.dll for current platform" + e.Message);
// throw;
// }
// temporay set the platform dependent System.Drawing.Common.dll
string targetdll = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"System.Drawing.Common.dll");
string src = targetdll + (Util.IsWindows() ? ".win" : ".linux");
try
{
if (!File.Exists(targetdll))
File.Copy(src, targetdll);
else
{
FileInfo targetInfo = new(targetdll);
FileInfo srcInfo = new(src);
if(targetInfo.Length != srcInfo.Length)
File.Copy(src, targetdll, true);
}
}
catch (Exception e)
{
m_log.Error("Failed to copy System.Drawing.Common.dll for current platform" + e.Message);
throw;
}
m_log.InfoFormat(
"[OPENSIM MAIN]: System Locale is {0}", System.Threading.Thread.CurrentThread.CurrentCulture);

View file

@ -142,28 +142,27 @@ namespace OpenSim.Server
connList = string.Join(",", servicesList.ToArray());
}
// NOPE
// // temporay set the platform dependent System.Drawing.Common.dll
// string targetdll = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
// "System.Drawing.Common.dll");
// string src = targetdll + (Util.IsWindows() ? ".win" : ".linux");
// try
// {
// if (!File.Exists(targetdll))
// File.Copy(src, targetdll);
// else
// {
// FileInfo targetInfo = new(targetdll);
// FileInfo srcInfo = new(src);
// if (targetInfo.Length != srcInfo.Length)
// File.Copy(src, targetdll, true);
// }
// }
// catch (Exception e)
// {
// m_log.Error("Failed to copy System.Drawing.Common.dll for current platform" + e.Message);
// throw;
// }
// temporay set the platform dependent System.Drawing.Common.dll
string targetdll = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"System.Drawing.Common.dll");
string src = targetdll + (Util.IsWindows() ? ".win" : ".linux");
try
{
if (!File.Exists(targetdll))
File.Copy(src, targetdll);
else
{
FileInfo targetInfo = new(targetdll);
FileInfo srcInfo = new(src);
if (targetInfo.Length != srcInfo.Length)
File.Copy(src, targetdll, true);
}
}
catch (Exception e)
{
m_log.Error("Failed to copy System.Drawing.Common.dll for current platform" + e.Message);
throw;
}
string[] conns = connList.Split(new char[] {',', ' ', '\n', '\r', '\t'});

Binary file not shown.

Binary file not shown.