summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2020-11-14 15:44:33 +0000
committersr55 <[email protected]>2020-11-14 15:44:40 +0000
commitedd291d61a3aad8f41f86af909a4e9979ac5d37d (patch)
tree6dcefb610de2c2b7b3853eb486269eb53bf45cb5 /win/CS/HandBrakeWPF
parent1a8610c0ca7ad2ceacbb02b71ca46e955ce3ae00 (diff)
WinGui: Various fixes and improvements to the installers post .NET 5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/Installer/Installer64.nsi12
-rw-r--r--win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi13
-rw-r--r--win/CS/HandBrakeWPF/Services/PowerService.cs19
3 files changed, 24 insertions, 20 deletions
diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi
index ec6914ec9..8b06214fb 100644
--- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi
+++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi
@@ -123,6 +123,12 @@ Section "HandBrake" SectionApp
File "*.config"
File "*.pdb"
File "*.config"
+ File "*.deps.json"
+ File "*.runtimeconfig.json"
+
+ SetOutPath "$INSTDIR\runtimes\win\lib\netcoreapp2.0"
+ SetOverwrite ifnewer
+ File "runtimes\win\lib\netcoreapp2.0\*.*"
; Copy the languages
SetOutPath "$INSTDIR\de"
@@ -236,6 +242,12 @@ Section Uninstall
RMDir "$INSTDIR\co"
Delete "$INSTDIR\uk\*.*"
RMDir "$INSTDIR\uk"
+
+ Delete "$INSTDIR\runtimes\win\lib\netcoreapp2.0\*.*"
+ RMDir "$INSTDIR\runtimes\win\lib\netcoreapp2.0"
+ RMDir "$INSTDIR\runtimes\win\lib"
+ RMDir "$INSTDIR\runtimes\win"
+ RMDir "$INSTDIR\runtimes"
RMDir "$INSTDIR"
diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi
index 19323a403..0d2f18b54 100644
--- a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi
+++ b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi
@@ -119,9 +119,14 @@ Section "HandBrake" SectionApp
File "*.dll"
File "*.template"
File "*.config"
- File "*.json"
+ File "*.deps.json"
+ File "*.runtimeconfig.json"
File "HandBrake*.pdb"
+ SetOutPath "$INSTDIR\runtimes\win\lib\netcoreapp2.0"
+ SetOverwrite ifnewer
+ File "runtimes\win\lib\netcoreapp2.0\*.*"
+
; Copy the languages
SetOutPath "$INSTDIR\de"
SetOverwrite ifnewer
@@ -233,6 +238,12 @@ Section Uninstall
Delete "$INSTDIR\uk\*.*"
RMDir "$INSTDIR\uk"
+ Delete "$INSTDIR\runtimes\win\lib\netcoreapp2.0\*.*"
+ RMDir "$INSTDIR\runtimes\win\lib\netcoreapp2.0"
+ RMDir "$INSTDIR\runtimes\win\lib"
+ RMDir "$INSTDIR\runtimes\win"
+ RMDir "$INSTDIR\runtimes"
+
RMDir "$INSTDIR"
Delete "$SMPROGRAMS\HandBrake Nightly\Uninstall.lnk"
diff --git a/win/CS/HandBrakeWPF/Services/PowerService.cs b/win/CS/HandBrakeWPF/Services/PowerService.cs
index adf6a2655..e72b8c6ba 100644
--- a/win/CS/HandBrakeWPF/Services/PowerService.cs
+++ b/win/CS/HandBrakeWPF/Services/PowerService.cs
@@ -9,9 +9,6 @@
namespace HandBrakeWPF.Services
{
- using System;
- using System.Management;
-
using HandBrakeWPF.Utilities;
public class PowerService
@@ -27,21 +24,5 @@ namespace HandBrakeWPF.Services
return true;
}
-
- private void GetPowerState()
- {
- System.Management.ObjectQuery query = new ObjectQuery("Select * FROM Win32_Battery");
- ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
-
- ManagementObjectCollection collection = searcher.Get();
-
- foreach (ManagementObject mo in collection)
- {
- foreach (PropertyData property in mo.Properties)
- {
- Console.WriteLine("Property {0}: Value is {1}", property.Name, property.Value);
- }
- }
- }
}
}