mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-22 18:33:31 +01:00
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.
24 lines
890 B
Bash
Executable File
24 lines
890 B
Bash
Executable File
#!/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"
|