diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 8207012c..709acf88 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-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 MacOSArm64 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 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 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