How to include resource files in Theos makefile?

That is not the way you include resources using theos. MyTweak_FILES variable should only include files that can be compiled. Make file handles resources differently.

To include resources you need to create a bundle as follows.

1) Create a folder called Resources in the tweak.xm directory.

2) Put all your resource files (all your PNG's) into that folder.

3) Add the following info to your make file

4) Define your bundle as follows on top of your tweak.xm file.

5) You can now initialize the bundle and use the images within your tweak as follows:

In the above steps replace your_bundle_identifier with your tweaks bundle identifier which would be in the control file. (ex: com.yourdomain.tweak_name)

Also replace your_image_name with the name of the image you want to use.

You can pretty much use any resources (ex: sound files) the above way.

https://stackoverflow.com/questions/15999757/how-to-include-resource-files-in-theos-makefile

发表评论