From 8b31436e25035a581e7fee8751ea748f6039cc49 Mon Sep 17 00:00:00 2001 From: MasterAcnolo Date: Mon, 29 Jun 2026 10:44:17 +0200 Subject: [PATCH] feat: publish package to fedora copr, add script to automaticaly build and upload the file. Enhance readme and fix auto updater issue --- README.md | 138 ++++++++++++------ app/autoUpdater.js | 5 + package.json | 35 ++++- ...om.masteracnolo.freedomloader.metainfo.xml | 73 +++++++++ package/freedom-loader.spec | 25 ++++ scripts/make-copr-srpm.sh | 20 +++ 6 files changed, 247 insertions(+), 49 deletions(-) create mode 100644 package/com.masteracnolo.freedomloader.metainfo.xml create mode 100644 package/freedom-loader.spec create mode 100755 scripts/make-copr-srpm.sh diff --git a/README.md b/README.md index d1cf577..8180e50 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ alt="Banner" style="width: 50%;"/> -### **A clean, open-source multimedia downloader for Windows** +### **A clean, open-source multimedia downloader for Windows and Linux** -[![Release](https://img.shields.io/badge/Release-1.5.1-blue?style=for-the-badge)](https://github.com/MasterAcnolo/Freedom-Loader/releases) +[![Release](https://img.shields.io/badge/Release-1.6.0-blue?style=for-the-badge)](https://github.com/MasterAcnolo/Freedom-Loader/releases) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-red.svg?style=for-the-badge)](https://www.gnu.org/licenses/gpl-3.0) [![Website](https://img.shields.io/badge/Website-Visit-404040?style=for-the-badge)](https://masteracnolo.github.io/Freedom-Loader-Site/) [![Workshop](https://img.shields.io/badge/Worshop-Visit-0E05A1?style=for-the-badge)](https://masteracnolo.github.io/Freedom-Loader-Workshop/) @@ -86,35 +86,84 @@ The primary goal is to make media downloading accessible to users who want offli ## Installation +[![Fedora Copr](https://img.shields.io/badge/Fedora-Copr-294172?style=for-the-badge&logo=fedora&logoColor=white)](https://copr.fedorainfracloud.org/coprs/masteracnolo/freedom-loader/) +[![Debian/Ubuntu](https://img.shields.io/badge/.deb-Debian%2FUbuntu-A81D33?style=for-the-badge&logo=debian&logoColor=white)](https://github.com/MasterAcnolo/Freedom-Loader/releases) + +[//]: # ([![Snap Store](https://img.shields.io/badge/Snap-Store-82BEA0?style=for-the-badge&logo=snapcraft&logoColor=white)](https://snapcraft.io/freedom-loader)) +[![AppImage](https://img.shields.io/badge/AppImage-Universal-1E88E5?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/MasterAcnolo/Freedom-Loader/releases) + ### Requirements -- **Operating System**: Windows 10 or later -- **Browser**: Mozilla Firefox (required for cookie extraction) - - [Download Firefox](https://www.firefox.com) +- **Windows**: Windows 10 or later +- **Linux**: any modern x86_64 distribution +- **Browser**: Mozilla Firefox ([download](https://www.firefox.com)) required for cookie extraction, on both platforms -### Standard Installation +### Windows -1. Download the latest release from the [Releases page](https://github.com/MasterAcnolo/Freedom-Loader/releases) -2. Run the downloaded `.exe` installer -3. If Windows Defender shows a warning, click "More info" then "Run anyway" -4. Follow the installation wizard +1. Download the latest `.exe` from the [Releases page](https://github.com/MasterAcnolo/Freedom-Loader/releases) +2. Run the installer (click "More info" → "Run anyway" if Windows Defender warns you) +3. Follow the installation wizard + +### Linux + +#### Fedora (via Copr — recommended) + +Installing via Copr lets `dnf` handle future updates automatically: + +```bash +sudo dnf copr enable masteracnolo/freedom-loader +sudo dnf install freedom-loader +``` + +#### Debian / Ubuntu (.deb) + +```bash +# Download the latest .deb from the Releases page, then: +sudo apt install ./freedom-loader_1.x.x_amd64.deb +``` + +[//]: # (#### Snap (any distro with snapd)) + +[//]: # () +[//]: # (```bash) + +[//]: # (sudo snap install freedom-loader) + +[//]: # (```) + +#### RPM (Fedora/RHEL/openSUSE, without Copr) + +```bash +sudo dnf install ./freedom-loader-1.x.y.x86_64.rpm +``` + +#### AppImage (any distro, no installation needed) + +```bash +# Download the latest .AppImage from the Releases page, then: +chmod +x Freedom-Loader-1.x.y.AppImage +./Freedom-Loader-1.x.y.AppImage +``` + +Once installed via any method, launch Freedom Loader from your application menu, or from a terminal with: +```bash +freedom-loader +``` ### File Locations -Downloaded files are stored in: -``` -C:\Users\[USERNAME]\Downloads\Freedom Loader -``` -> [!NOTE] -> *You can change it whenever you want. Just click the "Edit" button in the UI.* +| | Windows | Linux | +|---------------|---------------------------------------------------------|--------------------------------------| +| **Downloads** | `C:\Users\[USERNAME]\Downloads\Freedom Loader` | `~/Downloads/Freedom Loader` | +| **Logs** | `C:\Users\[USERNAME]\AppData\Local\FreedomLoader\logs\` | `~/.local/share/FreedomLoader/logs/` | -Application logs can be found at: -``` -C:\Users\[USERNAME]\AppData\Local\FreedomLoader\logs\ -``` +> [!NOTE] +> The download folder can be changed anytime via the "Edit" button in the UI, on both platforms. ## Usage +> [!TIP] On Linux, you can start Freedom Loader using `freedom-loader` command + ### Basic Download 1. Launch Freedom Loader @@ -138,7 +187,7 @@ The application supports various configuration options: If you encounter issues: 1. Restart the application -2. Check the logs in `AppData\Local\FreedomLoader\logs\` +2. Check the logs in `AppData\Local\FreedomLoader\logs\` or `~/.local/share/FreedomLoader/logs` 3. Open the developer console: `CTRL + SHIFT + I` → "Toggle Developer Tools" 4. Create an issue on GitHub with logs and reproduction steps @@ -164,10 +213,17 @@ If you encounter issues: Freedom Loader can be configured either through the settings panel in the UI or by directly editing the `config.json` file located in the application data directory. ### Configuration File Location + +#### Windows ``` %APPDATA%\Freedom Loader\config.json ``` +#### Linux +``` +~/.config/Freedom Loader/config.json +``` + ### Available Options ```json { @@ -192,24 +248,24 @@ Freedom Loader can be configured either through the settings panel in the UI or ### Configuration Options -| Option | Type | Default | Description | -|--------|------|---------|-------------| -| `autoUpdate` | boolean | `true` | Enable automatic application updates | -| `discordRPC` | boolean | `true` | Enable Discord Rich Presence integration | -| `customTopBar` | boolean | `true` | Use custom application top bar | -| `autoCheckInfo` | boolean | `true` | Automatically fetch video information on URL paste | -| `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files | -| `addMetadata` | boolean | `true` | Add metadata tags to downloaded files | -| `verboseLogs` | boolean | `false` | Enable detailed logging for debugging | -| `autoDownloadPlaylist` | boolean | `true` | Automatically download entire playlists | -| `createPlaylistFolders` | boolean | `true` | Automatically create a folder for a playlist | -| `customCodec` | string | `"h264"` | Video codec for encoding (supported: h264, h265, vp9, av1) | -| `logSystem` | boolean | `true` | Enable application logging | -| `outputTitleCheck` | boolean | `true` | Verify output file titles | -| `downloadSystem` | boolean | `true` | Enable download system | -| `notifySystem` | boolean | `true` | Enable system notifications | -| `enableHardwareAcceleration` | boolean | `true` | Enable Hardware Acceleration | -| `theme` | string | `dark` | Current Theme Name | +| Option | Type | Default | Description | +|------------------------------|---------|----------|------------------------------------------------------------| +| `autoUpdate` | boolean | `true` | Enable automatic application updates | +| `discordRPC` | boolean | `true` | Enable Discord Rich Presence integration | +| `customTopBar` | boolean | `true` | Use custom application top bar | +| `autoCheckInfo` | boolean | `true` | Automatically fetch video information on URL paste | +| `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files | +| `addMetadata` | boolean | `true` | Add metadata tags to downloaded files | +| `verboseLogs` | boolean | `false` | Enable detailed logging for debugging | +| `autoDownloadPlaylist` | boolean | `true` | Automatically download entire playlists | +| `createPlaylistFolders` | boolean | `true` | Automatically create a folder for a playlist | +| `customCodec` | string | `"h264"` | Video codec for encoding (supported: h264, h265, vp9, av1) | +| `logSystem` | boolean | `true` | Enable application logging | +| `outputTitleCheck` | boolean | `true` | Verify output file titles | +| `downloadSystem` | boolean | `true` | Enable download system | +| `notifySystem` | boolean | `true` | Enable system notifications | +| `enableHardwareAcceleration` | boolean | `true` | Enable Hardware Acceleration | +| `theme` | string | `dark` | Current Theme Name | ### Supported Codecs @@ -423,7 +479,7 @@ resources/ - Write clear commit messages - Test thoroughly before submitting changes - Update documentation when adding features -- Maintain compatibility with Windows 10+ +- Maintain compatibility with Windows 10+ and Linux ## Roadmap @@ -445,7 +501,7 @@ Use the GitHub Issues system and include: - Clear description of the issue - Steps to reproduce - Expected vs actual behavior -- Relevant logs from `AppData\Local\FreedomLoader\logs\` +- Relevant logs from `AppData\Local\FreedomLoader\logs\` or `~/.local/share/FreedomLoader/logs/` - Screenshots if applicable ### Feature Requests diff --git a/app/autoUpdater.js b/app/autoUpdater.js index 3f55799..d153712 100644 --- a/app/autoUpdater.js +++ b/app/autoUpdater.js @@ -121,6 +121,11 @@ function initAutoUpdater(mainWindow) { */ async function checkForUpdates() { + if (process.env.SNAP) { + logger.info("Running as Snap, update managed by snapd, skipping electron-updater"); + return; + } + if (!require("electron").app.isPackaged) return ; try { diff --git a/package.json b/package.json index 96ec7db..35f1256 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ { "provider": "github", "owner": "MasterAcnolo", - "repo": "Freedom-Loader" + "repo": "Freedom-Loader", + "releaseType": "draft" } ], "files": [ @@ -82,7 +83,7 @@ "shortcutName": "Freedom Loader" }, "linux": { - "target": ["AppImage", "deb","rpm"], + "target": ["AppImage", "deb","rpm", "snap"], "category": "Utility", "icon": "build/app-icon.png", "extraResources": [ @@ -90,12 +91,30 @@ { "from": "resources/binaries/linux/ffmpeg", "to": "binaries/ffmpeg" }, { "from": "resources/binaries/linux/ffprobe", "to": "binaries/ffprobe" }, { "from": "resources/binaries/linux/deno", "to": "binaries/deno" } - ], - "extraFiles": [ - { - "from": "package/com.masteracnolo.freedomloader.metainfo.xml", - "to": "usr/share/metainfo/com.masteracnolo.freedomloader.metainfo.xml" - } + ] + }, + "deb": { + "fpm": [ + "./package/com.masteracnolo.freedomloader.metainfo.xml=/usr/share/metainfo/com.masteracnolo.freedomloader.metainfo.xml" + ] + }, + "rpm": { + "fpm": [ + "./package/com.masteracnolo.freedomloader.metainfo.xml=/usr/share/metainfo/com.masteracnolo.freedomloader.metainfo.xml" + ] + }, + "snap": { + "confinement": "strict", + "plugs": [ + "default", + "home", + "removable-media", + "network", + "audio-playback", + "desktop", + "desktop-legacy", + "x11", + "wayland" ] } } diff --git a/package/com.masteracnolo.freedomloader.metainfo.xml b/package/com.masteracnolo.freedomloader.metainfo.xml new file mode 100644 index 0000000..4efdddf --- /dev/null +++ b/package/com.masteracnolo.freedomloader.metainfo.xml @@ -0,0 +1,73 @@ + + + + com.masteracnolo.freedomloader + + Freedom Loader + + GUI for yt-dlp to download video and audio with metadata + + CC0-1.0 + GPL-3.0-only + + + MasterAcnolo + + + +

+ Freedom Loader is a free and open-source graphical interface built + around yt-dlp, the powerful command-line media downloader. It lets + you download video and audio from hundreds of supported websites + without ever touching a terminal, with no ads, no tracking, and + no questionable third-party services. +

+

+ Under the hood, Freedom Loader bundles yt-dlp and ffmpeg directly, + so there is nothing extra to install: paste a link, choose a + format and quality, and the app handles fetching, converting + and tagging the file for you. +

+

Features include:

+
    +
  • MP4 video or MP3 audio downloads with embedded metadata and thumbnails
  • +
  • Quality selection from best to specific resolutions (1080p, 720p, 480p)
  • +
  • Codec choice: H.264, H.265, AV1, VP9 and Theora
  • +
  • Playlist downloads with automatic per-playlist folders
  • +
  • Cookie-based access to age-restricted and member-only content
  • +
  • Custom theme system with a web-based theme creator
  • +
  • Real-time download progress with network speed indicator
  • +
  • Optional Discord Rich Presence integration
  • +
  • Automatic application and download-engine updates
  • +
+

+ DRM-protected content is not supported and cannot be downloaded. +

+
+ + freedom-loader.desktop + + https://github.com/MasterAcnolo/Freedom-Loader + https://github.com/MasterAcnolo/Freedom-Loader/issues + https://github.com/MasterAcnolo/Freedom-Loader + + + AudioVideo + Utility + Network + + + + + +

Latest stable release.

+
+
+
+ + + + + freedom-loader + +
diff --git a/package/freedom-loader.spec b/package/freedom-loader.spec new file mode 100644 index 0000000..a4f7446 --- /dev/null +++ b/package/freedom-loader.spec @@ -0,0 +1,25 @@ +Name: freedom-loader +Version: __VERSION__ +Release: 1%{?dist} +Summary: GUI for yt-dlp media downloads +License: GPL-3.0-only +Source0: freedom-loader-__VERSION__.x86_64.rpm +BuildArch: x86_64 +Requires: glibc, gtk3, nss, libXScrnSaver + +%description +GUI for yt-dlp media downloads. + +%install +rpm2cpio %{SOURCE0} | (cd %{buildroot} && cpio -idmv) +mkdir -p %{buildroot}/usr/bin +ln -sf "/opt/Freedom Loader/freedom-loader" %{buildroot}/usr/bin/freedom-loader + +%files +/opt/* +/usr/bin/freedom-loader +/usr/share/applications/* +/usr/share/metainfo/* +/usr/share/icons/hicolor + +%changelog \ No newline at end of file diff --git a/scripts/make-copr-srpm.sh b/scripts/make-copr-srpm.sh new file mode 100755 index 0000000..a3e3b23 --- /dev/null +++ b/scripts/make-copr-srpm.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +VERSION=$(node -p "require('$ROOT_DIR/package.json').version") +mkdir -p "$ROOT_DIR/srpm-out" + +TMP_DIR="$ROOT_DIR/.copr-build-tmp" +mkdir -p "$TMP_DIR" +TMP_SPEC="$TMP_DIR/freedom-loader.spec" +sed "s/__VERSION__/$VERSION/g" "$ROOT_DIR/package/freedom-loader.spec" > "$TMP_SPEC" + +rpmbuild -bs "$TMP_SPEC" \ + --define "_sourcedir $ROOT_DIR/dist" \ + --define "_srcrpmdir $ROOT_DIR/srpm-out" + +rm -rf "$TMP_DIR" +echo "SRPM généré : $ROOT_DIR/srpm-out/freedom-loader-$VERSION-1*.src.rpm" \ No newline at end of file