This repository has been archived by the owner on Jun 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbootstrap-build.sh
executable file
·53 lines (44 loc) · 1.72 KB
/
bootstrap-build.sh
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
#!/usr/bin/env bash
source /etc/os-release
echo -e "\nInstalling dependencies for your distro...\n"
case $ID in
"debian" | "ubuntu" | "elementary")
sudo apt install build-essential gcc clang -y
pixbuf_dev=""
case "$VERSION_CODENAME" in
"focal" | "buster")
pixbuf_dev="libgdk-pixbuf2.0-dev"
;;
*)
pixbuf_dev="libgdk-pixbuf-2.0-dev"
;;
esac
sudo apt install libglib2.0-dev libpango1.0-dev "$pixbuf_dev" libatk1.0-dev libgtk-3-dev libxcb-shape0-dev libxcb-xfixes0-dev curl -y
;;
"fedora")
dnf="$(which dnf)"
if [ -f "$(command -v dnf5)" ]; then
dnf="$(which dnf5)"
sudo $dnf group install development-tools -y
else
sudo $dnf groupinstall "Development Tools" -y
fi
sudo $dnf install gobject-introspection-devel cairo-devel atk-devel pango-devel gdk-pixbuf2-devel gtk3-devel clang curl cmake -y
;;
"arch")
# TODO: Add Arch Linux packages
;;
*)
echo -e "Unknown distribution, please manually find and install the relevant packages for your distro.\n"
;;
esac
if [[ -z $(which rustup 2>/dev/null) ]]; then
echo "Installing rustup..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- --default-toolchain nightly -y
source $HOME/.cargo/env
fi
echo -e "\nInstalling wasm32-unknown-unknown Rust target..."
rustup target install wasm32-unknown-unknown
echo -e "\nInstalling trunk..."
cargo install trunk
echo -e "\nIf you're inside a toolbox or distrobox, you need to install the necessary display drivers for your GPU *inside* the container otherwise you will run into OpenGL issues."