From 4470f6d7f0a9ce12bee23852df33a20495c85948 Mon Sep 17 00:00:00 2001 From: neoarz Date: Tue, 15 Apr 2025 15:52:26 -0400 Subject: [PATCH 1/7] create makefile --- .gitignore | 2 ++ Makefile | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 4f201677..fea5159c 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,5 @@ fastlane/test_output iOSInjectionProject/ .DS_Store +.vscode/settings.json +.vscode diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..56d194f5 --- /dev/null +++ b/Makefile @@ -0,0 +1,65 @@ +TARGET_CODESIGN = $(shell which ldid) + +PLATFORM = iphoneos +NAME = StikJIT +SCHEME ?= 'StikJIT' +RELEASE = Release-iphoneos +CONFIGURATION = Release + +MACOSX_SYSROOT = $(shell xcrun -sdk macosx --show-sdk-path) +TARGET_SYSROOT = $(shell xcrun -sdk $(PLATFORM) --show-sdk-path) + +APP_TMP = $(TMPDIR)/$(NAME) +STAGE_DIR = $(APP_TMP)/stage +APP_DIR = $(APP_TMP)/Build/Products/$(RELEASE)/$(NAME).app + +all: package + +package: + @rm -rf $(APP_TMP) + + @set -o pipefail; \ + xcodebuild \ + -jobs $(shell sysctl -n hw.ncpu) \ + -project '$(NAME).xcodeproj' \ + -scheme $(SCHEME) \ + -configuration $(CONFIGURATION) \ + -arch arm64 -sdk $(PLATFORM) \ + -derivedDataPath $(APP_TMP) \ + CODE_SIGNING_ALLOWED=NO \ + DSTROOT=$(APP_TMP)/install \ + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO \ + ONLY_ACTIVE_ARCH=NO \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO \ + SWIFT_OPTIMIZATION_LEVEL="-Onone" \ + IPHONEOS_DEPLOYMENT_TARGET=17.4 + + @rm -rf Payload + @rm -rf $(STAGE_DIR)/ + @mkdir -p $(STAGE_DIR)/Payload + @mv $(APP_DIR) $(STAGE_DIR)/Payload/$(NAME).app + @echo $(APP_TMP) + @echo $(STAGE_DIR) + + @rm -rf $(STAGE_DIR)/Payload/$(NAME).app/_CodeSignature + @ln -sf $(STAGE_DIR)/Payload Payload + @rm -rf packages + @mkdir -p packages + +ifeq ($(TIPA),1) + @zip -r9 packages/$(NAME)-ts.tipa Payload +else + @zip -r9 packages/$(NAME).ipa Payload +endif + @rm -rf Payload + +clean: + @rm -rf $(STAGE_DIR) + @rm -rf packages + @rm -rf out.dmg + @rm -rf $(APP_TMP) + +.PHONY: apple-include + + From 96e50714f285e1cca34cbf5cb4dfa6f26fd9d546 Mon Sep 17 00:00:00 2001 From: neoarz Date: Tue, 15 Apr 2025 16:04:57 -0400 Subject: [PATCH 2/7] update readme to use makefile --- README.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 21afbad9..71c6aedf 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ - Native UI for managing JIT-enabling. - No data collection—ensuring full privacy. -## Compiling Instructions +## Building Instructions 1. **Clone the repository:** ```sh @@ -50,13 +50,34 @@ cd StikJIT ``` -2. **Open in Xcode:** - Open `StikJIT.xcodeproj` in Xcode. +2. **Build using Makefile:** + ```sh + make package # Build unsigned .ipa + ``` + +3. **Updating:** + ```sh + git pull + make clean # Clean previous build + make package # Rebuild + ``` + +> **Note:** The Makefile build creates an unsigned IPA in the `packages` directory. While this is useful for quick builds, please use Xcode for development and debugging. When submitting pull requests or reporting issues, ensure you've tested your changes thoroughly using Xcode. + +## Contributing +```sh +# Clone the repository +git clone https://github.com/0-Blu/StikJIT.git +cd StikJIT + +# Open in Xcode +open StikJIT.xcodeproj +``` -3. **Build and Run:** - - Connect your iOS device. - - Select your device in Xcode. - - Build and run the project. +Then in Xcode: +- Connect your iOS device +- Select your device in Xcode +- Build and run the project (⌘R) ## License StikJIT is licensed under **AGPL-3.0**. See [`LICENSE`](LICENSE) for details. From ece1233e2df90a6207b06e2d9a66d6f9fa1fbed3 Mon Sep 17 00:00:00 2001 From: neo <164915254+neoarz@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:06:02 -0400 Subject: [PATCH 3/7] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 71c6aedf..bedccfed 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,10 @@ make clean # Clean previous build make package # Rebuild ``` +> [!WARNING] +> The Makefile build creates an unsigned IPA in the `packages` directory. While this is useful for quick builds, please use Xcode for development and debugging. When submitting pull requests or reporting issues, ensure you've tested your changes thoroughly using Xcode. + -> **Note:** The Makefile build creates an unsigned IPA in the `packages` directory. While this is useful for quick builds, please use Xcode for development and debugging. When submitting pull requests or reporting issues, ensure you've tested your changes thoroughly using Xcode. ## Contributing ```sh From 54e60c26e477aedbc654c5696a3379e706614cbf Mon Sep 17 00:00:00 2001 From: neo <164915254+neoarz@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:10:42 -0400 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bedccfed..3f8f53be 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ make package # Rebuild ``` > [!WARNING] -> The Makefile build creates an unsigned IPA in the `packages` directory. While this is useful for quick builds, please use Xcode for development and debugging. When submitting pull requests or reporting issues, ensure you've tested your changes thoroughly using Xcode. +> The __Makefile__ build creates an unsigned .ipa in the `packages` directory. While this is useful for quick builds, please use Xcode for development and debugging. When submitting pull requests or reporting issues, ensure you've tested your changes thoroughly using Xcode. From 13894c0cf5ff8d84169a0e84b6b0848585b02d55 Mon Sep 17 00:00:00 2001 From: neo <164915254+neoarz@users.noreply.github.com> Date: Tue, 15 Apr 2025 18:24:21 -0400 Subject: [PATCH 5/7] Update Makefile --- Makefile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 56d194f5..f71ed5d2 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,19 @@ +# StikJIT Makefile +# By neoarz + +# Path to code signing tool TARGET_CODESIGN = $(shell which ldid) +# Build config PLATFORM = iphoneos NAME = StikJIT SCHEME ?= 'StikJIT' RELEASE = Release-iphoneos CONFIGURATION = Release - MACOSX_SYSROOT = $(shell xcrun -sdk macosx --show-sdk-path) TARGET_SYSROOT = $(shell xcrun -sdk $(PLATFORM) --show-sdk-path) +# Temporary build directories APP_TMP = $(TMPDIR)/$(NAME) STAGE_DIR = $(APP_TMP)/stage APP_DIR = $(APP_TMP)/Build/Products/$(RELEASE)/$(NAME).app @@ -18,6 +23,7 @@ all: package package: @rm -rf $(APP_TMP) + # Build the app with xcodebuild @set -o pipefail; \ xcodebuild \ -jobs $(shell sysctl -n hw.ncpu) \ @@ -35,6 +41,7 @@ package: SWIFT_OPTIMIZATION_LEVEL="-Onone" \ IPHONEOS_DEPLOYMENT_TARGET=17.4 + # Prepare for packaging @rm -rf Payload @rm -rf $(STAGE_DIR)/ @mkdir -p $(STAGE_DIR)/Payload @@ -42,17 +49,15 @@ package: @echo $(APP_TMP) @echo $(STAGE_DIR) + # Remove Apple's code signature @rm -rf $(STAGE_DIR)/Payload/$(NAME).app/_CodeSignature @ln -sf $(STAGE_DIR)/Payload Payload @rm -rf packages @mkdir -p packages -ifeq ($(TIPA),1) - @zip -r9 packages/$(NAME)-ts.tipa Payload -else - @zip -r9 packages/$(NAME).ipa Payload -endif - @rm -rf Payload +# Create standard IPA package +@zip -r9 packages/$(NAME).ipa Payload +@rm -rf Payload clean: @rm -rf $(STAGE_DIR) @@ -61,5 +66,3 @@ clean: @rm -rf $(APP_TMP) .PHONY: apple-include - - From 0596201812d2c487a9f2da380ca5e66505a85d39 Mon Sep 17 00:00:00 2001 From: neo <164915254+neoarz@users.noreply.github.com> Date: Tue, 15 Apr 2025 18:26:39 -0400 Subject: [PATCH 6/7] Update Makefile --- Makefile | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f71ed5d2..b3f60a15 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,18 @@ # StikJIT Makefile # By neoarz +# Version 1.0 - April 2025 # Path to code signing tool TARGET_CODESIGN = $(shell which ldid) -# Build config +# Build configuration settings PLATFORM = iphoneos NAME = StikJIT SCHEME ?= 'StikJIT' RELEASE = Release-iphoneos CONFIGURATION = Release + +# SDK paths for compilation MACOSX_SYSROOT = $(shell xcrun -sdk macosx --show-sdk-path) TARGET_SYSROOT = $(shell xcrun -sdk $(PLATFORM) --show-sdk-path) @@ -18,12 +21,16 @@ APP_TMP = $(TMPDIR)/$(NAME) STAGE_DIR = $(APP_TMP)/stage APP_DIR = $(APP_TMP)/Build/Products/$(RELEASE)/$(NAME).app +# Default target all: package +# Main build target - compiles and packages the application package: + # Clean any previous build artifacts @rm -rf $(APP_TMP) # Build the app with xcodebuild + # Uses parallel jobs to speed up compilation @set -o pipefail; \ xcodebuild \ -jobs $(shell sysctl -n hw.ncpu) \ @@ -41,28 +48,37 @@ package: SWIFT_OPTIMIZATION_LEVEL="-Onone" \ IPHONEOS_DEPLOYMENT_TARGET=17.4 - # Prepare for packaging + # Prepare the directory structure for packaging @rm -rf Payload @rm -rf $(STAGE_DIR)/ @mkdir -p $(STAGE_DIR)/Payload @mv $(APP_DIR) $(STAGE_DIR)/Payload/$(NAME).app + + # Debug output - show paths for troubleshooting @echo $(APP_TMP) @echo $(STAGE_DIR) - # Remove Apple's code signature + # Remove Apple's code signature so we can use our own @rm -rf $(STAGE_DIR)/Payload/$(NAME).app/_CodeSignature + + # Set up symbolic link for packaging @ln -sf $(STAGE_DIR)/Payload Payload + + # Prepare packages directory @rm -rf packages @mkdir -p packages + + # Create standard IPA package + # Using max compression level (9) for smaller file size + @zip -r9 packages/$(NAME).ipa Payload + @rm -rf Payload -# Create standard IPA package -@zip -r9 packages/$(NAME).ipa Payload -@rm -rf Payload - +# Clean target - removes all temporary files and build artifacts clean: @rm -rf $(STAGE_DIR) @rm -rf packages @rm -rf out.dmg @rm -rf $(APP_TMP) +# Phony target declaration .PHONY: apple-include From 87ba94f43d7ceeed8d6b482cb11dbbaa1913218f Mon Sep 17 00:00:00 2001 From: neo <164915254+neoarz@users.noreply.github.com> Date: Tue, 15 Apr 2025 18:27:10 -0400 Subject: [PATCH 7/7] Update Makefile --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index b3f60a15..45f99bd0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ # StikJIT Makefile # By neoarz -# Version 1.0 - April 2025 # Path to code signing tool TARGET_CODESIGN = $(shell which ldid)