Modernize application to v0.9.0 with PySide6, FastAPI, and PWA support
## Major Changes ### Build System - Replace requirements.txt with pyproject.toml for modern dependency management - Support for uv package manager alongside pip - Update PyInstaller spec files for new dependencies and structure ### Desktop GUI (Tkinter → PySide6) - Complete rewrite of UI using PySide6/Qt6 - New modular structure in gui/ directory: - main_window.py: Main application window - macro_editor.py: Macro creation/editing dialog - command_builder.py: Visual command sequence builder - Modern dark theme with consistent styling - System tray integration ### Web Server (Flask → FastAPI) - Migrate from Flask/Waitress to FastAPI/Uvicorn - Add WebSocket support for real-time updates - Full CRUD API for macro management - Image upload endpoint ### Web Interface → PWA - New web/ directory with standalone static files - PWA manifest and service worker for installability - Offline caching support - Full macro editing from web interface - Responsive mobile-first design - Command builder UI matching desktop functionality ### Macro System Enhancement - New command sequence model replacing simple text/app types - Command types: text, key, hotkey, wait, app - Support for delays between commands (wait in ms) - Support for key presses between commands (enter, tab, etc.) - Automatic migration of existing macros to new format - Backward compatibility maintained ### Files Added - pyproject.toml - gui/__init__.py, main_window.py, macro_editor.py, command_builder.py - gui/widgets/__init__.py - web/index.html, manifest.json, service-worker.js - web/css/styles.css, web/js/app.js - web/icons/icon-192.png, icon-512.png ### Files Removed - requirements.txt (replaced by pyproject.toml) - ui_components.py (replaced by gui/ modules) - web_templates.py (replaced by web/ static files) - main.spec (consolidated into platform-specific specs) ### Files Modified - main.py: Simplified entry point for PySide6 - macro_manager.py: Command sequence model and migration - web_server.py: FastAPI implementation - config.py: Version bump to 0.9.0 - All .spec files: Updated for PySide6 and new structure - README.md: Complete rewrite for v0.9.0 - .gitea/workflows/release.yml: Disabled pending build testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,157 +1,159 @@
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(cat version.txt)
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: v${{ env.VERSION }}
|
||||
name: Release v${{ env.VERSION }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
build-windows:
|
||||
needs: [create-release]
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyinstaller
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build executable
|
||||
run: |
|
||||
pyinstaller macropad.spec
|
||||
|
||||
- name: Upload Windows artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macropad-windows
|
||||
path: dist/macropad.exe
|
||||
|
||||
build-linux:
|
||||
needs: [create-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3-tk python3-dev
|
||||
# Pystray requirements
|
||||
sudo apt-get install -y libgtk-3-dev python3-gi python3-gi-cairo gir1.2-gtk-3.0
|
||||
# Direct dependencies for system tray functionality
|
||||
sudo apt-get install -y gir1.2-appindicator3-0.1
|
||||
# Additional libraries
|
||||
sudo apt-get install -y libcairo2-dev libgirepository1.0-dev
|
||||
# For QR code display
|
||||
sudo apt-get install -y python3-pil.imagetk
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyinstaller
|
||||
pip install -r requirements.txt
|
||||
- name: Build executable
|
||||
run: |
|
||||
pyinstaller macropad_linux.spec
|
||||
|
||||
- name: Upload Linux artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macropad-linux
|
||||
path: dist/macropad
|
||||
|
||||
# MacOS build is temporarily disabled
|
||||
# Uncomment this section when macOS build environment becomes available
|
||||
# =============================================================================
|
||||
# WORKFLOW DISABLED - Pending testing of v0.9.0 modernization
|
||||
# =============================================================================
|
||||
# This workflow is temporarily disabled while testing the new:
|
||||
# - PySide6 GUI (replacing Tkinter)
|
||||
# - FastAPI web server (replacing Flask)
|
||||
# - pyproject.toml build system (replacing requirements.txt)
|
||||
# - PWA web interface
|
||||
#
|
||||
# build-macos:
|
||||
# needs: [create-release]
|
||||
# runs-on: macos-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v3
|
||||
#
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: '3.11'
|
||||
#
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install pyinstaller
|
||||
# pip install -r requirements.txt
|
||||
#
|
||||
# - name: Build executable
|
||||
# run: |
|
||||
# pyinstaller macropad_macos.spec
|
||||
#
|
||||
# - name: Upload macOS artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: macropad-macos
|
||||
# path: dist/macropad.app
|
||||
# Uncomment the workflow below once builds are verified locally.
|
||||
# =============================================================================
|
||||
|
||||
attach-to-release:
|
||||
needs: [create-release, build-windows, build-linux]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(cat version.txt)
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Attach executables to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: v${{ env.VERSION }}
|
||||
files: |
|
||||
macropad-windows/macropad.exe
|
||||
macropad-linux/macropad
|
||||
# macropad-macos/macropad.app/**/*
|
||||
# name: Build and Release
|
||||
#
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
#
|
||||
# jobs:
|
||||
# create-release:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v3
|
||||
#
|
||||
# - name: Get version
|
||||
# id: get_version
|
||||
# run: |
|
||||
# VERSION=$(cat version.txt)
|
||||
# echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
#
|
||||
# - name: Create Release
|
||||
# id: create_release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# tag_name: v${{ env.VERSION }}
|
||||
# name: Release v${{ env.VERSION }}
|
||||
# draft: false
|
||||
# prerelease: false
|
||||
#
|
||||
# build-windows:
|
||||
# needs: [create-release]
|
||||
# runs-on: windows-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v3
|
||||
#
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: '3.11'
|
||||
#
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install pyinstaller
|
||||
# pip install -e .
|
||||
#
|
||||
# - name: Build executable
|
||||
# run: |
|
||||
# pyinstaller macropad.spec
|
||||
#
|
||||
# - name: Upload Windows artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: macropad-windows
|
||||
# path: dist/macropad.exe
|
||||
#
|
||||
# build-linux:
|
||||
# needs: [create-release]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v3
|
||||
#
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: '3.11'
|
||||
#
|
||||
# - name: Install system dependencies
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# # PySide6 requirements
|
||||
# sudo apt-get install -y libxcb-xinerama0 libxkbcommon-x11-0 libegl1
|
||||
# # System tray requirements
|
||||
# sudo apt-get install -y libgtk-3-dev python3-gi python3-gi-cairo gir1.2-gtk-3.0
|
||||
# sudo apt-get install -y gir1.2-appindicator3-0.1
|
||||
# sudo apt-get install -y libcairo2-dev libgirepository1.0-dev
|
||||
#
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install pyinstaller
|
||||
# pip install -e .
|
||||
#
|
||||
# - name: Build executable
|
||||
# run: |
|
||||
# pyinstaller macropad_linux.spec
|
||||
#
|
||||
# - name: Upload Linux artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: macropad-linux
|
||||
# path: dist/macropad
|
||||
#
|
||||
# # MacOS build - requires macos runner
|
||||
# # build-macos:
|
||||
# # needs: [create-release]
|
||||
# # runs-on: macos-latest
|
||||
# # steps:
|
||||
# # - name: Checkout code
|
||||
# # uses: actions/checkout@v3
|
||||
# #
|
||||
# # - name: Set up Python
|
||||
# # uses: actions/setup-python@v4
|
||||
# # with:
|
||||
# # python-version: '3.11'
|
||||
# #
|
||||
# # - name: Install dependencies
|
||||
# # run: |
|
||||
# # python -m pip install --upgrade pip
|
||||
# # pip install pyinstaller
|
||||
# # pip install -e .
|
||||
# #
|
||||
# # - name: Build executable
|
||||
# # run: |
|
||||
# # pyinstaller macropad_macos.spec
|
||||
# #
|
||||
# # - name: Upload macOS artifact
|
||||
# # uses: actions/upload-artifact@v3
|
||||
# # with:
|
||||
# # name: macropad-macos
|
||||
# # path: dist/macropad.app
|
||||
#
|
||||
# attach-to-release:
|
||||
# needs: [create-release, build-windows, build-linux]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v3
|
||||
#
|
||||
# - name: Get version
|
||||
# id: get_version
|
||||
# run: |
|
||||
# VERSION=$(cat version.txt)
|
||||
# echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
#
|
||||
# - name: Download all artifacts
|
||||
# uses: actions/download-artifact@v3
|
||||
#
|
||||
# - name: Attach executables to release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# tag_name: v${{ env.VERSION }}
|
||||
# files: |
|
||||
# macropad-windows/macropad.exe
|
||||
# macropad-linux/macropad
|
||||
|
||||
Reference in New Issue
Block a user