From f81fdb9c8f4934f8550b255d5347e79cbff3e423 Mon Sep 17 00:00:00 2001 From: aandrew-me Date: Mon, 12 Sep 2022 10:41:08 +0600 Subject: [PATCH] Adding options for mac builds --- README.md | 14 ++++++++++++-- linux.sh | 1 + mac.sh | 10 ++++++++++ package.json | 6 ++++-- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 mac.sh diff --git a/README.md b/README.md index 22a03b2..eb493d2 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ Download and install the exe file. Windows defender may create problems as usual ## Linux Linux has several options available - AppImage, Deb, Snap and flatpak. - ### AppImage **AppImage** format is supported on most Linux distros and has Auto-Update support. So it is recommended. @@ -51,8 +50,15 @@ It just needs to be executed after downloading. See more about [AppImages here]( ### Debian package For Debian based distros like Ubuntu .deb file is available. Download and run - ``` -sudo dpkg -i file_name.deb +sudo dpkg -i YTDownloader.deb ``` +## macOS +Since the app is not signed, when you will try to open the app, macOS will not allow you to open it. So you will need to follow some steps to open it. + +1. Click on **System Preferences** on your Mac Dock. +2. Choose **Security & Privacy** +3. The app will be shown there. Click on **Open** + ## Internationalization 🌍 Translations into other languages would be highly appreciated. If you want to help translating the app to other languages, you can join from [here](https://crwd.in/ytdownloader). Open a new issue and that language will be added to Crowdin. @@ -90,4 +96,8 @@ npm run linux To build for Windows ``` npm run windows +``` +To build for macOS +``` +npm run mac ``` \ No newline at end of file diff --git a/linux.sh b/linux.sh index 2b0aa68..5fd49cc 100755 --- a/linux.sh +++ b/linux.sh @@ -3,6 +3,7 @@ # The binary will be placed in the root dir of the app rm ffmpeg.exe +rm ffmpeg wget "https://github.com/yt-dlp/FFmpeg-Builds/releases/latest/download/ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz" tar xvf ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz cp ffmpeg-n5.1-latest-linux64-gpl-5.1/bin/ffmpeg ffmpeg diff --git a/mac.sh b/mac.sh new file mode 100644 index 0000000..282527a --- /dev/null +++ b/mac.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Script to download the latest x64 mac version of ffmpeg +# The binary will be placed in the root dir of the app +rm ffmpeg +rm ffmpeg.exe +wget https://evermeet.cx/ffmpeg/ffmpeg-5.1.1.7z +7z e ffmpeg-5.1.1.7z +chmod 777 ffmpeg +rm ffmpeg-5.1.1.7z + diff --git a/package.json b/package.json index 16b5856..11b8f36 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "debug": "electron --inspect=5858 .", "windows": "./windows.sh && electron-builder -w", "linux": "./linux.sh && electron-builder -l", - "publish-linux": "./linux.sh && electron-builder -l --publish=always", - "publish-windows": "./windows.sh && electron-builder -w --publish=always" + "mac":"./mac.sh && electron-builder -m", + "publish-linux": "cp ../ffmpeg-bin/ffmpeg . && electron-builder -l --publish=always", + "publish-windows": "cp ../ffmpeg-bin/ffmpeg.exe . && electron-builder -w --publish=always", + "publish-mac":"cp ../ffmpeg-bin/mac/ffmpeg . && electron-builder -m --publish=always" }, "author": { "name": "Andrew",