desktop 앱 적용
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
# GoldenChart Desktop — 내부 파일럿 배포·운영 가이드 (10명 이내)
|
||||
|
||||
## 1. 서버 최초 설정 (macOS Jenkins, 1회)
|
||||
|
||||
```bash
|
||||
cd /Users/aidev/apps/goldenChart # WORK_TREE
|
||||
|
||||
# Rust · NSIS · cargo-xwin
|
||||
./scripts/install-desktop-build-deps.sh
|
||||
|
||||
# updater 서명 키 (private → ~/.tauri/, public → desktop/updater.pub)
|
||||
./scripts/setup-desktop-updater-keys.sh
|
||||
git add desktop/updater.pub desktop/src-tauri/tauri.conf.json
|
||||
git commit -m "chore(desktop): add updater public key"
|
||||
|
||||
# Jenkins Job 등록
|
||||
./scripts/server-install-desktop-jenkins.sh
|
||||
```
|
||||
|
||||
Jenkins Credential (Secret file): `tauri-signer-key` → `/Users/aidev/.tauri/goldenchart.key`
|
||||
|
||||
Global PATH에 추가:
|
||||
|
||||
```
|
||||
/opt/homebrew/opt/llvm/bin
|
||||
/opt/homebrew/bin
|
||||
$HOME/.cargo/bin
|
||||
```
|
||||
|
||||
## 2. Jenkins Job: goldenChart-Desktop-Pipeline
|
||||
|
||||
| 항목 | 값 |
|
||||
|------|-----|
|
||||
| SCM | `file:///Volumes/ADATA/git/goldenChart.git` main |
|
||||
| 스케줄 | 30분마다 SCM poll (또는 수동) |
|
||||
| 빌드 | `scripts/jenkins-desktop-pipeline.sh` |
|
||||
| Artifact | `dist-desktop/**` |
|
||||
|
||||
환경 변수 (선택):
|
||||
|
||||
| 변수 | 설명 |
|
||||
|------|------|
|
||||
| `TAURI_SIGNER_KEY` | private key 경로 |
|
||||
| `DESKTOP_DEPLOY_WEB=1` | 빌드 후 frontend Docker 재배포 |
|
||||
| `BUMP_VERSION=patch` | 빌드 시 버전 bump |
|
||||
| `DESKTOP_UPDATE_BASE_URL` | latest.json URL base |
|
||||
|
||||
수동 실행:
|
||||
|
||||
```bash
|
||||
./scripts/jenkins-desktop-pipeline.sh
|
||||
# 또는
|
||||
./scripts/build-desktop.sh --all
|
||||
./scripts/publish-desktop-update.sh
|
||||
```
|
||||
|
||||
## 3. 사용자 설치
|
||||
|
||||
### macOS
|
||||
|
||||
1. Jenkins → `dist-desktop/*.dmg` 또는 updates URL에서 다운로드
|
||||
2. DMG → Applications
|
||||
3. 최초 실행: **시스템 설정 → 개인정보 보호 → 확인 없이 열기**
|
||||
|
||||
### Windows
|
||||
|
||||
1. `*-setup.exe` (NSIS) 다운로드
|
||||
2. SmartScreen → **추가 정보 → 실행**
|
||||
|
||||
## 4. 앱 기능
|
||||
|
||||
- **서버**: `http://exdev.co.kr/api` (웹과 동일 계정·DB)
|
||||
- **위젯**: OS 별도 창 (`WebviewWindow`)
|
||||
- **알림**: 창 닫기 → 트레이 상주, STOMP + OS 알림
|
||||
- **업데이트**: 설정 → 일반 → PC 앱 → **업데이트 확인**
|
||||
|
||||
## 5. 업데이트 배포 흐름
|
||||
|
||||
```
|
||||
git push main
|
||||
→ Jenkins goldenChart-Desktop-Pipeline
|
||||
→ build-desktop.sh (dmg + exe + updater bundles)
|
||||
→ publish-desktop-update.sh (sign + latest.json)
|
||||
→ frontend/public/desktop/updates/
|
||||
→ (DESKTOP_DEPLOY_WEB=1) nginx 재배포
|
||||
→ 클라이언트 앱 내 업데이트
|
||||
```
|
||||
|
||||
## 6. Smoke Test
|
||||
|
||||
```bash
|
||||
npm run smoke:desktop
|
||||
```
|
||||
|
||||
## 로컬 개발 (Mac)
|
||||
|
||||
```bash
|
||||
npm install
|
||||
|
||||
# 최초 1회 — Homebrew(~/homebrew) + Rust + NSIS/LLVM
|
||||
npm run install:desktop:deps -- --mac-only # macOS 빌드만 (빠름)
|
||||
# npm run install:desktop:deps # Windows 크로스 빌드 포함
|
||||
|
||||
source ~/.zprofile # PATH 적용
|
||||
npm run dev:desktop
|
||||
npm run build:desktop:mac
|
||||
```
|
||||
|
||||
산출물: `desktop/src-tauri/target/release/bundle/dmg/GoldenChart_*.dmg`
|
||||
|
||||
관리자 권한이 있으면 `/opt/homebrew` 정식 설치를 권장합니다 (bottle 사용, LLVM 빌드 시간 단축).
|
||||
Reference in New Issue
Block a user