From ba29c1445d18fc66a8daf1e5269846a8b359a532 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 20 Feb 2021 19:47:34 +0000 Subject: WinGui: Refactor the build system to use the dotnet CLI and adding support for future ARM64 builds. --- win/CS/HandBrakeWPF/App.xaml.cs | 9 +-- win/CS/HandBrakeWPF/Installer/Installer64.nsi | 79 --------------------- win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi | 82 +--------------------- .../PublishProfiles/publish_arm64.pubxml | 17 +++++ .../PublishProfiles/publish_portable.pubxml | 2 +- .../Properties/PublishProfiles/publish_x64.pubxml | 2 +- 6 files changed, 22 insertions(+), 169 deletions(-) create mode 100644 win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_arm64.pubxml (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs index 04aacf2b9..471b5412c 100644 --- a/win/CS/HandBrakeWPF/App.xaml.cs +++ b/win/CS/HandBrakeWPF/App.xaml.cs @@ -72,14 +72,7 @@ namespace HandBrakeWPF Application.Current.Shutdown(); return; } - - if (!File.Exists("hb.dll")) - { - MessageBox.Show(HandBrakeWPF.Properties.Resources.Startup_HbDllMissing, HandBrakeWPF.Properties.Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error); - Application.Current.Shutdown(); - return; - } - + if (e.Args.Any(f => f.Equals("--reset"))) { HandBrakeApp.ResetToDefaults(); diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi index 7e5033fb1..63c0a7263 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi @@ -123,57 +123,6 @@ 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" - SetOverwrite ifnewer - File "de\*.*" - - SetOutPath "$INSTDIR\zh" - SetOverwrite ifnewer - File "zh\*.*" - - SetOutPath "$INSTDIR\es" - SetOverwrite ifnewer - File "es\*.*" - - SetOutPath "$INSTDIR\fr" - SetOverwrite ifnewer - File "fr\*.*" - - SetOutPath "$INSTDIR\ko" - SetOverwrite ifnewer - File "ko\*.*" - - SetOutPath "$INSTDIR\ru" - SetOverwrite ifnewer - File "ru\*.*" - - SetOutPath "$INSTDIR\tr" - SetOverwrite ifnewer - File "tr\*.*" - - SetOutPath "$INSTDIR\ja" - SetOverwrite ifnewer - File "ja\*.*" - - SetOutPath "$INSTDIR\pt-BR" - SetOverwrite ifnewer - File "pt-BR\*.*" - - SetOutPath "$INSTDIR\co" - SetOverwrite ifnewer - File "co\*.*" - - SetOutPath "$INSTDIR\uk" - SetOverwrite ifnewer - File "uk\*.*" ; Copy the standard doc set into the doc folder SetOutPath "$INSTDIR\doc" @@ -220,34 +169,6 @@ Section Uninstall Delete "$INSTDIR\*.*" Delete "$INSTDIR\doc\*.*" RMDir "$INSTDIR\doc" - Delete "$INSTDIR\de\*.*" - RMDir "$INSTDIR\de" - Delete "$INSTDIR\zh\*.*" - RMDir "$INSTDIR\zh" - Delete "$INSTDIR\es\*.*" - RMDir "$INSTDIR\es" - Delete "$INSTDIR\fr\*.*" - RMDir "$INSTDIR\fr" - Delete "$INSTDIR\ko\*.*" - RMDir "$INSTDIR\ko" - Delete "$INSTDIR\ru\*.*" - RMDir "$INSTDIR\ru" - Delete "$INSTDIR\tr\*.*" - RMDir "$INSTDIR\tr" - Delete "$INSTDIR\ja\*.*" - RMDir "$INSTDIR\ja" - Delete "$INSTDIR\pt-BR\*.*" - RMDir "$INSTDIR\pt-BR" - Delete "$INSTDIR\co\*.*" - 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 0d2f18b54..25e0ac74a 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi @@ -119,58 +119,8 @@ Section "HandBrake" SectionApp File "*.dll" File "*.template" File "*.config" - 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 - File "de\*.*" - - SetOutPath "$INSTDIR\zh" - SetOverwrite ifnewer - File "zh\*.*" - - SetOutPath "$INSTDIR\es" - SetOverwrite ifnewer - File "es\*.*" - - SetOutPath "$INSTDIR\fr" - SetOverwrite ifnewer - File "fr\*.*" - - SetOutPath "$INSTDIR\ko" - SetOverwrite ifnewer - File "ko\*.*" - - SetOutPath "$INSTDIR\ru" - SetOverwrite ifnewer - File "ru\*.*" - - SetOutPath "$INSTDIR\tr" - SetOverwrite ifnewer - File "tr\*.*" - - SetOutPath "$INSTDIR\ja" - SetOverwrite ifnewer - File "ja\*.*" - - SetOutPath "$INSTDIR\pt-BR" - SetOverwrite ifnewer - File "pt-BR\*.*" - - SetOutPath "$INSTDIR\co" - SetOverwrite ifnewer - File "co\*.*" - - SetOutPath "$INSTDIR\uk" - SetOverwrite ifnewer - File "uk\*.*" + File "*.pdb" + File "*.config" ; Copy the standard doc set into the doc folder SetOutPath "$INSTDIR\doc" @@ -215,34 +165,6 @@ Section Uninstall Delete "$INSTDIR\*.*" Delete "$INSTDIR\doc\*.*" RMDir "$INSTDIR\doc" - Delete "$INSTDIR\de\*.*" - RMDir "$INSTDIR\de" - Delete "$INSTDIR\zh\*.*" - RMDir "$INSTDIR\zh" - Delete "$INSTDIR\es\*.*" - RMDir "$INSTDIR\es" - Delete "$INSTDIR\fr\*.*" - RMDir "$INSTDIR\fr" - Delete "$INSTDIR\ko\*.*" - RMDir "$INSTDIR\ko" - Delete "$INSTDIR\ru\*.*" - RMDir "$INSTDIR\ru" - Delete "$INSTDIR\tr\*.*" - RMDir "$INSTDIR\tr" - Delete "$INSTDIR\ja\*.*" - RMDir "$INSTDIR\ja" - Delete "$INSTDIR\pt-BR\*.*" - RMDir "$INSTDIR\pt-BR" - Delete "$INSTDIR\co\*.*" - 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/Properties/PublishProfiles/publish_arm64.pubxml b/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_arm64.pubxml new file mode 100644 index 000000000..5a21d0919 --- /dev/null +++ b/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_arm64.pubxml @@ -0,0 +1,17 @@ + + + + + Release + Any CPU + bin\publish + FileSystem + net5.0-windows + win-x64 + false + True + True + + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_portable.pubxml b/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_portable.pubxml index a08109177..ca4a52847 100644 --- a/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_portable.pubxml +++ b/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_portable.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - bin\publish\portable + bin\publish FileSystem net5.0-windows false diff --git a/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_x64.pubxml b/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_x64.pubxml index 46d53a9c0..fdfa77c90 100644 --- a/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_x64.pubxml +++ b/win/CS/HandBrakeWPF/Properties/PublishProfiles/publish_x64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - bin\publish\x64 + bin\publish FileSystem net5.0-windows win-x64 -- cgit v1.2.3