Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Get answers to all your basic programming questions. No Ogre questions, please!
Post Reply
User avatar
Gaiha
Gnoblar
Posts: 24
Joined: Thu Feb 04, 2016 7:05 pm
Location: Canada
Contact:

Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by Gaiha » Sun Feb 07, 2016 7:19 am

I hope this is useful to anyone running Linux... Smoochies!

______________________________________________________________________________________________________

**Pre-requisites**

This tutorial will assume you:
1) have the basic understanding of how to use a Terminal.
2) know how to switch to ROOT user and Exit.
3) know how to create a source file target and a destination target.

Base System: Ubuntu 14.04.03 (Trusty Tahr) LTS
** The repositories contain ALL the required dependencies, all you need to do is access them **

from your Keyboard - Type: [crtl]+[alt]+t - to open a terminal

** Begin Preparation Tasks**

Execute the following commands at your terminal:
username@hostname:~S sudo su
[sudo] password for [hostname]:
root@hostname:/home/username# cd /root
root@hostname:~# apt-get update
root@hostname:~# apt-get dist-upgrade
** End Preparation Tasks **
_______________________________________________________________________________________________________

** Begin Pre-installation Tasks **

** Install Subversion **
Subversion is a version control system, that as you develop your OGRE application(s), it will automatically keep track of which files have been updated and when, as well as provide details to revert back to an earlier version if you make any blunders.

Execute the following command at your terminal:
root@hostname:~# apt-get install subversion
** Install Apache Ant **
Apache Ant is a Java-based, open-source software build tool developed by the Apache Software Foundation. It is similar to the "make" utility, but is mainly functional on the Java platform. Unlike make, Ant scripts are written in XML to describe the build process and its dependencies. Portability and simplicity of use are two of the main benefits of Ant.

Execute the following command at your terminal:
root@hostname:~# apt-get install ant ant-optional
** Install Python **
Python is a multiparadigm, general-purpose, interpreted, high-level programming language. Python allows programmers to use different programming styles to create simple or complex programs, get quicker results and write code almost as if speaking in a human language.

Execute the following command at your terminal:
root@hostname:~# apt-get install python-software-properties
** Install Java JDK **
Provided from Oracle, The Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (javadoc) and other tools needed in Java development.

Execute the following commands at your terminal and follow the prompts as required:
root@hostname:~# add-apt-repository ppa:webupd8team/java
root@hostname:~# apt-get update
root@hostname:~# apt-get install oracle-java9-installer
root@hostname:~# apt-get install oracle-java9-set-default
*(EDIT 7 Feb 2014 From Java8 to Java 9)*

** Confirm the installation has completed **
root@hostname:~# java -version
** This completes the Pre-installation Procedures **
_______________________________________________________________________________________________________

** Installation Tasks **

** Install Cmake **
CMake is a cross-platform build system - or perhaps more accurately a build configurator. It is a program which, from a set of CMake scripts, creates a native build system for your platform that allows you to build Ogre. The build process is configurable via CMake. Ogre provides several options which you can use to customise your build.

Execute the following command at your terminal:
root@hostname:~# add-apt-repository ppa:george-edison55/cmake-3.x
root@hostname:~# apt-get update
root@hostname:~# apt-get install cmake cmake-gui cmake-data
*(Note - The current version within the default repository packages is 3.2.2 added 30/06/2015)

** Install OGRE v1.9 **

Execute the following commands at your terminal:
root@hostname:~# apt-get install libogre-1.9-dev
root@hostname:~# apt-get update
root@hostname:~# apt-get dist-upgrade
**Additional Dependencies**

** FreeType **
- is written in C. It is designed as a library which takes a True Type Font as the input, removes its bytecode instructions and returns a new font where all glyphs are bytecode hinted using the information by the module. The idea is to provide hinting to assist in coding and debugging.

Execute the following commands at your terminal:
root@hostname:~# apt-get install ttfautohint ttfautohintGUI
**Optional Components**

** MYGUI ** RECOMMENDED!
Provides an open and extensible interface for OGRE with full support in C++ as well as additional resources for XML, Python and Java.

Execute the following commands at your terminal:
root@hostname:~# apt-get install mygui-doc
root@hostname:~# apt-get install libmyguiengine3
root@hostname:~# apt-get install libmyguiengine3-dbg
root@hostname:~# apt-get install libmygui.openglplatform0debian0
root@hostname:~# apt-get install libmygui.ogreplatform0debian0
root@hostname:~# apt-get install libmygui.openglplatform0debian0
root@hostname:~# apt-get install libmygui.ogreplatform0debian0-dbg
root@hostname:~# apt-get install libmygui-dev
root@hostname:~# apt-get update
root@hostname:~# apt-get dist-upgrade
<< OR >>
[**Please don't install both, I did and made a complete mess, that required a complete O/S re-installation. Just don't do it!**]

** Eclipse **
Provides an open and extensible platform for building additional toolsets and also seamlessly integrate OGRE's avaiable tools into one GUI.

Execute the following commands at your terminal:
root@hostname:~# apt-get install eclipse
root@hostname:~# apt-get update
root@hostname:~# apt-get dist-upgrade
** You are now ready to begin building your OGRE application(s) using Cmake. **
_______________________________________________________________________________________________________

** Close your Terminal, you are done. **

Execute the following commands at your terminal:
root@hostname:~# exit
username@hostname:~S [ctrl] + [alt] + s
** Restart Your Computer **

From your keyboard, type [ctrl]+[alt]+[del] to reboot your system.

** When your system finishes Rebooting, You now have all the tools at your disposal to create pretty much anything and everything OGRE is capable of building on a Linux Platform. Simply start Cmake and get busy! **
0 x

User avatar
Gaiha
Gnoblar
Posts: 24
Joined: Thu Feb 04, 2016 7:05 pm
Location: Canada
Contact:

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by Gaiha » Tue Feb 09, 2016 12:56 am

Well... after successfully building OGRE v1.9 on my Development Machine, somewhere between adding/deleting/installing/removing software components, my boot loader decided to corrupt itself, and the video drivers went somewhere else. Good thing it's only my Dev Box. LOLZ Perhaps it is best left "Sin Die"...

From a FRESH install of Ubuntu 14.04 (Trusy Tahr) LTS… I have re-acquired all the little goodies from my NAS, and shall begin again… This time, proceeding from where my previous post ended.

_____________________________________________________________________________________

This Tutorial will Assume:
1) You know how to create a source file target and a destination target.
2) Are working within a "Clean Environment".
3) Have intimate knowledge of "Synaptic".

Base System: Ubuntu 14.04 (Trusty Tahr) LTS

** Begin Preparation Tasks **
username@hostname:~S sudo su
[sudo] password for [hostname]:
root@hostname:/home/username# cd /root
root@hostname:~# apt-get update
root@hostname:~# apt-get dist-upgrade
root@hostname:~# apt-get install synaptic
** End Preparation Tasks **

_____________________________________________________________________________________

Open Cmake

From here, Cmake will configure your OGRE v2.1 build based upon your system's hardware setup and software environment, as well as provide you with additional options.

~~ Choose your Source Repository. ~~ This should be where you want Cmake to draw files from to do your build. This should be somewhere that you can readily access, In my case… My NAS Array, but for you it may be simply where you decided to download the OGRE tar file and unpacked it. Wherever you put it, go get it and tell CMake where it is with the [Browse] button on the Source Line.

[Source Target] .../home/gaiha/sinbad-ogre-0d580c7216ab/

~~ Choose your Build Repository. ~~ This should be where you want Cmake to save files to for your build. This should be somewhere that you can readily access, I'm my case… Directly onto the Bare Metal I have assigned, but for you it may be simply where you decided to put it. Perhaps some sort of Projects Folder on your hard drive. Wherever you want to put it, go tell CMake where, with the [Browse] button on the Build Line. Generally speaking (as suggested by Sinbad), it's not a good idea to make the Source and Build targets the same place... if you make a booboo, or want to build another project, CMake could get confused as well as YOU, as to what is what. (Remember installing Subversion? Very useful tool, make use of it when appropriate).

[Build Target] .../home/gaiha/kebec1661/

~~ READY? ~~
Just Click the [Configure] button and Cmake will do the rest. If you get any errors [and I'm sure you will get a few) all is not lost! Cmake will do a nice job of telling you what else it needs, based upon your hardware and software configurations.

Remember synaptic? Now is a good time, to use it to its full potential and directly add, then install required dependencies to meet your individual build requirements and correct all those errors. All Errors are listed in RED TEXT and will need to be INDIVIDUALLY addressed. Once you have added a software component, simply clear the Cmake Cache, then click the [Configure] Button after EACH individual error has been corrected. Depending on your system, your machine MAY require a restart, to complete an installation cycle.


~~ ERROR FREE? ~~
OK, you're now Error Free and ready to have Cmake compile your project. Simply click the [Generate] Button and Cmake will prompt you for a Generator and a Compiler. You can simply choose what you want to use based upon your hardware and installed software, or just use the defaults. Additionally, any optional Generator or Compiler you use, should be installed so you can take advantage of the target platform(s) and/or O/S you want to deploy your application to.

_____________________________________________________________________________________

If you have any question, feel free to post a reply... or if it's really urgent, send a PM.

Smoochies!
0 x
I may not be perfect... but parts of me are Excellent!

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by spacegaier » Tue Feb 09, 2016 10:11 am

In order to get Ogre to run, you don't need Java, SVN, Ant, Maven or am I missing something?
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by c6burns » Tue Feb 09, 2016 10:39 am

I wondered the same thing at first, but his tutorial assumes you are using Eclipse for IDE. That's where those dependencies come in. I don't understand why all the dist-upgrade commands, though. If you insist on that, you could run apt-get update once at the start, and dist-upgrade once at the end. Though I'm not exactly sure why you would dist-upgrade at all during this.
0 x

User avatar
Gaiha
Gnoblar
Posts: 24
Joined: Thu Feb 04, 2016 7:05 pm
Location: Canada
Contact:

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by Gaiha » Tue Feb 09, 2016 3:17 pm

spacegaier wrote:In order to get Ogre to run, you don't need Java, SVN, Ant, Maven or am I missing something?
c6burns wrote:I wondered the same thing at first, but his tutorial assumes you are using Eclipse for IDE. That's where those dependencies come in. I don't understand why all the dist-upgrade commands, though. If you insist on that, you could run apt-get update once at the start, and dist-upgrade once at the end. Though I'm not exactly sure why you would dist-upgrade at all during this.
Heya guys! nice of you to ask:
My Orge install is part of a larger project which uses MYSQL and an Apache Server... and yes, I am using Eclipse as the primary IDE. My project is all housed on remote Bare Metal and the actual Dev is done on a local machine. As far as Update and Upgrade, a habit I've always done... particularly when adding a PPA. I'm such a newb when it comes to Ogre, so if I make any serious blunders along the way, be sure to pick me up, dust me off and point me in the right direction.

If you can, suggestions on an edit would be most appreciated.
Smoochies!
0 x
I may not be perfect... but parts of me are Excellent!

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by c6burns » Wed Feb 10, 2016 2:08 am

Ah OK my day job involves a lot of sysadmin work. Running dist-upgrade would be a disaster on most of my systems. That will upgrade EVERYTHING ... even your kernel. On your local system, or even on a physical server, it is probably safe. On a virtualized server with a specific kernel it could be really bad :D I only use upgrade after making adjustments to my apt sources during an actual upgrade. If you run apt-get update and then apt-get install whatever ... it will already be giving you the upgraded whatever and its up-to-date dependencies.

Anyway just my 2 cents about that haha
0 x

User avatar
moejac
Halfling
Posts: 45
Joined: Tue Dec 08, 2009 9:18 am

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by moejac » Wed Feb 10, 2016 8:16 am

The only reason why you would want to run 'dist-upgrade' on a regular basis is if you are using a rolling release. Otherwise, a bad idea.
0 x

sethanath
Halfling
Posts: 46
Joined: Fri Dec 09, 2016 6:43 pm

Re: Installing OGRE on Ubuntu 14.04 (Trusty Tahr)

Post by sethanath » Sun Dec 11, 2016 10:57 pm

Do you have similar instruction, but for "Building Ogre3d from Source" on Linux Mint 18? I couldn't get mine to work.
I also want to use Netbeans IDE.

Thank you.
0 x

Post Reply