Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

A way to automate finding the Ren'Py version. #2

@Uradamus

Description

@Uradamus

Looking around a bit, I found that you can get the version number from the ./renpy/__init__.py file in the game's directory. It's declared as a tuple along the lines of:

version_tuple = (6, 99, 11, vc_version)

Only the first 3 parts are relevant and they could be grabbed with a code snippet like this:

RENPYVER=grep "^version_tuple =" renpy/__init__.py | awk '{for(i=1;i<NF;i++){match($i,/[0-9]+/);if(RLENGTH!=-1){if(length(r)>0){r=r "."};r=r substr($i,RSTART,RLENGTH)}};print r}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions