Include local changes
This commit is contained in:
parent
4b77b1117d
commit
e234123c17
5 changed files with 223 additions and 2 deletions
98
CONTRIBUTING.md
Normal file
98
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
# Contributing to cmuxterm
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- macOS 14+
|
||||
- Xcode 15+
|
||||
- [Zig](https://ziglang.org/) (install via `brew install zig`)
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Clone the repository with submodules:
|
||||
```bash
|
||||
git clone --recursive https://github.com/manaflow-ai/cmuxterm.git
|
||||
cd cmuxterm
|
||||
```
|
||||
|
||||
2. Run the setup script:
|
||||
```bash
|
||||
./scripts/setup.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
- Initialize git submodules (ghostty, homebrew-cmuxterm)
|
||||
- Build the GhosttyKit.xcframework from source
|
||||
- Create the necessary symlinks
|
||||
|
||||
3. Build and run the debug app:
|
||||
```bash
|
||||
./scripts/reload.sh
|
||||
```
|
||||
|
||||
## Development Scripts
|
||||
|
||||
| Script | Description |
|
||||
|--------|-------------|
|
||||
| `./scripts/setup.sh` | One-time setup (submodules + xcframework) |
|
||||
| `./scripts/reload.sh` | Build and launch Debug app |
|
||||
| `./scripts/reloadp.sh` | Build and launch Release app |
|
||||
| `./scripts/reload2.sh` | Reload both Debug and Release |
|
||||
| `./scripts/rebuild.sh` | Clean rebuild |
|
||||
|
||||
## Rebuilding GhosttyKit
|
||||
|
||||
If you make changes to the ghostty submodule, rebuild the xcframework:
|
||||
|
||||
```bash
|
||||
cd ghostty
|
||||
zig build -Demit-xcframework=true -Doptimize=ReleaseFast
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
### Basic tests (run on VM)
|
||||
|
||||
```bash
|
||||
ssh cmux-vm 'cd /Users/cmux/GhosttyTabs && xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination "platform=macOS" build && pkill -x "cmuxterm DEV" || true && APP=$(find /Users/cmux/Library/Developer/Xcode/DerivedData -path "*/Build/Products/Debug/cmuxterm DEV.app" -print -quit) && open "$APP" && for i in {1..20}; do [ -S /tmp/cmuxterm.sock ] && break; sleep 0.5; done && python3 tests/test_update_timing.py && python3 tests/test_signals_auto.py && python3 tests/test_ctrl_socket.py && python3 tests/test_notifications.py'
|
||||
```
|
||||
|
||||
### UI tests (run on VM)
|
||||
|
||||
```bash
|
||||
ssh cmux-vm 'cd /Users/cmux/GhosttyTabs && xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination "platform=macOS" -only-testing:GhosttyTabsUITests test'
|
||||
```
|
||||
|
||||
## Ghostty Submodule
|
||||
|
||||
The `ghostty` submodule points to [manaflow-ai/ghostty](https://github.com/manaflow-ai/ghostty), a fork of the upstream Ghostty project.
|
||||
|
||||
### Making changes to ghostty
|
||||
|
||||
```bash
|
||||
cd ghostty
|
||||
git checkout -b my-feature
|
||||
# make changes
|
||||
git add .
|
||||
git commit -m "Description of changes"
|
||||
git push manaflow my-feature
|
||||
```
|
||||
|
||||
### Keeping the fork updated
|
||||
|
||||
```bash
|
||||
cd ghostty
|
||||
git fetch origin
|
||||
git checkout main
|
||||
git merge origin/main
|
||||
git push manaflow main
|
||||
```
|
||||
|
||||
Then update the parent repo:
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
git add ghostty
|
||||
git commit -m "Update ghostty submodule"
|
||||
```
|
||||
|
||||
See `docs/ghostty-fork.md` for details on fork changes and conflict notes.
|
||||
Loading…
Add table
Add a link
Reference in a new issue