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.

Revisions

  1. RedenticDev revised this gist May 24, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions 1 - Tips.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## Theos variables
    To put in the root `Makefile` or to use in directly within the `make command`.
    To put in the root `Makefile` or to use in directly within the `make` command.
    - `FINALPACKAGE=1`/`DEBUG=0`/`FOR_RELEASE=1`: builds an optimized package ready for release (and removes the `-X+debug`)
    - `LEAN_AND_MEAN=1`: disables theos auto-import like `Foundation`, `UIKit` and some others. [Depreacated and useless since iOS 14.0](https://github.com/theos/theos/blob/master/Prefix.pch#L9).
    - `LEAN_AND_MEAN=1`: disables theos auto-import like `Foundation`, `UIKit` and some others. [Deprecated and useless since iOS 14.0](https://github.com/theos/theos/blob/master/Prefix.pch#L9).
    - `GO_EASY_ON_ME=1`: tells theos to stop treating warnings as errors, makes the compiler quieter (I personnally don't recommend using it, [it's always better to fix your code instead of muting errors, unless you really know what you're doing](https://www.reddit.com/r/jailbreakdevelopers/comments/50wv18/adding_a_button_to_the_uinavbar/d7lr2nw).)

    ## Other tips
    @@ -12,7 +12,7 @@ after-install::
    ```
    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
    - 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)`.**
  2. RedenticDev revised this gist May 24, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1 - Tips.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ Similarly, `PREINSTALL_TARGET_PROCESSES` does the same but BEFORE the install.

    **`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 (")
    - `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
    ```logos
  3. RedenticDev revised this gist May 23, 2021. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions 1 - Tips.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    To put in the root `Makefile` or to use in directly within the `make command`.
    - `FINALPACKAGE=1`/`DEBUG=0`/`FOR_RELEASE=1`: builds an optimized package ready for release (and removes the `-X+debug`)
    - `LEAN_AND_MEAN=1`: disables theos auto-import like `Foundation`, `UIKit` and some others. [Depreacated and useless since iOS 14.0](https://github.com/theos/theos/blob/master/Prefix.pch#L9).
    - `GO_EASY_ON_ME=1`: tells theos to stop treating warnings as errors, makes the compiler quieter (I personnally don't recommend using it, [it's always better to fix your code instead of muting errors, unless you really know why you're doing that](https://www.reddit.com/r/jailbreakdevelopers/comments/50wv18/adding_a_button_to_the_uinavbar/d7lr2nw).)
    - `GO_EASY_ON_ME=1`: tells theos to stop treating warnings as errors, makes the compiler quieter (I personnally don't recommend using it, [it's always better to fix your code instead of muting errors, unless you really know what you're doing](https://www.reddit.com/r/jailbreakdevelopers/comments/50wv18/adding_a_button_to_the_uinavbar/d7lr2nw).)

    ## Other tips
    - Use `INSTALL_TARGET_PROCESSES` in the `Makefile` to list the processes to kill after install, so no need to write something like
    @@ -12,8 +12,9 @@ after-install::
    ```
    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_SPINGBOARD` macros to check for these conditions
    - `THEOS_INSTANCE_NAME` can be used in code to read current instance's name (the `$(TWEAK_NAME)` thing etc)
    - You can use `IS_IPAD` or `IN_SPRINGBOARD` macros to check for these conditions
    - `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 (")
  4. RedenticDev revised this gist May 23, 2021. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions 1 - Tips.md
    Original file line number Diff line number Diff line change
    @@ -18,3 +18,10 @@ Similarly, `PREINSTALL_TARGET_PROCESSES` does the same but BEFORE the install.
    - `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 (")
    - `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
    ```logos
    %ctor {
    %config(your_config);
    %init;
    }
    ```
  5. RedenticDev revised this gist May 23, 2021. 3 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
  6. RedenticDev created this gist May 23, 2021.
    5 changes: 5 additions & 0 deletions Shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    - `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
    1 change: 1 addition & 0 deletions Sources.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    [Theos wiki](https://github.com/theos/theos/wiki/Features), [Theos Prefix.pch](https://github.com/theos/theos/blob/master/Prefix.pch), open-source tweaks, Google and common practices.
    20 changes: 20 additions & 0 deletions Tips.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    ## Theos variables
    To put in the root `Makefile` or to use in directly within the `make command`.
    - `FINALPACKAGE=1`/`DEBUG=0`/`FOR_RELEASE=1`: builds an optimized package ready for release (and removes the `-X+debug`)
    - `LEAN_AND_MEAN=1`: disables theos auto-import like `Foundation`, `UIKit` and some others. [Depreacated and useless since iOS 14.0](https://github.com/theos/theos/blob/master/Prefix.pch#L9).
    - `GO_EASY_ON_ME=1`: tells theos to stop treating warnings as errors, makes the compiler quieter (I personnally don't recommend using it, [it's always better to fix your code instead of muting errors, unless you really know why you're doing that](https://www.reddit.com/r/jailbreakdevelopers/comments/50wv18/adding_a_button_to_the_uinavbar/d7lr2nw).)

    ## Other tips
    - Use `INSTALL_TARGET_PROCESSES` in the `Makefile` to list the processes to kill after install, so no need to write something like
    ```makefile
    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_SPINGBOARD` macros to check for these conditions
    - `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 (")
    - `instance_EXTRA_FRAMEWORKS` is used to fetch frameworks installed manually in `$THEOS/lib`