OSCam Emu Patch Generator

There are 59 replies in this Thread which was already clicked 12,296 times. The last Post () by speedy005.

  • OSCam Emu Patch Generator – Overview


    The OSCam Emu Patch Generator is a comprehensive, GUI-based tool for managing, creating, and applying patches for OSCam Emu. It is designed to simplify patching workflows while providing advanced Git integration, backup options, and GitHub deployment.


    Key Features:


    1. Patch Creation & Management

    - Automatically generate patches by comparing the OSCam Emu repository with a streaming OSCam source.

    - Supports creating, renewing, and checking patches.

    - Includes automatic patch headers with version, commit hash, and patch modifier information.


    2. Git Integration

    - Clone and manage OSCam and OSCam Emu repositories.

    - Apply patches directly to the Git repository.

    - Check patch compatibility using Git’s `apply --check`.

    - View the latest commits directly in the GUI.

    - Manage OSCam Emu Git folder with one-click cleanup and patching.


    3. Backup & Version Control

    - Backup existing patches to a configurable location.

    - Automatically create alternative backups to prevent accidental overwrites.

    - Maintain patch history with clear date and version metadata.


    4. GitHub Deployment

    - Upload patches to a GitHub repository using credentials stored in a secure configuration file.

    - Supports forcing commits and pushing all changes to a selected branch.

    - No private credentials are stored in the code; all user info comes from a secure JSON configuration.


    5. Patch Distribution

    - Export patches as ZIP files for easy distribution.

    - Includes optional icons for quick identification of actions.


    6. Customizable GUI

    - Modern PyQt6-based interface with a dynamic info log window.

    - Supports multiple languages (English and German) and customizable color themes.

    - Includes progress bars, active button highlighting, and an easy-to-use layout for patch actions.


    7. Safety & Convenience

    - Never deletes critical files from the patch folder.

    - Provides user confirmations for destructive actions (cleaning folder, exiting, etc.).

    - Ensures all required tools (git, zip, Python3, pip3) are installed.


    Technical Notes:

    - Developed in Python 3 with PyQt6 and PIL for icons.

    - Fully open-source under the MIT license.

    - Designed for Linux-based systems with OSCam Emu installed.




    pasted-from-clipboard.png

  • speedy005

    When generating this last patch, a larger file than the previous ones is created, and an error occurs at the end of applying the patch.


    The wiki file is not a regular file - it refuses to patch.

    1 of 1 fragment ignored - saving rejects the wiki.rej file.


    I just went through the procedure again, and now it works perfectly!

    Excellent contribution speedy005

    Edited once, last by oktus: Merged a post created by JDavid22 into this post. ().

  • new version

    now with github upload function for people have a github account.

    Create a file named oscamsource in the s3 folder.

    Then enter your Git repository for building oscam with emu in it. Example:

    trunkurl='https://github.com/oscam-mirror/oscam-emu'

    This allows you to directly check out the oscam emu git without applying the patch with ./se repopatch.


    patch is working no erros or hunks


    s3 compile perfectly

    pasted-from-clipboard.png

  • OSCam Emu Toolkit - Fixes and Improvements

    Patch Upload Fixed:

    • oscam-emu.patch now correctly overwrites the previous version on GitHub.

    • Only the patch file is updated; all other repository files remain untouched.

    • Commit messages are automatically extracted from the patch file header without unnecessary prefixes like Update patch.

    Progress Callback Compatibility:

    • All patch-related functions (create_patch, apply_patch, backup_old_patch, zip_patch, github_upload_patch_file) now support progress_callback correctly.

    • GUI progress bar reflects task completion properly.

    Header Handling:

    • Patch headers remain intact.

    • Git commit message uses the exact first line of the patch, removing redundant “Update patch” prefixes.

    Git Safety:

    • During patch uploads, only oscam-emu.patch is replaced; other files in the Git repository are preserved.

    • The tool performs git reset --hard and git pull safely to avoid conflicts without deleting unrelated files.

    • fix info screen

    General Stability:

    • Minor syntax and function fixes (create_icons, zip_patch, backup_old_patch) to ensure all features run without errors.

    • pasted-from-clipboard.png

  • 2️⃣ Old Patch Folder Button Renamed

    • In the “Options” section at the bottom (Grid Buttons), the S3-Patch Folder button was renamed to “Select Old Patch” (or in English: “S3 Folder”).
    • The button text is now pulled from TEXTS[LANG]["change_old_dir"] → makes switching languages easier.

    3️⃣ Progress Bar Centered Properly

    • Old version: full window width, looked messy.
    • New version:
      • QProgressBar wrapped in an HBoxLayout
      • addStretch() on left and right → centered
      • setFixedWidth(600) → reasonable length
    • Indentation cleaned up → Black-compatible.

    4️⃣ Consistent Indentation Everywhere

    • All code blocks now use 4 spaces per level.
    • Comments placed correctly at block level, not inside code.
    • No mix of tabs and spaces, avoiding Python syntax errors.

    5️⃣ Option Buttons Cleanly Created

    • create_option_button() function used → consistent height, radius, and colors
    • Buttons added to the layout in the correct order
    • Lambda callbacks set up correctly → activate button and execute action

    6️⃣ Grid Buttons Set Up Correctly

    • Buttons from actions = [...] added cleanly in a QGridLayout
    • Row/column calculation (divmod(idx, 3)) correct
    • Lambda callbacks clean, no indentation issues
    • Can now be formatted automatically with Black

    7️⃣ GitHub Upload Fix

    • The GitHub Upload buttons for Patch Files and OSCam-Emu-Git were fixed:
      • Proper text labels applied
      • Correct callbacks assigned
      • Buttons now behave consistently with other option buttons
      • All issues in the GitHub configuration window have been fixed.

    ✅ Summary:

    • All bottom option and grid buttons work correctly
    • Old Patch folder button renamed
    • Progress bar centered with reasonable width
    • Indentation fixed → compatible with Black
    • GitHub upload buttons now functional and integrated

    pasted-from-clipboard.png

  • OSCam Emu Patch Manager – Features

    Patch Creation

    • Generates a patch from the OSCam source code.

    • Automatically fetches the latest code from both the OSCam-Emu repo and the Streamboard OSCam repo.

    • Includes a header with version, build, commit hash, and modifier info.

    • Shows progress and info in the GUI with colored messages and emojis.

    Patch Renewal

    • Updates an existing patch by re-generating it from the latest source.

    Patch Checking

    • Verifies if the patch can be applied cleanly to the local OSCam-Emu Git repository.

    • Gives clear success/error messages in the GUI.

    Patch Application

    • Applies the patch directly to the local OSCam-Emu Git repository.

    • Configures Git user name/email automatically.

    • Commits the changes with a clear message including patch version.

    • Shows colored success or error messages in the info panel.

    Zip Patch

    • Packages the patch file (oscam-emu.patch) into a ZIP archive.

    • Confirms success in the GUI.

    Backup Old Patch

    • Creates a backup of the previous patch (oscam-emu.altpatch) before replacing it.

    • Ensures you can always revert if needed.

    Clean Patch Folder

    • Deletes temporary files in the patch folder.

    • Keeps important files intact (like config, scripts, icons).

    • Displays progress and success/error messages.

    OSCam-Emu Git Folder Management

    • Clean OSCam-Emu Git: Deletes the local OSCam-Emu Git repository safely.

    • Patch OSCam-Emu Git: Clones the repo, applies the patch, and commits changes automatically.

    GitHub Integration

    • Upload Patch File: Uploads oscam-emu.patch to a GitHub repository.

    • Ensures only the patch file is overwritten; other files remain untouched.

    • Upload OSCam-Emu Git Folder: Uploads the local OSCam-Emu Git repository with applied patch.

    • Manage GitHub Credentials: Configure username, token, repo URL, branch, Git user name/email.

    Tool Check

    • Automatically checks that required tools (git, patch, zip, python3, pip3) are installed.

    • Attempts to install missing tools on Debian/Ubuntu automatically.

    • Shows colored info/warning/error messages in the GUI.

    GUI Features

    • Modern PyQt6 interface with:

      • Info panel with colored messages and emojis (✅ ⚠️ ❌ ℹ️)

      • Buttons with icons for main actions

      • Language switching (English/Deutsch)

      • Color themes for buttons and progress bars

      • Progress bar for all actions

      • Commit count selection for viewing last commits

    Other Utilities

    • Change S3 patch folder: lets you point the tool to your old patch folder.

    • View Commits: shows the latest commits from the OSCam-Emu repository.

    • Supports multiple color themes for GUI readability and style.

      pasted-from-clipboard.png
  • OSCam Emu Patch Manager – Features

    1. Patch Management

      • Create, apply, check, and zip OSCam patches.

      • Backup old patches and restore them if needed.

      • Clean patch folders safely.

    2. S3 Patch Folder Integration

      • Set and save the path to your S3 patch folder.

      • All patch operations (backup, create, renew) use this folder automatically.

      • Config remembers the folder after restarting the tool.

    3. Plugin Updates

      • Update the OSCam Patch Manager plugin automatically.

      • Backup current plugin files before updating.

      • Shows an info box when the update is finished.

      • Optional restart of the tool after the update.

    4. Tool Restart

      • Manual “Restart Tool” button.

      • Restarts the application safely while keeping all settings.

    5. Git / Commit Integration

      • View commits directly from the tool.

      • Configure commit count.

      • Upload patches or OSCam Emu folders to GitHub.

      • Edit GitHub upload configuration for patches and OSCam Emu.

    6. User Interface Customization

      • Change language between English (EN) and German (DE).

      • Change color theme dynamically.

      • Digital clock display in the header.

      • Patch Header editor.

    7. Backup and Safety

      • Automatic backups of plugin files before updates.

      • Backup and restore patch files before applying changes.

    8. Progress Monitoring

      • Shows progress for long-running tasks (patch creation, Git uploads, etc.).

      • Info log panel for detailed messages.

    9. Grid & Option Buttons

      • Easy-to-access buttons for all major actions (patch, Git, plugin, config).

      • Options arranged clearly with color coding for quick identification.

    10. Config Persistence

      • Stores language, color theme, commit count, and S3 patch folder in config.json.

      • Automatically loads previous settings on startup.





    pasted-from-clipboard.pngpasted-from-clipboard.png

  • OSCAm Emu Patch Manager – Fixes & Improvements Summary

    1. Automatic Update Check at Startup

      • Added a 1-second delayed automatic check for plugin updates using QTimer.singleShot.

      • Shows a message if an update is available or not.

    2. Plugin Update Button Improvements

      • Clicking the Plugin Update button now shows a proper dialog:

        • If a new version is available → asks for confirmation before downloading.

        • If already up-to-date → shows a “No new version available” info message.

      • Fixed the bug where the old window remained open after updating on startup.

    3. Commit Count Feature

      • Added a label and spinbox to select the number of commits to display.

      • The value is now immediately saved to config.json whenever it changes.

      • Avoided duplicate spinboxes in the UI.

    4. Restart Tool Button

      • Text now adapts correctly to language changes.

      • Added missing English translation for "restart_tool": "Restart Tool" in TEXTS.

    5. Configuration Saving Method

      • Added a reusable save_config_value(key, value) method for writing changes to config.json.

    6. Text Updates (TEXTS)

      • Added missing translations for all new features (commit label, plugin update dialogs, restart button, etc.).

      • Ensured both English and German texts are consistent.

    7. Color Themes for Dark Mode

      • Added 15 new dark mode color themes in the format:

        Code
        "ThemeName": {"bg": "#1A1A1D", "text": "<BrightColor>"}
      • Each theme has a dark background and a bright text color.

    8. Miscellaneous Fixes

      • Fixed plugin_update_action() error regarding unexpected progress_callback argument.

      • Ensured smooth update process whether triggered at startup or via the Plugin Update button.

      pasted-from-clipboard.png

Your resource for OSCam-EMU softcam

Find configs, downloads, tutorials, and support for emulation setup, IPTV decoding, and extended protocol support. Master emulation and extended decoding with OSCam-EMU. Access dedicated support, configs, tutorials, and downloads for enhanced IPTV and service access.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!