Skip to content

Updater for applications from GitHub.

License

Notifications You must be signed in to change notification settings

Zalexanninev15/GRU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Release Updater

Description

Updater for applications from GitHub. It has a huge number of convenient settings and supports multiple rockers, and can download files not only from GitHub, but also based only on the release, supports pre-releases and a fairly deep asset search among releases. Lots of arguments.

Features

  • Fine-Grained Update Customization: Highly customizable asset download process with numerous arguments to adjust the update flow, making it flexible for a wide range of use cases.
  • Support for Releases Without Assets: In cases where no assets are found, the application can directly download the EXE or files from an external URL (example).
  • Multiple Downloader Options: Choose between curl, wget, the built-in gru (gru-classic) or tcpud downloader for maximum flexibility in downloading assets.
  • Seamless Archive Extraction: Leverage 7-Zip via the command line to handle nearly all types of archive files during the extraction process.
  • Automatic Process Termination: Automatically terminates the running application during updates to avoid issues with in-use applications, ensuring smooth updates.
  • Pre-Update Script Support: Optionally execute a custom prepare.bat file before the update to perform additional tasks.
  • Post-Update Script Support: Optionally execute a custom script.bat file after the update to perform additional tasks.
  • Comprehensive and Self-Sufficient Documentation: View detailed documentation by running gru.exe without any arguments to understand every option and its usage.
  • Version Control for Precise Updates: Fine-tune the update process by determining the current version and ensuring that the right release is applied based on your setup.
  • Automatic Cleanup: Automatically remove temporary files post-update to keep your system clean. Most cases work without issues, but a few may require manual intervention.
  • Pre-release Support: Optionally select pre-releases for updates if a stable release is not available or if the latest unstable release is preferred.
  • Asset Search Across Multiple Releases: Search for assets across multiple recent releases (not just the latest), ensuring you always get the right version of the file.

Available arguments

  • --app <application.exe> — Set the EXE of the launcher/main application.
  • --main <path> — Set the path to the main application located one level above the EXE.
  • --extract / --no-extract — Decide whether to extract archive files or simply move the downloaded EXE.
  • --leave / --no-leave — Control whether to keep or remove unnecessary folders.
  • --before / --no-before — Run a prepare.bat script before downloading (optional).
  • --script / --no-script — Optionally run script.bat after the download and extraction.
  • --silent / --no-silent — Hide the console window during execution for a quieter experience.
  • --details / --no-details — Show detailed download information using curl/wget.
  • --tool <type> — Choose between download tools like curl, wget, gru, gru-classic, or tcpud.
  • --link <url> — Use a direct download link when assets are unavailable in the release.
  • --ua <user-agent> — Customize the user-agent string for optimized download speeds.
  • --gh <personal access token> — Use a GitHub personal access token for improved access if there are restrictions.
  • --wgetrc / --no-wgetrc — Use the wget configuration file (.wgetrc).
  • --pre / --no-pre — Use pre-releases if stable versions are unavailable.
  • --ghost / --no-ghost — Search for assets across multiple recent releases, not just the latest.

This program offers total control over your application updates and downloads, ensuring a smooth, customizable, and clean update process every time.

A simplified description is provided here, and a more detailed one is provided in the utility itself.

System requirements

OS: Windows 10 build 1809+ (x64)/11. Final version for x32

Support for early OS versions is possible when using the built-in downloader ("gru" or "gru-classic"), as well as when specifying the path to the executable files for "curl" or "wget". Support for Windows 7/8/8.1 (x64) and old builds of Windows 10 (x64) is possible, but not guaranteed and not tested, it may be necessary to recompile the project for outdated systems.

Usage

  1. Copy the UpdateTools folder from the archive to the application folder.
  2. Run the gru.exe file with the arguments (the full list of arguments can be obtained by running gru.exe, even without console, just launching it.
  3. The file/archive will be downloaded. If it is an archive, then it will be unzipped to a folder a level higher than the current one (i.e. you need to remove UpdateTools from the path). If it is a single file, then it will simply be moved (also to a higher level). The archive will be deleted automatically after unpacking.
gru.exe --repo gek64/GitHubDesktopPortable --app GitHubDesktopPortable.exe --with "paf" --main App\GitHubDesktop\GitHubDesktop.exe --tool wget
gru.exe --repo flameshot-org/flameshot --app flameshot.exe --with "win64.zip" --script

📜 Script: View

gru.exe --repo jgraph/drawio-desktop --app app.exe --with "-windows-no-installer.exe" --no-extract

Example, ScreenToGif

gru.exe --repo NickeManarin/ScreenToGif --app ScreenToGif.exe --with ".Portable.x64.zip" --tool curl
gru.exe --repo microsoft/vscode --app Code.exe --with "null" --link "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-archive"

Build

  1. Install all dependencies with Administrator rights (it is recommended to use packages from the Scoop package manager)
Set-ExecutionPolicy -Scope CurrentUser  -ExecutionPolicy Bypass -Force
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

Then:

scoop install git rust-gnu gcc
scoop bucket add extras
scoop install extras/resource-hacker rustup-gnu
  1. Download the repository
git clone https://github.com/Zalexanninev15/GRU
cd .\GRU\
  1. Compile the GRU with my script in PowerShell!
.\build.ps1
  1. The resulting file gru.exe will be in the project folder, not the release folder.