Step 2: Compiling UOX3
uox3 compile on linux slackware :: UOX3 v0.98-3.7
-
My conf:
Slackware 10.1.0
gcc-4.0.2/configure --prefix=/usr/local --enable-languages=c,c++
-
0. pwd
(result: /home/uox3/)
1. cvs -z3 -d:pserver:
anonymous@openuo.cvs.sourceforge.net:/cvsroot/openuo co -P projects/uox3/source
2. cd projects/uox3/source
3.
http://downloads.ghost-home.de/uox3.tar.bz2 <- there is uox3/source -> mozilla/ folder , upload it to your projects/uox3/source dir.
after upload, chmod +x mozilla/js/src/Linux_All_DBG.OBJ/*
(NOT WORKING for compilation-> cvs -z3 -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -P mozilla/js/src)
4. mcedit socket_interface.h
// Replace str 38 #define INADDR_NONE with //#define INADDR_NONE in file socket_interface.h
5. touch configure.in
6. mcedit configure.in
// put this code to file configure.in:
AC_INIT(uox3.cpp)
AM_INIT_AUTOMAKE(uox3,0.97)
AC_PROG_CXX
AC_C_CONST
CXXFLAGS="-O2 -I./mozilla/js/src"
AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no)
if test "$enable_debug" = yes ; then
CXXFLAGS="$CXXFLAGS -g3"
AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
fi
dnl To enable debugger support, remove the "dnl" from the line 3 lines down
dnl and recompile the entire application
dnl CXXFLAGS="$CXXFLAGS -g"
AC_OUTPUT(Makefile)
// end of code
7. mcedit uoxlinux.h
// Replace str 4 #include <cstdlib.h> with #include <stdlib.h>
8. mcedit Makefile.am
// Add this cpp file to the list: PartySystem.cpp \
9. mcedit Makefile.in
// Add in all lists what you see there (3), -> PartySystem.cpp (like in list)
10. mcedit PartySystem.cpp
// Replace str 9,10 with: const int BIT_LEADER = 0 , const int BIT_LOOTABLE = 1
12. mcedit autogen.sh
// Replace str 21: gcc -g -c -DXP_UNIX *.c ; ar -r js32.a *.o
// with this:
// make -ref Makefile.ref
// ar -r js32.a Linux_All_DBG.OBJ/*.o Linux_All_DBG.OBJ/*.o
11. sh autogen.sh
12. make
DONE !!!
uox3@www:~/projects/uox3/source$
ls -la uox*
-rwxr-xr-x 1 uox3 users 5312412 2006-11-24 21:30
uox3*
-rw-r--r-- 1 uox3 users 98109 2006-09-20 08:24 uox3.cpp
-rw-r--r-- 1 uox3 users 2547 2006-03-16 09:33 uox3.h
-rw-r--r-- 1 uox3 users 766 2004-07-17 03:03 uox3.ico
-rw-r--r-- 1 uox3 users 150512 2006-11-24 21:27 uox3.o
-rw-r--r-- 1 uox3 users 1638 2006-03-06 02:47 uox3.rc
-rw-r--r-- 1 uox3 users 1070 2006-11-24 21:00 uoxlinux.h
-rw-r--r-- 1 uox3 users 5780 2006-07-01 23:45 uoxstruct.h
uox3@www:~/projects/uox3/source$
after compilation
upload all files from ->
all-in-one*.zip archive (download it from uox3.org)
then
$ rm uox3.exe
$ rm js32.dll
then copy linux binary
uox3 to folder where was uox3.exe
then need dos2unix some files from zip archive
cd to dir where is uox3 binary now..
download dos2unix soft
$ wget
http://primates.ximian.com/~fejj/dos2unix.c
$ gcc dos2unix.c -o dos2unix
then
$ find . -name "*.dfn" > a.sh
$ find . -name "*.uad" >> a.sh
$ find . -name "*.js" >> a.sh
$ find . -name "*.adm" >> a.sh
$ find . -name "*.ENG" >> a.sh
$ find . -name "*.FRE" >> a.sh
$ find . -name "*.UNK" >> a.sh
$ find . -name "*.ZRO" >> a.sh
then
$ mcedit a.sh
press F4 and replace all: ./
with: dos2unix ./
then
$ sh a.sh
$ dos2unix uox.ini
configure uox.ini paths and IP's
Gr33tz t0 Xuri :: on :: irc.freenode.org #uox3
Not working totaly, buggy..
bugs with: js/*.scp files..