Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build configuration and README #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.theos/
.DS_STORE
packages/
build/
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Brooklyn

## This readme is out-of-date.
Blame Ethan, he's working on it.


## Components
### Rubicon
> "The die is cast."
Expand All @@ -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.
Expand All @@ -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
8 changes: 5 additions & 3 deletions layout/var/mobile/Documents/mautrix-imessage-armv7/fetch.sh
Original file line number Diff line number Diff line change
@@ -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