Update build info

This commit is contained in:
Andrew 2024-02-23 11:43:37 +03:00
parent 5e58ca749f
commit 49d756a844
5 changed files with 47 additions and 23 deletions

View File

@ -171,8 +171,9 @@ To run with [Electron](https://www.electronjs.org/) :
npm start npm start
``` ```
To build for Linux (It will create packages as specified in package.json). The builds are stored in **release** folder. You need to be in a Linux environment to execute those scripts. Otherwise you can download the ffmpeg binary for the respective platform and put it in the root directory of the app and build with electron-builder. You need to download ffmpeg and put it in the root directory of the project. If you don't need to build for arm processor, you can download ffmpeg by executing any of the files - linux.sh / mac.sh / windows.sh depending on the platform. Otherwise you need to download ffmpeg from [here](https://github.com/yt-dlp/FFmpeg-Builds/releases) for windows/linux and from [here](http://www.osxexperts.net/) for mac (not tested)
To build for Linux (It will create packages as specified in package.json). The builds are stored in **release** folder.
``` ```
npm run linux npm run linux
``` ```
@ -188,3 +189,8 @@ To build for macOS
``` ```
npm run mac npm run mac
``` ```
If you only want to build for one format, you can do
```
npx electron-builder -l appimage
```
It will just create a linux appimage build.

View File

@ -2,10 +2,16 @@
# Script to download the latest x64 linux version of custom ffmpeg build for yt-dlp # Script to download the latest x64 linux version of custom ffmpeg build for yt-dlp
# The binary will be placed in the root dir of the app # The binary will be placed in the root dir of the app
rm ffmpeg* if ls ffmpeg* 1> /dev/null 2>&1; then
wget "https://github.com/yt-dlp/FFmpeg-Builds/releases/latest/download/ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz" rm ffmpeg*
tar xvf ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz fi
cp ffmpeg-n5.1-latest-linux64-gpl-5.1/bin/ffmpeg ffmpeg # >> Check if curl is installed or nor
if ! command -V curl > /dev/null 2>&1; then
echo "curl not installed, please install it and try again"
exit
fi
curl -SL --progress-bar "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg_linux_amd64" -o ffmpeg
chmod +x ffmpeg chmod +x ffmpeg
rm -rf ffmpeg-n5.1-latest-linux64-gpl-5.1
rm ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz

17
mac.sh
View File

@ -1,9 +1,16 @@
#!/bin/bash #!/bin/bash
# Script to download the latest x64 mac version of ffmpeg # Script to download the latest x64 mac version of ffmpeg
# The binary will be placed in the root dir of the app # The binary will be placed in the root dir of the app
rm ffmpeg* if ls ffmpeg* 1> /dev/null 2>&1; then
curl https://evermeet.cx/ffmpeg/ffmpeg-6.0.zip -o ffmpeg.zip rm ffmpeg*
unzip ffmpeg.zip fi
chmod +x ffmpeg # >> Check if curl is installed or nor
rm ffmpeg.zip if ! command -V curl > /dev/null 2>&1; then
echo "curl not installed, please install it and try again"
exit
fi
curl -SL --progress-bar "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg_mac" -o ffmpeg
chmod +x ffmpeg

View File

@ -4,16 +4,16 @@
"yt-dlp-wrap-plus": "^2.3.18" "yt-dlp-wrap-plus": "^2.3.18"
}, },
"name": "ytdownloader", "name": "ytdownloader",
"version": "3.17.1", "version": "3.17.2",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
"start": "electron .", "start": "electron .",
"watch": "nodemon --exec electron .", "watch": "nodemon --exec electron .",
"dist": "electron-builder", "dist": "electron-builder",
"debug": "electron --inspect=5858 .", "debug": "electron --inspect=5858 .",
"windows": "./windows.sh && electron-builder -w", "windows": "electron-builder -w",
"linux": "./linux.sh && electron-builder -l", "linux": "electron-builder -l",
"mac": "./mac.sh && electron-builder -m", "mac": "electron-builder -m",
"publish-linux": "cp ../ffmpeg-bin/ffmpeg . && electron-builder -l --publish=always", "publish-linux": "cp ../ffmpeg-bin/ffmpeg . && electron-builder -l --publish=always",
"publish-windows": "cp ../ffmpeg-bin/ffmpeg.exe . && electron-builder -w --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", "publish-mac": "cp ../ffmpeg-bin/mac/ffmpeg . && electron-builder -m --publish=always",

View File

@ -2,10 +2,15 @@
# Script to download the latest x64 windows version of custom ffmpeg build for yt-dlp # Script to download the latest x64 windows version of custom ffmpeg build for yt-dlp
# The binary will be placed in the root dir of the app # The binary will be placed in the root dir of the app
rm ffmpeg* if ls ffmpeg* 1> /dev/null 2>&1; then
wget "https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.1-latest-win64-gpl-5.1.zip" rm ffmpeg*
unzip ffmpeg-n5.1-latest-win64-gpl-5.1.zip fi
cp ffmpeg-n5.1-latest-win64-gpl-5.1/bin/ffmpeg.exe ffmpeg.exe # >> Check if curl is installed or nor
chmod +x ffmpeg.exe if ! command -V curl > /dev/null 2>&1; then
rm -rf ffmpeg-n5.1-latest-win64-gpl-5.1 echo "curl not installed, please install it and try again"
rm ffmpeg-n5.1-latest-win64-gpl-5.1.zip exit
fi
curl -SL --progress-bar "https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg.exe" -o ffmpeg.exe
chmod +x ffmpeg.exe