From c69965a809475250dc573267a2081fc99629186a Mon Sep 17 00:00:00 2001 From: KoalaBear Date: Wed, 24 Mar 2021 09:35:20 +0100 Subject: [PATCH] - More changes to fix installer / builds --- HAClimateDeskband.sln | 3 ++ HAClimateDeskband/HAClimateDeskband.csproj | 13 ++------ .../HAClimateDeskbandInstaller.csproj | 30 +++++++++++-------- HAClimateDeskbandInstaller/Program.cs | 10 +++---- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/HAClimateDeskband.sln b/HAClimateDeskband.sln index 04853eb..7a44147 100644 --- a/HAClimateDeskband.sln +++ b/HAClimateDeskband.sln @@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HAClimateDeskband", "HAClimateDeskband\HAClimateDeskband.csproj", "{4EE0B5C1-E49B-4CE8-AD43-75DB00104A00}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HAClimateDeskbandInstaller", "HAClimateDeskbandInstaller\HAClimateDeskbandInstaller.csproj", "{01653002-E017-4F43-9961-5624D588EBE5}" + ProjectSection(ProjectDependencies) = postProject + {4EE0B5C1-E49B-4CE8-AD43-75DB00104A00} = {4EE0B5C1-E49B-4CE8-AD43-75DB00104A00} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/HAClimateDeskband/HAClimateDeskband.csproj b/HAClimateDeskband/HAClimateDeskband.csproj index dbd9015..e64ffd4 100644 --- a/HAClimateDeskband/HAClimateDeskband.csproj +++ b/HAClimateDeskband/HAClimateDeskband.csproj @@ -109,17 +109,6 @@ 3.0.41 - - - - - - - - - - - @@ -143,6 +132,8 @@ del /F /Q "$(OutDir)OxyPlot.dll" del /F /Q "$(OutDir)OxyPlot.WindowsForms.dll" del /F /Q "$(OutDir)HAClimateDeskband-merged.pdb" + copy /Y "$(OutDir)HAClimateDeskband-merged.dll" "$(OutDir)HAClimateDeskband.dll" + del /F /Q "$(OutDir)HAClimateDeskband-merged.dll" ) \ No newline at end of file diff --git a/HAClimateDeskbandInstaller/HAClimateDeskbandInstaller.csproj b/HAClimateDeskbandInstaller/HAClimateDeskbandInstaller.csproj index 697b83d..55ad4bf 100644 --- a/HAClimateDeskbandInstaller/HAClimateDeskbandInstaller.csproj +++ b/HAClimateDeskbandInstaller/HAClimateDeskbandInstaller.csproj @@ -38,13 +38,6 @@ Resources\HomeAssistant.ico - - - - - - - @@ -66,9 +59,9 @@ - - Resources\HAClimateDeskband-merged.dll - + + Resources\HAClimateDeskband.dll + @@ -76,11 +69,24 @@ 3.0.41 + + + {4ee0b5c1-e49b-4ce8-ad43-75db00104a00} + HAClimateDeskband + + - - + if $(ConfigurationName) == Release ( + del /F /Q "$(OutDir)HAClimateDeskband.dll" + del /F /Q "$(OutDir)HAClimateDeskband.pdb" + del /F /Q "$(OutDir)Newtonsoft.Json.dll" + del /F /Q "$(OutDir)OxyPlot.dll" + del /F /Q "$(OutDir)OxyPlot.WindowsForms.dll" + del /F /Q "$(OutDir)HAClimateDeskbandInstaller.exe.config" + del /F /Q "$(OutDir)HAClimateDeskbandInstaller.pdb" +) diff --git a/HAClimateDeskbandInstaller/Program.cs b/HAClimateDeskbandInstaller/Program.cs index 29a37cf..55f4547 100644 --- a/HAClimateDeskbandInstaller/Program.cs +++ b/HAClimateDeskbandInstaller/Program.cs @@ -11,7 +11,7 @@ namespace HAClimateDeskbandInstaller class Program { private const string InstallerExecutableName = "HAClimateDeskbandInstaller.exe"; - private const string DllName = "HAClimateDeskband-merged.dll"; + private const string DllName = "HAClimateDeskband.dll"; static Guid UninstallGuid = new Guid(@"2d0e746f-e2ae-4c2c-9040-5c5a715e7a8a"); class InstallInfo @@ -88,7 +88,7 @@ static void Install(InstallInfo info) // Register assemblies foreach (string filename in info.FilesToRegister) { - string targetFilePath = Path.Combine(info.TargetPath, filename.Replace("-merged", string.Empty)); + string targetFilePath = Path.Combine(info.TargetPath, filename); Console.Write($"Registering {filename}.. "); RegisterDLL(targetFilePath, true, false); Console.WriteLine("OK."); @@ -116,7 +116,7 @@ private static void CopyFiles(InstallInfo info) { foreach (string filename in info.FilesToCopy) { - string targetFilePath = Path.Combine(info.TargetPath, filename.Replace("-merged", string.Empty)); + string targetFilePath = Path.Combine(info.TargetPath, filename); Console.Write($"Copying {filename}.. "); WriteEmbeddedResourceToFile(filename, targetFilePath); Console.WriteLine("OK."); @@ -141,7 +141,7 @@ static bool RollBack(InstallInfo info) // Unregister assembly foreach (string item in info.FilesToRegister) { - string targetFilePath = Path.Combine(info.TargetPath, item.Replace("-merged", string.Empty)); + string targetFilePath = Path.Combine(info.TargetPath, item); RegisterDLL(targetFilePath, false, true); RegisterDLL(targetFilePath, true, true); } @@ -153,7 +153,7 @@ static bool RollBack(InstallInfo info) // Remove files foreach (string filename in info.FilesToCopy) { - string targetFilePath = Path.Combine(info.TargetPath, filename.Replace("-merged", string.Empty)); + string targetFilePath = Path.Combine(info.TargetPath, filename); if (File.Exists(targetFilePath)) {