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
|
# OS files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
/aqtinstall.log
|
||||||
@@ -85,6 +85,7 @@ System packages installed by the script:
|
|||||||
| `libgl1-mesa-dev` | OpenGL headers (Qt) |
|
| `libgl1-mesa-dev` | OpenGL headers (Qt) |
|
||||||
| `libxkbcommon-dev` | XKB headers (Qt) |
|
| `libxkbcommon-dev` | XKB headers (Qt) |
|
||||||
| `libuchardet-dev` | Encoding detection (TXT reader) |
|
| `libuchardet-dev` | Encoding detection (TXT reader) |
|
||||||
|
| `zlib1g-dev` | zlib headers (required by minizip) |
|
||||||
| `libminizip-dev` | ZIP/EPUB extraction |
|
| `libminizip-dev` | ZIP/EPUB extraction |
|
||||||
| `libdjvulibre-dev` | DjVu format |
|
| `libdjvulibre-dev` | DjVu format |
|
||||||
| `libwpd-dev` | Legacy .doc 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
|
#### 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:
|
When `CMakeLists.txt` gains a new `find_package` or `pkg_check_modules` dependency, update **all** of the following:
|
||||||
|
|
||||||
| File | What to add |
|
| File | What to add |
|
||||||
|
|||||||
@@ -132,11 +132,30 @@ ctest --test-dir build --output-on-failure
|
|||||||
|
|
||||||
### CLion
|
### CLion
|
||||||
|
|
||||||
1. Open the project root folder (File → Open)
|
#### Linux
|
||||||
2. CLion auto-detects `CMakeLists.txt` and configures
|
|
||||||
3. Select a CMake profile (Debug/Release) in Settings → Build, Execution, Deployment → CMake
|
1. Open the project root folder (File → Open) — CLion detects `CMakeLists.txt` automatically
|
||||||
4. Build: `Ctrl+F9` / `⌘F9` | Run: `Shift+F10` / `⌃R`
|
2. Go to **Settings → Build, Execution, Deployment → CMake**
|
||||||
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
|
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
|
### VSCode
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ RUN apt-get update -qq && \
|
|||||||
build-essential libgl1-mesa-dev \
|
build-essential libgl1-mesa-dev \
|
||||||
gcc g++ mingw-w64 \
|
gcc g++ mingw-w64 \
|
||||||
libuchardet-dev \
|
libuchardet-dev \
|
||||||
libquazip1-qt6-dev libminizip-dev \
|
zlib1g-dev libquazip1-qt6-dev libminizip-dev \
|
||||||
libdjvulibre-dev libwpd-dev \
|
libdjvulibre-dev libwpd-dev \
|
||||||
libxcb-cursor0 \
|
libxcb-cursor0 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|||||||
@@ -8,35 +8,19 @@ set -euo pipefail
|
|||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
# ── Build tools ────────────────────────────────────────────────────────────────
|
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
git
|
git \
|
||||||
|
|
||||||
# ── OpenGL and XKB headers (required by Qt at compile time) ───────────────────
|
|
||||||
apt-get install -y \
|
|
||||||
libgl1-mesa-dev \
|
libgl1-mesa-dev \
|
||||||
libxkbcommon-dev
|
libxkbcommon-dev \
|
||||||
|
libuchardet-dev \
|
||||||
# ── Encoding detection ─────────────────────────────────────────────────────────
|
zlib1g-dev \
|
||||||
apt-get install -y libuchardet-dev
|
libminizip-dev \
|
||||||
|
libdjvulibre-dev \
|
||||||
# ── ZIP extraction (EPUB, DOCX, ODT) ──────────────────────────────────────────
|
libwpd-dev \
|
||||||
# minizip is the underlying C lib; QuaZip will be built from source against the
|
python3-venv
|
||||||
# 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
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Installing Qt 6.10.1 via aqtinstall → /opt/qt ..."
|
echo "Installing Qt 6.10.1 via aqtinstall → /opt/qt ..."
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ ApplicationWindow {
|
|||||||
window._restoringState = true
|
window._restoringState = true
|
||||||
bookController.openBook(appState.lastFileUrl())
|
bookController.openBook(appState.lastFileUrl())
|
||||||
} else {
|
} else {
|
||||||
|
window.sidebarOpen = true
|
||||||
var savedPage = appState.lastPage
|
var savedPage = appState.lastPage
|
||||||
if (savedPage === "library" || savedPage === "settings")
|
if (savedPage === "library" || savedPage === "settings")
|
||||||
window.currentPage = savedPage
|
window.currentPage = savedPage
|
||||||
|
|||||||
Reference in new issue
Block a user