From 9cfbb5700548e6caf226e623485a4a55df1a24f9 Mon Sep 17 00:00:00 2001 From: Carl Ambroselli Date: Sat, 4 Dec 2021 14:45:24 +0100 Subject: [PATCH] Fix build configuration and README --- .gitignore | 1 + README.md | 33 +++++++++++++++---- .../Documents/mautrix-imessage-armv7/fetch.sh | 8 +++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index e36cb09..8579804 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .theos/ .DS_STORE packages/ +build/ diff --git a/README.md b/README.md index 46e48e8..e1af6e7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ # Brooklyn -## This readme is out-of-date. -Blame Ethan, he's working on it. - - ## Components ### Rubicon > "The die is cast." @@ -23,9 +19,11 @@ iMessage runtime inspection tool. Also api testing grounds. 2. Open brooklyn.xcodeproj. 3. Go to the brooklyn *target*, then click Build Settings 4. Change `THEOS_DEVICE_IP` to the Bonjour or IP address of the targeted device. -5. Change `THEOS` to *your full theos path.* No cheating with ~. Do the same in the Makefile. This step won't be needed in the future. -6. Open a terminal and type `ssh-copy-id root@`, followed by the address you set in Step 4. The default password for iOS is `alpine`. (If it gives an error, run `ssh-keygen` and spam enter, then try again.) -7. Connect a device to Xcode, select `brooklyn>(device)` in the tab bar, and click Run! +5. Change `THEOS` to *your full theos path.* No cheating with ~. +6. Update the directory under Targets > Brooklyn > Info from the `ethanrdoesmc` directory to the full path where your code is checked out +7. Edit the Makefile and update the IP behind `THEOS_DEVICE_IP` to the IP of your iPhone. +8. Open a terminal and type `ssh-copy-id root@`, followed by the address you set in Step 4. The default password for iOS is `alpine`. (If it gives an error, run `ssh-keygen` and spam enter, then try again.) +9. Connect a device to Xcode, select `brooklyn>(device)` in the tab bar, and click Run! Optional code highlighting, autocomplete, error checking: 1. Set the build target to `xchighlight>Any iOS Device (armv7, arm64)` in the tab bar. @@ -44,5 +42,26 @@ Optional code highlighting, autocomplete, error checking: #### Notes If you make changes to .xib files, make sure to commit the built .nib files in the Resources folder as well. That way, other platforms can build without Xcode. This will not be a requirement in the future. +## Troubleshooting + +``` +bash: ldid: command not found +... +make[1]: *** [internal-application-all_] Error 2 +make: *** [Brooklyn.all.application.variables] Error 2 +Command ExternalBuildToolExecution failed with a nonzero exit code +``` + +Take a look at the logs above and spot the PATH variable. Most likely brew installed ldid to `/opt/homebrew/bin/ldid` but `/opt/homebrew/bin` is not part of you xcode path. You can create a link from your `/usr/local/bin` dir by running `sudo ln -s /opt/homebrew/bin/ldid /usr/local/bin/ldid` (make sure that this is your homebrew install location by running `which ldid`, `/opt/homebrew` is the default on M1 Macs) + + +``` +dm.pl: building package `com.beeper.brooklyn:iphoneos-arm' in `./packages/com.beeper.brooklyn_0.0.1-2+debug_iphoneos-arm.deb' +open2: exec of lzma -c1 failed: No such file or directory at /Users/carl/theos/bin/dm.pl line 118. +make: *** [internal-package] Error 2 +``` + +I wasn't able to get `lzma` to work, so I edited `vim ~/theos/makefiles/package/deb.mk` and changed `_THEOS_PLATFORM_DPKG_DEB_COMPRESSION ?= lzma` to `_THEOS_PLATFORM_DPKG_DEB_COMPRESSION ?= gzip`. + ### Linux / Windows I'll add these instructions soon. I don't have theos set up on Windows. I also don't have a Linux install yet. For shame, I know, for shame! :P diff --git a/layout/var/mobile/Documents/mautrix-imessage-armv7/fetch.sh b/layout/var/mobile/Documents/mautrix-imessage-armv7/fetch.sh index 4214232..00771cd 100755 --- a/layout/var/mobile/Documents/mautrix-imessage-armv7/fetch.sh +++ b/layout/var/mobile/Documents/mautrix-imessage-armv7/fetch.sh @@ -1,6 +1,8 @@ #!/bin/sh cd $(dirname $0) -curl -L https://mau.dev/tulir/mautrix-imessage/-/jobs/artifacts/master/download?job=build%20armv7 -o mautrix-imessage-armv7.zip +curl -L https://mau.dev/mautrix/imessage/-/jobs/artifacts/master/download?job=build+ios+armv7 -o mautrix-imessage-ios-armv7.zip rm -f mautrix-imessage libolm.3.dylib example-config.yaml -unzip mautrix-imessage-armv7.zip -rm -f mautrix-imessage-armv7.zip +unzip mautrix-imessage-ios-armv7.zip +rm -f mautrix-imessage-ios-armv7.zip +mv mautrix-imessage-ios-armv7/* . +rmdir mautrix-imessage-ios-armv7