Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25519
Modified Files:
ChangeLog configure.py wolfpack.pro
Log Message:
Updates
MySQL checking.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ChangeLog 4 Aug 2004 22:51:15 -0000 1.2
--- ChangeLog 5 Aug 2004 21:21:15 -0000 1.3
***************
*** 26,29 ****
--- 26,30 ----
(See Anti Speed Hack settings in the General group)
- New Windows Release builds should now include MySQL support by default.
+ - Added some additional checking to wolfpack.pro
Wolfpack 12.9.7 Beta (4. July 2004)
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.201
retrieving revision 1.202
diff -C2 -d -r1.201 -r1.202
*** wolfpack.pro 5 Aug 2004 20:14:52 -0000 1.201
--- wolfpack.pro 5 Aug 2004 21:21:15 -0000 1.202
***************
*** 6,20 ****
#################################################################
PROJECT = wolfpack
TARGET = wolfpack
TEMPLATE = app
! CONFIG += qt thread exceptions rtti debug
unix {
- debug {
- message( "Debugging is enabled!" )
- DEFINES +=_DEBUG _AIDEBUG
- }
QMAKE_LIBDIR_FLAGS = -L/usr/lib -L/usr/local/lib
LIBS = -ldl -lutil
--- 6,18 ----
#################################################################
+ include( config.pri )
+
PROJECT = wolfpack
TARGET = wolfpack
TEMPLATE = app
! CONFIG += qt thread exceptions rtti
unix {
QMAKE_LIBDIR_FLAGS = -L/usr/lib -L/usr/local/lib
LIBS = -ldl -lutil
***************
*** 28,51 ****
# MySQL Checks
! isEmpty( MYSQL_INCDIR ) {
! message( "Warning: MYSQL_INCDIR was not defined!" )
exists( /usr/local/include/mysql/mysql.h ) {
message( "MySQL included found in: /usr/local/include/mysql" )
! MYSQL_INCDIR = /usr/local/include/mysql
}
else:exists( /usr/include/mysql/mysql.h ) {
message( "MySQL included found in: /usr/include/mysql" )
! MYSQL_INCDIR = /usr/include/mysql
}
}
! isEmpty( MYSQL_LIBDIR ) {
! message( "Warning: MYSQL_LIBDIR was not defined!" )
exists( /usr/local/lib/mysql/libmysqlclient.so ) {
message( "Found libmysqlclient.so in: /usr/local/lib/mysql" )
! MYSQL_LIBDIR = -L/usr/local/lib/mysql -lmysqlclient
}
else:exists( /usr/lib/mysql/libmysqlclient.so ) {
message( "Found libmysqlclient.so in: /usr/lib/mysql" )
! MYSQL_LIBDIR = -L/usr/lib/mysql -lmysqlclient
}
--- 26,49 ----
# MySQL Checks
! isEmpty( MySQL_INCDIR ) {
! message( "Warning: MySQL_INCDIR was not defined!" )
exists( /usr/local/include/mysql/mysql.h ) {
message( "MySQL included found in: /usr/local/include/mysql" )
! MySQL_INCDIR = /usr/local/include/mysql
}
else:exists( /usr/include/mysql/mysql.h ) {
message( "MySQL included found in: /usr/include/mysql" )
! MySQL_INCDIR = /usr/include/mysql
}
}
! isEmpty( MySQL_LIBDIR ) {
! message( "Warning: MySQL_LIBDIR was not defined!" )
exists( /usr/local/lib/mysql/libmysqlclient.so ) {
message( "Found libmysqlclient.so in: /usr/local/lib/mysql" )
! MySQL_LIBDIR = -L/usr/local/lib/mysql -lmysqlclient
}
else:exists( /usr/lib/mysql/libmysqlclient.so ) {
message( "Found libmysqlclient.so in: /usr/lib/mysql" )
! MySQL_LIBDIR = -L/usr/lib/mysql -lmysqlclient
}
***************
*** 111,116 ****
}
! INCLUDEPATH += $$PY_INCDIR $$MYSQL_INCDIR $$SQLITE_INCDIR
! LIBS += $$PY_LIBDIR $$MYSQL_LIBDIR $$SQLITE_LIBDIR
# We need to remove these to be safe
--- 109,114 ----
}
! INCLUDEPATH += $$PY_INCDIR $$MySQL_INCDIR $$SQLITE_INCDIR
! LIBS += $$PY_LIBDIR $$MySQL_LIBDIR $$SQLITE_LIBDIR
# We need to remove these to be safe
***************
*** 374,376 ****
unix {
INCPATH -= /usr/include/python2.2
! }
\ No newline at end of file
--- 372,376 ----
unix {
INCPATH -= /usr/include/python2.2
! }
!
! message( "For additional options please try executing: python configure.py" )
Index: configure.py
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/configure.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** configure.py 5 Aug 2004 20:14:52 -0000 1.14
--- configure.py 5 Aug 2004 21:21:15 -0000 1.15
***************
*** 20,23 ****
--- 20,26 ----
py_incpath = ""
qt_qmake = ""
+ mysql_libpath = ""
+ mysql_libfile = ""
+ mysql_incpath = ""
sys.stdout.write( "Wolfpack configure script\n" )
***************
*** 64,67 ****
--- 67,130 ----
return True
+ def checkMySQL(options):
+ if sys.platform == "win32":
+ MySQL_LIBSEARCHPATH = [ sys.prefix + "\Libs\mysqlclient*.lib" ]
+ MySQL_INCSEARCHPATH = [ sys.prefix + "\include\mysql.h" ]
+ elif sys.platform == "linux2":
+ MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \
+ "/usr/lib/mysql/libmysqlclient*.so", \
+ "/usr/local/lib/libmysqlclient*.so", \
+ "/usr/lib/libmysqlclient*.so" ]
+ MySQL_LIBSTATICSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.a", \
+ "/usr/lib/mysql/libmysqlclient*.a", \
+ "/usr/local/lib/libmysqlclient*.a", \
+ "/usr/lib/libmysqlclient*.a" ]
+ MySQL_INCSEARCHPATH = [ "/usr/local/include/mysql/mysql.h", \
+ "/usr/include/mysql/mysql.h", \
+ "/usr/local/include/mysql.h", \
+ "/usr/include/mysql.h" ]
+ elif sys.platform == "freebsd4":
+ MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \
+ "/usr/lib/mysql/libmysqlclient*.so", \
+ "/usr/local/lib/libmysqlclient*.so", \
+ "/usr/lib/libmysqlclient*.so" ]
+ MySQL_LIBSTATICSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.a", \
+ "/usr/lib/mysql/libmysqlclient*.a", \
+ "/usr/local/lib/libmysqlclient*.a", \
+ "/usr/lib/libmysqlclient*.a" ]
+ MySQL_INCSEARCHPATH = [ "/usr/local/include/mysql/mysql.h", \
+ "/usr/include/mysql/mysql.h", \
+ "/usr/local/include/mysql.h", \
+ "/usr/include/mysql.h" ]
+ else:
+ sys.stdout.write("ERROR: Unknown platform %s to checkMySQL()" % sys.platform )
+ sys.exit()
+
+ # if --static
+ if options.staticlink:
+ MySQL_LIBSEARCHPATH = MySQL_LIBSTATICSEARCHPATH
+
+ global mysql_libpath
+ global mysql_libfile
+
+ mysql_libfile, mysql_libpath = findFile( MySQL_LIBSEARCHPATH )
+ if ( mysql_libfile ):
+ sys.stdout.write("%s\n" % os.path.join( py_libpath, py_libfile ) )
+ else:
+ sys.stdout.write("Not Found!\n")
+ sys.exit()
+
+ global mysql_incpath
+ mysql_incfile = None
+ sys.stdout.write( "Searching for Python includes... " )
+ mysql_incfile, mysql_incpath = findFile( MySQL_INCSEARCHPATH )
+ if ( mysql_incfile ):
+ sys.stdout.write( "%s\n" % mysql_incpath )
+ else:
+ sys.stdout.write("Not Found!\n")
+ sys.exit()
+
+ return True
+
def checkPython(options):
if sys.platform == "win32":
***************
*** 103,109 ****
sys.exit()
! # if --static
if options.staticlink:
! PYTHONLIBSEARCHPATH = PYTHONLIBSTATICSEARCHPATH
# if it was overiden...
--- 166,172 ----
sys.exit()
! # if --static
if options.staticlink:
! PYTHONLIBSEARCHPATH = PYTHONLIBSTATICSEARCHPATH
# if it was overiden...
***************
*** 123,136 ****
sys.stdout.write( "Checking unicode support... " )
if sys.maxunicode > 65535:
! sys.stdout.write( "failed\n" )
! sys.stdout.write( "Wolfpack currently requires python to be compiled with UCS2, its compiled with UCS4\n" )
! sys.exit();
! else:
! sys.stdout.write( "ok\n" )
! sys.stdout.write( "Checking CPU byte order... %s" % sys.byteorder )
! if sys.byteorder != 'little':
! sys.stdout.write("\nError: Wolfpack currently only supports little endian systems\n" )
! sys.exit();
sys.stdout.write( "Searching for Python library... " )
--- 186,199 ----
sys.stdout.write( "Checking unicode support... " )
if sys.maxunicode > 65535:
! sys.stdout.write( "failed\n" )
! sys.stdout.write( "Wolfpack currently requires python to be compiled with UCS2, its compiled with UCS4\n" )
! sys.exit();
! else:
! sys.stdout.write( "ok\n" )
! sys.stdout.write( "Checking CPU byte order... %s" % sys.byteorder )
! if sys.byteorder != 'little':
! sys.stdout.write("\nError: Wolfpack currently only supports little endian systems\n" )
! sys.exit();
sys.stdout.write( "Searching for Python library... " )
***************
*** 167,174 ****
parser.add_option("--python-libraries", dest="py_libpath", help="Python library path")
parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt")
! parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries")
(options, args) = parser.parse_args()
checkPython(options)
checkQt()
--- 230,241 ----
parser.add_option("--python-libraries", dest="py_libpath", help="Python library path")
parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt")
! parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries")
! parser.add_option("--enable-debug", action="store_true", dest="enable_debug", help="Enables basic debugging support.")
! parser.add_option("--enable-aidebug", action="store_true", dest="enable_aidebug", help="Enabled debugging of NPC AI.")
! parser.add_option("--enable-mysql", action="store_true", dest="enable_mysql", help="Enables MySQL support.")
(options, args) = parser.parse_args()
checkPython(options)
+ checkMySQL(options)
checkQt()
***************
*** 178,181 ****
--- 245,251 ----
global py_incpath
global qt_qmake
+ global mysql_libpath
+ global mysql_libfile
+ global mysql_incpath
config = file("config.pri", "w")
***************
*** 183,195 ****
config.write("# any changes to this file will be lost!\n")
! config.write("INCLUDEPATH += %s\n" % ( py_incpath ) )
! # Build LIBS
! LIBS = ""
if sys.platform == "win32":
! LIBS = os.path.join( py_libpath, py_libfile )
else:
! LIBS = "-l%s -L%s" % ( py_libfile, py_libpath )
! config.write("LIBS += %s\n" % LIBS)
config.close()
--- 253,287 ----
config.write("# any changes to this file will be lost!\n")
! # Build Python LIBS and Includes
! PY_LIBDIR = ""
if sys.platform == "win32":
! PY_LIBDIR = os.path.join( py_libpath, py_libfile )
else:
! PY_LIBDIR = "-lpython2.3 -L%s" % ( py_libpath )
! config.write("PY_INCDIR = %s\n" % ( py_incpath ) )
! config.write("PY_LIBDIR = %s\n" % PY_LIBDIR)
!
! # Build MySQL Libs
! MySQL_LIBDIR = ""
! if sys.platform == "win32":
! MySQL_LIBDIR = os.path.join( mysql_libpath, mysql_libfile )
! else:
! MySQL_LIBDIR = "-lmysqlclient -L%s" % ( mysql_libpath )
! config.write("MySQL_INCDIR = %s\n" % mysql_incpath )
! config.write("MySQL_LIBDIR = %s\n" % MySQL_LIBDIR )
!
! DEFINES = ""
! CONFIG = ""
! # if --debug
! if options.enable_debug:
! DEFINES += "_DEBUG "
! CONFIG += "debug "
! # if --aidebug
! if options.enable_aidebug:
! DEFINES += "_AIDEBUG "
!
! config.write("DEFINES += %s\n" % DEFINES)
! config.write("CONFIG += %s\n" % CONFIG)
config.close()
***************
*** 203,205 ****
if __name__ == "__main__":
! main()
--- 295,297 ----
if __name__ == "__main__":
! main()
|