diff options
author | sr55 <[email protected]> | 2020-11-14 15:44:33 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2020-11-14 15:44:40 +0000 |
commit | edd291d61a3aad8f41f86af909a4e9979ac5d37d (patch) | |
tree | 6dcefb610de2c2b7b3853eb486269eb53bf45cb5 /win | |
parent | 1a8610c0ca7ad2ceacbb02b71ca46e955ce3ae00 (diff) |
WinGui: Various fixes and improvements to the installers post .NET 5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.Installer/Product.wxs | 17 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Installer/Installer64.nsi | 12 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi | 13 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/PowerService.cs | 19 |
4 files changed, 38 insertions, 23 deletions
diff --git a/win/CS/HandBrake.Installer/Product.wxs b/win/CS/HandBrake.Installer/Product.wxs index cb50b63b8..580d6fdd4 100644 --- a/win/CS/HandBrake.Installer/Product.wxs +++ b/win/CS/HandBrake.Installer/Product.wxs @@ -84,14 +84,23 @@ <File Source="$(var.packagePath)\HandBrake.deps.json"/> - <File Source="$(var.packagePath)\HandBrake.runtimeconfig.dev.json"/> <File Source="$(var.packagePath)\HandBrake.runtimeconfig.json"/> <File Source="$(var.packagePath)\HandBrake.Worker.deps.json"/> - <File Source="$(var.packagePath)\HandBrake.Worker.runtimeconfig.dev.json"/> <File Source="$(var.packagePath)\HandBrake.Worker.runtimeconfig.json"/> - </Component> + <Directory Id="runtime" Name="runtimes"> + <Directory Id="runtime_win" Name="win"> + <Directory Id="runtime_lib" Name="lib"> + <Directory Id="runtime_netcore2" Name="netcoreapp2.0"> + <Component Win64="yes" Id="runtime" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42193"> + <File Id="runtime_system_management" Source="$(var.packagePath)\runtimes\win\lib\netcoreapp2.0\System.Management.dll" /> + </Component> + </Directory> + </Directory> + </Directory> + </Directory> + <Directory Id="de_lang" Name="de"> <Component Win64="yes" Id="de_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42182"> <File Id="de_lang" Source="$(var.packagePath)\de\HandBrake.resources.dll" /> @@ -192,6 +201,8 @@ <ComponentRef Id="ApplicationFiles"/> <ComponentRef Id="AppShortcuts"/> + <ComponentRef Id="runtime"/> + <ComponentRef Id="de_lang"/> <ComponentRef Id="co_lang"/> <ComponentRef Id="es_lang"/> 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); - } - } - } } } |