Agel 2636b7cf51 Add Update sidebar menu item and macOS standard About menu
Add an "Update" entry to the sidebar to give users quick access to the
application version without interrupting their reading session. Clicking
it opens a themed modal popup (loaded conditionally via Loader) that
displays AppInfo.version and keeps any currently open book loaded,
providing a natural foundation for future update-checking functionality.

On macOS, also install a parentless QMenuBar with a QAction::AboutRole
item so Qt's Cocoa integration places "About Asteria" in the standard
macOS Application menu without adding a QML in-window menu bar. The
action invokes NSApp's standard About panel, leveraging the bundle name,
icon, and version already configured in Info.plist.
2026-11-19 14:30:41 +01:00
2026-11-13 14:07:56 +01:00
2026-11-13 14:38:13 +01:00
2026-11-19 13:54:40 +01:00
2026-11-12 16:49:42 +01:00
2026-11-19 13:54:40 +01:00
2026-03-31 10:47:16 +02:00
2026-11-13 10:56:08 +01:00
2026-10-25 14:22:12 +01:00
2026-11-13 10:56:08 +01:00
2026-11-19 12:59:51 +00:00

Asteria Qt

A cross-platform desktop book/document reader built with Qt6/C++. Reimplementation of asteria-bookreader (Electron/React) using a native Qt stack.

Target platforms: Windows (x86_64 and ARM64), Linux (x86_64 and ARM64), and macOS.

Prerequisites

  • Qt 6.12+ (6.12.0 installed by default via aqtinstall to /opt/qt)
  • CMake 3.16+
  • C++17 compiler — GCC 10+ or Clang 12+ on Linux; MinGW-w64 (GCC/Clang) via MSYS2 or LLVM-MinGW on Windows

Installing Dependencies

Linux (Ubuntu/Debian)

sudo scripts/install-deps-ubuntu.sh
# Optional: include Linux ARM64 cross-compilation dependencies and Qt 6.12.0 (gcc_arm64)
sudo scripts/install-deps-ubuntu.sh --with-arm64

The script installs Qt 6.12.0 via aqtinstall to /opt/qt/6.12.0/gcc_64, plus the following apt packages:

Group Packages Required?
Build tools build-essential, cmake, ninja-build, git, pkg-config Required
Qt compile deps libgl-dev, libegl-dev, libxkbcommon-dev, libfontconfig1-dev, libfreetype-dev, libdbus-1-dev Required
Encoding libuchardet-dev Required (TXT/FB2 encoding detection)
Archive libminizip-dev, libarchive-dev, zlib1g-dev Required (EPUB/FBZ/CBZ/CBR)

Windows

All Windows dependencies — Qt 6, MinGW-w64, CMake, Ninja, and all third-party libraries — are installed through MSYS2, a Linux-like environment for Windows with a proper package manager (pacman). This ensures everything is compiled with the same GCC toolchain with no ABI mismatches.

Step 1 — Install Git for Windows

Download and install from git-scm.com/download/win. During setup:

  • Select "Git from the command line and also from 3rd-party software" (recommended PATH option)
  • Use the default options for everything else

Step 2 — Install MSYS2

Download and run the installer from msys2.org. Use the default install path (C:\msys64).

After installation, open the MSYS2 MINGW64 shell (search the Start menu for "MSYS2 MINGW64" — use this shell, not MSYS2 MSYS or UCRT64) and update the package database:

pacman -Syu

The shell will likely close itself partway through. Reopen it and run the update again to finish:

pacman -Syu

Step 3 — Install Qt 6 and all dependencies

In the MSYS2 MINGW64 shell, navigate to the project folder and run the install script (MSYS2 mounts Windows drives as /c/, /d/ etc.):

cd /c/path/to/asteria-qt
bash scripts/install-deps-windows.sh

The script installs Qt 6.12.0 via aqtinstall to /opt/qt/6.12.0/mingw_64, plus the following MSYS2 packages:

  • mingw-w64-x86_64-gcc — GCC toolchain
  • mingw-w64-x86_64-zlib — Compression library
  • mingw-w64-x86_64-cmake — CMake build system
  • mingw-w64-x86_64-ninja — Ninja build tool
  • mingw-w64-x86_64-uchardet — Character encoding detection
  • mingw-w64-x86_64-minizip — ZIP archive support
  • mingw-w64-x86_64-quazip — Qt ZIP integration
  • mingw-w64-x86_64-djvulibre — DjVu document support
  • mingw-w64-x86_64-libwpd — WordPerfect document support

Verify the installation:

gcc --version
cmake --version
ls /opt/qt/6.12.0/mingw_64/bin  # Should show Qt binaries like qmake6

Step 4 — Clone the repository

git clone https://github.com/your-org/asteria-qt.git
cd asteria-qt

Building

All build commands run in the MSYS2 MINGW64 shell on Windows, or a regular terminal on Linux.

On Linux, pass -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64 so CMake finds the aqt-installed Qt. On Windows, pass -DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64 for the same reason.

Command Line

# Debug build (Linux x86_64)
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64
cmake --build build --parallel

# Debug build (Windows)
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64
cmake --build build --parallel

# Release build (Linux x86_64)
cmake -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64
cmake --build build-release --parallel

# Release build (Linux ARM64 cross-compile)
cmake -B build-linux-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE=scripts/linux-arm64-toolchain.cmake \
  -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_arm64 \
  -DQT_HOST_PATH=/opt/qt/6.12.0/gcc_64
cmake --build build-linux-arm64 --parallel

# Run tests
ctest --test-dir build --output-on-failure

Running

./build/asteria-qt        # Linux
./build/asteria-qt.exe    # Windows (run from MSYS2 MINGW64 shell)

CLion

Linux

  1. Open the project root folder (File → Open) — CLion detects CMakeLists.txt automatically
  2. Go to Settings → Build, Execution, Deployment → CMake
  3. In the Debug and Release profiles, add to CMake options:
    -DCMAKE_PREFIX_PATH=/opt/qt/6.12.0/gcc_64
    
    This is where install-deps-ubuntu.sh installs Qt 6.12.0 via aqtinstall.
  4. CLion auto-detects the system GCC toolchain — no toolchain configuration needed
  5. To add a Release profile: click + to duplicate, change Build type to Release, same CMake options
  6. Build: Ctrl+F9 | Run: Shift+F10

Windows

  1. Configure the toolchain — Settings → Build, Execution, Deployment → Toolchains:
    • Click + → MinGW
    • Set C Compiler to C:\msys64\mingw64\bin\gcc.exe
    • Set C++ Compiler to C:\msys64\mingw64\bin\g++.exe
    • Leave Debugger set to Bundled — MSYS2's GDB can be newer than CLion supports
  2. Configure CMake — Settings → Build, Execution, Deployment → CMake:
    • In the Debug profile, set Toolchain to the MSYS2 MinGW toolchain created above
    1. In the Debug and Release profiles, add to CMake options:
    -DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64
    
  3. Build: Ctrl+F9 | Run: Shift+F10

VSCode

  1. Install extensions: C/C++, CMake Tools
  2. Open the project root
  3. CMake Tools detects CMakeLists.txt automatically
  4. On Windows: when prompted to select a kit, choose the MSYS2 MinGW64 GCC kit (points to C:\msys64\mingw64\bin\gcc.exe)
  5. Build: Ctrl+Shift+B | Run: F5 (with launch.json) or CMake Tools' Run button

Qt Creator

  1. File → Open File or Project → select CMakeLists.txt
  2. Configure the kit under Edit → Preferences → Kits
  3. On Windows: add a kit pointing to MSYS2's Qt (C:\msys64\mingw64) and MinGW compiler and -DCMAKE_PREFIX_PATH=c:\msys64\opt\qt\6.12.0\mingw_64 to the CMake options
  4. Build: Ctrl+B / ⌘B | Run: Ctrl+R / ⌘R
S
Description
No description provided
Readme GPL-3.0
13 MiB
0 Stars 1 Watchers 0 Forks
2026-11-23 20:27:14 +01:00
Languages
C++ 74.2%
QML 8.4%
Shell 6.3%
Python 6.2%
CMake 3.2%
Other 1.6%