mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-22 10:33:31 +01:00
feat(gui): offline basemap under the Places map
Places now draws the proton-map-rs basemap that Proton Gallery uses: seas by depth, lakes, rivers, built-up areas, borders and town names, in light and dark. Tiles render on two worker threads into the existing tile layer, so caching, ancestor stand-ins and density restarts work as before. Opening Places sends no request. The OpenFreeMap street map stays opt-in and replaces the basemap while it is turned on. Without the basemap file the map falls back to the coarse Natural Earth outlines. scripts/fetch-basemap.sh downloads basemap-v1.pmtiles and checks it against a pinned SHA-256. The deb, rpm, tarball, local and AUR PKGBUILDs, COPR spec and Nix package install it to /usr/share/proton-drive-linux. PDFS_BASEMAP points the app at another copy. The new credit and preference text is translated in every catalog.
This commit is contained in:
1 parent
7be4c7db1e
commit
795dd7edb0
34 files changed
+753
-292
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Download the offline Places basemap built by proton-rs's `basemap` tool,
|
||||
# checked against its pinned SHA-256. Without it the map shows coarse
|
||||
# outlines only.
|
||||
set -euo pipefail
|
||||
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
name=basemap-v1.pmtiles
|
||||
url=https://github.com/narrrl/proton-rs/releases/download/basemap-v1/$name
|
||||
sha256=ce9acab1b7ed7f15b23e2365b1b6a580db79f4bc4421851ee673eff4c920d280
|
||||
out=${1:-$root/data/$name}
|
||||
if [[ -f $out ]] && echo "$sha256 $out" | sha256sum --check --status; then
|
||||
exit 0
|
||||
fi
|
||||
mkdir -p "$(dirname -- "$out")"
|
||||
part=$(mktemp "$out.XXXXXX")
|
||||
trap 'rm -f -- "$part"' EXIT
|
||||
curl --fail --location --silent --show-error --retry 3 --output "$part" "$url"
|
||||
echo "$sha256 $part" | sha256sum --check --status || {
|
||||
echo "The downloaded $name doesn't match its pinned checksum." >&2
|
||||
exit 1
|
||||
}
|
||||
chmod 644 "$part"
|
||||
mv -- "$part" "$out"
|
||||
@@ -233,6 +233,9 @@ printf '[Settings]\ngtk-decoration-layout=:close\n' >"$root/config/gtk-4.0/setti
|
||||
home=/home/alex
|
||||
[[ -e "$home" ]] && home="$root/home"
|
||||
|
||||
# The offline Places basemap, as the packages install it.
|
||||
"$repo/scripts/fetch-basemap.sh"
|
||||
|
||||
outer_bus=${DBUS_SESSION_BUS_ADDRESS:-unset}
|
||||
env -i \
|
||||
PATH="$PATH" LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 TZ="${TZ:-Europe/Berlin}" \
|
||||
@@ -241,6 +244,7 @@ env -i \
|
||||
XDG_CACHE_HOME="$root/cache" XDG_DATA_HOME="$root/data" \
|
||||
XDG_RUNTIME_DIR="$root/run" \
|
||||
PDFS_DEMO_ROOT="$root" PDFS_DEMO_OUTER_BUS="$outer_bus" \
|
||||
PDFS_BASEMAP="$repo/data/basemap-v1.pmtiles" \
|
||||
GSETTINGS_BACKEND=memory ADW_DEBUG_COLOR_SCHEME=prefer-dark GTK_A11Y=none GDK_DEBUG=no-portals \
|
||||
BIN="$bin" PHOTOS="$photos" OUT="$out" SHOTS="$shots" SETTLE="$settle" \
|
||||
dbus-run-session -- "$repo/scripts/screenshots.sh" --session 2>"$root/session.log"
|
||||
|
||||
Reference in new issue
Block a user