Absolutely! Here’s a Bash script that downloads (not installs) the main dependencies for an offline, lightweight, cross-platform indoor routing app using Flutter, SQLite, and SpatiaLite. This script is designed to be run on Linux (Ubuntu/Debian), but you can adapt it for other platforms.
What this script does:
- Downloads the latest stable Flutter SDK.
- Downloads the SQLite amalgamation source.
- Downloads the SpatiaLite source.
- Downloads Protobuf (optional, for some routing engines).
- Prepares a folder structure for your project.
#!/bin/bash
set -e
# Set versions (update as needed)
FLUTTER_VERSION="3.22.2-stable"
SQLITE_VERSION="3450200" # 3.45.2.0
SPATIALITE_VERSION="5.1.0"
PROTOBUF_VERSION="24.4"
# Create a directory for all downloads
mkdir -p indoor-routing-deps
cd indoor-routing-deps
echo "Downloading Flutter SDK..."
wget -c https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}.tar.xz
echo "Downloading SQLite amalgamation source..."
wget -c https://www.sqlite.org/2024/sqlite-amalgamation-${SQLITE_VERSION}.zip
echo "Downloading SpatiaLite source..."
wget -c https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${SPATIALITE_VERSION}.tar.gz
echo "Downloading Protobuf (optional, for routing engines)..."
wget -c https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz
echo "All dependencies downloaded to $(pwd)"
# Optional: List files
ls -lh
echo "Done!"
How to use:
- Copy the script above into a file, e.g.,
download_deps.sh.
- Make it executable:
chmod +x download_deps.sh
- Run it:
./download_deps.sh
Notes:
- This script only downloads the dependencies. You’ll need to extract/build/install them as needed for your platform.
- For cross-platform (Windows, macOS), you’ll need to adjust the download URLs for Flutter and possibly other dependencies.
- For Flutter, you can use the sqflite plugin for SQLite. For SpatiaLite, you may need to build a native plugin or use FFI.
- For offline routing, you might also want to look at OSRM, GraphHopper, or Valhalla if you need more advanced routing features.
Let me know if you want a script that also builds/installs these, or if you need Windows/macOS versions!