1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-10 14:26:15 -05:00

Introductory notes for OS X (#760)

This commit is contained in:
Josh Jordan 2020-10-07 16:16:31 -04:00 committed by GitHub
parent d78175b7b4
commit 2e42fcee15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 16 deletions

View File

@ -33,7 +33,7 @@ go_install(){
sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz > /dev/null 2>&1 sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz > /dev/null 2>&1
echo "Clean unneeded files" echo "Clean unneeded files"
rm go*.linux-amd64.tar.gz rm go*.linux-amd64.tar.gz
elif [ "$distribution" = "Fedora" ]; then elif [ "$distribution" = "Fedora" ]; then
echo "Downloading Go" echo "Downloading Go"
wget https://dl.google.com/go/go"$go_version".linux-amd64.tar.gz > /dev/null 2>&1 wget https://dl.google.com/go/go"$go_version".linux-amd64.tar.gz > /dev/null 2>&1
@ -41,7 +41,7 @@ go_install(){
sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz > /dev/null 2>&1 sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz > /dev/null 2>&1
echo "Clean unneeded files" echo "Clean unneeded files"
rm go*.linux-amd64.tar.gz rm go*.linux-amd64.tar.gz
elif [ "$distribution" = "Debian" ] || [ "$distribution" = "Ubuntu" ] || [ "$distribution" = "Deepin" ]; then elif [ "$distribution" = "Debian" ] || [ "$distribution" = "Ubuntu" ] || [ "$distribution" = "Deepin" ]; then
echo "Downloading Go" echo "Downloading Go"
wget https://dl.google.com/go/go"$go_version".linux-amd64.tar.gz > /dev/null 2>&1 wget https://dl.google.com/go/go"$go_version".linux-amd64.tar.gz > /dev/null 2>&1
@ -49,13 +49,13 @@ go_install(){
sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz > /dev/null 2>&1 sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz > /dev/null 2>&1
echo "Clean unneeded files" echo "Clean unneeded files"
rm go*.linux-amd64.tar.gz rm go*.linux-amd64.tar.gz
elif [ "$distribution" = "Gentoo" ]; then elif [ "$distribution" = "Gentoo" ]; then
sudo emerge --ask n go sudo emerge --ask n go
elif [ "$distribution" = "Manjaro" ] || [ "$distribution" = "Arch\ Linux" ]; then elif [ "$distribution" = "Manjaro" ] || [ "$distribution" = "Arch\ Linux" ]; then
sudo pacman -S go --noconfirm sudo pacman -S go --noconfirm
elif [ "$distribution" = "OpenSUSE" ] || [ "$distribution" = "SUSE" ]; then elif [ "$distribution" = "OpenSUSE" ] || [ "$distribution" = "SUSE" ]; then
echo "Downloading Go" echo "Downloading Go"
wget https://dl.google.com/go/go"$go_version".linux-amd64.tar.gz > /dev/null 2>&1 wget https://dl.google.com/go/go"$go_version".linux-amd64.tar.gz > /dev/null 2>&1
@ -71,27 +71,31 @@ fi
dep_install(){ dep_install(){
if [ "$distribution" = "CentOS" ] || [ "$distribution" = "Red\ Hat" ] || [ "$distribution" = "Oracle" ]; then if [ "$distribution" = "CentOS" ] || [ "$distribution" = "Red\ Hat" ] || [ "$distribution" = "Oracle" ]; then
sudo yum install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel alsa-lib-devel libXi-devel > /dev/null 2>&1 sudo yum install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel alsa-lib-devel libXi-devel > /dev/null 2>&1
elif [ "$distribution" = "Fedora" ]; then elif [ "$distribution" = "Fedora" ]; then
sudo dnf install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel alsa-lib-devel libXi-devel > /dev/null 2>&1 sudo dnf install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel alsa-lib-devel libXi-devel > /dev/null 2>&1
elif [ "$distribution" = "Debian" ] || [ "$distribution" = "Ubuntu" ] || [ "$distribution" = "Deepin" ]; then elif [ "$distribution" = "Debian" ] || [ "$distribution" = "Ubuntu" ] || [ "$distribution" = "Deepin" ]; then
sudo apt-get install -y libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libsdl2-dev libasound2-dev > /dev/null 2>&1 sudo apt-get install -y libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libsdl2-dev libasound2-dev > /dev/null 2>&1
elif [ "$distribution" = "Gentoo" ]; then elif [ "$distribution" = "Gentoo" ]; then
sudo emerge --ask n libXcursor libXrandr libXinerama libXi libGLw libglvnd libsdl2 alsa-lib > /dev/null 2>&1 sudo emerge --ask n libXcursor libXrandr libXinerama libXi libGLw libglvnd libsdl2 alsa-lib > /dev/null 2>&1
elif [ "$distribution" = "Manjaro" ] || [ "$distribution" = "Arch\ Linux" ]; then elif [ "$distribution" = "Manjaro" ] || [ "$distribution" = "Arch\ Linux" ]; then
if [ -z "$mesa_detect_arch" ]; then 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 sudo pacman -S libxcursor libxrandr libxinerama libxi mesa libglvnd sdl2 sdl2_mixer sdl2_net alsa-lib --noconfirm > /dev/null 2>&1
else else
sudo pacman -S libxcursor libxrandr libxinerama libxi libglvnd sdl2 sdl2_mixer sdl2_net alsa-lib --noconfirm > /dev/null 2>&1 sudo pacman -S libxcursor libxrandr libxinerama libxi libglvnd sdl2 sdl2_mixer sdl2_net alsa-lib --noconfirm > /dev/null 2>&1
fi fi
elif [ "$distribution" = "OpenSUSE" ] || [ "$distribution" = "SUSE" ]; then elif [ "$distribution" = "OpenSUSE" ] || [ "$distribution" = "SUSE" ]; then
sudo zypper install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel Mesa-libGL-devel alsa-lib-devel libXi-devel > /dev/null 2>&1 sudo zypper install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel Mesa-libGL-devel alsa-lib-devel libXi-devel > /dev/null 2>&1
elif [[ "$OSTYPE" == "darwin"* ]]; then
# are there dependencies required? did I just have all of them already?
echo "Mac OS detected, no dependency installation necessary..."
fi fi
} }
@ -108,4 +112,5 @@ fi
echo "Build OpenDiablo 2" echo "Build OpenDiablo 2"
go get -d go get -d
go build go build
echo "Build finished. Please edit config.json before running OpenDiablo2" 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"

View File

@ -53,7 +53,7 @@
<hr /> <hr />
<h2 id="config">Configuration</h2> <h2 id="config">Configuration</h2>
<div class="paragraph"> <div class="paragraph">
<span>There is a configuration file (config.json) that should be located in the root folder. The following table describes the different options and what they mean.</span> <span>There is a configuration file (config.json) whose location depends on your operating system. It will be generated when OpenDiablo2 is run and the output will show the file location for editing. The following table describes the different options and what they mean.</span>
<table> <table>
<thead> <thead>
<tr> <tr>