diff --git a/.dockerignore b/.dockerignore index 628b48d3..46be46b6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,29 +1,24 @@ -# Dependencies node_modules npm-debug.log* yarn-debug.log* yarn-error.log* -# Build outputs dist build .next .nuxt -# Development files .env.local .env.development.local .env.test.local .env.production.local -# IDE and editor files .vscode .idea *.swp *.swo *~ -# OS generated files .DS_Store .DS_Store? ._* @@ -32,98 +27,67 @@ build ehthumbs.db Thumbs.db -# Git .git .gitignore -# Documentation README.md README-CN.md CONTRIBUTING.md LICENSE -# Docker files (avoid copying docker files into docker) -# docker/ - commented out to allow entrypoint.sh to be copied - -# Repository images repo-images/ -# Uploads directory uploads/ -# Electron files (not needed for Docker) electron/ electron-builder.json -# Development and build artifacts *.log *.tmp *.temp -# Font files (we'll optimize these in Dockerfile) -# public/fonts/*.ttf - -# Logs logs *.log -# Runtime data pids *.pid *.seed *.pid.lock -# Coverage directory used by tools like istanbul coverage -# nyc test coverage .nyc_output -# Dependency directories jspm_packages/ -# Optional npm cache directory .npm -# Optional eslint cache .eslintcache -# Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ -# Optional REPL history .node_repl_history -# Output of 'npm pack' *.tgz -# Yarn Integrity file .yarn-integrity -# parcel-bundler cache (https://parceljs.org/) .cache .parcel-cache -# next.js build output .next -# nuxt.js build output .nuxt -# vuepress build output .vuepress/dist -# Serverless directories .serverless -# FuseBox cache .fusebox/ -# DynamoDB Local files .dynamodb/ -# TernJS port file -.tern-port \ No newline at end of file +.tern-port diff --git a/.editorconfig b/.editorconfig index 3a6a1797..e6478bbc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,20 +1,14 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file root = true -# Unix-style newlines with a newline ending every file [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -# Matches multiple files with brace expansion notation [*.{js,jsx,ts,tsx,json,css,scss,md,yml,yaml}] indent_style = space indent_size = 2 -# Markdown files [*.md] trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes index 0716d3da..5350c239 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,5 @@ -# Auto detect text files and perform LF normalization * text=auto eol=lf -# Source code *.js text eol=lf *.jsx text eol=lf *.ts text eol=lf @@ -14,16 +12,13 @@ *.yaml text eol=lf *.yml text eol=lf -# Scripts *.sh text eol=lf *.bash text eol=lf -# Windows scripts should use CRLF *.bat text eol=crlf *.cmd text eol=crlf *.ps1 text eol=crlf -# Binary files *.png binary *.jpg binary *.jpeg binary diff --git a/.gitignore b/.gitignore index fa7c621e..7925cae5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -# Logs logs *.log npm-debug.log* @@ -12,7 +11,6 @@ dist dist-ssr *.local -# Editor directories and files .vscode/* !.vscode/extensions.json .idea diff --git a/.prettierignore b/.prettierignore index 5f52bf45..12156ff6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,23 +1,18 @@ -# Ignore artifacts: build coverage dist dist-ssr release -# Dependencies node_modules package-lock.json pnpm-lock.yaml yarn.lock -# Database db -# Environment .env -# Misc *.min.js *.min.css openapi.json diff --git a/PACKAGE_MANAGERS.md b/PACKAGE_MANAGERS.md deleted file mode 100644 index 5bb8c0d2..00000000 --- a/PACKAGE_MANAGERS.md +++ /dev/null @@ -1,364 +0,0 @@ -# Package Manager Submissions for Termix - -This document describes the package manager integrations for Termix and how to use them. - -## Chocolatey (Windows) - -### Overview - -Chocolatey package files are located in the `chocolatey/` directory. - -### Files - -- `termix.nuspec` - Package manifest -- `tools/chocolateyinstall.ps1` - Installation script -- `tools/chocolateyuninstall.ps1` - Uninstallation script - -### Automatic Submission - -When you run the "Build Electron App" workflow with `artifact_destination: submit`: - -1. The workflow builds the Windows x64 MSI -2. Automatically creates a Chocolatey package -3. Pushes to Chocolatey if `CHOCOLATEY_API_KEY` secret is configured - -### Setup - -Add your Chocolatey API key as a GitHub secret: - -- Secret name: `CHOCOLATEY_API_KEY` -- Get your API key from: https://community.chocolatey.org/account - -**Note:** The package ID is set to "termix-ssh" to avoid conflicts with existing packages. - -### Manual Submission - -If you prefer to submit manually: - -1. Download the `chocolatey-package` artifact from GitHub Actions -2. Run: `choco push termix-ssh.{VERSION}.nupkg --source https://push.chocolatey.org/` - -### Installation (for users) - -Once approved on Chocolatey: - -```powershell -choco install termix-ssh -``` - ---- - -## Flatpak (Linux) - -### Overview - -Flatpak package files are located in the `flatpak/` directory. - -### Files - -- `com.karmaa.termix.yml` - Flatpak manifest (supports x64 and arm64) -- `com.karmaa.termix.desktop` - Desktop entry file -- `com.karmaa.termix.metainfo.xml` - AppStream metadata -- `flathub.json` - Flathub configuration -- `prepare-flatpak.sh` - Helper script for manual preparation -- `README.md` - Detailed Flatpak documentation - -### Automatic Preparation - -When you run the "Build Electron App" workflow with `artifact_destination: submit`: - -1. The workflow builds Linux x64 and arm64 AppImages -2. Generates all required Flatpak submission files -3. Creates a `flatpak-submission` artifact with everything needed - -### Submission Process - -Flatpak requires manual PR submission to Flathub: - -1. **Download the artifact** - - Download `flatpak-submission` from the GitHub Actions run - - Extract all files - -2. **Fork Flathub** - - Go to https://github.com/flathub/flathub - - Click "Fork" - -3. **Prepare your fork** - - ```bash - git clone https://github.com/YOUR-USERNAME/flathub.git - cd flathub - git checkout -b com.karmaa.termix - ``` - -4. **Copy submission files** - - Copy all files from the `flatpak-submission` artifact to your fork root - -5. **Submit PR** - - ```bash - git add . - git commit -m "Add Termix application" - git push origin com.karmaa.termix - ``` - - - Go to your fork on GitHub - - Click "Compare & pull request" - - Submit to flathub/flathub - -6. **Wait for review** - - Flathub maintainers will review (typically 1-5 days) - - Be responsive to feedback - -### Testing Locally - -Before submitting, you can test the Flatpak build: - -```bash -# Install flatpak-builder -sudo apt install flatpak-builder - -# Build and install -cd flatpak/ -flatpak-builder --user --install --force-clean build-dir com.karmaa.termix.yml - -# Run -flatpak run com.karmaa.termix -``` - -### Installation (for users) - -Once approved on Flathub: - -```bash -flatpak install flathub com.karmaa.termix -``` - ---- - -## Homebrew Cask (macOS) - -### Overview - -Homebrew Cask files are located in the `homebrew/` directory. Casks are used for GUI macOS applications. - -### Files - -- `termix.rb` - Homebrew Cask formula -- `README.md` - Detailed documentation - -### Submission Options - -You have two options for distributing via Homebrew: - -#### Option 1: Official Homebrew Cask (Recommended) - -Submit to https://github.com/Homebrew/homebrew-cask for maximum visibility. - -**Advantages:** - -- Discoverable by all Homebrew users -- Automatic update checking -- Official Homebrew support - -**Process:** - -1. Download the `homebrew-submission` artifact from GitHub Actions -2. Fork Homebrew/homebrew-cask -3. Add the cask file to `Casks/t/termix.rb` -4. Test locally and run audit checks -5. Submit PR - -**Requirements:** - -- App must be stable (not beta) -- Source code must be public -- Must pass `brew audit --cask` checks -- DMG must be code-signed and notarized (already done) - -#### Option 2: Custom Tap (Alternative) - -Create your own Homebrew tap at `Termix-SSH/homebrew-termix`. - -**Advantages:** - -- Full control over updates -- No approval process -- Can include beta releases - -**Setup:** - -```bash -# Create repository: Termix-SSH/homebrew-termix -# Add file: Casks/termix.rb (from homebrew-submission artifact) -``` - -**Users install with:** - -```bash -brew tap termix-ssh/termix -brew install --cask termix -``` - -### Automatic Preparation - -When you run the "Build Electron App" workflow with `artifact_destination: submit`: - -1. Builds macOS universal DMG -2. Calculates SHA256 checksum -3. Updates cask file with version and checksum -4. Verifies Ruby syntax -5. Creates a `homebrew-submission` artifact - -### Installation (for users) - -**From Official Homebrew (after approval):** - -```bash -brew install --cask termix -``` - -**From Custom Tap:** - -```bash -brew tap termix-ssh/termix -brew install --cask termix -``` - -### Updating the Cask - -**Official Homebrew Cask:** - -- Homebrew bot auto-updates within hours of new releases -- Or manually submit PR with new version/checksum - -**Custom Tap:** - -- Update version and sha256 in termix.rb -- Commit to your tap repository -- Users run: `brew upgrade --cask termix` - -### Testing Locally - -```bash -# Test installation -brew install --cask ./homebrew/termix.rb - -# Verify it works -open /Applications/Termix.app - -# Uninstall -brew uninstall --cask termix - -# Run audit -brew audit --cask --online ./homebrew/termix.rb -brew style ./homebrew/termix.rb -``` - ---- - -## Workflow Integration - -### GitHub Actions Workflow - -The `.github/workflows/electron-build.yml` includes three package manager submission jobs: - -1. **submit-to-chocolatey** - Automatically submits to Chocolatey - - Requires: `CHOCOLATEY_API_KEY` secret - - Runs when: `artifact_destination == 'submit'` - - Platform: Windows - - Output: Auto-pushes to Chocolatey + artifact - -2. **submit-to-flatpak** - Prepares Flatpak submission files - - No secrets required - - Runs when: `artifact_destination == 'submit'` - - Platform: Linux - - Output: Artifact for manual Flathub PR (both x64 and arm64) - -3. **submit-to-homebrew** - Prepares Homebrew Cask submission files - - No secrets required - - Runs when: `artifact_destination == 'submit'` - - Platform: macOS - - Output: Artifact for manual Homebrew PR or custom tap - -### Usage - -When creating a release, select "submit" for artifact destination: - -- This will build for all platforms (Windows, Linux, macOS) -- Automatically submit to Chocolatey (if API key is configured) -- Create Flatpak submission artifact for manual Flathub PR -- Create Homebrew submission artifact for manual Homebrew PR or custom tap - -### Artifacts Generated - -- `chocolatey-package` - .nupkg file (also auto-pushed if key configured) -- `flatpak-submission` - Complete Flathub submission (x64 + arm64) -- `homebrew-submission` - Complete Homebrew Cask submission (universal DMG) - ---- - -## Version Management - -Both package managers automatically use the version from `package.json`: - -- Current version: 1.8.0 -- Version is dynamically injected during the build process -- Download URLs are constructed using the release tag format: `release-{VERSION}-tag` - -### Important Notes - -- Ensure your GitHub releases follow the tag format: `release-X.Y.Z-tag` -- Example: `release-1.8.0-tag` -- If your tag format differs, update the workflows accordingly - ---- - -## Support - -For issues with: - -- **Chocolatey package**: Open issue at https://community.chocolatey.org/packages/termix -- **Flatpak package**: Open issue at https://github.com/flathub/com.karmaa.termix -- **Homebrew Cask**: - - Official: Open issue at https://github.com/Homebrew/homebrew-cask/issues - - Custom tap: Open issue in your tap repository -- **Build process**: Open issue at https://github.com/Termix-SSH/Termix/issues - -## Installation Summary - -### Windows - -```powershell -# Chocolatey (after approval) -choco install termix-ssh -``` - -### Linux - -```bash -# Flatpak (after approval) -flatpak install flathub com.karmaa.termix -``` - -### macOS - -```bash -# Official Homebrew Cask (after approval) -brew install --cask termix - -# Or from custom tap -brew tap termix-ssh/termix -brew install --cask termix -``` - ---- - -## Future Package Managers - -To add support for additional package managers: - -1. Create a directory with package files (e.g., `snap/`, `homebrew/`) -2. Add a job to `.github/workflows/electron-build.yml` -3. Update this document with instructions -4. Consider whether submission can be automated or requires manual PR diff --git a/PACKAGE_SUBMISSION_SUMMARY.md b/PACKAGE_SUBMISSION_SUMMARY.md deleted file mode 100644 index 579f7204..00000000 --- a/PACKAGE_SUBMISSION_SUMMARY.md +++ /dev/null @@ -1,311 +0,0 @@ -# Package Submission Setup Summary - -This document summarizes all the package manager integrations that have been set up for Termix. - -## Overview - -Termix now has complete package manager support for all three major platforms: - -- **Windows**: Chocolatey -- **Linux**: Flatpak (Flathub) -- **macOS**: Homebrew Cask - -## Files Created - -### Chocolatey (Windows) - -``` -chocolatey/ -├── termix.nuspec # Package manifest -└── tools/ - ├── chocolateyinstall.ps1 # Installation script - └── chocolateyuninstall.ps1 # Uninstallation script -``` - -### Flatpak (Linux) - -``` -flatpak/ -├── com.karmaa.termix.yml # Flatpak manifest (x64 & arm64) -├── com.karmaa.termix.desktop # Desktop entry file -├── com.karmaa.termix.metainfo.xml # AppStream metadata -├── flathub.json # Flathub configuration -├── prepare-flatpak.sh # Helper script -└── README.md # Detailed documentation -``` - -### Homebrew (macOS) - -``` -homebrew/ -├── termix.rb # Homebrew Cask formula -└── README.md # Detailed documentation -``` - -### Documentation - -``` -PACKAGE_MANAGERS.md # Complete guide for all package managers -PACKAGE_SUBMISSION_SUMMARY.md # This file -``` - -### Modified Files - -``` -.github/workflows/electron-build.yml # Added 3 new submission jobs -``` - -## GitHub Actions Integration - -### New Jobs Added to Workflow - -1. **submit-to-chocolatey** (Lines 551-654) - - Platform: Windows - - Trigger: `artifact_destination == 'submit'` - - Actions: - - Downloads Windows x64 MSI - - Calculates SHA256 checksum - - Updates package manifest with version/checksum - - Packs Chocolatey package - - Automatically pushes to Chocolatey (if API key configured) - - Creates artifact for backup - -2. **submit-to-flatpak** (Lines 656-844) - - Platform: Linux (Ubuntu) - - Trigger: `artifact_destination == 'submit'` - - Actions: - - Downloads x64 and arm64 AppImages - - Calculates SHA256 checksums for both architectures - - Generates PNG icons from SVG - - Updates manifest and metainfo with version/checksums/date - - Creates complete submission artifact - - Includes detailed submission instructions - -3. **submit-to-homebrew** (Lines 846-1059) - - Platform: macOS - - Trigger: `artifact_destination == 'submit'` - - Actions: - - Downloads macOS universal DMG - - Calculates SHA256 checksum - - Updates Cask formula with version/checksum - - Verifies Ruby syntax - - Creates submission artifact - - Includes instructions for both official and custom tap - -## Setup Required - -### Chocolatey (Automated) - -Add GitHub secret to enable automatic submission: - -- **Secret name**: `CHOCOLATEY_API_KEY` -- **Get from**: https://community.chocolatey.org/account -- **Location**: Repository Settings → Secrets and variables → Actions - -**Note:** Package ID is "termix-ssh" - -### Flatpak (Manual) - -No secrets required. Process: - -1. Run workflow with "submit" option -2. Download `flatpak-submission` artifact -3. Fork https://github.com/flathub/flathub -4. Copy files and create PR - -### Homebrew (Manual) - -No secrets required. Two options: - -**Option 1: Official Homebrew** - -1. Run workflow with "submit" option -2. Download `homebrew-submission` artifact -3. Fork https://github.com/Homebrew/homebrew-cask -4. Add to `Casks/t/termix.rb` and create PR - -**Option 2: Custom Tap** - -1. Create repository: `Termix-SSH/homebrew-termix` -2. Add `Casks/termix.rb` from artifact -3. Users install with: `brew tap termix-ssh/termix && brew install --cask termix` - -## How to Use - -### For Each Release: - -1. **Prepare Release** - - Ensure version in `package.json` is updated - - Create GitHub release with tag format: `release-X.Y.Z-tag` - - Example: `release-1.8.0-tag` - -2. **Run Build Workflow** - - Go to Actions → "Build Electron App" - - Click "Run workflow" - - Select options: - - **Platform**: `all` (or specific platform) - - **Artifact destination**: `submit` - -3. **Automated Submissions** - - **Chocolatey**: Automatically pushed (if API key configured) - - Package appears on Chocolatey within hours - - Users can install with: `choco install termix` - -4. **Manual Submissions** - - **Flatpak**: Download `flatpak-submission` artifact - - Follow instructions in `SUBMISSION_INSTRUCTIONS.md` - - Submit PR to flathub/flathub - - Review time: 1-5 days - - - **Homebrew**: Download `homebrew-submission` artifact - - Follow instructions in `SUBMISSION_INSTRUCTIONS.md` - - Option 1: Submit PR to Homebrew/homebrew-cask - - Option 2: Push to custom tap - - Review time (official): 24-48 hours - -## Version Management - -All package managers automatically use the version from `package.json`: - -- Current version: **1.8.0** -- Version format: Semantic versioning (X.Y.Z) -- All checksums calculated automatically -- Download URLs constructed automatically - -## Important Notes - -### Release Tag Format - -The workflows expect GitHub release tags in this format: - -``` -release-{VERSION}-tag -``` - -Examples: - -- ✅ `release-1.8.0-tag` -- ✅ `release-2.0.0-tag` -- ❌ `v1.8.0` -- ❌ `1.8.0` - -If your tag format is different, update these lines in the workflows: - -- **Chocolatey**: Line 597 -- **Flatpak**: Lines 724-725 -- **Homebrew**: Line 900 - -### Code Signing Requirements - -All builds require proper code signing: - -- **Windows MSI**: Already signed via electron-builder -- **Linux AppImage**: No signing required -- **macOS DMG**: Must be signed and notarized (already configured) - -### File Naming Conventions - -The workflows expect these file naming patterns: - -- Windows: `termix_windows_x64_{version}_msi.msi` -- Linux x64: `termix_linux_x64_{version}_appimage.AppImage` -- Linux arm64: `termix_linux_arm64_{version}_appimage.AppImage` -- macOS: `termix_macos_universal_{version}_dmg.dmg` - -These are already configured in `electron-builder.json`. - -## Testing Locally - -### Chocolatey - -```powershell -cd chocolatey -choco pack termix-ssh.nuspec -choco install termix-ssh -s . -y -``` - -### Flatpak - -```bash -cd flatpak -flatpak-builder --user --install --force-clean build-dir com.karmaa.termix.yml -flatpak run com.karmaa.termix -``` - -### Homebrew - -```bash -cd homebrew -brew install --cask ./termix.rb -brew uninstall --cask termix -``` - -## User Installation Commands - -Once approved on all platforms: - -```bash -# Windows (Chocolatey) -choco install termix-ssh - -# Linux (Flatpak) -flatpak install flathub com.karmaa.termix - -# macOS (Homebrew - Official) -brew install --cask termix - -# macOS (Homebrew - Custom Tap) -brew tap termix-ssh/termix -brew install --cask termix -``` - -## Update Strategy - -### Chocolatey - -- Updates pushed automatically when you run workflow with "submit" -- Users update with: `choco upgrade termix-ssh` - -### Flatpak - -- After initial approval, you get a repository: `flathub/com.karmaa.termix` -- For updates: commit new version/checksum to that repo -- Flathub auto-builds and publishes -- Users update with: `flatpak update` - -### Homebrew (Official) - -- Homebrew bot auto-updates within hours of new releases -- Detects new releases via GitHub releases -- Users update with: `brew upgrade --cask termix` - -### Homebrew (Custom Tap) - -- Manually update the cask file in your tap repo -- Users update with: `brew upgrade --cask termix` - -## Resources - -- [Chocolatey Documentation](https://docs.chocolatey.org/) -- [Flatpak Documentation](https://docs.flatpak.org/) -- [Flathub Submission](https://docs.flathub.org/docs/for-app-authors/submission) -- [Homebrew Cask Cookbook](https://docs.brew.sh/Cask-Cookbook) -- [AppStream Guidelines](https://www.freedesktop.org/software/appstream/docs/) - -## Support - -For issues: - -- **Build/Workflow**: https://github.com/Termix-SSH/Termix/issues -- **Chocolatey**: https://community.chocolatey.org/packages/termix-ssh -- **Flatpak**: https://github.com/flathub/com.karmaa.termix/issues -- **Homebrew**: https://github.com/Homebrew/homebrew-cask/issues (or your custom tap) - ---- - -**Next Steps:** - -1. Add `CHOCOLATEY_API_KEY` to GitHub secrets -2. Run workflow with "submit" option for your next release -3. Download artifacts and follow submission instructions -4. Monitor submission PRs and respond to feedback diff --git a/index.html b/index.html index 29230a71..b376f7cd 100644 --- a/index.html +++ b/index.html @@ -6,34 +6,33 @@