summaryrefslogtreecommitdiff
path: root/html/en
diff options
context:
space:
mode:
authorscuri <scuri>2010-08-02 18:59:41 +0000
committerscuri <scuri>2010-08-02 18:59:41 +0000
commit34899059fd513326677565cd04886ec497b27931 (patch)
tree977e3a1fe312200b51a06332b0fe0506eb9101ed /html/en
parent25a0766e11bd06a84e8c60a586881db0dd3279ca (diff)
*** empty log message ***
Diffstat (limited to 'html/en')
-rw-r--r--html/en/building.html119
-rw-r--r--html/en/guide.html2
2 files changed, 121 insertions, 0 deletions
diff --git a/html/en/building.html b/html/en/building.html
new file mode 100644
index 0000000..32b6691
--- /dev/null
+++ b/html/en/building.html
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
+<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
+<head>
+<meta http-equiv="Content-Language" content="en-us">
+<title>Guide</title>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<link rel="stylesheet" type="text/css" href="../style.css">
+</head>
+<body>
+
+<h1 align="center" style="text-align:center">Building Lua, IM, CD and IUP in
+Linux</h1>
+<p>This is a guide to build all the Lua, IM, CD and IUP libraries in Linux.
+Notice that you may not use all the libraries, but this guide will build all of
+them. Later on it is explained how to build a single library.</p>
+<h3>System Configuration</h3>
+<p>You will have to download the development version of some packages installed
+on your system. Although the run time version of some of these packages are
+already installed, the development versions are usually not. The packages
+described here are for Ubuntu, but you will be able to identify them for other
+systems as well.</p>
+<p>To build Lua you will need:</p>
+ <pre>libreadline5-dev</pre>
+ <p>To build IM you will need:</p>
+ <pre>g++</pre>
+ <p>To build CD you will need:</p>
+<pre>libx11-dev
+libxpm-dev
+libxmu-dev
+ libxft-dev (for the XRender driver, OPTIONAL)
+libgtk2.0-dev (for the GDK driver)</pre>
+
+<p>To build IUP you will need:</p>
+<pre>libgtk2.0-dev (for the GTK driver) [already installed for CD]
+ libmotif-dev and x11proto-print-dev (for the Motif driver, OPTIONAL)
+libgl1-mesa-dev and libglu1-mesa-dev (for the IupGLCanvas)</pre>
+<h3>Download</h3>
+<p>Download the &quot;xxx-X.X_Sources.tar.gz&quot; package from the &quot;<strong>Docs and Sources</strong>&quot;
+folder for the version you want to build. Here are links for the <strong>Files</strong> section
+in <strong>Source Forge</strong>:</p>
+<p>Lua - <a href="http://sourceforge.net/projects/luabinaries/files/">
+http://sourceforge.net/projects/luabinaries/files/</a><br>
+IM - <a href="http://sourceforge.net/projects/imtoolkit/files/">
+http://sourceforge.net/projects/imtoolkit/files/</a><br>
+CD - <a href="http://sourceforge.net/projects/canvasdraw/files/">
+http://sourceforge.net/projects/canvasdraw/files/</a><br>
+IUP - <a href="http://sourceforge.net/projects/iup/files/">
+http://sourceforge.net/projects/iup/files/</a></p>
+<h3>Lua</h3>
+<p>Although we use Lua from LuaBinaries, any Lua installation can also be used.
+But you will have to define some environment variables before building IM, CD and
+IUP. Here is an example:</p>
+<pre class="example">export LUA_SUFFIX=
+export LUA_INC=/usr/local/include [actually NOT necessary, this one is already used by gcc/g++]
+export LUA_LIB=/usr/local/lib [ &quot; ]
+export LUA_BIN=/usr/local/bin [necessary because luac will not be used from the PATH]</pre>
+<p>The tools <strong>bin2c</strong> and <strong>luac</strong> are necessary only if you need to rebuild LOH files.
+But since the source packages already includes them, those tools are in fact not
+necessary.</p>
+<h3>Unpacking</h3>
+<p>If you are going to build all the libraries, the makefiles and projects
+expect the following directory tree:</p>
+<pre>/xxxx/
+ iup/
+ cd/
+ im/
+ lua5.1/ [optional]</pre>
+
+<p>So, unpack all the source packages in the same folder that will do fine.</p>
+<h3>Building</h3>
+
+<p>As a general rule (excluding system dependencies): IUP depends on CD and IM,
+and CD depends on IM. So start by build IM, then CD, then IUP.</p>
+<p>To start building go the the &quot;<strong>src</strong>&quot; folder and type &quot;<strong>make</strong>&quot;. In IUP there are
+many &quot;srcxxx&quot; folders, so go to the up folder &quot;iup&quot; and type
+&quot;<strong>make</strong>&quot; that all the
+sub folders will be built.</p>
+<p>Instead of building all the libraries, try building only the libraries you
+are going to use. The provided makefiles will build all the libraries, but take
+a look inside them and you will figure out how to build just one library. </p>
+<h3>Installation</h3>
+
+<p>After building you can copy the libraries files to the system folder. This is
+not necessary since you can use -I and -L on your makefiles, but it can be done.
+If you are inside one of the libraries main folder you can type:</p>
+<pre>cp lib/Linux26g4/* /usr/local/lib
+cp include/* /usr/local/include</pre>
+<p>This will copy run time and development files. If you just want the run time,
+then do simply:</p>
+<pre>cp lib/Linux26g4/*.so /usr/local/lib</pre>
+<p>Also when coping development folders, if you want to keep the library headers
+in a separate folder, you can do:</p>
+<pre>cp -R iup/include /usr/local/include/iup
+cp -R cd/include /usr/local/include/cd
+cp -R im/include /usr/local/include/im</pre>
+<p>Then use in your makefile -Iiup -Icd -Iim.</p>
+<p>This installation procedure also can be used for the pre-compiled binaries
+packages available for download. They contain the development and run time files
+you need. </p>
+<p>If you <strong>don't</strong> want to copy the libraries to your system
+folder, you can still use them, but you will need to add the binaries folders to
+the LD_LIBRARY_PATH, for example:</p>
+<pre>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xxxx/iup/lib/Linux26g4:/xxxx/cd/lib/Linux26g4:/xxxx/im/lib/Linux26g4</pre>
+<p>In this case, in your makefile will will also need to specify those paths
+when linking using -L/xxxx/iup/lib/Linux26g4.</p>
+<h4>Lua</h4>
+<p>If you are NOT using LuaBinaries then you have two options to be able to use
+&quot;require&quot; with these libraries. You can create symbolic links in the Lua C
+modules folder to the installed libraries run time:</p>
+<pre>ln -s /usr/local/lib/lipiuplua51.so /usr/local/lib/lua/5.1/iuplua.so
+ln -s /usr/local/lib/lipiupluacontrols51.so /usr/local/lib/lua/5.1/iupluacontrols.so
+...</pre>
+<p>You can set the LUA_CPATH environment variable:</p>
+<pre>export LUA_CPATH=./\?.so\;./lib\?.so\;./lib\?51.so\;
+</pre>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/html/en/guide.html b/html/en/guide.html
index 6905890..f918cfa 100644
--- a/html/en/guide.html
+++ b/html/en/guide.html
@@ -74,6 +74,8 @@ command line on the &quot;src&quot; folder and all libraries and executables wil
build.
Set the TECTOOLS_HOME environment variable to the folder were the Lua libraries
are installed, by default it will assume &quot;TECTOOLS_HOME=../..&quot;.</p>
+<p>In Linux, check the &quot;<a href="../../../iup/html/en/building.html">Building Lua, IM, CD and IUP in
+Linux</a>&quot; guide.</p>
<p>In Windows, the easiest way to build everything is to install the Tecmake tool into your system. It is easy and helps a lot.
The Tecmake configuration files (*.mak) available at the &quot;src&quot; folder are very easy to understand also.
Also there are files named