Skip to content

Updater for applications from GitHub.

License

Notifications You must be signed in to change notification settings

Zalexanninev15/GRU

Repository files navigation

Github Release Updater

Description

Updater for applications from GitHub. It has a huge number of convenient settings and it supports multiple downloaders, and can also download files not from GitHub based only on the release.

Features

  • Features of fine-tuning the update process, a huge number of arguments for incredibly fine-tuning asset downloads from GitHub and beyond...
  • Support for releases without assets, the file itself will be downloaded from another site via a direct link (example)
  • Using, at the user's choice, as many as three types of downloader: curl, wget, integrated (built-in downloader).
  • Using the console 7-Zip allows you to unpack almost all kinds of release archives.
  • Automatically kill the process of the updated application when updating, which eliminates possible difficulties when updating applications that are already running.
  • Support for a custom script that runs after an application update (script.bat file).
  • Clear and sufficiently self-sufficient documentation (run gru.exe without arguments).
  • Support for determining the current version when using a specific argument for a more fine-grained application update process.
  • Automatically cleans all temporary files after its work (there may be problems with some, but in most cases everything goes fine).

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 ("integrated"), 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. Close PowerShell :)

  2. Copy the path (from pwd output) and replace C:\\msys2\\ on your in the file cargo.toml (section target.x86_64-pc-windows-gnu)

Example:

[target.x86_64-pc-windows-gnu]
linker = "C:\\Users\\Den\\scoop\\apps\\msys2\\current\\mingw64\\bin\\gcc.exe"
ar = "C:\\Users\\Den\\scoop\\apps\\msys2\\mingw64\\bin\\ar.exe"
  1. Compile the GRU with my script in PowerShell!
.\my_compiler.ps1
  1. The resulting file gru.exe will be in the project folder, not the release folder.