Introjucer - Xcode - package resources

It seems that all non .h/.cpp files will be copied into the package, which is definitely not a good idea! Is this something you do in the introjucer, or is it something that xcode automatically does? I use Xcode 3.

The only files that’ll be added as resources are ones that aren’t compiled or added to the binary data. I think it’s reasonable to assume that any files which have no other purpose must be there because you want them as a resource…?

No, i don’t think so. It can happen that you going to ship files with the binary that weren’t intended to be included. The problem is that you don’t notice it.

But those wouldn’t need to go into the project at all. If you’ve added a file to the introjucer project, it’s fair to assume that you expect it to do something with that file!

yes, i expect it to do something, it should be added to the project file tree, nothing more.

I have exactly the same issue. I have a text file full of self notes that I find useful to be one click launch-able from inside my IDE.

I still agree with Jules here though. When I add something to a project I’m logically including it in the project. If I want to override that, the introjucer helpfully allows me to do so, but this is a niche need. The more common need is that a bunch of resources are being added because they will be part of the binary, and having the user manually activate them all in the introjucer would be obnoxious.

tl;dr, the principals of least surprise, and maximum common utility suggest Jules chose correctly.

no no no, i can’t believe that you agree with jules. :wink:

Adding something to the project, and adding something as resources is something completely different and a security problem (you don’t notice it) and has uncommon opt-out behavior.
The only consistent solution would be to mark it like the binary resources with a “copy to resources” check-box!

Well, I guess it could have another option for “add to resources” to disable it. Will add it to my to-do-list.

Hooray! :slight_smile:

bump, could you please stop that non cpp automatically added to the resources. Its highly security relevant!!!

Didn’t I already do this ages ago? There’s already a shouldBeAddedToBinaryResourcesByDefault() method that returns false for source files.

no i mean the files that will be copied to the mac application package. No files should automatically added to them. No no never!
For example you add whole folders to you source-tree, they might contain xml-files or configuration scripts may contain sensible data (copy-protection etc…) the end-user should not see…

But it deliberately copies files into the package, because that’s a feature that people use! The way it’s designed is that if you have a file in your tree, then it’ll either add it to the binary data, or to the package resources. I can’t just change the way that logic works, or other people’s projects will stop working!

To do what you’re asking, I’d need to extend the UI and project to add an extra setting + flag to say whether each file can be exported or just kept private in the project.

I have nothing against package files, i use them too, but the current behavior is just bad interface design

  • counterintiutiv (there is absolute no visual feedback that files are in the package)
  • inconsistent (there are no package files on windows, so this logic “then it’ll either add it to the binary data, or to the package resources” makes no sense for multi-platform support )
  • security problem (because accidentally adding unwanted files)
    Maybe you see this from an mac-developer perspective, i you coming from windows you may didn’t even now that you send unwanted files to your costumer.
    Anyway i have a check script that control the output package, but i think that may can be a problem for other people.

It appears that this is still a restriction with the Introjucer so I'd like to vote for adding this ability.  I have numerous files which I use to assist in my development and not having them available as part of the IDE flow is quite inconvenient.  I don't believe it's correct to say that workspace resources equal final product resources.  For example if you were building a car you might have hundreds of documents detailing the build requirements, but the finished vehicle might only contain an owner's manual.  Silly analogy perhaps but that's my 2 cents.