update scripts, readme and open sidebar on startup without book
This commit is contained in:
6 files changed
+38
-30
No files matched your search
@@ -36,3 +36,4 @@ ci-output/
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
/aqtinstall.log
|
||||
@@ -85,6 +85,7 @@ System packages installed by the script:
|
||||
| `libgl1-mesa-dev` | OpenGL headers (Qt) |
|
||||
| `libxkbcommon-dev` | XKB headers (Qt) |
|
||||
| `libuchardet-dev` | Encoding detection (TXT reader) |
|
||||
| `zlib1g-dev` | zlib headers (required by minizip) |
|
||||
| `libminizip-dev` | ZIP/EPUB extraction |
|
||||
| `libdjvulibre-dev` | DjVu format |
|
||||
| `libwpd-dev` | Legacy .doc format |
|
||||
@@ -104,6 +105,8 @@ Windows builds are cross-compiled from Linux using `scripts/mingw-w64-toolchain.
|
||||
|
||||
#### Adding a new C/C++ dependency
|
||||
|
||||
**CRITICAL: whenever any dependency changes, all three files below MUST be updated in the same commit. Never update one without the others.**
|
||||
|
||||
When `CMakeLists.txt` gains a new `find_package` or `pkg_check_modules` dependency, update **all** of the following:
|
||||
|
||||
| File | What to add |
|
||||
|
||||
@@ -132,11 +132,30 @@ ctest --test-dir build --output-on-failure
|
||||
|
||||
### CLion
|
||||
|
||||
1. Open the project root folder (File → Open)
|
||||
2. CLion auto-detects `CMakeLists.txt` and configures
|
||||
3. Select a CMake profile (Debug/Release) in Settings → Build, Execution, Deployment → CMake
|
||||
4. Build: `Ctrl+F9` / `⌘F9` | Run: `Shift+F10` / `⌃R`
|
||||
5. On Windows: set the toolchain to use MSYS2's MinGW (`C:\msys64\mingw64\bin\gcc.exe`) under Settings → Build, Execution, Deployment → Toolchains; leave GDB set to **Bundled** — MSYS2's GDB is newer than CLion supports
|
||||
#### 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** profile, add to **CMake options**:
|
||||
```
|
||||
-DCMAKE_PREFIX_PATH=/opt/qt/6.10.1/gcc_64
|
||||
```
|
||||
This is where `install-deps-ubuntu.sh` installs Qt 6.10.1 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
|
||||
- No `CMAKE_PREFIX_PATH` needed — MSYS2 installs Qt to a prefix CMake finds automatically
|
||||
3. Build: `Ctrl+F9` | Run: `Shift+F10`
|
||||
|
||||
### VSCode
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ RUN apt-get update -qq && \
|
||||
build-essential libgl1-mesa-dev \
|
||||
gcc g++ mingw-w64 \
|
||||
libuchardet-dev \
|
||||
libquazip1-qt6-dev libminizip-dev \
|
||||
zlib1g-dev libquazip1-qt6-dev libminizip-dev \
|
||||
libdjvulibre-dev libwpd-dev \
|
||||
libxcb-cursor0 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -8,35 +8,19 @@ set -euo pipefail
|
||||
|
||||
apt-get update
|
||||
|
||||
# ── Build tools ────────────────────────────────────────────────────────────────
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
ninja-build \
|
||||
git
|
||||
|
||||
# ── OpenGL and XKB headers (required by Qt at compile time) ───────────────────
|
||||
apt-get install -y \
|
||||
git \
|
||||
libgl1-mesa-dev \
|
||||
libxkbcommon-dev
|
||||
|
||||
# ── Encoding detection ─────────────────────────────────────────────────────────
|
||||
apt-get install -y libuchardet-dev
|
||||
|
||||
# ── ZIP extraction (EPUB, DOCX, ODT) ──────────────────────────────────────────
|
||||
# minizip is the underlying C lib; QuaZip will be built from source against the
|
||||
# aqt Qt when EPUB support is added.
|
||||
apt-get install -y libminizip-dev
|
||||
|
||||
# ── DjVu support ───────────────────────────────────────────────────────────────
|
||||
apt-get install -y libdjvulibre-dev
|
||||
|
||||
# ── Legacy .doc support (libwpd) ───────────────────────────────────────────────
|
||||
apt-get install -y libwpd-dev
|
||||
|
||||
# ── Qt 6.10.1 via aqtinstall ──────────────────────────────────────────────────
|
||||
# We use a temporary venv so aqtinstall doesn't pollute the system Python env.
|
||||
apt-get install -y python3-venv
|
||||
libxkbcommon-dev \
|
||||
libuchardet-dev \
|
||||
zlib1g-dev \
|
||||
libminizip-dev \
|
||||
libdjvulibre-dev \
|
||||
libwpd-dev \
|
||||
python3-venv
|
||||
|
||||
echo ""
|
||||
echo "Installing Qt 6.10.1 via aqtinstall → /opt/qt ..."
|
||||
|
||||
@@ -34,6 +34,7 @@ ApplicationWindow {
|
||||
window._restoringState = true
|
||||
bookController.openBook(appState.lastFileUrl())
|
||||
} else {
|
||||
window.sidebarOpen = true
|
||||
var savedPage = appState.lastPage
|
||||
if (savedPage === "library" || savedPage === "settings")
|
||||
window.currentPage = savedPage
|
||||
|
||||
Reference in new issue
Block a user