A cross-platform native extension and store manager UI for HPR (Human Pattern Recorder), built with C++, Slint, Lua, and libarchive.
It allows browsing, filtering, installing, and deleting extensions and themes for HPR directly from inside the HPR application interface.
Important
This is not a standalone application. HPR-Store is itself an HPR extension — a plugin you drop into HPR's extension folder. Once installed, it acts as a store manager that lets you browse and install other extensions and themes from within HPR's UI.
Note
HPR Version Compatibility: HPR-Store requires HPR v0.9.7 or higher. Older versions of HPR lack necessary extension manager APIs (such as HPR.reloadMyself).
Before HPR-Store can work, you must enable the following option in HPR's settings panel:
Settings → Extensions → Allow Extensions to Load Native Libraries
Warning
This setting allows Lua extensions to call package.loadlib / require to load external .dll or .so libraries. HPR warns that this bypasses sandbox restrictions — only enable this for extensions you trust.
No building required if you grab a pre-built release.
- Download the latest release zip from the Releases page.
- Extract the zip — you will get a folder named
HPR-Store/containing four files:HPR-Store.lualibHPR-Store.so(Linux)HPR-Store.dll(Windows)registry.json
- Copy the entire
HPR-Store/folder to HPR's extension directory:- Linux:
~/.config/HPR/extensions/ - Windows:
%APPDATA%\HPR\HPR_Config\extensions\
- Linux:
- Open HPR, go to Settings → Extensions, and enable "Allow Extensions to Load Native Libraries".
- Restart HPR (or press the rescan button in the Extensions menu). HPR-Store will appear in your extensions list.
- Click the Action button on HPR-Store to open the store window.
HPR-Store maintains its own release cycle independent of HPR.
When the registry reports a newer version of HPR-Store, an Update HPR-Store button appears in the top-left of the store window's title bar. Clicking it:
- Downloads the new release zip to a temp directory.
- Renames the currently loaded library to
.old(avoiding OS file locks on Windows, avoiding in-place overwrite crashes on Linux). - Copies the new binary and Lua files into the extension folder.
- Calls
HPR.reloadMyself()— HPR hot-reloads the store extension with the new binary, completely without restarting.
Leftover .old files from a previous update are cleaned up automatically on next launch.
Want your extension or theme listed in HPR-Store? See PUBLISHING.md for the full submission rules and procedure.
- Slint Compiler & Library
- libarchive (extracts
.zipand.tararchives) - ixwebsocket (performs HTTP fetches and package downloads)
- nlohmann_json (parses registry JSON files)
- openssl / zlib
# Install system dependencies (Ubuntu / Debian)
sudo apt install build-essential cmake libarchive-dev libssl-dev zlib1g-dev
# Arch Linux
sudo pacman -S base-devel cmake libarchive openssl zlib# Build
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config ReleaseThe post-build step automatically copies the compiled library, HPR-Store.lua, and registry.json to HPR's active extensions directory.
Warning
Building on Windows is currently error-prone and glitchy. I'll be adding detailed steps in a future update. For now, please use the pre-built release from the Releases page.
Registers HPR metadata and binds lifecycle callbacks (init, onTick, onExit, onAction) to native library symbols loaded via package.loadlib.
Exposes initialize, destroy, and showUi as extern "C" symbols. Holds the global lua_State* pointer used to bridge C++ back into Lua for lifecycle calls (HPR.unloadExtension, HPR.reloadMyself, HPR.refreshExtensions).
Owns the StoreWindow Slint instance and wires it to UIEventBridge, which maps all user interactions to C++ installer and registry logic.
- Downloads remote
registry.jsonfrom GitHub viaixwebsocket. - Downloads and extracts
.ziprelease archives vialibarchive. - Before any file modification, synchronously unloads the target extension via
HPR.unloadExtensionthrough the live Lua state. - For self-updates: uses
dladdr(Linux) andGetModuleFileNameW(Windows) to resolve the exact loaded library path, then performs rename-staging before overwriting.