Skip to content

Instantly share code, notes, and snippets.

@RedenticDev
Last active March 19, 2022 14:42
Show Gist options
  • Save RedenticDev/cd511505cd73db1a07f0201c83595253 to your computer and use it in GitHub Desktop.
Save RedenticDev/cd511505cd73db1a07f0201c83595253 to your computer and use it in GitHub Desktop.
Theos tips & shortcuts

Theos variables

To put in the root Makefile or to use in directly within the make command.

Other tips

  • Use INSTALL_TARGET_PROCESSES in the Makefile to list the processes to kill after install, so no need to write something like
after-install::
	killall -9 SpringBoard

Similarly, PREINSTALL_TARGET_PROCESSES does the same but BEFORE the install.

  • File.m_CFLAGS = ... to provide flags for individual files
  • You can use IS_IPAD or IN_SPRINGBOARD macros to check for these conditions from your code
  • THEOS_INSTANCE_NAME can be used in code to read current instance's name (the $(TWEAK_NAME) thing etc)

instance_XXX is the name of your "Makefile variable", e.g. it can represent $(TWEAK_NAME) or $(BUNDLE_NAME).

  • instance_USE_SUBSTRATE=0 to use internal generator instead of Substrate (don't ask me what this mean)
  • instance_WEAK_LIBRARIES/instance_WEAK_FRAMEWORKS to weakly link both of them (also no clue what's that)
  • instance_EXTRA_FRAMEWORKS is used to fetch frameworks installed manually in $THEOS/lib
  • instance_LOGOSFLAGS can be used to specify Logos flags instead of using something like
%ctor {
	%config(your_config);
	%init;
}
  • make do = make package install
  • $THEOS/bin/update-theos / make update-theos to update theos
  • make clean-packages to delete non-final packages
  • make show to open the OS' file explorer and highlight the latest package
  • make troubleshoot to get help and upload the output of the error to Ghostbin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment