Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Update package lists
- sudo apt update
- # Install required packages
- sudo apt-get install -y libudev-dev cmake xorg-dev libglu1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxkbcommon-dev libwayland-dev git g++ gcc libinput-dev libsoil-dev build-essential libx11-dev libxtst-dev
- # Get the current username
- username=$(whoami)
- # Set the directory path
- github_dir="/home/$username/github"
- # Create github directory if it doesn't exist
- if [ ! -d "$github_dir" ]; then
- mkdir -p "$github_dir"
- fi
- # Change directory to github directory
- cd "$github_dir"
- # Clone GLFW repository
- git clone https://github.com/glfw/glfw.git
- cd glfw
- mkdir build
- cd build
- # Build GLFW
- cmake ..
- make
- sudo make install
- # Return to the parent directory
- cd ../..
- # Clone zap-client repository
- git clone https://github.com/Gerosity/zap-client.git
- cd zap-client
- mkdir build
- cd build
- # Build zap-client
- cmake ..
- make
- # Create a shell script to run zapclient
- echo "#!/bin/bash" > "$github_dir/zapclient.sh"
- echo "cd $github_dir/zap-client/build" >> "$github_dir/zapclient.sh"
- echo "sudo ./zapclient" >> "$github_dir/zapclient.sh"
- chmod +x "$github_dir/zapclient.sh"
- # Create a desktop shortcut for zapclient
- desktop_dir="/home/$username/Desktop"
- echo "[Desktop Entry]" > "$desktop_dir/zapclient.desktop"
- echo "Type=Application" >> "$desktop_dir/zapclient.desktop"
- echo "Name=Zap Client" >> "$desktop_dir/zapclient.desktop"
- echo "Exec=$github_dir/zapclient.sh" >> "$desktop_dir/zapclient.desktop"
- echo "Terminal=true" >> "$desktop_dir/zapclient.desktop"
- echo "Icon=utilities-terminal" >> "$desktop_dir/zapclient.desktop"
- chmod +x "$desktop_dir/zapclient.desktop"
- # Create a menu entry for zapclient
- menu_dir="/usr/share/applications"
- sudo sh -c "echo '[Desktop Entry]' > $menu_dir/zapclient.desktop"
- sudo sh -c "echo 'Type=Application' >> $menu_dir/zapclient.desktop"
- sudo sh -c "echo 'Name=Zap Client' >> $menu_dir/zapclient.desktop"
- sudo sh -c "echo 'Exec=$github_dir/zapclient.sh' >> $menu_dir/zapclient.desktop"
- sudo sh -c "echo 'Terminal=true' >> $menu_dir/zapclient.desktop"
- sudo sh -c "echo 'Icon=utilities-terminal' >> $menu_dir/zapclient.desktop"
Advertisement
Add Comment
Please, Sign In to add comment