Skip to content

feat(scripts): macOS .app 번들 빌드 스크립트 (SPEC-V0-1-2-MACOS-BUNDLE-001)#59

Open
GoosLab wants to merge 2 commits intodevelopfrom
feature/SPEC-V0-1-2-MACOS-BUNDLE-001
Open

feat(scripts): macOS .app 번들 빌드 스크립트 (SPEC-V0-1-2-MACOS-BUNDLE-001)#59
GoosLab wants to merge 2 commits intodevelopfrom
feature/SPEC-V0-1-2-MACOS-BUNDLE-001

Conversation

@GoosLab
Copy link
Copy Markdown
Collaborator

@GoosLab GoosLab commented Apr 27, 2026

Summary

`cargo build --release` 만으로는 macOS .app 번들이 생성되지 않아 사용자가 `open target/release/moai-studio.app` 호출 시 file-not-found 에러 발생. 본 PR 은 cargo-bundle 의존 없이 표준 Unix 도구만으로 번들을 조립하는 빌드 스크립트 추가.

Changes

scripts/build-macos-app.sh (NEW, 156 LOC)

  • 워크스페이스 `Cargo.toml` 의 `workspace.package.version` 자동 치환
  • 바이너리 + libghostty-vt.dylib + Info.plist + 아이콘 PNG 조립
  • `@executable_path` rpath 매칭 (otool -L 검증)
  • ad-hoc codesign (`codesign --sign - --force --deep`)
  • 옵션: `--install` (`~/Applications/` 복사), `--skip-build`, `--debug`

assets/macos/Info.plist.template (NEW)

  • `CFBundleIdentifier`: kr.ai.mo.moai-studio
  • `CFBundleVersion` / `CFBundleShortVersionString`: `VERSION` placeholder
  • `LSMinimumSystemVersion`: 14.0
  • `NSHighResolutionCapable`, `LSApplicationCategoryType`: developer-tools

Verification

$ scripts/build-macos-app.sh --skip-build
==> Version: 0.1.1
==> Building bundle at target/release/moai-studio.app
==> Ad-hoc codesign
$ open target/release/moai-studio.app
$ pgrep -f "moai-studio.app/Contents/MacOS/moai-studio"  # PID 확인됨

사용법

# 풀 빌드 + 번들
scripts/build-macos-app.sh

# 빌드 + 번들 + ~/Applications 설치 (개발 시연용)
scripts/build-macos-app.sh --install

# 이미 빌드한 바이너리로 번들만 (빠른 반복)
scripts/build-macos-app.sh --skip-build

# 디버그 프로필
scripts/build-macos-app.sh --debug

Carry-over

  • `assets/icons/icon.icns` 생성 (iconutil) → `CFBundleIconFile` PNG → ICNS 전환 (v0.1.0 GA 요구사항, 별도 SPEC)
  • Hardened Runtime + Notarization (배포 채널 활성화 시)
  • CI 통합: `.github/workflows/release-macos.yml` 에서 본 스크립트 호출 (선택)

Test plan

  • CI: 7 required status checks PASS (script 자체는 macOS-only, CI Linux 영향 없음)
  • 로컬: `scripts/build-macos-app.sh && open target/release/moai-studio.app` 정상 동작
  • `scripts/build-macos-app.sh --install` 후 `open ~/Applications/moai-studio.app` 정상

🗿 MoAI email@mo.ai.kr

cargo build --release 만으로는 .app 번들이 만들어지지 않아, 사용자가
`open target/release/moai-studio.app` 호출 시 file-not-found 에러 발생.

추가:
- scripts/build-macos-app.sh — cargo-bundle 의존 없이 손수 번들 조립
- assets/macos/Info.plist.template — workspace 버전 자동 치환 (__VERSION__)

번들 구조:
  moai-studio.app/Contents/
    Info.plist              (workspace.package.version 자동 주입)
    MacOS/
      moai-studio           (release 바이너리)
      libghostty-vt.dylib   (@executable_path rpath 매칭)
    Resources/
      moai-studio.png       (256x256 placeholder, GA 전 .icns 교체 필요)
    _CodeSignature/         (codesign --sign - --force --deep)

사용법:
  scripts/build-macos-app.sh                # build + bundle
  scripts/build-macos-app.sh --install      # ~/Applications/ 에도 복사
  scripts/build-macos-app.sh --skip-build   # cargo build 생략, 번들만
  scripts/build-macos-app.sh --debug        # debug profile

검증:
- cargo build --release -p moai-studio-app PASS
- 번들 생성 + 실행 PID 확인
- otool -L: @rpath/libghostty-vt.dylib + @executable_path rpath 매칭 확인

Carry-over (v0.1.0 GA 이전):
- assets/icons/icon.icns 생성 (iconutil) → CFBundleIconFile 변경
- Hardened Runtime 진입 + notarization (배포 채널)

🗿 MoAI <email@mo.ai.kr>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 115171e8-db22-44fe-bbd4-8d44dfb59bdd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "release/**" at "reviews.auto_review.base_branches[2]"; Invalid regex pattern for base branch. Received: "hotfix/**" at "reviews.auto_review.base_branches[3]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/SPEC-V0-1-2-MACOS-BUNDLE-001

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@GoosLab GoosLab enabled auto-merge (squash) April 27, 2026 04:42
scripts/build-macos-app.sh + assets/macos/Info.plist.template (PR #59) 의
사용법을 CLAUDE.local.md §8 신설로 명문화.

추가 내용:
- §8.1 배경 (cargo build --release 만으로는 .app 미생성)
- §8.2 스크립트 구성 (3 파일 역할표)
- §8.3 사용법 (4 옵션: 기본 / --install / --skip-build / --debug)
- §8.4 시연/개발 자주 쓰는 패턴 (3 패턴 A/B/C)
- §8.5 번들 구조 (Contents/MacOS, Frameworks, Resources)
- §8.6 검증 명령 (otool -L, otool -l, pgrep)
- §8.7 HARD 규칙 (시연 전 스크립트 실행 강제 + macOS 전용)
- §8.8 v0.1.0 GA 전 carry-over (icns / Hardened Runtime / Notarization)

섹션 시프트:
- §8 Version 임시규칙 → §9
- §9 Code Comments → §10 (sub §10.1~10.6)
- §10 Troubleshooting → §11
- §10.1/§10.5 cross-ref 갱신

Version 1.3.0 → 1.4.0.

🗿 MoAI <email@mo.ai.kr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant