Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
Install native dependencies before installing Rust
Browse files Browse the repository at this point in the history
Installing clang allows trunk to be built and installed without errors.
Because there is no point in seperating the two package installation
processes, might as well lump them together at the beginning of the
script.
  • Loading branch information
STBoyden committed May 27, 2022
1 parent 45a6799 commit cecd17c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions bootstrap-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,16 @@

source /etc/os-release

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 "\nInstalling dependencies for your distro...\n"

case $ID in
"debian" | "ubuntu" | "elementary")
sudo apt install base-devel gcc -y
sudo apt install base-devel gcc clang -y
sudo apt install libglib2.0-dev libpango1.0-dev libgdk-pixbuf-2.0-dev libatk1.0-dev libgtk-3-dev libxcb-shape0-dev libxcb-xfixes0-dev -y
;;
"fedora")
sudo dnf groupinstall "Development Tools" -y
sudo dnf install gobject-introspection-devel cairo-devel atk-devel pango-devel gdk-pixbuf2-devel gtk3-devel -y
sudo dnf install gobject-introspection-devel cairo-devel atk-devel pango-devel gdk-pixbuf2-devel gtk3-devel clang -y
;;
"arch")
# TODO: Add Arch Linux packages
Expand All @@ -33,4 +21,16 @@ case $ID in
;;
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."

0 comments on commit cecd17c

Please sign in to comment.