Skip to content

Getting Started

Dana Buehre edited this page Aug 12, 2018 · 3 revisions

Theos Resources

To get started using libCSPreferences, first, you’ll need to download the resources and import them into your theos installation. You can grab the latest resources from the releases tab, or by clicking here. Once you have the resources downloaded, you’ll need to take the CSPreferences folder and place it in theos/vendor/include and take the contents of the lib folder and place them in theos/lib

NIC Templates

In addition to the resources, I also offer 2 NIC templates for easy project creation. I’d strongly recommend that you use these templates. You can get the templates from here. once you have the templates, place the 2 .tar files in theos/templates/creaturecoding/. To use the templates, simply run $THEOS/bin/nic.pl, and select creature_tweak_preferences for a new project with libCSPreferences pre-configured, or libcspreferences for creating a libCSPreferences bundle in an existing tweak.

Additional Configuration

At this point, if you used the creature_tweak_preferences template you can run $ make do, and you’ll find your new tweaks preference bundle in Settings. If you used the libcspreferences template, you’ll have a few things to configure before it’s ready to use.

  1. You’ll need to the XXXProvider.m & XXXProvider.h files from the newly created preference folder and move them to the root of your project.
  2. Add $(TWEAK_NAME)_LDFLAGS += -lCSPreferencesProvider to your Makefile, to link the provider lib to your tweak.
  3. If you don't use $(wildcard ) for your source files in the root Makefile, you’ll need to add XXXProvider.m to your [PROJECT NAME]_FILES in the makefile. I’d recommend using a wildcard for this instead, like so $(TWEAK_NAME)_FILES = $(wildcard *.m *.xm) in your makefile.
    NOTE: substitute XXX for the prefix you selected when creating the bundle with NIC.

Clone this wiki locally