Difference between revisions of "MG/FreeBSD Compiling"

From MegaGlest
Jump to navigation Jump to search
 
m (→‎See also: adding categories)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Wikify}}
+
This page explains how to compile [[MegaGlest]] on FreeBSD.
Get the source from svn (trunk should be ok):
 
  
svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk megaglest
+
==Getting the source code==
 +
Install and use [[MG/Getting_The_Code|''Git to check out'']] the MegaGlest source code.
  
 +
==Build dependencies==
 +
Following build dependencies have to be met:
 +
<pre>
 +
aalib-1.4.r5_5autoconf-2.67
 +
autoconf-wrapper-20071109
 +
automake-1.9.6_4
 +
automake-wrapper-20071109
 +
cmake-2.8.3_1
 +
damageproto-1.2.0
 +
dri2proto-2.2
 +
expat-2.0.1_1
 +
fixesproto-4.1.1
 +
freealut-1.1.0_2
 +
jam-2.5_2
 +
kbproto-1.0.4
 +
libGL-7.4.4
 +
libGLU-7.4.4
 +
libX11-1.3.3_1,1
 +
libXau-1.0.5
 +
libXdamage-1.1.2
 +
libXdmcp-1.0.3
 +
libXext-1.1.1,1
 +
libXfixes-4.0.4
 +
libXrandr-1.3.0
 +
libXrender-0.9.5
 +
libXxf86vm-1.1.0
 +
libdrm-2.4.12_1
 +
libiconv-1.13.1_1
 +
libogg-1.2.0,4
 +
libpthread-stubs-0.3_3
 +
libvorbis-1.3.1,3
 +
libxcb-1.7
 +
lua-5.1.4_5
 +
m4-1.4.15,1
 +
openal-soft-1.12.854_1
 +
perl-5.10.1_2
 +
pkg-config-0.25_1
 +
randrproto-1.3.1
 +
renderproto-0.11
 +
sdl-1.2.14_2,2
 +
xerces-c2-2.7.0_1
 +
xextproto-7.1.1
 +
xf86vidmodeproto-2.3
 +
xproto-7.0.16
 +
wxgtk2-unicode-2.8.10_4</pre>
  
 +
==Compilation==
 +
Recently the build system was changed to cmake. Therefor you should just have to do:
 +
./build-mg.sh
 +
in the megaglest directory.
  
or the source tarball from version 3.3.7_beta3 or above.
+
===Old method===
 
+
If you are going to compile from older version of the source tree, with jam, read on.
 
 
BUILD DEPENDENCIES:
 
 
 
Following build deps have to be met:
 
 
 
B-deps:<br />aalib-1.4.r5_5 autoconf-2.67 autoconf-wrapper-20071109 automake-1.9.6_4 \<br />automake-wrapper-20071109 damageproto-1.2.0 dri2proto-2.2 expat-2.0.1_1 \<br />fixesproto-4.1.1 freealut-1.1.0_2 jam-2.5_2 kbproto-1.0.4 libGL-7.4.4 libGLU-7.4.4 \<br />libX11-1.3.3_1,1 libXau-1.0.5 libXdamage-1.1.2 libXdmcp-1.0.3 libXext-1.1.1,1 \<br />libXfixes-4.0.4 libXrandr-1.3.0 libXrender-0.9.5 libXxf86vm-1.1.0 libdrm-2.4.12_1 \<br />libiconv-1.13.1_1 libogg-1.2.0,4 libpthread-stubs-0.3_3 libvorbis-1.3.1,3 libxcb-1.7 \<br />lua-5.1.4_5 m4-1.4.15,1 openal-soft-1.12.854_1 perl-5.10.1_2 pkg-config-0.25_1 \<br />randrproto-1.3.1 renderproto-0.11 sdl-1.2.14_2,2 xerces-c2-2.7.0_1 xextproto-7.1.1 \<br />xf86vidmodeproto-2.3 xproto-7.0.16 wxgtk2-unicode-2.8.10_4
 
 
 
Install these package e.g. from ports tree.
 
 
 
'''ATTENTION: jam is needed to build MegaGlest, not make'''
 
 
 
go to megaglest/mk/linux and run autogen.sh
 
 
 
  
 +
go to megaglest/mk/linux and run
 
  ./autogen.sh
 
  ./autogen.sh
 
 
next call the configure script this way:
 
next call the configure script this way:
 
 
  ./configure --with-libxerces=/usr/local --with-libOpenAL=/usr/local --with-libLibPng=/usr/local \
 
  ./configure --with-libxerces=/usr/local --with-libOpenAL=/usr/local --with-libLibPng=/usr/local \
 
  --with-libLibJPEG=/usr/local --with-libLibCurl=/usr/local --with-libLibX11=/usr/local \
 
  --with-libLibJPEG=/usr/local --with-libLibCurl=/usr/local --with-libLibX11=/usr/local \
Line 34: Line 69:
 
If this has finnished successfully without errors and a message like this:
 
If this has finnished successfully without errors and a message like this:
  
'''Notice: This project uses jam (and not make) as build tool.'''
+
'''Notice: This project uses jam (and not make) as build tool.''' Type in:
 +
jam
  
type in:
+
If everything went well the last lines of the output of jam should look like this:
  
 
+
  LinkApplication glest_configurator
  jam
+
...updated 257 target(s)...
 
 
If everything went well the last lines of the output of jam should look like this:<br />[....]<br />LinkApplication glest_configurator<br />...updated 257 target(s)...
 
  
 
You should create under megaglest/mk/linux a new folder:
 
You should create under megaglest/mk/linux a new folder:
 
 
  mkdir mydata
 
  mkdir mydata
  
Line 55: Line 88:
 
  ln -s ../tutorials
 
  ln -s ../tutorials
  
 +
Now you can start MegaGlest by typing within the folder megaglest/mk/linux
 +
./glest.bin
  
 +
===Alternative method===
 +
*Retrieve two files from the [http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/155111 corresponding PR].
 +
*Get the [http://www.freebsd.org/cgi/query-pr.cgi?prp=155111-1-txt&n=/megaglest.shar megaglest.shar] and the [http://www.freebsd.org/cgi/query-pr.cgi?prp=155111-2-txt&n=/megaglest-data.shar megaglest-data.shar] files.
  
 +
As root user, copy or move these files to <tt>/usr/ports/games</tt> and execute them:
 +
  sh megaglest.shar
 +
  sh megaglest-data.shar
  
Now you can start MegaGlest by typing within the folder megaglest/mk/linux
+
After that you'll find two new directories under <tt>/usr/ports/games</tt>: <tt>megaglest</tt> and <tt>megaglest-data</tt>
 +
 
 +
Go to <tt>/usr/ports/games/megaglest</tt> and install it like any other port by typing:
 +
  cd /usr/ports/games/megaglest ; make install clean
  
 +
After build and installation has finished successfully you should be able to start MegaGlest by typing:
 +
megaglest
  
./glest.bin
+
==See Also==
 +
*[[MegaGlest]]
 +
*[[MG/Linux Compiling|Linux Compiling]]
 +
*[[MG/Windows Compiling|Windows Compiling]]
 +
*[[MG/Mac Compiling|Mac Compiling]]
 +
[[Category:MG]]
 +
[[Category:Compiling]]
 +
[[Category:Development]]

Latest revision as of 05:07, 19 June 2016

This page explains how to compile MegaGlest on FreeBSD.

Getting the source code[edit]

Install and use Git to check out the MegaGlest source code.

Build dependencies[edit]

Following build dependencies have to be met:

aalib-1.4.r5_5autoconf-2.67
autoconf-wrapper-20071109
automake-1.9.6_4
automake-wrapper-20071109
cmake-2.8.3_1
damageproto-1.2.0
dri2proto-2.2
expat-2.0.1_1
fixesproto-4.1.1
freealut-1.1.0_2
jam-2.5_2
kbproto-1.0.4
libGL-7.4.4
libGLU-7.4.4
libX11-1.3.3_1,1
libXau-1.0.5
libXdamage-1.1.2
libXdmcp-1.0.3
libXext-1.1.1,1
libXfixes-4.0.4
libXrandr-1.3.0
libXrender-0.9.5
libXxf86vm-1.1.0
libdrm-2.4.12_1
libiconv-1.13.1_1
libogg-1.2.0,4
libpthread-stubs-0.3_3
libvorbis-1.3.1,3
libxcb-1.7
lua-5.1.4_5
m4-1.4.15,1
openal-soft-1.12.854_1
perl-5.10.1_2
pkg-config-0.25_1
randrproto-1.3.1
renderproto-0.11
sdl-1.2.14_2,2
xerces-c2-2.7.0_1
xextproto-7.1.1
xf86vidmodeproto-2.3
xproto-7.0.16
wxgtk2-unicode-2.8.10_4

Compilation[edit]

Recently the build system was changed to cmake. Therefor you should just have to do:

./build-mg.sh

in the megaglest directory.

Old method[edit]

If you are going to compile from older version of the source tree, with jam, read on.

go to megaglest/mk/linux and run

./autogen.sh

next call the configure script this way:

./configure --with-libxerces=/usr/local --with-libOpenAL=/usr/local --with-libLibPng=/usr/local \
--with-libLibJPEG=/usr/local --with-libLibCurl=/usr/local --with-libLibX11=/usr/local \
--with-ogg-includes=/usr/local --with-vorbis=/usr/local --with-ogg=/usr/local \
--with-ogg-libraries=/usr/local/lib --with-ogg-includes=/usr/local/include \
--with-wx-config=/usr/local/bin/wxgtk2u-2.8-config

If this has finnished successfully without errors and a message like this:

Notice: This project uses jam (and not make) as build tool. Type in:

jam

If everything went well the last lines of the output of jam should look like this:

LinkApplication glest_configurator
...updated 257 target(s)...

You should create under megaglest/mk/linux a new folder:

mkdir mydata

and create some symlinks within

ln -s ../scenarios
ln -s ../data
ln -s ../maps
ln -s ../tilesets
ln -s ../techs
ln -s ../tutorials

Now you can start MegaGlest by typing within the folder megaglest/mk/linux

./glest.bin

Alternative method[edit]

As root user, copy or move these files to /usr/ports/games and execute them:

 sh megaglest.shar
 sh megaglest-data.shar

After that you'll find two new directories under /usr/ports/games: megaglest and megaglest-data

Go to /usr/ports/games/megaglest and install it like any other port by typing:

 cd /usr/ports/games/megaglest ; make install clean

After build and installation has finished successfully you should be able to start MegaGlest by typing:

megaglest

See Also[edit]