-
Notifications
You must be signed in to change notification settings - Fork 2
/
fedora-install-dev-cpp-python-qt
89 lines (85 loc) · 2.91 KB
/
fedora-install-dev-cpp-python-qt
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
#
# Install script for C++ and related development tools, such as git, python and gcc.
#
# NOTE:
# - Written for WSL import of docker root filesystem of Fedora 33 and 34,
# from Fedora Container Base image (with dnf) and Fedora Container Minimal
# Base image (with microdnf).
# - Must be run by actual root user, not by use of sudo from regular user,
# (sudo is not installed by default in the Fedora Container Minimal Base image).
# - Interactive! Will prompt user before doing any changes!
# - Skips installation of documentation, by specifying --nodocs as command line
# argument. Standard base image has this configured as default with
# "tsflags=nodocs" in /etc/dns/dns.conf, but this is not supported by microdnf
# so for the minimal base image it must be added on command line.
#
# Verify running as root
if [ ${EUID:-$(id -u)} -ne 0 ]; then
echo 'Please run this script as root'
exit 1
fi
# Figure out if we have dnf or microdnf (from the Fedora Container Minimal Base image)
if hash dnf > /dev/null 2>&1; then
dnf=dnf
elif hash microdnf > /dev/null 2>&1; then
dnf=microdnf
else
echo 'Package manager dnf or microdnf not found'
exit 1
fi
echo "Installing packages..."
if ! $dnf --nodocs install \
`# Diff command` \
diffutils \
`# SSL toolkit` \
openssl-devel \
`# SSH client (is also a dependency of git)` \
openssh-clients \
`# Git client` \
git \
`# Qt 5 (contains also dependencies of pyside2)` \
qt5-qtbase-devel \
qt5-qtcharts-devel \
`# Python 3 libraries (is also optional dependency of boost for python bindings)` \
python3-numpy \
python3-pylint \
python3-pytest \
python3-ipython \
python3-pyside2 \
`# Ninja build-system` \
ninja-build \
`# CMake build-system generator` \
cmake \
`# GNU C++ compiler` \
gcc-c++ \
`# GDB debugger` \
gdb \
`# Boost headers and libraries` \
boost-devel \
`# Armadillo headers and libraries` \
armadillo-devel \
`# DLib headers and libraries, with dependencies libpng-devel, libjpeg-devel, and libsq3-devel` \
dlib-devel \
libpng-devel \
libjpeg-devel \
libsq3-devel
`# Doctest headers and libraries` \
doctest-devel
then
echo "Failed!"
exit 1
fi
# Possible additions
# `# Git client LFS extension (not used for now)` \
# git-lfs \
# `# CCache (to trade disk space for recompilation speed, not installed for now to avoid it being detected and used before configured properly)` \
# ccache \
# `# Valgrind (not used for now, ant this is quite large - 320MiB installed)` \
# valgrind \
#
# # If installing ccache, could then also limit the size from default 5GB to 500MB.
# # Note: This will only have effect for the current user, and will be stored as
# # configuration file ~/.config/ccache/ccache.conf, so must run the script as the
# # intended dev user and not root!
# ccache --set-config max_size=500M