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
```
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
```
@ -188,3 +189,8 @@ To build for macOS
```
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
# The binary will be placed in the root dir of the app
if ls ffmpeg* 1> /dev/null 2>&1; then
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
fi
# >> 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
rm -rf ffmpeg-n5.1-latest-linux64-gpl-5.1
rm ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz

15
mac.sh
View File

@ -1,9 +1,16 @@
#!/bin/bash
# Script to download the latest x64 mac version of ffmpeg
# The binary will be placed in the root dir of the app
if ls ffmpeg* 1> /dev/null 2>&1; then
rm ffmpeg*
curl https://evermeet.cx/ffmpeg/ffmpeg-6.0.zip -o ffmpeg.zip
unzip ffmpeg.zip
chmod +x ffmpeg
rm ffmpeg.zip
fi
# >> 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_mac" -o ffmpeg
chmod +x ffmpeg

View File

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

View File

@ -2,10 +2,15 @@
# 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
if ls ffmpeg* 1> /dev/null 2>&1; then
rm ffmpeg*
wget "https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.1-latest-win64-gpl-5.1.zip"
unzip ffmpeg-n5.1-latest-win64-gpl-5.1.zip
cp ffmpeg-n5.1-latest-win64-gpl-5.1/bin/ffmpeg.exe ffmpeg.exe
fi
# >> 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.exe" -o ffmpeg.exe
chmod +x ffmpeg.exe
rm -rf ffmpeg-n5.1-latest-win64-gpl-5.1
rm ffmpeg-n5.1-latest-win64-gpl-5.1.zip