build.archive() not creating .rpa file.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
spencer98881
Newbie
Posts: 1
Joined: Sat Dec 23, 2023 11:12 pm
Projects: Perks of Lactogenesis
Contact:

build.archive() not creating .rpa file.

#1 Post by spencer98881 »

I want to archive specific scenes that are all in the same folder. After manipulating the archiving section of options.rpy for this purpose the build distribution doesn't even create a .rpa file. What am I missing?

Code: Select all

init python:

    ## The following functions take file patterns. File patterns are case-
    ## insensitive, and matched against the path relative to the base directory,
    ## with and without a leading /. If multiple patterns match, the first is
    ## used.
    ##
    ## In a pattern:
    ##
    ## / is the directory separator.
    ##
    ## * matches all characters, except the directory separator.
    ##
    ## ** matches all characters, including the directory separator.
    ##
    ## For example, "*.txt" matches txt files in the base directory, "game/
    ## **.ogg" matches ogg files in the game directory or any of its
    ## subdirectories, and "**.psd" matches psd files anywhere in the project.

    ## Classify files as None to exclude them from the built distributions.
    build.archive("scenes", "all")


    build.classify('**~', None)
    build.classify('**.bak', None)
    build.classify('**/.**', None)
    build.classify('**/#**', None)
    build.classify('**/thumbs.db', None)


    # Archive in-game scenes.
    build.classify("images/sc/*/*.jpg", "scenes")
    build.classify("images/sc/*/*.png", "scenes")

    ## Files matching documentation patterns are duplicated in a mac app build,
    ## so they appear in both the app and the zip file.

    build.documentation('*.html')
    build.documentation('*.txt')
Above is all of the code in options.rpy related to making archives. I've tried different versions of the build.classify() commands:
(images/sc/*/*.jpg , images/sc/**.jpg , images/sc/**/**.jpg)

enaielei
Veteran
Posts: 293
Joined: Fri Sep 17, 2021 2:09 am
Organization: enaielei
Tumblr: enaielei
Deviantart: enaielei
Github: enaielei
Skype: enaielei
Soundcloud: enaielei
itch: enaielei
Discord: enaielei#7487
Contact:

Re: build.archive() not creating .rpa file.

#2 Post by enaielei »

There's an example in the docs on how to archive the files.
https://www.renpy.org/doc/html/build.html#archives wrote:

Code: Select all

# Declare two archives.
build.archive("scripts", "all")
build.archive("images", "all")

# Put script files into the scripts archive.
build.classify("game/**.rpy", "scripts")
build.classify("game/**.rpyc", "scripts")

# Put images into the images archive.
build.classify("game/**.jpg", "images")
build.classify("game/**.png", "images")
In your case, I think it should be...

Code: Select all

    build.archive("scenes", "all")

    # Archive in-game scenes.
    build.classify("game/images/sc/**.jpg", "scenes")
    build.classify("game/images/sc/**.png", "scenes")

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]