Jump to content
  • entries
    944
  • comments
    5,899
  • views
    929,467

Selective file inclusion (continued)


Josh

4,394 views

 Share

Based on a little observation, I've made the following changes to the publish routine on the beta branch:

The FPS Player script has been updated so that the footstep sound files are explicitly named, so they don't get missed in the publish step. You will need to update your project to get the new script (or just copy FPSPlayer.lua to your project).

There is now a checkbox to "Only include used files". If this is checked, then the new packing routine will be used, otherwise the old behavior of including all files is used.

The file extension filter will now be used so you can include files like XML, TXT, or whatever else you want.

The routine has been fixed to pick up terrain textures and include those.

A few people suggested a "tagging" system so the user can mark files to be included or not. This is a very bad idea. The whole point of the selective file inclusion system is that the user doesn't want to maintain a clean directory. So adding a manual system to overcome the limitations of the automatic system...it would be easier just to delete the unwanted files. When your feature requests lead to more feature requests, to fix the problems of the previous feature, that is a strong sign of bad design. So we won't be going down that path. biggrin.png

If you are using the selective file inclusion and you want to force a file to be included that would otherwise be impossible to detect, an easy way to do this is to just add a commented-out line in your main script that names the file:

--myfile.tex

Anyways, the new build is available now on the beta branch. Let me know how you like it.

  • Upvote 13
 Share

17 Comments


Recommended Comments

Just tried it and it worked great, added comment --skybox_texture.mat to app.lua and it then included the Skybox setting, that I had put in Scene Root.

Link to comment

Okay, that's something else I missed. You should not have to add that yourself. Please let me know if you find any other mistakes.

Link to comment

So I my situation (not sure if you have read it) I have over a hundred sound files located in 1 folder: "Sounds/Nature". These sounds are dynamically loaded. It would be great if I could specify the folder instead of listing every single file.

Link to comment

@Gonan, I updated it so it will catch skybox files.

 

@Aggror, that is an exception. You should be smart enough to just keep a clean directory and don't use this feature.

  • Upvote 2
Link to comment

To go along with this, how about an option to clean the directory of all files not detected to be used? Or to perhaps flag them somehow in the assets tree?

Link to comment

I'm entirely happy with this solution. A sane, simple and safe automated system for the more basic projects out there and the old "include everything" system that allows for total control but also requires it.

 

Let's not bend over backwards for this non-issue.

  • Upvote 1
Link to comment

Although I take exception to your stab there Josh, I do appreciate your taking the matter on and fixing the issue that WILL effect many users both NEW and OLD!

 

For those that this helps, Im happy to have beena part in it, for the rest of you, nothing :)

Link to comment

Again, just to be clear, when you reference "script" you mean source files too, right? So a comment like

// myfile.tex

would be picked up in any c or cpp file, right? Or just in App.cpp?

  • Upvote 1
Link to comment

I think he meant:

 

A few people suggested a "tagging" system so the user can mark files to be included or not. This is a very bad idea.

 

He's probably expecting more business speak smile.png.

 

"I don't think a tagging system is the way to go for Leadwerks"

 

Nobody likes hearing their idea is a very bad one :)

Link to comment

@ Josh " You should be smart enough to just keep a clean directory and don't use this feature." Obvioulsy, im not a smart person and am incapable of this. If thats the dividing line. All good buddy. You cant touch my feelers :)

 

I mentioned the tagging system once as a spit ball. Thats business speak for bouncing ideas off the wall to see what sticks and might work.;) Its part of the successful plan ive used for years to collaborate with others about project ideas and processes ro find a solution. Im saddened so few took part in that process, yet im delighted that it got implemented so fast and executed so well.t As stated in a PM to Josh, again, thank you for the time and effort put forth in this issue, Im sure many many others will find it exceptionally useful.

Link to comment

Market conditions indicate at this time that the idea proposed would not leverage sufficient synergy to promote holistic achievement of our total not-sucking strategy (TNSS).

 

Again, just to be clear, when you reference "script" you mean source files too, right? So a comment like

// myfile.tex

would be picked up in any c or cpp file, right? Or just in App.cpp?

Yes.

  • Upvote 1
Link to comment

if this remark is in main script, why not use a function RequiredFile("myfile.tex"),

it can write a file list and also check if the file exist.

but means u need run the game once and then publish.

or both together, the user can choose.

  • Upvote 1
Link to comment

i wish we get the same file list at runtime.

can't get the zombie sounds at publish.

also i had add them in remark.

maybe because spaces in folder name?

i had in remark also try _ for space.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...