deskflow/scripts/install_deps.sh
Nick Bolton ad330d7fba
FreeBSD GitHub runner with vmactions/freebsd-vm@v1 (#7474)
* Add experimental BSD job to CI

* Remove container

* cd into ` synergy/synergy/`

* Change unix to bsd

* Use only run param and not prepare

* Install python3 on FreeBSD

* Add missing command to prepare param

* Add all the Unix-like BSD-derived

* Use latest python3 for NetBSD and DragonFly BSD

* Use env for cmd and correct prepare commands

* Add deps config for unix-like

* Install Python deps on Unix-like

* Return matching entry in `get_unix_like_os`

* Add cmake dep for cmakelang py module

* Back out Unix-like support in `install_deps.py` (Python is tricky on BSD)

* Back out BSD from config

* Create install_deps.sh script for BSD-derived

* Use .sh script instead of .py for BSD-derived

* Add other case and fixed syntax

* Use /usr/bin/env

* Use more available sh

* Restore debian command

* Fixed syntax error

* Remove prepare args

* Remove space

* Use which instead of command

* Add libX11 dep

* Add other BSD-derivatives

* Set CMAKE_REQUIRED_INCLUDES

* Fixed bad separator for CMAKE_REQUIRED_INCLUDES

* Add debug lines

* Set CMAKE_REQUIRED_LIBRARIES to lib names

* use CMAKE_REQUIRED_QUIET

* Set CMAKE_REQUIRED_FLAGS for BSD

* Message for BSD packaging

* Make PKG_CONFIG_FOUND optional

* Move debug to all OS

* Remove solaris for now, too many missing packages

* Add missing  override to XWindowsScreen.h

* Add PC_GLIB_INCLUDE_DIRS

* Fixed glib include

* Make libnotify optional

* Set CMAKE_LIBRARY_PATH

* Only run tests if toml++ available

* Also run integ tests

* Remove DragonFly (C++ version too old)

* Fixed NetBSD command

* Aww sucks. Well, I tried. Patches welcome

* Update ChangeLog

* Fixed README for OpenBSD, NetBSD, DragonFly BSD, Solaris

* Add missing case for SunOS

* Drop redundant virtual specifiers

* Print libs on FreeBSD

* Restore link_directories

* Beef up to ubuntu-24.04-16-core-x64, export QT_QPA_PLATFORM, improve comment

* Remove debug line

* Simplify debug text

* Restore ubuntu-latest

* Fixed really stupid typo

* Beef up with ubuntu-22.04-16-core-x64

* Revert "Beef up with ubuntu-22.04-16-core-x64"

This reverts commit 3de5773ef6.

* Add missing name

* Make .sh file primary deps file

* Tweaked deps instruction label
2024-09-06 10:03:34 +01:00

78 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env sh
SUDO=$(which sudo > /dev/null 2>&1 && echo "sudo" || echo "")
install_deps() {
uname_out="$(uname -s)"
case "${uname_out}" in
FreeBSD*) install_freebsd ;;
OpenBSD*) install_openbsd ;;
NetBSD*) install_netbsd ;;
DragonFly*) install_dragonfly ;;
SunOS*) install_solaris ;;
*) install_other $uname_out ;;
esac
}
install_freebsd() {
run_cmd pkg install -y \
cmake \
ninja \
gmake \
gcc10 \
openssl \
glib \
gdk-pixbuf2 \
libX11 \
libXtst \
libnotify \
libxkbfile \
qt6-base \
qt6-tools \
gtk3 \
googletest \
pugixml
}
install_openbsd() {
# Patches welcome!
# pkg_add error:
# Can't find libX11
# Can't find libXtst
echo "Sorry, OpenBSD is not supported yet."
}
install_netbsd() {
# Patches welcome!
# pkg_add error:
# pkg_add: no pkg found for 'libX11', sorry.
# pkg_add: no pkg found for 'libXtst', sorry.
echo "Sorry, NetBSD is not supported yet."
}
install_dragonfly() {
# Patches welcome!
# The C++ version on DragonFly BSD seems to be too old.
echo "Sorry, DragonFly BSD is not supported yet."
}
install_solaris() {
# Patches welcome!
echo "Sorry, Solaris is not supported yet."
}
install_other() {
# TODO: Port the .py script to shell script to make the deps installation lighter on
# Linux and macOS. The .py script is probably only really needed to deal with Windows.
echo "Running Python script for: $1"
run_cmd ./scripts/install_deps.py
}
run_cmd() {
cmd="${SUDO:+$SUDO }$@"
echo "Running: $cmd"
$cmd
}
install_deps