Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 8 #1077

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
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
24 changes: 12 additions & 12 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderWPF
- name: Build Windows GUI
Expand All @@ -35,12 +35,12 @@ jobs:
file-name: ffmpeg.zip

- name: Bundle FFmpeg
run: tar xfz ffmpeg.zip --strip-components=1; copy bin/ffmpeg.exe TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64/ffmpeg.exe
run: tar xfz ffmpeg.zip --strip-components=1; copy bin/ffmpeg.exe TwitchDownloaderWPF/bin/Release/net8.0-windows/publish/win-x64/ffmpeg.exe

- name: Zip Windows GUI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64"
files: "TwitchDownloaderWPF/bin/Release/net8.0-windows/publish/win-x64"
dest: TwitchDownloaderGUI-Windows-x64.zip

- name: Upload Windows GUI Artifact Asset
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderCLI
- name: Build Windows CLI
Expand All @@ -74,31 +74,31 @@ jobs:
- name: Zip Windows CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/Windows"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/Windows"
dest: TwitchDownloaderCLI-Windows-x64.zip

- name: Zip Linux CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/Linux"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/Linux"
dest: TwitchDownloaderCLI-Linux-x64.zip

- name: Zip LinuxAlpine CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxAlpine"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/LinuxAlpine"
dest: TwitchDownloaderCLI-LinuxAlpine-x64.zip

- name: Zip LinuxArm CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxArm"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/LinuxArm"
dest: TwitchDownloaderCLI-LinuxArm.zip

- name: Zip LinuxArm64 CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxArm64"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/LinuxArm64"
dest: TwitchDownloaderCLI-LinuxArm64.zip

- name: Upload Windows CLI Artifact Asset
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderCLI
- name: Build MacOS CLI
Expand All @@ -150,13 +150,13 @@ jobs:
- name: Zip MacOS CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOS"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/MacOS"
dest: TwitchDownloaderCLI-MacOS-x64.zip

- name: Zip MacOSArm64 CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOSArm64"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/MacOSArm64"
dest: TwitchDownloaderCLI-MacOSArm64.zip

- name: Upload MacOS CLI Artifact Asset
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderWPF
- name: Build Windows GUI
Expand All @@ -60,12 +60,12 @@ jobs:
file-name: ffmpeg.zip

- name: Bundle FFmpeg
run: tar xfz ffmpeg.zip --strip-components=1; copy bin/ffmpeg.exe TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64/ffmpeg.exe
run: tar xfz ffmpeg.zip --strip-components=1; copy bin/ffmpeg.exe TwitchDownloaderWPF/bin/Release/net8.0-windows/publish/win-x64/ffmpeg.exe

- name: Zip Windows GUI Release Asset
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64"
files: "TwitchDownloaderWPF/bin/Release/net8.0-windows/publish/win-x64"
dest: TwitchDownloaderGUI-${{ github.event.inputs.release_tag }}-Windows-x64.zip

- name: Download URL
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderCLI
- name: Build Windows CLI
Expand All @@ -115,31 +115,31 @@ jobs:
- name: Zip Windows CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/Windows"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/Windows"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-Windows-x64.zip

- name: Zip Linux CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/Linux"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/Linux"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-Linux-x64.zip

- name: Zip LinuxAlpine CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxAlpine"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/LinuxAlpine"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-LinuxAlpine-x64.zip

- name: Zip LinuxArm CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxArm"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/LinuxArm"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-LinuxArm.zip

- name: Zip LinuxArm64 CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxArm64"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/LinuxArm64"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-LinuxArm64.zip

- name: Download URL
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderCLI
- name: Build MacOS CLI
Expand All @@ -222,13 +222,13 @@ jobs:
- name: Zip MacOS CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOS"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/MacOS"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOS-x64.zip

- name: Zip MacOSArm64 CLI
uses: vimtor/[email protected]
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOSArm64"
files: "TwitchDownloaderCLI/bin/Release/net8.0/publish/MacOSArm64"
dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOSArm64.zip

- name: Download URL
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ You can find more example commands in the [CLI README](TwitchDownloaderCLI/READM

## Requirements

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- About 1GB of disk space

## Build Instructions
Expand Down
2 changes: 1 addition & 1 deletion README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ chmod +x ffmpeg

## Requisitos

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)

## Instrucciones de Compilación

Expand Down
2 changes: 1 addition & 1 deletion README_it.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Puoi trovare altri esempi nel [CLI README](TwitchDownloaderCLI/README.md#example

## Requisiti

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- Circa 1GB di spazio su disco

## Istruzioni
Expand Down
2 changes: 1 addition & 1 deletion README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ chmod +x ffmpeg

## 必要条件

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- 約1GBのディスク空き容量

## ビルド手順
Expand Down
2 changes: 1 addition & 1 deletion README_pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Você pode encontrar mais comandos no [CLI README](TwitchDownloaderCLI/README.md

## Requerimentos

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- Mais ou menos 1GB de espaço de disco.

## Instruções para construção
Expand Down
2 changes: 1 addition & 1 deletion README_tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ chmod +x ffmpeg

## Gereksinimler

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)

## Derleme Talimatları

Expand Down
2 changes: 1 addition & 1 deletion README_zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ chmod +x ffmpeg

## 要求

- [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [.NET 8.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- 约 1GB 磁盘空间

## 构建说明
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderCLI.Tests/TwitchDownloaderCLI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
9 changes: 2 additions & 7 deletions TwitchDownloaderCLI/Modes/FfmpegHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using Mono.Unix;
using TwitchDownloaderCLI.Modes.Arguments;
using TwitchDownloaderCLI.Tools;
using TwitchDownloaderCore;
using TwitchDownloaderCore.Interfaces;
using Xabe.FFmpeg;
using Xabe.FFmpeg.Downloader;
Expand Down Expand Up @@ -49,12 +49,7 @@ private static void DownloadFfmpeg(ITaskProgress progress)

try
{
var ffmpegFileInfo = new UnixFileInfo("ffmpeg")
{
FileAccessPermissions = FileAccessPermissions.UserRead | FileAccessPermissions.UserWrite | FileAccessPermissions.GroupRead | FileAccessPermissions.OtherRead |
FileAccessPermissions.UserExecute | FileAccessPermissions.GroupExecute | FileAccessPermissions.OtherExecute
};
ffmpegFileInfo.Refresh();
TwitchHelper.Set777UnixFilePermissions(new FileInfo(FfmpegExecutableName));
}
catch
{
Expand Down
5 changes: 3 additions & 2 deletions TwitchDownloaderCLI/Properties/PublishProfiles/Linux.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>net6.0</TargetFramework>
<PublishDir>bin\Release\net6.0\publish\Linux</PublishDir>
<TargetFramework>net8.0</TargetFramework>
<PublishDir>bin\Release\net8.0\publish\Linux</PublishDir>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<PublishDir>bin\Release\net6.0\publish\LinuxAlpine</PublishDir>
<PublishDir>bin\Release\net8.0\publish\LinuxAlpine</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-musl-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\LinuxArm</PublishDir>
<PublishDir>bin\Release\net8.0\publish\LinuxArm</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>net6.0</TargetFramework>
<PublishDir>bin\Release\net6.0\publish\LinuxArm64</PublishDir>
<TargetFramework>net8.0</TargetFramework>
<PublishDir>bin\Release\net8.0\publish\LinuxArm64</PublishDir>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>
5 changes: 3 additions & 2 deletions TwitchDownloaderCLI/Properties/PublishProfiles/MacOS.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\MacOS</PublishDir>
<PublishDir>bin\Release\net8.0\publish\MacOS</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\MacOSArm64</PublishDir>
<PublishDir>bin\Release\net8.0\publish\MacOSArm64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
</PropertyGroup>
Expand Down
Loading