Skip to content

feat: Linux support — LVGL filesystem fix + AppImage, add AppStore app manager - #21

Draft
matixan wants to merge 18 commits into
masterfrom
feat/linux-appimage
Draft

feat: Linux support — LVGL filesystem fix + AppImage, add AppStore app manager#21
matixan wants to merge 18 commits into
masterfrom
feat/linux-appimage

Conversation

@matixan

@matixan matixan commented Apr 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix LVGL file loading on Linux by setting LV_FS_DEFAULT_DRIVER_LETTER='C' for non-Windows platforms (routes absolute paths through POSIX driver)
  • Add CrossPad.desktop for AppImage/desktop integration
  • Replace Linux tarball release with AppImage (single 12MB file, all deps bundled)

Test plan

  • Built and ran CrossPad on Linux (Ubuntu 24.04)
  • Verified PNG assets load correctly (no more "unknown driver letter" errors)
  • Built and tested AppImage locally — launches correctly
  • CI workflow builds AppImage on release tag

🤖 Generated with Claude Code

Set LV_FS_DEFAULT_DRIVER_LETTER to 'C' on Linux/Mac so LVGL routes
absolute paths through the POSIX filesystem driver. Add .desktop file
and switch CI from tarball to AppImage for single-file distribution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 8, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Linux support by ensuring LVGL file paths resolve correctly on non-Windows platforms and by switching Linux release packaging to an AppImage with desktop integration metadata.

Changes:

  • Set LV_FS_DEFAULT_DRIVER_LETTER to 'C' on non-Windows platforms so unprefixed/absolute paths route through LVGL’s POSIX FS driver.
  • Add a CrossPad.desktop entry for desktop/AppImage integration.
  • Update the release workflow to build and ship a Linux AppImage instead of a Linux tarball.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
lv_conf.h Sets a default LVGL FS driver letter on non-Windows to make POSIX path loading work without explicit prefixes.
CrossPad.desktop Adds desktop entry metadata used by AppImage/desktop integration.
.github/workflows/release.yml Replaces Linux packaging with AppImage build/upload steps for releases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +123 to +134
- name: Create AppImage icon
run: |
mkdir -p dist/CrossPad
cp bin/CrossPad dist/CrossPad/CrossPad
chmod +x dist/CrossPad/CrossPad
cp -r crosspad-gui/assets dist/CrossPad/assets
python3 -c "
from PIL import Image
img = Image.open('logo.png')
img.thumbnail((256, 256), Image.LANCZOS)
new_img = Image.new('RGBA', (256, 256), (0, 0, 0, 0))
x = (256 - img.width) // 2
y = (256 - img.height) // 2
new_img.paste(img, (x, y))
new_img.save('CrossPad.png')
"

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow uses from PIL import Image to generate CrossPad.png, but Pillow isn’t installed anywhere in the Linux job. On ubuntu-latest this will typically fail with ModuleNotFoundError: No module named 'PIL'. Install Pillow explicitly (e.g., sudo apt-get install -y python3-pil or python3 -m pip install --user pillow) before this step, or replace this with a tool that’s already installed on the runner.

Copilot uses AI. Check for mistakes.
Comment on lines +138 to +139
# Download linuxdeploy
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release workflow downloads and executes linuxdeploy-x86_64.AppImage from the moving continuous URL without any pinning or checksum/signature verification. Since this job produces release artifacts, this is a supply-chain risk and also makes builds non-reproducible. Pin to a specific linuxdeploy release version and verify its SHA256 (or use a GitHub Action/release asset with integrity checking) before executing it.

Suggested change
# Download linuxdeploy
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
# Download pinned linuxdeploy release and verify integrity
LINUXDEPLOY_VERSION=1-alpha-20250213-2
LINUXDEPLOY_SHA256=YOUR_LINUXDEPLOY_SHA256_HERE
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/${LINUXDEPLOY_VERSION}/linuxdeploy-x86_64.AppImage"
echo "${LINUXDEPLOY_SHA256} linuxdeploy-x86_64.AppImage" | sha256sum -c -

Copilot uses AI. Check for mistakes.
Comment thread CrossPad.desktop
Comment=CrossPad device simulator
Exec=CrossPad
Icon=CrossPad
Categories=Audio;Music;Midi;

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Categories=Audio;Music;Midi; lacks a recognized main category per the Desktop Entry spec (e.g., AudioVideo, Utility, etc.), which can cause desktop-file-validate/AppImage tooling to reject or misclassify the entry. Add an appropriate main category (commonly AudioVideo) and keep the rest as additional categories.

Suggested change
Categories=Audio;Music;Midi;
Categories=AudioVideo;Audio;Music;Midi;

Copilot uses AI. Check for mistakes.
matixan and others added 10 commits April 8, 2026 16:17
Replace inline app sources (mixer, piano, instructions, serial-monitor)
with git submodule installs via crosspad-apps registry. Add Python app
manager wrapper (scripts/app_manager.py) and auto-discovery in CMake
for crosspad-* submodules in src/apps/. Add icon resolver to handle
short icon names from REGISTER_APP macro.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix .gitignore ordering so .vscode/settings.json and tasks.json
are tracked. Adds VsCode Task Buttons for app manager and smart run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Consolidate shared libraries under lib/ (alongside ml_synth).
Update all CMake paths, asset resolution, CI workflows, and
run script. App manager requires check now finds deps in lib/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move App Store to CrossPad/crosspad-appstore submodule (auto-discovered
by CMake like other installable apps). Add built_in flag to registry
preventing install/remove. Update CLAUDE.md with app management workflow,
CLI commands, and new source layout (lib/crosspad-core, lib/crosspad-gui).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Skip crosspad-appstore in release builds (BUILD_TESTING=OFF)
- Registry generator supports exclude patterns for dev-only apps
- App Store shows "Rebuild needed" bar after install/remove/update
- Build button runs cmake configure+build in background with progress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crosspad_app.cpp and CITestApp.cpp now check for mixer headers at
compile time. Without crosspad-mixer installed, simulator runs without
mixer engine and CI tests skip mixer-dependent stages. Allows installing
and removing apps without breaking the build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matixan matixan changed the title feat: Linux support — LVGL filesystem fix + AppImage feat: Linux support — LVGL filesystem fix + AppImage, add AppStore app manager Apr 8, 2026
@matixan matixan added the enhancement New feature or request label Apr 8, 2026
matixan and others added 7 commits April 10, 2026 14:34
Add BLE MIDI to CrossPad PC simulator with full settings UI panel.
Uses SimpleBLE for BLE connection management (scan/connect/disconnect)
and RtMidi/ALSA for MIDI data I/O via Linux kernel btmidi module.

Architecture:
- crosspad-core: IBleMidi interface (portable, extends IMidiOutput),
  NullBleMidi stub, PlatformServices.setBleMidi(), WirelessSettings
- crosspad-pc: PcBleMidi (SimpleBLE + RtMidi), settings panel with
  host/server mode, device scanner, note offset, MIDI monitor
- MidiInputHandler wired on PC (same pattern as ESP32) for routing
  pad output to USB + BLE based on KeypadSettings flags
- Anti-loopback time-based filter for ALSA echo suppression
- All MIDI input dispatched via lv_async_call for LVGL thread safety

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- PcHttpClient: implement curl-based HTTP client for Linux (was stub)
- PcUpdater: refactor checkForUpdate/listReleases as shared code using
  IHttpClient, add full Linux/AppImage download/cache/install cycle
- UpdateApp: show installed apps list + dev build notice in release mode
  (CROSSPAD_DEV_BUILD define gated by BUILD_TESTING CMake option)
- CMakeLists: expose CROSSPAD_DEV_BUILD=1 compile definition for dev builds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…gistration

- SimpleBLE sets /WX /W1 internally which overrides our /w suppression,
  causing MSVC CI to fail on third-party warnings. Add /w override.
- Add CROSSPAD_REGISTER_APP_NAMED_FUNCTIONS define so REGISTER_APP macro
  generates named functions matching generate_registry.cmake expectations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
/w alone doesn't help when /WX (warnings-as-errors) is still active.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matixan
matixan marked this pull request as draft April 10, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants