Skip to content

Commit

Permalink
Added a shell script to help get started on a fresh Ubuntu machine
Browse files Browse the repository at this point in the history
  • Loading branch information
Lego3 committed Jan 3, 2015
1 parent 94e666c commit a9a826c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions run_to_initialize_on_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
if ! grep -q "jon-severinsson/ffmpeg" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
else
echo "Jon Severinsson's PPA has already been added on this machine."
fi
sudo apt-get install build-essential cmake libsdl1.2-dev libsdl-mixer1.2-dev timidity libfreetype6-dev libluajit-5.1-dev ffmpeg libavcodec-dev libavformat-dev libavresample-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev lua-socket -y
# Try to fix bug in luasocket 3.0-rc1
sudo sed -i 's/ PROXY/ _M.PROXY/g' /usr/share/lua/5.1/socket/http.lua

MAPEDITOR=""
echo "Do you wish to compile the Map Editor?"
select yn in "Yes" "No"; do
case $yn in
Yes )
MAPEDITOR="-D BUILD_MAPEDITOR=ON"
sudo apt-get install libwxgtk3.0-dev -y
break;;
No ) break;;
esac
done

cmake $MAPEDITOR .
cd CorsixTH
make

if [ -n "$MAPEDITOR" ]; then
cd ../MapEdit
make
fi

echo "Do you wish to compile the Level Editor?"
select yn in "Yes" "No"; do
case $yn in
Yes )
sudo apt-get install default-jdk -y
cd ../LevelEdit
mkdir -p bin
cp src/icon* ./bin/
javac -d bin -sourcepath src src/com/corsixth/leveledit/Main.java
echo "#!/bin/bash" > LevelEdit
echo "java -cp bin com.corsixth.leveledit.Main" >> LevelEdit
chmod 755 LevelEdit
break;;
No ) break;;
esac
done

0 comments on commit a9a826c

Please sign in to comment.