builds_folder suggestion/enhancement/contribution

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
oncardam
Newbie
Posts: 19
Joined: Thu Nov 08, 2012 11:59 pm
Contact:

builds_folder suggestion/enhancement/contribution

#1 Post by oncardam »

I keep my project source on a cloud storage folder (google drive) so other contributors can get to it, but I don't really want to keep uploading each build to cloud storage.

It would be good to have a builds_folder where dists get built to either on a per project or a global basis.

As a quick and easy hack I added a new parameter to options.rpy called builds_folder.

eg:

Code: Select all

    build.directory_name = "ROCE-R1.3.3"
    build.builds_folder = '''../../../RenpyBuilds'''         ### New
The following was added in the launcher's distribute.rpy:

Code: Select all


            self.base_name = build['directory_name']
            self.executable_name = build['executable_name']
            self.pretty_version = build['version']
            
            builds_folder = build.get('builds_folder')                 ### New
            
   
            # The destination directory.
            if destination is None:
                parent = os.path.dirname(project.path)
                if builds_folder:                                      ### New
                    if builds_folder[0] == '.':                        ### New
                        parent = os.path.join(parent, builds_folder)   ### New
                    else:                                              ### New
                        parent = builds_folder                         ### New  
                        
                self.destination = os.path.join(parent, self.base_name + "-dists")
                try:
                    os.makedirs(self.destination)
                except:
                    pass
            else:
                self.destination = destination

and added

Code: Select all

   rv["builds_folder"] = builds_folder 
to 00Build.RPY's dump function.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: builds_folder suggestion/enhancement/contribution

#2 Post by PyTom »

I've added build.destination to Ren'Py 6.16. There's a slight semantic change to what you have here - it gives the entire path to the dists directory, rather than the path to the directory containing the dists directory.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

oncardam
Newbie
Posts: 19
Joined: Thu Nov 08, 2012 11:59 pm
Contact:

Re: builds_folder suggestion/enhancement/contribution

#3 Post by oncardam »

Oh cool, thankyou. That will work just as well for my purposes. Does it work with relative and absolute paths?

Post Reply

Who is online

Users browsing this forum: No registered users