Skip to content

Ayushprtp/virtviewer-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

#!/bin/bash
set -e

# Colors
GREEN="\e[32m"
YELLOW="\e[33m"
RED="\e[31m"
RESET="\e[0m"

echo -e "${GREEN}▶ Starting static virt-viewer build...${RESET}"

# Paths
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BUILD_DIR="$SCRIPT_DIR/deps"
INSTALL_DIR="$SCRIPT_DIR/virtviewer-static"

mkdir -p "$BUILD_DIR" "$INSTALL_DIR"
cd "$BUILD_DIR"

# Step 1: Install dependencies
echo -e "${GREEN}▶ Installing build dependencies...${RESET}"
sudo apt-get update
sudo apt-get install -y \
  build-essential meson ninja-build \
  pkg-config gettext intltool \
  libgtk-3-dev libglib2.0-dev \
  libspice-client-gtk-3.0-dev \
  libusb-1.0-0-dev libepoxy-dev

# Step 2: Clone virt-viewer if not already present
if [ ! -d virt-viewer ]; then
  echo -e "${GREEN}▶ Cloning virt-viewer source...${RESET}"
  git clone https://gitlab.com/virt-viewer/virt-viewer.git
fi

cd virt-viewer
git checkout master

# Step 3: Configure Meson build
echo -e "${GREEN}▶ Configuring Meson...${RESET}"
rm -rf build

meson setup build --prefix="$INSTALL_DIR" -Ddefault_library=static

# Step 4: Build and install
echo -e "${GREEN}▶ Building virt-viewer...${RESET}"
ninja -C build

echo -e "${GREEN}▶ Installing to $INSTALL_DIR...${RESET}"
ninja -C build install

echo -e "${GREEN}✅ Static virt-viewer installed at: $INSTALL_DIR/bin/virt-viewer${RESET}"

About

VirtViewer Static 11.0.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors