1#!/bin/bash
2
3echo "------------------------------------------------------------------------------"
4echo "Remere's Map Editor installation script"
5echo -n "Checking for root privilegies... "
6
7if [ "$(id -u)" != "0" ]; then
8 echo "FAILED"
9 echo "This script must be run as root" 1>&2
10 exit 1
11else
12 echo "Done"
13fi
14
15echo -n "Adding tt-solutions repository... "
16grep "apt.tt-solutions.com" /etc/apt/sources.list > /dev/null
17if [ "$?" != "0" ]; then
18 echo "" >> /etc/apt/sources.list
19 echo "# tt-solutions repository, added by Remere's Map Editor installation script." >> /etc/apt/sources.list
20 echo "deb http://apt.tt-solutions.com/ubuntu/ dapper main" >> /etc/apt/sources.list
21 echo "Done"
22else
23 echo "Already done"
24fi
25
26echo "Installing required packages"
27
28echo -n "Installing libwxgtk2.8-0... "
29apt-get -y install libwxgtk2.8-0 > /dev/null
30if [ "$?" != "0" ]; then
31 echo "FAILED"
32 echo "You must do a manual install of the required packages"
33else
34 echo "Done"
35fi
36
37echo -n "Installing libboost1.40-all-dev... "
38apt-get -y install libboost1.40-all-dev > /dev/null
39if [ "$?" != "0" ]; then
40 echo "FAILED"
41 echo "You must do a manual install of the required packages"
42else
43 echo "Done"
44fi
45
46echo -n "Installing libxml2... "
47apt-get -y install libxml2 > /dev/null
48if [ "$?" != "0" ]; then
49 echo "FAILED"
50 echo "You must do a manual install of the required packages"
51else
52 echo "Done"
53fi
54
55echo -n "Installing libglu1-mesa... "
56apt-get -y install libglu1-mesa > /dev/null
57if [ "$?" != "0" ]; then
58 echo "FAILED"
59 echo "You must do a manual install of the required packages"
60else
61 echo "Done"
62fi
63
64echo -n "Installing libgl1-mesa-glx... "
65apt-get -y install libgl1-mesa-glx > /dev/null
66if [ "$?" != "0" ]; then
67 echo "FAILED"
68 echo "You must do a manual install of the required packages"
69else
70 echo "Done"
71fi
72
73echo -n "Do you want to update all packages, editor may not run with not-updated runtime libraries. [y/n] "
74read pr
75if [ "$pr" == "y" ]; then
76 echo "Running apt-get update..."
77 apt-get update
78fi
79
80echo "Installation complete, run ./rme to launch the editor"
81read -p "Press any key to exit... "
82
83