Page 1 of 1

builds_folder suggestion/enhancement/contribution

Posted: Sat Oct 05, 2013 10:24 pm
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.

Re: builds_folder suggestion/enhancement/contribution

Posted: Mon Oct 14, 2013 12:03 am
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.

Re: builds_folder suggestion/enhancement/contribution

Posted: Mon Oct 14, 2013 4:43 am
by oncardam
Oh cool, thankyou. That will work just as well for my purposes. Does it work with relative and absolute paths?