From 0494561795757971e3b8a8597578867a7634a62a Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:36:57 -0500 Subject: [PATCH 1/5] Create MacOSArm64 publish profile for TwitchDownloaderClI --- .../PublishProfiles/MacOSArm64.pubxml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 TwitchDownloaderCLI/Properties/PublishProfiles/MacOSArm64.pubxml diff --git a/TwitchDownloaderCLI/Properties/PublishProfiles/MacOSArm64.pubxml b/TwitchDownloaderCLI/Properties/PublishProfiles/MacOSArm64.pubxml new file mode 100644 index 00000000..84087d4b --- /dev/null +++ b/TwitchDownloaderCLI/Properties/PublishProfiles/MacOSArm64.pubxml @@ -0,0 +1,19 @@ + + + + + Release + Any CPU + bin\Release\net6.0\publish\MacOSArm64 + FileSystem + net6.0 + osx-arm64 + true + True + True + true + true + + \ No newline at end of file From 96e8a5e0598fe2696b69db58038097722ba6fe6d Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:37:06 -0500 Subject: [PATCH 2/5] Update README --- README.md | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index adfde98d..08d81887 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,10 @@ TwitchDownloaderCLI.exe chatrender -i %vodid%_chat.json -h 1080 -w 422 --framera 1. Go to [Releases](https://github.com/lay295/TwitchDownloader/releases/) and download the latest version for Windows or [build from source](#building-from-source). 2. Extract `TwitchDownloaderCLI.exe`. -3. Browse to where you extracted the file in the terminal. +3. Browse to where you extracted the executable: +``` +cd C:\folder\containing\TwitchDownloaderCLI +``` 4. If you do not have FFmpeg, you can install it via [Chocolatey package manager](https://community.chocolatey.org/), or you can get it as a standalone file from [ffmpeg.org](https://ffmpeg.org/download.html) or by using TwitchDownloaderCLI: ``` TwitchDownloaderCLI.exe ffmpeg --download @@ -103,39 +106,51 @@ TwitchDownloaderCLI.exe videodownload --id -o out.mp4 2. Ensure both `fontconfig` and `libfontconfig1` are installed. `apt-get install fontconfig libfontconfig1` on Ubuntu. 3. Go to [Releases](https://github.com/lay295/TwitchDownloader/releases/) and download the latest binary for Linux, grab the [AUR Package](https://aur.archlinux.org/packages/twitch-downloader-bin/) for Arch Linux, or [build from source](#building-from-source). 4. Extract `TwitchDownloaderCLI`. -5. Browse to where you extracted the file and give it executable rights in the terminal: +5. Browse to where you extracted the binary: +``` +cd directory/containing/TwitchDownloaderCLI +``` +6. Give the binary executable rights: ``` sudo chmod +x TwitchDownloaderCLI ``` -6. a) If you do not have FFmpeg, you should install it via your distro package manager, however you can also get it as a standalone file from [ffmpeg.org](https://ffmpeg.org/download.html) or by using TwitchDownloaderCLI: +7. a) If you do not have FFmpeg, you should install it system-wide via your distro package manager, however you can also get it as a standalone file from [ffmpeg.org](https://ffmpeg.org/download.html) or by using TwitchDownloaderCLI: ``` ./TwitchDownloaderCLI ffmpeg --download ``` -6. b) If downloaded as a standalone file, you must also give it executable rights with: +7. b) If downloaded as a standalone file, you must also give it executable rights with: ``` sudo chmod +x ffmpeg ``` -7. You can now start using the downloader, for example: +8. You can now start using the downloader, for example: ``` ./TwitchDownloaderCLI videodownload --id -o out.mp4 ``` ## MacOS – Getting started -1. Go to [Releases](https://github.com/lay295/TwitchDownloader/releases/) and download the latest binary for MacOS or [build from source](#building-from-source). -2. Extract `TwitchDownloaderCLI`. -3. Browse to where you extracted the file and give it executable rights in the terminal: +1. If your device has an Apple Silicon M-series processor, ensure that you download the arm64 binary, however if you would like to use the x64 binary on Apple Silicon it must be run via a terminal session running under Rosetta 2: +``` +arch -x86_64 zsh +``` +2. Go to [Releases](https://github.com/lay295/TwitchDownloader/releases/) and download the latest binary for MacOS or [build from source](#building-from-source). +3. Extract `TwitchDownloaderCLI`. +4. Browse to where you extracted the binary: +``` +cd directory/containing/TwitchDownloaderCLI +``` +5. Give the binary executable rights in the terminal: ``` chmod +x TwitchDownloaderCLI ``` -4. a) If you do not have FFmpeg, you can install it via [Homebrew package manager](https://brew.sh/), or you can get it as a standalone file from [ffmpeg.org](https://ffmpeg.org/download.html) or by using TwitchDownloaderCLI: +6. a) If you do not have FFmpeg, you can install it system-wide via the [Homebrew package manager](https://brew.sh/), or you can get it as a standalone file from [ffmpeg.org](https://ffmpeg.org/download.html) or by using TwitchDownloaderCLI: ``` ./TwitchDownloaderCLI ffmpeg --download ``` -4. b) If downloaded as a standalone file, you must also give it executable rights with: +6. b) If downloaded as a standalone file, you must also give it executable rights with: ``` chmod +x ffmpeg ``` -5. You can now start using the downloader, for example: +7. You can now start using the downloader, for example: ``` ./TwitchDownloaderCLI videodownload --id -o out.mp4 ``` @@ -169,7 +184,7 @@ dotnet publish TwitchDownloaderWPF -p:PublishProfile=Windows -p:DebugType=None - ``` dotnet publish TwitchDownloaderCLI -p:PublishProfile= -p:DebugType=None -p:DebugSymbols=false ``` -- Applicable Profiles: `Windows`, `Linux`, `LinuxAlpine`, `LinuxArm`, `LinuxArm64`, `MacOS` +- Applicable Profiles: `Windows`, `Linux`, `LinuxAlpine`, `LinuxArm`, `LinuxArm64`, `MacOS`, `MacOSArm64` 5. a) Navigate to the GUI build folder: ``` cd TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64 From a471dae8cdad334b9392711ff0759b5116c33a46 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:42:56 -0500 Subject: [PATCH 3/5] Update workflows --- .github/workflows/build-pr.yml | 16 ++++++++++++++-- .github/workflows/build.yml | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 8207012c..b0cf077b 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -144,17 +144,29 @@ jobs: run: dotnet restore TwitchDownloaderCLI - name: Build MacOS CLI run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=MacOS -p:DebugType=None -p:DebugSymbols=false - + - name: Build MacOSArm64 CLI + run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=MacOSArm64 -p:DebugType=None -p:DebugSymbols=false + - name: Zip MacOS CLI uses: vimtor/action-zip@v1 with: files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOS" dest: TwitchDownloaderCLI-MacOS-x64.zip + - name: Zip MacOSArm64 CLI + uses: vimtor/action-zip@v1 + with: + files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOSArm64" + dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOSArm64.zip + - name: Upload MacOS CLI Artifact Asset uses: actions/upload-artifact@v3 with: name: TwitchDownloaderCLI-MacOS-x64.zip path: TwitchDownloaderCLI-MacOS-x64.zip - + - name: Upload MacOS CLI Artifact Asset + uses: actions/upload-artifact@v3 + with: + name: TwitchDownloaderCLI-MacOSArm64.zip + path: TwitchDownloaderCLI-MacOSArm64.zip diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1d49f23..f4723814 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -216,12 +216,20 @@ jobs: run: dotnet restore TwitchDownloaderCLI - name: Build MacOS CLI run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=MacOS -p:DebugType=None -p:DebugSymbols=false + - name: Build MacOSArm64 CLI + run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=MacOSArm64 -p:DebugType=None -p:DebugSymbols=false - name: Zip MacOS CLI uses: vimtor/action-zip@v1 with: files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOS" dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOS-x64.zip + + - name: Zip MacOSArm64 CLI + uses: vimtor/action-zip@v1 + with: + files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOSArm64" + dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOSArm64.zip - name: Download URL uses: actions/download-artifact@v2 @@ -243,3 +251,13 @@ jobs: asset_path: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOS-x64.zip asset_name: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOS-x64.zip asset_content_type: application/zip + + - name: Upload MacOSArm64 CLI Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.url.outputs.content }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOSArm64.zip + asset_name: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOSArm64.zip + asset_content_type: application/zip From 310f6d4c89c8053777c121f54dd9db08ac51c210 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:44:38 -0500 Subject: [PATCH 4/5] Missed a line --- .github/workflows/build-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index b0cf077b..3e2beb09 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -165,7 +165,7 @@ jobs: name: TwitchDownloaderCLI-MacOS-x64.zip path: TwitchDownloaderCLI-MacOS-x64.zip - - name: Upload MacOS CLI Artifact Asset + - name: Upload MacOSArm64 CLI Artifact Asset uses: actions/upload-artifact@v3 with: name: TwitchDownloaderCLI-MacOSArm64.zip From cefd79bfbf0322dc8160deab4ad72171392cbb34 Mon Sep 17 00:00:00 2001 From: Scrub <72096833+ScrubN@users.noreply.github.com> Date: Tue, 28 Nov 2023 20:05:37 -0500 Subject: [PATCH 5/5] That's what I get for copy-pasting --- .github/workflows/build-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 3e2beb09..709acf88 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -157,7 +157,7 @@ jobs: uses: vimtor/action-zip@v1 with: files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOSArm64" - dest: TwitchDownloaderCLI-${{ github.event.inputs.release_tag }}-MacOSArm64.zip + dest: TwitchDownloaderCLI-MacOSArm64.zip - name: Upload MacOS CLI Artifact Asset uses: actions/upload-artifact@v3