mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-05 01:37:17 -05:00
commit
f6410f8961
10
build.sh
10
build.sh
@ -14,8 +14,6 @@ echo "OpenDiablo 2 Build Script $version"
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
|
||||
distribution=$(cat /etc/*release | grep "PRETTY_NAME" | sed 's/PRETTY_NAME=//g' | sed 's/["]//g' | awk '{print $1}')
|
||||
mesa_detect_arch=$(pacman -Q | grep mesa)
|
||||
|
||||
|
||||
go_install() {
|
||||
# Check OS & go
|
||||
@ -82,6 +80,7 @@ dep_install(){
|
||||
sudo emerge --ask n libXcursor libXrandr libXinerama libXi libGLw libglvnd libsdl2 alsa-lib >/dev/null 2>&1
|
||||
|
||||
elif [ "$distribution" = "Manjaro" ] || [ "$distribution" = "Arch\ Linux" ]; then
|
||||
mesa_detect_arch=$(pacman -Q | grep mesa)
|
||||
|
||||
if [ -z "$mesa_detect_arch" ]; then
|
||||
sudo pacman -S libxcursor libxrandr libxinerama libxi mesa libglvnd sdl2 sdl2_mixer sdl2_net alsa-lib --noconfirm >/dev/null 2>&1
|
||||
@ -102,15 +101,22 @@ dep_install(){
|
||||
# Build
|
||||
echo "Check Go"
|
||||
go_install
|
||||
|
||||
echo "Install libraries"
|
||||
if [ ! -e "$HOME/.config/OpenDiablo2" ]; then
|
||||
mkdir -p $HOME/.config/OpenDiablo2
|
||||
fi
|
||||
|
||||
if [ -e "$HOME/.config/OpenDiablo2/.libs" ]; then
|
||||
echo "libraries is installed"
|
||||
else
|
||||
echo "OK" >"$HOME/.config/OpenDiablo2/.libs"
|
||||
dep_install
|
||||
fi
|
||||
|
||||
echo "Build OpenDiablo 2"
|
||||
go get -d
|
||||
go build
|
||||
|
||||
echo "Build finished. Running OpenDiablo2 will generate a config.json file."
|
||||
echo "If there are subsequent errors, please inspect and edit the config.json file. See doc/index.html for more details"
|
||||
|
Loading…
Reference in New Issue
Block a user