diff --git a/src/EVEMon.Common/EVEMon.Common.csproj b/src/EVEMon.Common/EVEMon.Common.csproj index 17aae63bb..c6f8f1b42 100644 --- a/src/EVEMon.Common/EVEMon.Common.csproj +++ b/src/EVEMon.Common/EVEMon.Common.csproj @@ -7,6 +7,7 @@ false true true + true TRACE;NO_THREAD_SAFETY diff --git a/src/EVEMon.PieChart/EVEMon.PieChart.csproj b/src/EVEMon.PieChart/EVEMon.PieChart.csproj index 085159b29..ebf7653ef 100644 --- a/src/EVEMon.PieChart/EVEMon.PieChart.csproj +++ b/src/EVEMon.PieChart/EVEMon.PieChart.csproj @@ -5,6 +5,7 @@ false true true + true true @@ -38,4 +39,4 @@ - \ No newline at end of file + diff --git a/src/EVEMon.Watchdog/EVEMon.Watchdog.csproj b/src/EVEMon.Watchdog/EVEMon.Watchdog.csproj index 33b42328b..e8561021d 100644 --- a/src/EVEMon.Watchdog/EVEMon.Watchdog.csproj +++ b/src/EVEMon.Watchdog/EVEMon.Watchdog.csproj @@ -5,6 +5,7 @@ false true true + true false @@ -28,4 +29,4 @@ - \ No newline at end of file + diff --git a/src/EVEMon.WindowsApi/EVEMon.WindowsApi.csproj b/src/EVEMon.WindowsApi/EVEMon.WindowsApi.csproj index c2111f3b7..0d895ac4c 100644 --- a/src/EVEMon.WindowsApi/EVEMon.WindowsApi.csproj +++ b/src/EVEMon.WindowsApi/EVEMon.WindowsApi.csproj @@ -4,6 +4,7 @@ Library false EVEMon.WindowsApi + true true @@ -23,4 +24,4 @@ Properties\SharedAssemblyInfo.cs - \ No newline at end of file + diff --git a/src/EVEMon/EVEMon.csproj b/src/EVEMon/EVEMon.csproj index b3ab24d6b..df520b8c6 100644 --- a/src/EVEMon/EVEMon.csproj +++ b/src/EVEMon/EVEMon.csproj @@ -1,7 +1,7 @@  net8.0-windows - WinExe + Winexe publish\ true Disk @@ -20,6 +20,8 @@ false true true + true + false true @@ -283,13 +285,8 @@ - cd "$(SolutionDir)tools\ResFileCreator\bin\$(Configuration)\net8.0-windows\" - EVEMonResFileCreator.exe + cd "$(SolutionDir)tools/ResFileCreator/bin/$(Configuration)/$(TargetFramework)" + ./EVEMonResFileCreator - - del "$(MSBuildProjectDirectory)"\EVEMon.res -if exist "$(TargetDir)"EVEMon.exe.config del "$(TargetDir)"EVEMon.exe.config -if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll - - \ No newline at end of file + diff --git a/tests/Tests.EVEMon.Common/Tests.EVEMon.Common.csproj b/tests/Tests.EVEMon.Common/Tests.EVEMon.Common.csproj index 68efeb506..e16d3ed29 100644 --- a/tests/Tests.EVEMon.Common/Tests.EVEMon.Common.csproj +++ b/tests/Tests.EVEMon.Common/Tests.EVEMon.Common.csproj @@ -72,11 +72,6 @@ - rd /s /q "$(TargetDir)"Resources -del "$(TargetDir)"*office* -del "$(TargetDir)"*outlook* -del "$(TargetDir)"YamlDotNet* -if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll EVEMon.Common Unit Tests Unit Tests for EVEMon.Common EVEMon Developement Team @@ -87,4 +82,4 @@ if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll 1.0.0 en-US - \ No newline at end of file + diff --git a/tools/InstallBuilder/InstallBuilder.csproj b/tools/InstallBuilder/InstallBuilder.csproj index d82f3d7d3..e94a89117 100644 --- a/tools/InstallBuilder/InstallBuilder.csproj +++ b/tools/InstallBuilder/InstallBuilder.csproj @@ -9,6 +9,7 @@ false true true + true true @@ -39,4 +40,4 @@ 1.4.2 - \ No newline at end of file + diff --git a/tools/PatchXmlCreator/PatchXmlCreator.csproj b/tools/PatchXmlCreator/PatchXmlCreator.csproj index 2a4ea91ba..4ceafb350 100644 --- a/tools/PatchXmlCreator/PatchXmlCreator.csproj +++ b/tools/PatchXmlCreator/PatchXmlCreator.csproj @@ -7,6 +7,7 @@ false true true + true true @@ -38,18 +39,4 @@ - - rd /s /q "$(TargetDir)"Resources -del "$(TargetDir)"Google* -del "$(TargetDir)"*office* -del "$(TargetDir)"*outlook* -del "$(TargetDir)"*SharpZipLib* -del "$(TargetDir)"YamlDotNet* -del "$(TargetDir)"Dropbox* -del "$(TargetDir)"OneDrive* -del "$(TargetDir)"Microsoft* -del "$(TargetDir)"Newtonsoft* -del "$(TargetDir)"Zlib* -if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll - - \ No newline at end of file + diff --git a/tools/ResFileCreator/Program.cs b/tools/ResFileCreator/Program.cs index aa1891109..788a3ec45 100644 --- a/tools/ResFileCreator/Program.cs +++ b/tools/ResFileCreator/Program.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.IO; using System.Linq; +using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -47,10 +48,10 @@ private static void ParserAssemblyInfo() { Directory.SetCurrentDirectory(GetSolutionDirectory()); - string assemblyInfoFileContent = File.ReadAllText(Path.GetFullPath(@".\SharedAssemblyInfo.cs")); + string assemblyInfoFileContent = File.ReadAllText(Path.GetFullPath(@"SharedAssemblyInfo.cs")); s_dictionary["AssemblyTitle"] = "EVEMon"; - assemblyInfoFileContent = File.ReadAllText(Path.GetFullPath(@".\SharedAssemblyInfo.cs")); + assemblyInfoFileContent = File.ReadAllText(Path.GetFullPath(@"SharedAssemblyInfo.cs")); s_dictionary["AssemblyDescription"] = GetValueOf(assemblyInfoFileContent, "AssemblyDescription"); s_dictionary["AssemblyCompany"] = GetValueOf(assemblyInfoFileContent, "AssemblyCompany"); s_dictionary["AssemblyProduct"] = GetValueOf(assemblyInfoFileContent, "AssemblyProduct"); @@ -81,8 +82,7 @@ private static string GetValueOf(string assemblyInfoFileContent, string key) /// private static bool GenerateRcFile() { - s_resScriptfile = Path.GetFullPath(string.Format(CultureInfo.InvariantCulture, - "src\\EVEMon\\{0}.rc", s_dictionary["AssemblyTitle"])); + s_resScriptfile = Path.GetFullPath(Path.Combine("src", "EVEMon", "EVEMon.rc")); StringBuilder sb = new StringBuilder(); @@ -155,14 +155,14 @@ private static void AddVersionInfo(StringBuilder sb) /// The sb. private static void AddManifest(StringBuilder sb) { - const string ManifestFile = @"src\EVEMon\\app.manifest"; + var manifestFile = Path.GetFullPath(Path.Combine("src", "EVEMon", "app.manifest")); - if (!File.Exists(ManifestFile)) + if (!File.Exists(manifestFile)) return; sb .AppendLine("// Manifest") - .AppendLine($"1 24 \"{ManifestFile}\""); + .AppendLine($"1 24 \"{string.Concat(OperatingSystem.IsLinux() ? "Z:" : "", manifestFile)}\""); } /// @@ -171,11 +171,11 @@ private static void AddManifest(StringBuilder sb) /// The sb. private static void AddIcons(StringBuilder sb) { - const string IconsDir = @"src\EVEMon.Common\Resources\Icons"; + var iconsDir = Path.GetFullPath(Path.Combine("src", "EVEMon.Common", "Resources", "Icons")); List iconFilesPath = new List(); - if (Directory.Exists(IconsDir)) - iconFilesPath = Directory.GetFiles(IconsDir, "EVEMon.ico", SearchOption.AllDirectories).ToList(); + if (Directory.Exists(iconsDir)) + iconFilesPath = Directory.GetFiles(iconsDir, "EVEMon.ico", SearchOption.AllDirectories).ToList(); if (!iconFilesPath.Any()) return; @@ -186,14 +186,14 @@ private static void AddIcons(StringBuilder sb) sb.AppendLine("// Icon"); if (iconEVEMon != null) { - sb.AppendLine($"{count} ICON \"{iconEVEMon}\""); + sb.AppendLine($"{count} ICON \"{string.Concat(OperatingSystem.IsLinux() ? @"Z:" : "", iconEVEMon)}\""); count++; iconFilesPath.Remove(iconEVEMon); } foreach (string iconFilePath in iconFilesPath) { - sb.AppendLine($"{count} ICON \"{iconFilePath}\""); + sb.AppendLine($"{count} ICON \"{string.Concat(OperatingSystem.IsLinux() ? @"Z:" : "", iconFilePath)}\""); count++; } @@ -205,12 +205,19 @@ private static void AddIcons(StringBuilder sb) /// private static void CreateResFile() { + var file = OperatingSystem.IsLinux() ? "wine" : s_rcexe; + var arguments = OperatingSystem.IsLinux() + ? string.Format(CultureInfo.InvariantCulture, "{0} /v /nologo /r \"{1}\"", s_rcexe, string.Concat("Z:", s_resScriptfile)) + : string.Format(CultureInfo.InvariantCulture, "/v /nologo /r \"{0}\"", s_resScriptfile); + ProcessStartInfo startInfo = new ProcessStartInfo { - FileName = s_rcexe, - Arguments = string.Format(CultureInfo.InvariantCulture, "/v /nologo /r \"{0}\"", s_resScriptfile), + FileName = file, + Arguments = arguments, UseShellExecute = false, - RedirectStandardOutput = true + RedirectStandardOutput = true, + RedirectStandardError = true, + WorkingDirectory = GetSolutionDirectory() }; int exitCode; @@ -221,10 +228,11 @@ private static void CreateResFile() makeResProcess.WaitForExit(); exitCode = makeResProcess.ExitCode; - if (Debugger.IsAttached) + if (true) { Console.WriteLine(); Console.WriteLine(makeResProcess.StandardOutput.ReadToEnd()); + Console.WriteLine(makeResProcess.StandardError.ReadToEnd()); } } @@ -241,7 +249,7 @@ private static string FindRcExe() { // Lookup for 'RC.exe' for the particular process architecture string architecture = Environment.Is64BitProcess ? "x64" : "x86"; - string filePath = Path.Combine(GetProjectDirectory(), @"Dependencies\ResCompiler\", architecture, "rc.exe"); + string filePath = Path.Combine(GetProjectDirectory(), "Dependencies", "ResCompiler", architecture, "rc.exe"); return File.Exists(filePath) ? filePath : null; } @@ -254,7 +262,7 @@ private static string GetSolutionDirectory() { if (string.IsNullOrWhiteSpace(s_solutionDir)) { - s_solutionDir = Regex.Match(Directory.GetCurrentDirectory(), @"[a-zA-Z]+:.*\\(?=tools)", + s_solutionDir = Regex.Match(Directory.GetCurrentDirectory(), @"([a-zA-Z]+:){0,1}.*[\\/](?=tools)", RegexOptions.Compiled | RegexOptions.IgnoreCase).ToString(); } return s_solutionDir; @@ -268,7 +276,7 @@ private static string GetProjectDirectory() { if (string.IsNullOrWhiteSpace(s_projectDir)) { - s_projectDir = Regex.Match(Directory.GetCurrentDirectory(), @"[a-zA-Z]+:.*\\(?=bin)", + s_projectDir = Regex.Match(Path.GetDirectoryName(Directory.GetCurrentDirectory()), @"([a-zA-Z]+:){0,1}.*[\\/](?=bin)", RegexOptions.Compiled | RegexOptions.IgnoreCase).ToString(); } return s_projectDir; diff --git a/tools/ResFileCreator/ResFileCreator.csproj b/tools/ResFileCreator/ResFileCreator.csproj index aba0901c6..2e4bc0a1e 100644 --- a/tools/ResFileCreator/ResFileCreator.csproj +++ b/tools/ResFileCreator/ResFileCreator.csproj @@ -29,4 +29,4 @@ 1.0.0 en-US - \ No newline at end of file +