Gládio Cítrico

Using the Update by Webpage

back


Put the rb files in the project's folder, preferably in a subfolder

updatewp.rb in external folder.

Link the updatewp.rb in your project.

Code in image: load 'external/updatewp.rb'

Create a page or document with the text below inside.

updater[index,version,download_url]


index- to differentiate from other projects on the same page (it is recommended that each be on a separate line)
version - version of the project in download_url, for the updater to know if the pc version is equivalent or superior
download_url - download link of updated project (it is recommended that the project be wrapped in .zip)
Code in blog image: updater[mhdownloader,1.0,https://github.com/HermesPasser/Manga-Host-Downloader/archive/master.zip]

Now all you need to do is program.

Implementation in manga host downloader program.

A tiny doc

Hermes::Update::ByWebPage => string id, float version, string url

bool update => string directory (// "")
returns true if the operation has sucesfully and false if not.

bool update_is_avaliable
returns true if an update is available and false if not.

string get_update_link
returns the download link of update file.

Update process.