Ignore directory when building distribution

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
goldo
Regular
Posts: 127
Joined: Mon Jan 23, 2017 8:23 am
Contact:

Ignore directory when building distribution

#1 Post by goldo »

Hi guys,

I have an 'ignore' directory within the game folder, with various subfolders and files that are useful for testing but not supposed to be released with the game.

I must be stupid, but I cannot figure out the pattern for classifying files as 'ignore' when building a distribution.

The documentation says this:
The classification is done by the build.classify function. It takes a patterns and a space-separated list of filenames. Patterns are matched from first to last, with the first match taking precedence (even if a more-specific pattern follows.) Patterns are matched with and without a leading /. Patterns may include the following special characters:
/
The directory separator.
*
Matches all characters except for the directory separator.
**
Matches all characters.
I have tried the following, unsuccessfully:

Code: Select all

    build.classify('ignore/**', None)
    build.classify('ignore/', None)
    build.classify('ignore**', None)
    build.classify('ignore/**.**', None)
    
When building the distribution, it never fails to include all files within the 'ignore' folder... What am I doing wrong?

User avatar
Matalla
Veteran
Posts: 202
Joined: Wed Mar 06, 2019 6:22 pm
Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
itch: matalla-interactive
Location: Spain
Contact:

Re: Ignore directory when building distribution

#2 Post by Matalla »

Why not just delete or move that folder outside the game folder before making the distribution?
Comunidad Ren'Py en español (Discord)
Honest Critique

goldo
Regular
Posts: 127
Joined: Mon Jan 23, 2017 8:23 am
Contact:

Re: Ignore directory when building distribution

#3 Post by goldo »

Well, the point is I want to avoid doing that everytime by using the built-in classify function.

I need the directory inside the game folder otherwise it isn't available for testing (it is a large folder with pictures, so moving it back and forth takes several minutes).

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

Re: Ignore directory when building distribution

#4 Post by Imperf3kt »

You need to include the filetypes:

Code: Select all

    build.classify('game/ignore/**.png', None)
    build.classify('game/ignore/**.jpg', None)
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

goldo
Regular
Posts: 127
Joined: Mon Jan 23, 2017 8:23 am
Contact:

Re: Ignore directory when building distribution

#5 Post by goldo »

Thanks, I guess I could do that for every file type, but why doesn't this work:

Code: Select all

build.classify('ignore/**.**', None)
Also, it would leave behind all the empty subfolders, correct? I wish I could just skip everything that's in ignore including the folder itself.

Post Reply

Who is online

Users browsing this forum: piinkpuddiin