Datasets:
File size: 1,765 Bytes
e5a3ec0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #!/usr/bin/env bash
# Build script for DB Browser for SQLite (sqlitebrowser)
# Self-contained: installs deps, clones (if needed), configures, builds, installs.
# Runs as root, no sudo required.
set -euo pipefail
REPO_URL="https://github.com/sqlitebrowser/sqlitebrowser"
SRC_DIR="/workspace/repo"
BUILD_DIR="${SRC_DIR}/appbuild"
INSTALL_PREFIX="/workspace/install"
export DEBIAN_FRONTEND=noninteractive
echo "=== Installing build dependencies ==="
apt-get update -y || true
apt-get install -y \
build-essential \
cmake \
ninja-build \
git \
qtbase5-dev \
qtbase5-dev-tools \
qttools5-dev \
qttools5-dev-tools \
libqt5svg5-dev \
libsqlite3-dev
echo "=== Configuring (CMake / Ninja, Release) ==="
rm -rf "${BUILD_DIR}"
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"
# FORCE_INTERNAL_QSCINTILLA=ON: build the bundled QScintilla so we don't depend
# on a distro QScintilla package (which can be Qt4 and crash). QCustomPlot and
# QHexEdit already default to their bundled/internal copies.
# sqlcipher=0: use the plain system SQLite3 (no encryption support).
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DFORCE_INTERNAL_QSCINTILLA=ON \
-Dsqlcipher=0 \
-Wno-dev \
"${SRC_DIR}"
echo "=== Building ==="
ninja
echo "=== Installing to ${INSTALL_PREFIX} ==="
ninja install
# Make the whole install tree world-readable/executable so the app can be
# launched by an unprivileged user in later pipeline stages (build.sh runs as
# root, so freshly installed files are root-owned and may be 0700 otherwise).
chmod -R a+rX "${INSTALL_PREFIX}"
echo "=== Build complete ==="
test -x "${INSTALL_PREFIX}/bin/sqlitebrowser" && echo "OK: ${INSTALL_PREFIX}/bin/sqlitebrowser"
|