jsketcher/scripts/setup_tauri_dev_linux.sh
DaOfficialWizard b66cd019ed
Tauri (#1)
* fix: release to tauri branch

* fix: release to tauri branch

* fix: release to tauri branch

* fix: release to tauri

* fix: fix app not loading on linux builds

- update tauri
- fix dist directory path

BREAKING CHANGES

* fix: update readme

* fix: semantic-release

* Update .releaserc

* Update ci.yaml

* fix: Update .releaserc

* fix: remove repo from package.json

* chore(major): 1.0.0-tauri.1 [skip ci]

## 1.0.0-tauri.1 (2023-05-09)

### ⚠ BREAKING CHANGES

* CHANGES

### 🍕 Features

* add setup scripts for setting up tauri dev environment ([0c41a33](0c41a33d0e))
* **dxf:** add support for dimensions in dxf. ([56c884c](56c884ccfd))
* add support for dxf blocks ([#200](https://github.com/ZanzyTHEbar/jsketcher/issues/200)) ([322d47f](322d47f802))
* add support for dxf files import ([2fa2866](2fa2866296))
* finish up CI system ([5a688d1](5a688d1a9e))
* initial cir release ([2f94a6e](2f94a6eb82))
* initial tauri commit ([0a0bb54](0a0bb5485e))
* update tauri version ([90168da](90168da42c))

### 🐛 Bug Fixes

* .releasesrc file not having a main branch ([04f2e2c](04f2e2c6b7))
* .releasesrc file not having a main branch ([25ae8a4](25ae8a464b))
* **dxf:** add dimLayers to the export. ([#183](https://github.com/ZanzyTHEbar/jsketcher/issues/183)) ([a3349b5](a3349b5da4))
* fix app not loading on linux builds ([9ef599d](9ef599ddc9))
* fix release asset types ([8f73410](8f73410c74))
* release to tauri ([0ba5387](0ba5387601))
* release to tauri branch ([11fcf2e](11fcf2e87a))
* release to tauri branch ([e8486a5](e8486a5e65))
* release to tauri branch ([6076573](6076573c98))
* remove caching of pnpm in ci ([96165f3](96165f3e1e))
* remove old path ([f0b426c](f0b426c14f))
* remove repo from package.json ([dd099b8](dd099b8ad8))
* script for linux ([46bda82](46bda82726))
* semantic-release ([3edb4cf](3edb4cf635))
* Update .releaserc ([3343d2c](3343d2cb4a))
* update readme ([b00299d](b00299d5c1))
* windows failing to build ([def0782](def0782b76))

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2023-05-09 12:19:34 +01:00

101 lines
3.1 KiB
Bash
Executable file

#!/bin/bash
printf "This Script will setup the tauri dev environment\n"
# check if the user is running as root
if [ "$EUID" -ne 0 ]; then
printf "Please run as root\n"
exit 1
fi
# get user input and store in variable
printf "Do you want to install the Linux Development Dependencies? (y/n)\n"
read -r input
# check if the user input is y or n
#if [ "$input" == "y" ]; then
# printf "Installing Linux Development Dependencies\n"
#else
# printf "Not installing Linux Development Dependencies\n"
#fi
# Get their distro
printf "Which distro are you running? (ubuntu/arch/fedora/gentoo/opensuse/void)\n"
read -r distro
# convert distro to lowercase
distro=${distro,,}
# check if the distro is Ubuntu or arch or fedora or gentoo or openSUSE or NixOS or GNU GUIX or void
if [ "$distro" == "ubuntu" ] || [ "$distro" == "arch" ] || [ "$distro" == "fedora" ] || [ "$distro" == "gentoo" ] || [ "$distro" == "opensuse" ] || [ "$distro" == "void" ]; then
printf "Distro is $distro\n"
else
printf "Distro is not supported\n"
printf "NixOS and GNU GUIX are not supported by this script, but are supported by tauri - please see the tauri docs for more information.\n"
exit 1
fi
## Which distro are we on?
#printf "Detecting Distro\n"
#
## run this command: cat /etc/*-release | uniq -u and grep for the ID field and pipe into a variable
#
#cat /etc/*-release | uniq -u | grep -i "ID" | cut -d "=" -f 2 | tr -d '"' | tr -d '\n' >distro.txt
#
## read the variable into a variable
#distro=$(cat distro.txt)
#
## grab just the first word of the variable
#distro=$(echo $distro | cut -d " " -f 1)
#
## convert distro to lowercase
#distro=${distro,,}
## remove the file
#rm distro.txt
# Install Linux Development Dependencies
# run specific commands based on the distro
case $distro in
"ubuntu")
printf "Installing Ubuntu Development Dependencies\n"
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
;;
"arch")
printf "Installing Arch Development Dependencies\n"
sudo pacman -Syu
sudo pacman -S --needed webkit2gtk base-devel curl wget openssl appmenu-gtk-module gtk3 libappindicator-gtk3 librsvg libvips
;;
"fedora")
printf "Installing Fedora Development Dependencies\n"
sudo dnf check-update
sudo dnf install webkit2gtk4.0-devel openssl-devel curl wget libappindicator-gtk3 librsvg2-devel
sudo dnf group install "C Development Tools and Libraries"
;;
"gentoo")
printf "Installing Gentoo Development Dependencies\n"
sudo emerge --ask net-libs/webkit-gtk:4 dev-libs/libappindicator net-misc/curl net-misc/wget
;;
"opensuse")
printf "Installing openSUSE Development Dependencies\n"
sudo zypper up
sudo zypper in webkit2gtk3-soup2-devel libopenssl-devel curl wget libappindicator3-1 librsvg-devel
sudo zypper in -t pattern devel_basis
;;
"void")
printf "Installing Void Development Dependencies\n"
sudo xbps-install -Syu
sudo xbps-install -S webkit2gtk curl wget openssl gtk+3 libappindicator librsvg gcc pkg-config
;;
esac
# Install Rust
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
# All done!
printf "All done!\n"