Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/EVEMon.Common/EVEMon.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DefineConstants>TRACE;NO_THREAD_SAFETY</DefineConstants>
Expand Down
3 changes: 2 additions & 1 deletion src/EVEMon.PieChart/EVEMon.PieChart.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
Expand Down Expand Up @@ -38,4 +39,4 @@
<ItemGroup>
<ProjectReference Include="..\EVEMon.Common\EVEMon.Common.csproj" />
</ItemGroup>
</Project>
</Project>
3 changes: 2 additions & 1 deletion src/EVEMon.Watchdog/EVEMon.Watchdog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>false</DebugSymbols>
Expand All @@ -28,4 +29,4 @@
<ItemGroup>
<Compile Remove="Properties\Settings.Designer.cs" />
</ItemGroup>
</Project>
</Project>
3 changes: 2 additions & 1 deletion src/EVEMon.WindowsApi/EVEMon.WindowsApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyTitle>EVEMon.WindowsApi</AssemblyTitle>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
Expand All @@ -23,4 +24,4 @@
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
</Project>
</Project>
15 changes: 6 additions & 9 deletions src/EVEMon/EVEMon.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<OutputType>Winexe</OutputType>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -20,6 +20,8 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
</PropertyGroup>
<PropertyGroup>
<PublishSingleFile>true</PublishSingleFile>
Expand Down Expand Up @@ -283,13 +285,8 @@
</ItemGroup>
<PropertyGroup>
<PreBuildEvent>
cd "$(SolutionDir)tools\ResFileCreator\bin\$(Configuration)\net8.0-windows\"
EVEMonResFileCreator.exe
cd "$(SolutionDir)tools/ResFileCreator/bin/$(Configuration)/$(TargetFramework)"
./EVEMonResFileCreator
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>del "$(MSBuildProjectDirectory)"\EVEMon.res
if exist "$(TargetDir)"EVEMon.exe.config del "$(TargetDir)"EVEMon.exe.config
if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
7 changes: 1 addition & 6 deletions tests/Tests.EVEMon.Common/Tests.EVEMon.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@
</When>
</Choose>
<PropertyGroup>
<PostBuildEvent>rd /s /q "$(TargetDir)"Resources
del "$(TargetDir)"*office*
del "$(TargetDir)"*outlook*
del "$(TargetDir)"YamlDotNet*
if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll</PostBuildEvent>
<AssemblyTitle>EVEMon.Common Unit Tests</AssemblyTitle>
<Description>Unit Tests for EVEMon.Common</Description>
<Company>EVEMon Developement Team</Company>
Expand All @@ -87,4 +82,4 @@ if exist "$(TargetDir)"stdole.dll del "$(TargetDir)"stdole.dll</PostBuildEvent>
<InformationalVersion>1.0.0</InformationalVersion>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
</Project>
</Project>
3 changes: 2 additions & 1 deletion tools/InstallBuilder/InstallBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
Expand Down Expand Up @@ -39,4 +40,4 @@
<Version>1.4.2</Version>
</PackageReference>
</ItemGroup>
</Project>
</Project>
17 changes: 2 additions & 15 deletions tools/PatchXmlCreator/PatchXmlCreator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
Expand Down Expand Up @@ -38,18 +39,4 @@
<Compile Remove="Properties\Settings.Designer.cs" />
<EmbeddedResource Remove="Properties\Resources.resx" />
</ItemGroup>
<PropertyGroup>
<PostBuildEvent>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</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
46 changes: 27 additions & 19 deletions tools/ResFileCreator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -81,8 +82,7 @@ private static string GetValueOf(string assemblyInfoFileContent, string key)
/// <returns></returns>
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();

Expand Down Expand Up @@ -155,14 +155,14 @@ private static void AddVersionInfo(StringBuilder sb)
/// <param name="sb">The sb.</param>
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)}\"");
}

/// <summary>
Expand All @@ -171,11 +171,11 @@ private static void AddManifest(StringBuilder sb)
/// <param name="sb">The sb.</param>
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<string> iconFilesPath = new List<string>();

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;
Expand All @@ -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++;
}

Expand All @@ -205,12 +205,19 @@ private static void AddIcons(StringBuilder sb)
/// </summary>
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;
Expand All @@ -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());
}
}

Expand All @@ -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;
}
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tools/ResFileCreator/ResFileCreator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
<InformationalVersion>1.0.0</InformationalVersion>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
</Project>
</Project>