How to include all files of a folder in mkb through a single line(like *.*)

Home / Forums / Marmalade Archive / Marmalade System / How to include all files of a folder in mkb through a single line(like *.*)
7 replies [Last post]
by: Sandy
Status: Offline
Joined: 2010-01-05
Points: 1300

Hi,

I have lot of files in a folder to include in mkb. Is there any shortcut to give folder path in mkb, so that it automatically fetches all files from that folder?
Thanks a lot in advance!

by: Gastel_2
Status: Offline
Joined: 2012-02-21
Points: 1440
Let's say that you have your

Let's say that you have your data in the directory "Resources" then in your mkb in the assets section write:

assets
{
(../Resources)
.
}

this will include all the file and subdirectories found within the directory resources

If you want to include the whole content of a single directory just write the name of the directory, like this:

assets
{
(../Resources)
Graphics
}

this includes all the content and subdirectories of the directory "Graphics".

Bye

by: Sandy
Status: Offline
Joined: 2010-01-05
Points: 1300
Thanks a lot! But does it

Thanks a lot!
But does it apply for files too? if we want to include all files from directory, can we say

files
{
../directory_name
}

by: Sandy
Status: Offline
Joined: 2010-01-05
Points: 1300
Hi, I tried for files as

Hi,

I tried for files as mentioned above, but it doesn't look to load files into project. Can you please give your input?

Thanks.

by: Gastel_2
Status: Offline
Joined: 2012-02-21
Points: 1440
Sorry, I assumed that you

Sorry, I assumed that you needed it for resource files. I think that for source code files the "wild card" feature is missing or at least I don't know how to do it.

by: MonRoyals
Status: Offline
Joined: 2010-08-09
Points: 26970
Try this: files {

Try this:

files
{
(source)
'*.cpp'
'*.h'
}

by: LeeMcD
Status: Offline
Joined: 2011-08-19
Points: 370
MonRoyals, This works

MonRoyals,

This works great, but could it also parse subfolders and create corresponding filters within the vcproj? We have hundreds of files, and want to keep them categorized within the solution tree. If filters were created based upon subfolder name, that would help a lot.

Of course, ideally modifications could be made to the solution explorer within vs, and those changes would get written out to a separate, marmalade-specific "solution tree" file, which could be referenced within the .mkb. This would allow devs to restructure within the IDE, and would also allow all the files to be in a flat folder (i.e. code/src), but still have them within subfolders inside the solution explorer of the IDE. This way we can move folders around the tree without borking the SVN history caused by moving a file.

by: Gered
Status: Offline
Joined: 2011-04-03
Points: 180
I agree with LeeMcD. Being

I agree with LeeMcD.

Being able to do something like:

files
{
    (src)
}

And have the MKB create a vcproj with every folder/file inside "src" with filters created based on any subfolders found inside "src" would be ideal.

As it stands, I ended up doing something like this:

files
{
    (../src) [src] '*.*'
    (../src/graphics) [src/graphics] '*.*'
    (../src/input) [src/input] '*.*'
}

Which works, and at least I don't need to specify every single file (hundreds in total), but still means I have to do a bit of editing of the MKB file every now and then when a new subfolder in my src directory is added.

Hoping that the Marmalade team has something in the works or that there is some hidden/undocumented way to get this working right now.

Latest Posts

Latest Comments

Top Contributors

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810