Any working RenPy web updater?

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
richycapy
Regular
Posts: 56
Joined: Mon May 27, 2019 8:53 pm
Organization: EN Productions
Location: Mexico
Contact:

Any working RenPy web updater?

#1 Post by richycapy »

Hello, does someone knows how this works?

https://www.renpy.org/doc/html/updater.html

Or has a working script of it

This would be great to solve patch bugs which requiere one or two scripts so the player doesnt have to download the complete game again :/

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3807
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Any working RenPy web updater?

#2 Post by Imperf3kt »

Here's a section ripped directly from my current project.

Code: Select all

screen navigation():

    vbox:
        style_prefix "navigation"

        xpos gui.navigation_xpos
        yalign 0.5

        spacing gui.navigation_spacing


        ## Updates via this button are for PC only
        if renpy.variant("pc"):

            ## If an update is available, present user with option to update
            if updater.can_update(base=None):
                textbutton _("Update") action updater.Update("http://your_web_server_here/updates.json", patch=True)
This code will place a textbutton in the navigation menu that will appear once an update is available. I plan to later move this, and if you want to, all you really need is the action action updater.Update("http://your_web_server_here/updates.json", patch=True)

You'll need to follow the documentation about building the updates and then upload the all files it produces to your web server (which has to be set up in http only, not https)
cloud services will not work, you will need to rent an actual web server or similar and set it up to be accessible from the internet.
I rented a server and installed and set up nginx on it, this works well for me.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users