#2880 Build resDirs remote location

FMahony Fri 16 Dec 2022

I have a BuildPod build script where the resources are in a directory far far away. I can put the relative path in the resDirs field and it'll compile fine, but the guts of the pod mimic that very undesirable folder structure.

Is there a configuration that will allow me to build with remote resources but keep a simplified internal structure? For example:

actual path: `../dir1/dir2/dir3/lib/

desired path in pod: `lib/`

Henry Fri 16 Dec 2022

Hi FMahony!

It may not be ideal for your exact usage, and someone a little more familiar with the BuildPod script may be able to help you a bit more, but it may be worth looking at the Zip class, which can be used for reading and writing to pod files.

I've personally used this in a build script to rebuild a pod under a slightly different format in the past so you may find it useful!

SlimerDude Sat 17 Dec 2022

Hi FMahony,

I'm afraid the standard BuildPod does not cater for including custom resource files at an arbitrary path in the .pod file.

Generally the easiest way is to just re-create the desired directory structure underneath where the build.fan file lives (maybe have a pre-compile task to copy the files over?). Or, as Henry suggested, have a post-compile task to manually add the files to the .zip.

FMahony Sun 18 Dec 2022

Thanks for the advice!

It seems like letting the BuildPod script work as normal and then cleaning up using zip class methods is the way to go.

Login or Signup to reply.