How do I manage what gets compiled and packaged into PDX file?

How do I manage what gets compiled and packaged into PDX file?

I'm storing some documents and other artwork source files in my project folder that are getting automatically picked up when I compile and then packaged into the PDX container. I know I can obviously change my file organization and just move these up a level so they're out of this directory but wondering if there's any tricks to prevent these from getting automatically slurped up by the compiler? It would help cut down on time copying to a device (which is already verrrry slow!).

1 Like

pdc has a --skip-unknown/-k flag that tells it to skip files it doesn't recognize. That's about the only way to handle this currently, if you don't want to move the files out of the source folder. For a long time I've wanted to add a kind of command file that lets you customize pdc's behavior, but there were so many things I wanted to add I never got started.

Reading your post it occurs to me that a simple .pdcignore file (like .gitignore) would take care of this easily, so I'll file that and try to get it in the next release. I won't have support for wildcards/regex in the first iteration, just add a check on each input path against the ignore list. I've already proven that if it's too complicated I'll never get around to it. :wink:

1 Like

ftr this is ready for 2.7! :tada: You can specify individual files or entire folders. I wish I'd done this years ago!

11 Likes

Definetely useful, thanks!

Here are builds if you want to test it. I have no idea whether the linux or windows builds work or If there's external .so/.dll files that are required. lmk!

pdc-macos.zip (764.0 KB)
pdc-linux.zip (249.8 KB)
pdc-windows.zip (249.7 KB)

@dave Unsure if i'm doing something wrong or not, but when trying to use a .pdcignore file, if I ignore any file that actually exists in the Source folder (i.e. test.png), pdc.exe will use an infinitly increasing amount of ram and lock up / crash my pc :sweat: (seen it using well over 30gb!)

Without the .pdcignore / only referencing files that don't exist, it seems to work fine

Using sdk 2.7.3 on windows

image1

What's your .pdcignore file look like?

It happens with even just a single line of just

images.png

with it and images.png in the Source folder. If the images.png file isn't there it's fine.

The file / path doesn't seem to matter, aslong as it's a file that exists it seems to just consume unlimited ram

Thanks, I've found the issue and it will be fixed in the next release.

2 Likes

Just wanted to follow up to say this works great now, thanks for much for fixing it!

Would love to see the ability to also ignore paths using wildcards or just ignore whole filetypes!

Also, possibly a bit of a niche case, but I import pngs directly at runtime in my project - at the moment I'm just renaming them from .png to .pngx to stop pdc converting them, but this makes them a bit awkward for editing!

Is there any way to have it copy them directly over without converting them, but stilll being called .png? If not i'll just carry on renaming them! Thanks

This is not working for me:

  • I placed .pdgignore in the sources folder, alogn with main.lua
  • This is the content
libraries/pdDialogue/Examples/**
libraries/playout/demo/**
  • This is the error:
Compiling...
> "D:\Users\Mariano\Documents\PlaydateSDK\bin\pdc" -sdkpath "D:\Users\Mariano\Documents\PlaydateSDK" "d:\projects\project-crane\source" "d:\projects\project-crane\crane.pdx"
Command failed: "D:\Users\Mariano\Documents\PlaydateSDK\bin\pdc" -sdkpath "D:\Users\Mariano\Documents\PlaydateSDK" "d:\projects\project-crane\source" "d:\projects\project-crane\crane.pdx"
error: d:\projects\project-crane\source/libraries/pdDialogue/Examples/1 - Basic Textbox/pdDialogue.lua:unexpected symbol near '..'

ok, seems like widcards doesn't work, and to ignore an entire folder you ahve to not put a / at the end, this works:

libraries/pdDialogue/Examples
libraries/playout/demo