Statistics
| Branch: | Revision:

root / src / utils / omnetpp @ master

History | View | Annotate | Download (1.13 KB)

1 01873262 Georg Kunz
#!/bin/sh
2
#
3
# Detects the platform and architecture, and starts the IDE with the right launcher
4
#
5
IDEDIR=`dirname $0`/../ide
6
cd $IDEDIR
7
PLATFORM=`uname -sm`
8
LAUNCHER=omnetpp
9
10
echo Starting the OMNeT++ IDE...
11
12
if java -version 2>&1 | grep -i "libgcj" >/dev/null 2>/dev/null; then
13
  echo "A compatible JRE is required to run the IDE. "
14
  echo "Found GNU GIJ which is not supported. Please use Sun JRE or Open JRE 1.5+"
15
  echo "If you have several JDKs installed on you machine, change the default JVM."
16
  echo "You can switch between Java VMs with the 'sudo update-alternatives --config java' command."
17
  exit 1;
18
fi
19
20
if test ! -d configuration; then
21
  echo "The IDE is not yet configured. Please run the 'configure' script in the installation root folder!"
22
  exit 1;
23
fi
24
25
#set default language so GCC will report errors in english. see bug #3
26
export LANG=en_US.UTF-8
27
28
case $PLATFORM in
29
*MINGW*)
30
	./${LAUNCHER}.exe &
31
        ;;
32
*Linux*x86_64*)
33
	./${LAUNCHER} &
34
        ;;
35
*Linux*)
36
	./$LAUNCHER &
37
        ;;
38
*Darwin*)
39
	open ./${LAUNCHER}.app
40
        ;;
41
*)
42
	echo OMNeT++ IDE is supported only on: Linux 32/64bit, Windows 32bit, MacOS X Intel
43
	exit 1
44
        ;;
45
esac