1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: OS2</TITLE>
<META NAME="description" CONTENT="Crystal Space: OS2">
<META NAME="keywords" CONTENT="Crystal Space: OS2">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC105"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_36.html#SEC104"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_38.html#SEC107"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_30.html#SEC98"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_19.html#SEC29"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_43.html#SEC117"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 2.4.5 OS/2 </H3>
<!--docid::SEC105::-->
<P>
<EM>Written by Andrew Zabolotny, <A HREF="mailto:bit@eltech.ru">Andrew Zabolotny</A>.</EM>
</P><P>
This section contains configuration, compilation, and installation
instructions for the OS/2 port of Crystal Space, which was created, and is
maintained by Andrew Zabolotny (<A HREF="mailto:bit@eltech.ru">bit@eltech.ru</A>). Details of the
internals of the OS/2 port are also available, <A HREF="cs_257.html#SEC623">8.1.2 OS/2</A>
</P><P>
Currently Crystal Space compiles under OS/2 only with GNU C/C++
compiler. Theoretically it can be done with VisualAge and Watcom compilers
(almost) as well, but you will have to do it all yourself. Besides, currently
assembler optimizations are available only for GNU C/C++ compiler (they
uses GAS syntax) so most likely you anyway will want to use GCC.
Also you may consider using Pentium-optimizing GCC (PGCC) instead of
simple GCC which can be found at <A HREF="http://goof.com/pcg/os2">http://goof.com/pcg/os2</A>. Also
you need the EMX package; you need at least EMX tools (like
`<TT>emximp</TT>'), include files and C libraries.
</P><P>
Crystal Space provides support for MMX instructions; GAS 2.6 which
is shipped with as-of-today-latest EMX 0.9c does not; so you will need
GAS 2.8.1 or later compiled for OS/2. You can find a pre-compiled
binary on the above web page.
</P><P>
Also you will need GNU `<SAMP>make</SAMP>' (you should have it already if you're
using GCC). You will also need GNU `<SAMP>sed</SAMP>' if you want to make
dependency files (you can get Crystal Space up and running without them as
well, but you will want them if you're going to make changes to source code).
You also will need a Unix-like shell (for example, `<SAMP>bash</SAMP>') for this since
`<TT>cmd.exe</TT>' locks up with long command lines (Crystal Space sometimes
generates 1K and even more!) and redirection. You will need to use this
shell only when building dependencies.
</P><P>
You will need a Resource Compiler (which is bundled with the OS/2 itself,
during installation you should click the `<SAMP>Development tools</SAMP>' checkbox or
so). Also it is available in OS/2 Toolkit.
</P><P>
OS/2 makefile allows both Unix-like shells and OS/2's standard
`<TT>cmd.exe</TT>' to be used. By default it is configured for cmd.exe since it
is faster. You can switch shells by changing the `<SAMP>SHELL=</SAMP>' line in
`<TT>makefile.os2</TT>'.
</P><P>
You also will need IBM OS/2 Toolkit for DIVE headers.
Theoretically it can be made with DIVE headers for EMX which can be
found on several sites.
</P><P>
You will also require `<SAMP>zlib</SAMP>' (de/compression library), `<SAMP>pnglib</SAMP>' (if
you're going to work with PNG files), and `<SAMP>libjpeg</SAMP>' (if you're going
to use JPEG format). PNG and JPG support are optional, but
highly recommended. See section <A HREF="cs_18.html#SEC25">2.3 External Libraries</A>.
</P><P>
<A NAME="SEC106"></A>
<H4> Compiling the Libraries </H4>
<!--docid::SEC106::-->
<P>
You will need to pre-compile at least `<SAMP>zlib</SAMP>' prior to compiling Crystal
Space itself. In the following I suppose you downloaded all three libraries;
however if you didn't download `<SAMP>libjpeg</SAMP>' or `<SAMP>libpng</SAMP>' simply skip
corresponding instructions.
</P><P>
Find and download (preferably latest) versions of `<SAMP>zlib</SAMP>', `<SAMP>pnglib</SAMP>'
and `<SAMP>libjpeg</SAMP>'. Unpack them into the `<TT>CS/</TT>' subdirectory; usually
they unpacks in a directory named something like `<TT>libjpeg-x.xx</TT>' or
`<TT>zlib-x.xx</TT>' where `<SAMP>x.xx</SAMP>' is current version number. You should
rename them to `<TT>CS/libs/zlib</TT>', `<TT>CS/libs/libjpeg</TT>' and
`<TT>CS/libs/libpng</TT>' so that Crystal Space will find them. You should have a
tree like:
</P><P>
The most recent `<SAMP>zlib</SAMP>' and `<SAMP>pnglib</SAMP>' already includes makefiles for
compiling them under OS/2 with EMX/GCC; even if you got a
library that does not, you can find all required makefiles in
`<TT>CS/libs/cssys/os2</TT>'. There is a `<TT>README</TT>' file in each directory
which will tell you what you should do; in short, for `<SAMP>zlib</SAMP>':
</P><P>
<TABLE><tr><td> </td><td class=example><pre>cd CS
xcopy /s libs\cssys\os2\zlib zlib
xcopy /s libs\cssys\os2\libpng libpng
xcopy /s libs\cssys\os2\libjpeg libjpeg
</pre></td></tr></table></P><P>
Now you should build each library:
</P><P>
<TABLE><tr><td> </td><td class=example><pre>cd zlib
make -f os2/makefile.os2 OMF=0
del *.o
make -f os2/makefile.os2 OMF=1
</pre></td></tr></table></P><P>
You should run `<SAMP>make</SAMP>' twice to build both `<TT>a.out</TT>' format libraries
(<CODE>OMF=0</CODE>) and OMF libraries (<CODE>OMF=1</CODE>). You also should delete
`<TT>.o</TT>' files between compilations since in any case makefiles builds
`<TT>.o</TT>' (not `<TT>.obj</TT>') files; however the final library will have
`<TT>.lib</TT>' or `<TT>.a</TT>' extension depending on format.
</P><P>
After compilation, you will have four copies of the `<SAMP>zlib</SAMP>' library, each
in a different format, as summarized by this table.
</P><P>
<BLOCKQUOTE>
<TABLE>
<TR><TD><CODE>z.dll</CODE> </TD><TD> Dynamic library.</TD>
</TR>
<TR><TD><CODE>z.a</CODE> </TD><TD> Static library in `<TT>a.out</TT>' format.</TD>
</TR>
<TR><TD><CODE>zdll.a</CODE> </TD><TD> Dynamic import library in `<TT>a.out</TT>' format.</TD>
</TR>
<TR><TD><CODE>z.lib</CODE> </TD><TD> Static library in OMF format.</TD>
</TR>
<TR><TD><CODE>zdll.lib</CODE> </TD><TD> Dynamic import library in OMF format.</TD>
</TR></TABLE>
</BLOCKQUOTE>
<P>
You can leave libraries in their place; you only will need to copy (or move)
`<TT>z.dll</TT>' into a directory somewhere on your `<SAMP>LIBPATH</SAMP>' if you're going
to use dynamic version of `<SAMP>zlib</SAMP>'. Also you can (but you aren't required
to) copy (or move) `<TT>.lib</TT>' and `<TT>.a</TT>' files into a directory on your
`<SAMP>LIBRARY_PATH</SAMP>' (say `<TT>f:/emx/lib</TT>') if you're going to use them in
other projects too (or to avoid recompiling zlib upon receiving of future
Crystal Space updates).
</P><P>
Similarly:
</P><P>
<TABLE><tr><td> </td><td class=example><pre>cd libpng
make -f makefile.os2 OMF=0
del *.o
make -f makefile.os2 OMF=1
cd libjpeg
make -f os2/makefile.os2 OMF=0
del *.o
make -f os2/makefile.os2 OMF=1
</pre></td></tr></table></P><P>
<A NAME="BeOS"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_36.html#SEC104"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_38.html#SEC107"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_30.html#SEC98"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_19.html#SEC29"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_43.html#SEC117"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>
|