Re #313 (Improve Windows binary installer) Multi-plateform speed-dreams-2 install / user settings folder prefix, executable name, and sd2-prefixed tools executables names to enable cohabitation with 1.4.x
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3261 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 47fb2bf5a83e7f44c489be6620bee6f1982b2208 Former-commit-id: 8a24125280d7cc601d83687a869b0d0065cbb90f
This commit is contained in:
parent
4b557e1ad7
commit
512c02157a
15 changed files with 684 additions and 88 deletions
|
@ -107,9 +107,6 @@ SD_INSTALL_FILES(DATA "/"
|
|||
FILES credits.xml
|
||||
CHANGES.txt COPYING.txt INSTALL.txt README.txt TODO.txt)
|
||||
|
||||
SD_INSTALL_FILES(BIN
|
||||
FILES sd-robotgen.sh)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(data)
|
||||
ADD_SUBDIRECTORY(cmake)
|
||||
|
@ -128,6 +125,17 @@ ELSE(WIN32)
|
|||
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake" )
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Ensure system run-time libs are installed under Windows (MSVC*80.dll and co.).
|
||||
# We do it ourselves, but use InstallRequiredSystemLibraries to figure out what they are
|
||||
IF(WIN32)
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
||||
INSTALL(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
DESTINATION ${SD_BINDIR_ABS})
|
||||
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Configure CPack.
|
||||
INCLUDE(cmake/packagemaker.cmake)
|
||||
|
||||
|
|
36
INSTALL.txt
36
INSTALL.txt
|
@ -62,11 +62,17 @@ The Speed Dreams Team.
|
|||
|
||||
a - uncompress the tarball :
|
||||
|
||||
$ tar xfvj speed-dreams-xxx.tar.bz2
|
||||
. if bzip2-compressed (the old way) :
|
||||
|
||||
$ tar xfvj speed-dreams-xxx.tar.bz2
|
||||
|
||||
. if 7z-compressed (the new way) :
|
||||
|
||||
$ 7zr x -so speed-dreams-xxx.tar.7z | tar xvf -
|
||||
|
||||
b - configure :
|
||||
|
||||
1. cd to the path where Speed-dreams sources are installed.
|
||||
1. cd to the path where Speed Dreams sources are installed.
|
||||
|
||||
$ cd <speed-dreams-source-tree>
|
||||
|
||||
|
@ -84,10 +90,10 @@ The Speed Dreams Team.
|
|||
|
||||
Example :
|
||||
|
||||
$ cmake -D TORCS_LOCALDIR:STRING=~/dev/.speed-dreams \
|
||||
-D CMAKE_INSTALL_PREFIX:PATH=/usr/local/dev \
|
||||
$ cmake -D SD_LOCALDIR:STRING=~/dev/.sd-settings \
|
||||
-D CMAKE_PREFIX_PATH:STRING=/usr/local
|
||||
-D CMAKE_BUILD_TYPE:STRING=Debug \
|
||||
-D OPTION_DEBUG:BOOL=ON
|
||||
-D OPTION_OFFICIAL_ONLY:BOOL=OFF
|
||||
|
||||
or else you can use ccmake to change the variables interactively :
|
||||
|
||||
|
@ -106,8 +112,14 @@ The Speed Dreams Team.
|
|||
|
||||
Usefull CMake variables for Speed Dreams :
|
||||
|
||||
- TORCS_LOCALDIR:STRING : User settings dir for run-time (def: ~/.speed-dreams)
|
||||
- OPTION_DEBUG:BOOL : Full run-time traces if ON (def: OFF)
|
||||
- SD_LOCALDIR:STRING : User settings dir for run-time (def: ~/.speed-dreams-2)
|
||||
- OPTION_DEBUG:BOOL : Full run-time traces if ON (def: OFF)
|
||||
- OPTION_TRACE_LEVEL:STRING : Run-time traces level integer threshold,
|
||||
only if OPTION_DEBUG (traces with higher level are
|
||||
not logged ; 0=Fatal, 1=Error, 2=Warning, 3=Info,
|
||||
4=Trace, 5=Debug, ...) (def: 5)
|
||||
- CMAKE_PREFIX_PATH:STRING : Path prefixes for additional 3rdParty libraries (def:empty)
|
||||
(use /usr/local if you compiled some 3rdParty libs yourself).
|
||||
- CMAKE_INSTALL_PREFIX:PATH : Install path (def: /usr/local)
|
||||
- CMAKE_BUILD_TYPE:STRING : Debug, Release, RelWithDebInfo, MinSizeRel (def: Release)
|
||||
|
||||
|
@ -128,11 +140,11 @@ The Speed Dreams Team.
|
|||
|
||||
if default CMake settings were kept, Speed Dreams is normally installed in /usr/local :
|
||||
|
||||
$ speed-dreams
|
||||
$ speed-dreams-2
|
||||
|
||||
or, if /usr/local/bin not already in your PATH :
|
||||
or, if /usr/local/games not already in your PATH :
|
||||
|
||||
$ /usr/local/bin/speed-dreams
|
||||
$ /usr/local/games/speed-dreams-2
|
||||
|
||||
3 - Runtime options
|
||||
|
||||
|
@ -208,7 +220,9 @@ Note: If you use an "Express" version, don't forget to install also the Windows
|
|||
or be ready for headaches.
|
||||
|
||||
|
||||
2) MS VC++ 6 no more supported.
|
||||
2) MinGW : We want it ! Who can take care of the port :-?
|
||||
|
||||
3) MS VC++ 6 : No more supported.
|
||||
|
||||
III - FreeBSD installation from sources
|
||||
---------------------------------------
|
||||
|
|
|
@ -48,9 +48,9 @@ or our Tracker (visit http://sourceforge.net/apps/trac and login to SF.net for t
|
|||
|
||||
Car Setups
|
||||
----------
|
||||
For the human player driver, the car parameters are located in the files :
|
||||
- Linux : ~/.speed-dreams-dev/drivers/human/car*.xml
|
||||
- Windows : <My documents>\speed-dreams-dev.settings\drivers\human\car*.xml
|
||||
You can have you own version on the car setups for the human driver
|
||||
- Linux : ~/.speed-dreams-2/drivers/human/...
|
||||
- Windows : <My documents>\speed-dreams-2.settings\human\...
|
||||
depending on the car used. You can change them with a text editor,
|
||||
for more information look into the robot tutorial chapter 5
|
||||
(http://www.berniw.org/torcs/robot/ch5/properties.html).
|
||||
|
|
|
@ -28,9 +28,9 @@ ENDIF(NOT DEFINED IN_SOURCETREE)
|
|||
|
||||
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
IF(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX "C:/Program files/speed-dreams-dev" CACHE PATH "Prefix prepended to install directories" FORCE)
|
||||
SET(CMAKE_INSTALL_PREFIX "C:/Program files" CACHE PATH "Prefix prepended to install directories" FORCE)
|
||||
ELSE()
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local/dev" CACHE PATH "Prefix prepended to install directories" FORCE)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Prefix prepended to install directories" FORCE)
|
||||
ENDIF()
|
||||
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
|
||||
|
@ -58,9 +58,15 @@ ELSE(IN_SOURCETREE)
|
|||
ENDIF(IN_SOURCETREE)
|
||||
|
||||
IF(WIN32)
|
||||
SET(SD_LOCALDIR "~/speed-dreams-dev.settings" CACHE DOC "Where the user settings files should go")
|
||||
SET(SD_LOCALDIR "~/speed-dreams-2.settings" CACHE DOC "Where the user settings files should go")
|
||||
ELSE(WIN32) #UNIX
|
||||
SET(SD_LOCALDIR "~/.speed-dreams-dev" CACHE DOC "Where the user settings files should go")
|
||||
SET(SD_LOCALDIR "~/.speed-dreams-2" CACHE DOC "Where the user settings files should go")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WIN32)
|
||||
SET(SD_TOOLS_EXECPREFIX "sd2-" CACHE DOC "Prefix for the tools executable names")
|
||||
ELSE(WIN32) #UNIX
|
||||
SET(SD_TOOLS_EXECPREFIX "sd2-" CACHE DOC "Prefix for the tools executable names")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(IN_SOURCETREE)
|
||||
|
@ -70,15 +76,15 @@ IF(IN_SOURCETREE)
|
|||
SET(_DEFLIBDIR "lib64")
|
||||
ENDIF()
|
||||
IF(WIN32)
|
||||
SET(SD_BINDIR bin CACHE PATH "Place where the executables should go")
|
||||
SET(SD_DATADIR data CACHE PATH "Place where all the static data files should go")
|
||||
SET(SD_LIBDIR ${_DEFLIBDIR} CACHE PATH "Place where the libraries should go")
|
||||
SET(SD_INCLUDEDIR include CACHE PATH "Place where the include files should go")
|
||||
SET(SD_BINDIR speed-dreams-2/bin CACHE PATH "Place where the executables should go")
|
||||
SET(SD_DATADIR speed-dreams-2/data CACHE PATH "Place where all the static data files should go")
|
||||
SET(SD_LIBDIR speed-dreams-2/${_DEFLIBDIR} CACHE PATH "Place where the libraries should go")
|
||||
SET(SD_INCLUDEDIR speed-dreams-2/include CACHE PATH "Place where the include files should go")
|
||||
ELSE(WIN32) #UNIX
|
||||
SET(SD_BINDIR games CACHE PATH "Place where the executables should go")
|
||||
SET(SD_DATADIR share/games/speed-dreams CACHE PATH "Place where all the static data files should go")
|
||||
SET(SD_LIBDIR ${_DEFLIBDIR}/games/speed-dreams CACHE PATH "Place where the libraries should go")
|
||||
SET(SD_INCLUDEDIR include/speed-dreams CACHE PATH "Place where the include files should go")
|
||||
SET(SD_DATADIR share/games/speed-dreams-2 CACHE PATH "Place where all the static data files should go")
|
||||
SET(SD_LIBDIR ${_DEFLIBDIR}/games/speed-dreams-2 CACHE PATH "Place where the libraries should go")
|
||||
SET(SD_INCLUDEDIR include/speed-dreams-2 CACHE PATH "Place where the include files should go")
|
||||
ENDIF(WIN32)
|
||||
ELSE(IN_SOURCETREE)
|
||||
SET(SD_DATADIR ${SD_DATADIR_ABS})
|
||||
|
@ -1045,14 +1051,14 @@ ENDMACRO(SD_INSTALL_TRACK TRACKNAME CATEGORY)
|
|||
# TARGETS : Targets to install
|
||||
# Examples:
|
||||
# SD_INSTALL_FILES(DATA drivers/bt FILES bt.xml logo.rgb)
|
||||
# Installs bt.xml and logo.rgb in ${prefix}/share/games/speed-dreams/drivers/bt
|
||||
# Installs bt.xml and logo.rgb in ${prefix}/${SD_DATADIR}/drivers/bt
|
||||
# SD_INSTALL_FILES(DATA config/raceman USER config/raceman FILES quickrace.xml endrace.xml)
|
||||
# Installs quickrace.xml and endrace.xml in ${prefix}/share/games/speed-dreams/drivers/bt
|
||||
# and copies the file to the users settings folder ~/.speed-dreams/config/raceman at startup.
|
||||
# Installs quickrace.xml and endrace.xml in ${prefix}/${SD_DATADIR}/drivers/bt
|
||||
# and copies the file to the users settings folder ${SD_LOCALDIR}/config/raceman at startup.
|
||||
# SD_INSTALL_FILES(LIB drivers/bt TARGETS bt.so)
|
||||
# Installs bt.so in ${prefix}/lib/speed-dreams/drivers/bt
|
||||
# Installs bt.so in ${prefix}/${SD_LIBDIR}/drivers/bt
|
||||
# SD_INSTALL_FILES(BIN TARGETS speed-dreams)
|
||||
# Installs the speed-dreams target in ${prefix}/games
|
||||
# Installs the speed-dreams target in ${prefix}/${SD_BINDIR}
|
||||
MACRO(SD_INSTALL_FILES)
|
||||
|
||||
SET(SD_INSTALL_FILES_SYNTAX "DATA,1,1,IS_DATA,DATA_PATH")
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
|
||||
##########################################################################################
|
||||
# Settings that are common to all target systems.
|
||||
|
||||
|
|
|
@ -469,7 +469,7 @@ void GfRestart(bool bHardwareMouse, bool bMultiTexturing)
|
|||
int argInd;
|
||||
|
||||
// Command name.
|
||||
sprintf(cmd, "%sspeed-dreams", GetBinDir());
|
||||
sprintf(cmd, "%sspeed-dreams-2", GetBinDir());
|
||||
#ifdef WIN32
|
||||
strcat(cmd, ".exe");
|
||||
#endif
|
||||
|
|
|
@ -12,13 +12,13 @@ IF (COMMAND cmake_policy)
|
|||
cmake_policy(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
ADD_EXECUTABLE(speed-dreams ${SD_SOURCES})
|
||||
ADD_EXECUTABLE(speed-dreams-2 ${SD_SOURCES})
|
||||
|
||||
ADD_SDLIB_LIBRARY(speed-dreams client confscreens learning raceengineclient racescreens tgf tgfclient)
|
||||
ADD_SDLIB_LIBRARY(speed-dreams-2 client confscreens learning raceengineclient racescreens tgf tgfclient)
|
||||
|
||||
ADD_PLIB_LIBRARY(speed-dreams sg ssg ul)
|
||||
ADD_DL_LIBRARY(speed-dreams)
|
||||
ADD_PLIB_LIBRARY(speed-dreams-2 sg ssg ul)
|
||||
ADD_DL_LIBRARY(speed-dreams-2)
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS speed-dreams)
|
||||
SD_INSTALL_FILES(BIN TARGETS speed-dreams-2)
|
||||
SD_INSTALL_FILES(INCLUDE FILES osspec.h)
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
INCLUDE(../../../cmake/macros.cmake)
|
||||
PROJECT(accc)
|
||||
|
||||
SET(ACCC_SOURCES ac3dgroup.cpp ac3dload.cpp mainaccc.cpp)
|
||||
SET(ACCC_SOURCES ac3dgroup.cpp ac3dload.cpp mainaccc.cpp)
|
||||
|
||||
ADD_SDLIB_INCLUDEDIR(portability)
|
||||
|
||||
ADD_EXECUTABLE(sd-accc ${ACCC_SOURCES})
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}accc ${ACCC_SOURCES})
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS sd-accc)
|
||||
SD_INSTALL_FILES(BIN TARGETS ${SD_TOOLS_EXECPREFIX}accc)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
INCLUDE(../../../cmake/macros.cmake)
|
||||
PROJECT(sd-menuview)
|
||||
PROJECT(menuview)
|
||||
|
||||
SET(MENUVIEW_SOURCES main.cpp previewmenu.cpp)
|
||||
|
||||
|
@ -14,26 +14,26 @@ if (COMMAND cmake_policy)
|
|||
endif(COMMAND cmake_policy)
|
||||
|
||||
IF(UNIX)
|
||||
ADD_EXECUTABLE(sd-menuview ${MENUVIEW_SOURCES} ../../linux/linuxspec.cpp)
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}menuview ${MENUVIEW_SOURCES} ../../linux/linuxspec.cpp)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF (WIN32)
|
||||
ADD_EXECUTABLE(sd-menuview ${MENUVIEW_SOURCES} ../../windows/windowsspec.cpp)
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}menuview ${MENUVIEW_SOURCES} ../../windows/windowsspec.cpp)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
ADD_SDLIB_LIBRARY(sd-menuview robottools tgf tgfclient client)
|
||||
ADD_SDLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}menuview robottools tgf tgfclient client)
|
||||
|
||||
|
||||
IF(OPENGL_FOUND)
|
||||
TARGET_LINK_LIBRARIES(sd-menuview ${OPENGL_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(${SD_TOOLS_EXECPREFIX}menuview ${OPENGL_LIBRARY})
|
||||
ENDIF(OPENGL_FOUND)
|
||||
|
||||
ADD_PNG_LIBRARY(sd-menuview)
|
||||
ADD_SDL_LIBRARY(sd-menuview)
|
||||
ADD_PNG_LIBRARY(${SD_TOOLS_EXECPREFIX}menuview)
|
||||
ADD_SDL_LIBRARY(${SD_TOOLS_EXECPREFIX}menuview)
|
||||
|
||||
ADD_PLIB_LIBRARY(sd-menuview sg ssg ul)
|
||||
ADD_DL_LIBRARY(sd-menuview)
|
||||
ADD_PLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}menuview sg ssg ul)
|
||||
ADD_DL_LIBRARY(${SD_TOOLS_EXECPREFIX}menuview)
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS sd-menuview)
|
||||
SD_INSTALL_FILES(BIN TARGETS ${SD_TOOLS_EXECPREFIX}menuview)
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@ PROJECT(nfs2ac)
|
|||
|
||||
SET(NFS2AC_SOURCES mainnfs2ac.cpp)
|
||||
|
||||
ADD_EXECUTABLE(sd-nfs2ac ${NFS2AC_SOURCES})
|
||||
SD_INSTALL_FILES(BIN TARGETS sd-nfs2ac)
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}nfs2ac ${NFS2AC_SOURCES})
|
||||
SD_INSTALL_FILES(BIN TARGETS ${SD_TOOLS_EXECPREFIX}nfs2ac)
|
||||
|
|
|
@ -10,12 +10,12 @@ IF (COMMAND cmake_policy)
|
|||
cmake_policy(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
ADD_EXECUTABLE(sd-nfsperf ${NFSPERF_SOURCES})
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}nfsperf ${NFSPERF_SOURCES})
|
||||
|
||||
ADD_SDLIB_LIBRARY(sd-nfsperf tgf txml)
|
||||
ADD_SDLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}nfsperf tgf txml)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(sd-nfsperf dl)
|
||||
TARGET_LINK_LIBRARIES(${SD_TOOLS_EXECPREFIX}nfsperf dl)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS sd-nfsperf)
|
||||
SD_INSTALL_FILES(BIN TARGETS ${SD_TOOLS_EXECPREFIX}nfsperf)
|
||||
|
|
572
src/tools/robots/robotgen.sh
Executable file
572
src/tools/robots/robotgen.sh
Executable file
|
@ -0,0 +1,572 @@
|
|||
#!/bin/bash
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# file : robotgen
|
||||
# created : Mon Jul 29 21:01:37 CEST 2002
|
||||
# copyright : (C) 2002 by Eric Espié
|
||||
# email : Eric.Espie@torcs.org
|
||||
# version : $Id: sd-robotgen.sh 3254 2011-01-09 22:17:22Z pouillot $
|
||||
#
|
||||
##############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
function usage() {
|
||||
echo "usage: robotgen -n <name> -a <author> -c <car> [-d description] [--gpl]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [ $# -ne 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
"-n")
|
||||
NAME=$2
|
||||
shift;;
|
||||
|
||||
"-a")
|
||||
AUTHOR=$2
|
||||
shift;;
|
||||
"-c")
|
||||
CAR=$2
|
||||
shift;;
|
||||
"-d")
|
||||
DESCRIPTION=$2
|
||||
shift;;
|
||||
"--gpl")
|
||||
GPL=yes
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "$NAME" ] || [ -z "$AUTHOR" ] || [ -z "$CAR" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
CATEGORY=$(grep category data/cars/models/$CAR/$CAR.xml | sed -e 's/^.*val=\"//' -e 's/\".*$//')
|
||||
|
||||
if [ -z "$CATEGORY" ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
echo "Generation of robot $NAME author $AUTHOR"
|
||||
|
||||
ROBOTDIR=src/drivers/$NAME
|
||||
|
||||
rm -rf $ROBOTDIR
|
||||
|
||||
mkdir $ROBOTDIR || exit 1
|
||||
|
||||
echo -n "Copying $CAR.rgb ... "
|
||||
cp data/cars/models/$CAR/$CAR.rgb $ROBOTDIR || exit 1
|
||||
cp data/cars/models/$CAR/$CAR.xcf $ROBOTDIR 2>/dev/null
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo -n "and $CAR.xcf ... "
|
||||
fi
|
||||
echo "done"
|
||||
|
||||
echo -n "Copying logo.rgb ... "
|
||||
cp data/data/textures/logo.rgb $ROBOTDIR || exit 1
|
||||
echo "done"
|
||||
|
||||
MAKEFILE=$ROBOTDIR/Makefile
|
||||
|
||||
echo -n "Generating $MAKEFILE ... "
|
||||
|
||||
echo '##############################################################################' > $MAKEFILE || exit 1
|
||||
echo '#' >> $MAKEFILE || exit 1
|
||||
echo '# file : Makefile' >> $MAKEFILE || exit 1
|
||||
echo '# created : '`date` >> $MAKEFILE || exit 1
|
||||
echo '# copyright : (C) 2002 '$AUTHOR >> $MAKEFILE || exit 1
|
||||
echo '#' >> $MAKEFILE || exit 1
|
||||
echo '##############################################################################' >> $MAKEFILE || exit 1
|
||||
|
||||
if [ -n "$GPL" ]
|
||||
then
|
||||
echo '#' >> $MAKEFILE || exit 1
|
||||
echo '# This program is free software; you can redistribute it and/or modify' >> $MAKEFILE || exit 1
|
||||
echo '# it under the terms of the GNU General Public License as published by' >> $MAKEFILE || exit 1
|
||||
echo '# the Free Software Foundation; either version 2 of the License, or' >> $MAKEFILE || exit 1
|
||||
echo '# (at your option) any later version.' >> $MAKEFILE || exit 1
|
||||
echo '#' >> $MAKEFILE || exit 1
|
||||
echo '##############################################################################' >> $MAKEFILE || exit 1
|
||||
fi
|
||||
|
||||
echo >> $MAKEFILE || exit 1
|
||||
echo "ROBOT = $NAME" >> $MAKEFILE || exit 1
|
||||
echo 'MODULE = ${ROBOT}.so' >> $MAKEFILE || exit 1
|
||||
echo 'MODULEDIR = drivers/${ROBOT}' >> $MAKEFILE || exit 1
|
||||
echo 'SOURCES = ${ROBOT}.cpp' >> $MAKEFILE || exit 1
|
||||
echo '' >> $MAKEFILE || exit 1
|
||||
echo 'SHIPDIR = drivers/${ROBOT}' >> $MAKEFILE || exit 1
|
||||
echo 'SHIP = ${ROBOT}.xml '$CAR'.rgb logo.rgb' >> $MAKEFILE || exit 1
|
||||
echo 'SHIPSUBDIRS = ' >> $MAKEFILE || exit 1
|
||||
echo '' >> $MAKEFILE || exit 1
|
||||
echo 'PKGSUBDIRS = ${SHIPSUBDIRS}' >> $MAKEFILE || exit 1
|
||||
echo 'src-robots-'$NAME'_PKGFILES = $(shell find * -maxdepth 0 -type f -print)' >> $MAKEFILE || exit 1
|
||||
echo 'src-robots-'$NAME'_PKGDIR = ${PACKAGE}-${VERSION}/$(subst ${SPEED_DREAMS_BASE},,$(shell pwd))' >> $MAKEFILE || exit 1
|
||||
echo '' >> $MAKEFILE || exit 1
|
||||
echo 'include ${MAKE_DEFAULT}' >> $MAKEFILE || exit 1
|
||||
|
||||
echo "done"
|
||||
|
||||
XMLFILE=$ROBOTDIR/$NAME.xml
|
||||
|
||||
echo -n "Generating $XMLFILE ... "
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' > $XMLFILE || exit 1
|
||||
echo '<!--' >> $XMLFILE || exit 1
|
||||
echo ' file : '$NAME.xml >> $XMLFILE || exit 1
|
||||
echo ' created : '`date` >> $XMLFILE || exit 1
|
||||
echo ' copyright : (C) 2002 '$AUTHOR >> $XMLFILE || exit 1
|
||||
echo '-->' >> $XMLFILE || exit 1
|
||||
echo '' >> $XMLFILE || exit 1
|
||||
|
||||
|
||||
if [ -n "$GPL" ]
|
||||
then
|
||||
echo '<!-- This program is free software; you can redistribute it and/or modify -->' >> $XMLFILE || exit 1
|
||||
echo '<!-- it under the terms of the GNU General Public License as published by -->' >> $XMLFILE || exit 1
|
||||
echo '<!-- the Free Software Foundation; either version 2 of the License, or -->' >> $XMLFILE || exit 1
|
||||
echo '<!-- (at your option) any later version. -->' >> $XMLFILE || exit 1
|
||||
echo '' >> $XMLFILE || exit 1
|
||||
fi
|
||||
|
||||
echo '<!DOCTYPE params SYSTEM "../../libs/tgf/params.dtd">' >> $XMLFILE || exit 1
|
||||
echo '<params name="'$NAME'" type="robotdef">' >> $XMLFILE || exit 1
|
||||
echo ' <section name="Robots">' >> $XMLFILE || exit 1
|
||||
echo ' <section name="index">' >> $XMLFILE || exit 1
|
||||
echo ' <section name="1">' >> $XMLFILE || exit 1
|
||||
echo ' <attstr name="name" val="'$NAME'"></attstr>' >> $XMLFILE || exit 1
|
||||
echo ' <attstr name="desc" val="'$DESCRIPTION'"></attstr>' >> $XMLFILE || exit 1
|
||||
echo ' <attstr name="team" val=""></attstr>' >> $XMLFILE || exit 1
|
||||
echo ' <attstr name="author" val="'$AUTHOR'"></attstr>' >> $XMLFILE || exit 1
|
||||
echo ' <attstr name="car name" val="'$CAR'"></attstr>' >> $XMLFILE || exit 1
|
||||
echo ' <attstr name="category" val="'$CATEGORY'"></attstr>' >> $XMLFILE || exit 1
|
||||
echo ' <attnum name="race number" val="0"></attnum>' >> $XMLFILE || exit 1
|
||||
echo ' <attnum name="red" val="1.0"></attnum>' >> $XMLFILE || exit 1
|
||||
echo ' <attnum name="green" val="1.0"></attnum>' >> $XMLFILE || exit 1
|
||||
echo ' <attnum name="blue" val="1.0"></attnum>' >> $XMLFILE || exit 1
|
||||
echo ' </section>' >> $XMLFILE || exit 1
|
||||
echo ' </section>' >> $XMLFILE || exit 1
|
||||
echo ' </section>' >> $XMLFILE || exit 1
|
||||
echo '</params>' >> $XMLFILE || exit 1
|
||||
|
||||
echo "done"
|
||||
|
||||
CPPFILE=$ROBOTDIR/$NAME.cpp
|
||||
|
||||
echo -n "Generating $CPPFILE ... "
|
||||
|
||||
echo '/***************************************************************************' > $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo ' file : '$NAME.cpp >> $CPPFILE || exit 1
|
||||
echo ' created : '`date` >> $CPPFILE || exit 1
|
||||
echo ' copyright : (C) 2002 '$AUTHOR >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo ' ***************************************************************************/' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
|
||||
if [ -n "$GPL" ]
|
||||
then
|
||||
echo '/***************************************************************************' >> $CPPFILE || exit 1
|
||||
echo ' * *' >> $CPPFILE || exit 1
|
||||
echo ' * This program is free software; you can redistribute it and/or modify *' >> $CPPFILE || exit 1
|
||||
echo ' * it under the terms of the GNU General Public License as published by *' >> $CPPFILE || exit 1
|
||||
echo ' * the Free Software Foundation; either version 2 of the License, or *' >> $CPPFILE || exit 1
|
||||
echo ' * (at your option) any later version. *' >> $CPPFILE || exit 1
|
||||
echo ' * *' >> $CPPFILE || exit 1
|
||||
echo ' ***************************************************************************/' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
fi
|
||||
|
||||
echo '#ifdef _WIN32' >> $CPPFILE || exit 1
|
||||
echo '#include <windows.h>' >> $CPPFILE || exit 1
|
||||
echo '#endif' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '#include <stdio.h>' >> $CPPFILE || exit 1
|
||||
echo '#include <stdlib.h> ' >> $CPPFILE || exit 1
|
||||
echo '#include <string.h> ' >> $CPPFILE || exit 1
|
||||
echo '#include <math.h>' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '#include <tgf.h> ' >> $CPPFILE || exit 1
|
||||
echo '#include <track.h> ' >> $CPPFILE || exit 1
|
||||
echo '#include <car.h> ' >> $CPPFILE || exit 1
|
||||
echo '#include <raceman.h> ' >> $CPPFILE || exit 1
|
||||
echo '#include <robottools.h>' >> $CPPFILE || exit 1
|
||||
echo '#include <robot.h>' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo 'static tTrack *curTrack;' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo 'static void initTrack(int index, tTrack* track, void *carHandle, void **carParmHandle, tSituation *s); ' >> $CPPFILE || exit 1
|
||||
echo 'static void newrace(int index, tCarElt* car, tSituation *s); ' >> $CPPFILE || exit 1
|
||||
echo 'static void drive(int index, tCarElt* car, tSituation *s); ' >> $CPPFILE || exit 1
|
||||
echo 'static void endrace(int index, tCarElt *car, tSituation *s);' >> $CPPFILE || exit 1
|
||||
echo 'static void shutdown(int index);' >> $CPPFILE || exit 1
|
||||
echo 'static int InitFuncPt(int index, void *pt); ' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* ' >> $CPPFILE || exit 1
|
||||
echo ' * Module entry point ' >> $CPPFILE || exit 1
|
||||
echo ' */ ' >> $CPPFILE || exit 1
|
||||
echo 'extern "C" int ' >> $CPPFILE || exit 1
|
||||
echo $NAME'(tModInfo *modInfo) ' >> $CPPFILE || exit 1
|
||||
echo '{' >> $CPPFILE || exit 1
|
||||
echo ' memset(modInfo, 0, 10*sizeof(tModInfo));' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo ' modInfo->name = "'$NAME'"; /* name of the module (short) */' >> $CPPFILE || exit 1
|
||||
echo ' modInfo->desc = "'$DESCRIPTION'"; /* description of the module (can be long) */' >> $CPPFILE || exit 1
|
||||
echo ' modInfo->fctInit = InitFuncPt; /* init function */' >> $CPPFILE || exit 1
|
||||
echo ' modInfo->gfId = ROB_IDENT; /* supported framework version */' >> $CPPFILE || exit 1
|
||||
echo ' modInfo->index = 1;' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo ' return 0; ' >> $CPPFILE || exit 1
|
||||
echo '} ' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* Module interface initialization. */' >> $CPPFILE || exit 1
|
||||
echo 'static int ' >> $CPPFILE || exit 1
|
||||
echo 'InitFuncPt(int index, void *pt) ' >> $CPPFILE || exit 1
|
||||
echo '{ ' >> $CPPFILE || exit 1
|
||||
echo ' tRobotItf *itf = (tRobotItf *)pt; ' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo ' itf->rbNewTrack = initTrack; /* Give the robot the track view called */ ' >> $CPPFILE || exit 1
|
||||
echo ' /* for every track change or new race */ ' >> $CPPFILE || exit 1
|
||||
echo ' itf->rbNewRace = newrace; /* Start a new race */' >> $CPPFILE || exit 1
|
||||
echo ' itf->rbDrive = drive; /* Drive during race */' >> $CPPFILE || exit 1
|
||||
echo ' itf->rbPitCmd = NULL;' >> $CPPFILE || exit 1
|
||||
echo ' itf->rbEndRace = endrace; /* End of the current race */' >> $CPPFILE || exit 1
|
||||
echo ' itf->rbShutdown = shutdown; /* Called before the module is unloaded */' >> $CPPFILE || exit 1
|
||||
echo ' itf->index = index; /* Index used if multiple interfaces */' >> $CPPFILE || exit 1
|
||||
echo ' return 0; ' >> $CPPFILE || exit 1
|
||||
echo '} ' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* Called for every track change or new race. */' >> $CPPFILE || exit 1
|
||||
echo 'static void ' >> $CPPFILE || exit 1
|
||||
echo 'initTrack(int index, tTrack* track, void *carHandle, void **carParmHandle, tSituation *s) ' >> $CPPFILE || exit 1
|
||||
echo '{ ' >> $CPPFILE || exit 1
|
||||
echo ' curTrack = track;' >> $CPPFILE || exit 1
|
||||
echo ' *carParmHandle = NULL; ' >> $CPPFILE || exit 1
|
||||
echo '} ' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* Start a new race. */' >> $CPPFILE || exit 1
|
||||
echo 'static void ' >> $CPPFILE || exit 1
|
||||
echo 'newrace(int index, tCarElt* car, tSituation *s) ' >> $CPPFILE || exit 1
|
||||
echo '{ ' >> $CPPFILE || exit 1
|
||||
echo '} ' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* Drive during race. */' >> $CPPFILE || exit 1
|
||||
echo 'static void ' >> $CPPFILE || exit 1
|
||||
echo 'drive(int index, tCarElt* car, tSituation *s) ' >> $CPPFILE || exit 1
|
||||
echo '{ ' >> $CPPFILE || exit 1
|
||||
echo ' memset((void *)&car->ctrl, 0, sizeof(tCarCtrl)); ' >> $CPPFILE || exit 1
|
||||
echo ' car->ctrl.brakeCmd = 1.0; /* all brakes on ... */ ' >> $CPPFILE || exit 1
|
||||
echo ' /* ' >> $CPPFILE || exit 1
|
||||
echo ' * add the driving code here to modify the ' >> $CPPFILE || exit 1
|
||||
echo ' * car->_steerCmd ' >> $CPPFILE || exit 1
|
||||
echo ' * car->_accelCmd ' >> $CPPFILE || exit 1
|
||||
echo ' * car->_brakeCmd ' >> $CPPFILE || exit 1
|
||||
echo ' * car->_gearCmd ' >> $CPPFILE || exit 1
|
||||
echo ' * car->_clutchCmd ' >> $CPPFILE || exit 1
|
||||
echo ' */ ' >> $CPPFILE || exit 1
|
||||
echo '}' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* End of the current race */' >> $CPPFILE || exit 1
|
||||
echo 'static void' >> $CPPFILE || exit 1
|
||||
echo 'endrace(int index, tCarElt *car, tSituation *s)' >> $CPPFILE || exit 1
|
||||
echo '{' >> $CPPFILE || exit 1
|
||||
echo '}' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
echo '/* Called before the module is unloaded */' >> $CPPFILE || exit 1
|
||||
echo 'static void' >> $CPPFILE || exit 1
|
||||
echo 'shutdown(int index)' >> $CPPFILE || exit 1
|
||||
echo '{' >> $CPPFILE || exit 1
|
||||
echo '}' >> $CPPFILE || exit 1
|
||||
echo '' >> $CPPFILE || exit 1
|
||||
|
||||
echo "done"
|
||||
|
||||
DEFFILE=$ROBOTDIR/$NAME.def
|
||||
|
||||
echo -n "Generating $DEFFILE ... "
|
||||
|
||||
echo ';' > $DEFFILE || exit 1
|
||||
echo '; file : '$NAME.def >> $DEFFILE || exit 1
|
||||
echo '; created : '`date` >> $DEFFILE || exit 1
|
||||
echo '; copyright : (C) 2002 '$AUTHOR >> $DEFFILE || exit 1
|
||||
echo ';' >> $DEFFILE || exit 1
|
||||
|
||||
if [ -n "$GPL" ]
|
||||
then
|
||||
echo ';' >> $DEFFILE || exit 1
|
||||
echo '; This program is free software; you can redistribute it and/or modify' >> $DEFFILE || exit 1
|
||||
echo '; it under the terms of the GNU General Public License as published by' >> $DEFFILE || exit 1
|
||||
echo '; the Free Software Foundation; either version 2 of the License, or ' >> $DEFFILE || exit 1
|
||||
echo '; (at your option) any later version. ' >> $DEFFILE || exit 1
|
||||
echo ';' >> $DEFFILE || exit 1
|
||||
fi
|
||||
|
||||
echo '' >> $DEFFILE || exit 1
|
||||
echo 'LIBRARY '$NAME >> $DEFFILE || exit 1
|
||||
echo '' >> $DEFFILE || exit 1
|
||||
echo 'SECTIONS .data READ WRITE' >> $DEFFILE || exit 1
|
||||
echo '' >> $DEFFILE || exit 1
|
||||
echo 'EXPORTS' >> $DEFFILE || exit 1
|
||||
echo ' '$NAME >> $DEFFILE || exit 1
|
||||
echo '' >> $DEFFILE || exit 1
|
||||
|
||||
echo "done"
|
||||
|
||||
DSPFILE=$ROBOTDIR/$NAME.dsp
|
||||
NAME_=$(echo $NAME | tr "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
||||
echo -n "Generating $DSPFILE ... "
|
||||
|
||||
echo '# Microsoft Developer Studio Project File - Name="'$NAME'" - Package Owner=<4>
|
||||
' > $DSPFILE || exit 1
|
||||
echo '# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ** DO NOT EDIT **
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'CFG='$NAME' - Win32 Debug
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE use the Export Makefile command and run
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE NMAKE /f "'$NAME'.mak".
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE You can specify a configuration when running NMAKE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE NMAKE /f "'$NAME'.mak" CFG="'$NAME' - Win32 Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE Possible choices for configuration are:
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE "'$NAME' - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE "'$NAME' - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!MESSAGE
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Project
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP AllowPerConfigDependencies 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Scc_ProjName ""
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Scc_LocalPath ""
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'CPP=cl.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'MTL=midl.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'RSC=rc.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!IF "$(CFG)" == "'$NAME' - Win32 Release"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Use_MFC 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Use_Debug_Libraries 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Output_Dir "Release"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Intermediate_Dir "Release"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Target_Dir ""
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Use_MFC 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Use_Debug_Libraries 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Output_Dir "Release"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Intermediate_Dir "Release"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Ignore_Export_Lib 1
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Target_Dir ""
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "'$NAME_'_EXPORTS" /YX /FD /c
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD CPP /nologo /G5 /W3 /GX /O2 /I "../../../export/include" /I "../../windows/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "'$NAME_'_EXPORTS" /YX /FD /c
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'BSC32=bscmake.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE BSC32 /nologo
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BSC32 /nologo
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'LINK32=link.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD LINK32 tgf.lib robottools.lib sg.lib ul.lib /nologo /dll /map /machine:I386 /nodefaultlib:"LIBCD" /libpath:"../../../export/lib" /libpath:"../../windows/lib"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Special Build Tool
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'WkspDir=.
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'TargetDir=.\Release
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'SOURCE="$(InputPath)"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'PostBuild_Cmds=copy $(TargetDir)\*.dll $(WkspDir)\runtime\drivers\'$NAME'
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Special Build Tool
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!ELSEIF "$(CFG)" == "'$NAME' - Win32 Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Use_MFC 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Use_Debug_Libraries 1
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Output_Dir "Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Intermediate_Dir "Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP BASE Target_Dir ""
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Use_MFC 0
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Use_Debug_Libraries 1
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Output_Dir "Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Intermediate_Dir "Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Ignore_Export_Lib 1
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Target_Dir ""
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "'$NAME_'_EXPORTS" /YX /FD /GZ /c
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD CPP /nologo /G5 /W3 /Gm /GX /ZI /Od /I "../../../export/include" /I "../../windows/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "'$NAME_'_EXPORTS" /YX /FD /GZ /c
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'BSC32=bscmake.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE BSC32 /nologo
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BSC32 /nologo
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'LINK32=link.exe
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# ADD LINK32 robottools.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sg.lib ul.lib /nologo /dll /map /debug /machine:I386 /pdbtype:sept /libpath:"../../../export/libd" /libpath:"../../windows/lib"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Special Build Tool
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'WkspDir=.
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'TargetDir=.\Debug
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'SOURCE="$(InputPath)"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'PostBuild_Cmds=copy $(TargetDir)\*.dll $(WkspDir)\runtimed\drivers\'$NAME'
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Special Build Tool
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '!ENDIF
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Target
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Name "'$NAME' - Win32 Release"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Name "'$NAME' - Win32 Debug"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Group "Source Files"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Source File
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'SOURCE=.\'$NAME'.cpp
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Source File
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Source File
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo 'SOURCE=.\'$NAME'.def
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Source File
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Group
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# Begin Group "Header Files"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Group
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Target
|
||||
' >> $DSPFILE || exit 1
|
||||
echo '# End Project
|
||||
' >> $DSPFILE || exit 1
|
||||
|
||||
echo "done"
|
|
@ -10,22 +10,22 @@ ADD_OSSPEC_INCLUDEDIR()
|
|||
ADD_PLIB_INCLUDEDIR()
|
||||
|
||||
#disable developer warning
|
||||
if (COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
IF (COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
ADD_EXECUTABLE(sd-texmapper ${TEXMAPPER_SOURCES})
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}texmapper ${TEXMAPPER_SOURCES})
|
||||
|
||||
ADD_PLIB_LIBRARY(sd-texmapper sg ssg ul)
|
||||
ADD_PLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}texmapper sg ssg ul)
|
||||
|
||||
ADD_SDLIB_LIBRARY(sd-texmapper tgf tgfclient)
|
||||
ADD_SDLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}texmapper tgf tgfclient)
|
||||
|
||||
ADD_PNG_LIBRARY(${SD_TOOLS_EXECPREFIX}texmapper)
|
||||
|
||||
ADD_PNG_LIBRARY(sd-texmapper)
|
||||
IF(UNIX)
|
||||
ADD_X11_LIBRARY(sd-texmapper)
|
||||
ADD_XRANDR_LIBRARY(sd-texmapper)
|
||||
ADD_X11_LIBRARY(${SD_TOOLS_EXECPREFIX}texmapper)
|
||||
ADD_XRANDR_LIBRARY(${SD_TOOLS_EXECPREFIX}texmapper)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS sd-texmapper)
|
||||
SD_INSTALL_FILES(BIN TARGETS ${SD_TOOLS_EXECPREFIX}texmapper)
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
INCLUDE(../../../cmake/macros.cmake)
|
||||
|
||||
PROJECT(trackgen)
|
||||
|
||||
SET(TRACKGEN_SOURCES ac3d.cpp easymesh.cpp elevation.cpp maintrackgen.cpp
|
||||
|
@ -12,9 +13,9 @@ ADD_SDL_INCLUDEDIR()
|
|||
ADD_INTERFACE_INCLUDEDIR()
|
||||
|
||||
#disable developer warning
|
||||
if (COMMAND cmake_policy)
|
||||
IF (COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
IF(WIN32)
|
||||
# Ignore some run-time libs to avoid link time warnings and sometimes even crashes.
|
||||
|
@ -22,26 +23,23 @@ IF(WIN32)
|
|||
ENDIF(WIN32)
|
||||
|
||||
IF(UNIX)
|
||||
ADD_EXECUTABLE(sd-trackgen ${TRACKGEN_SOURCES} ../../linux/linuxspec.cpp)
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}trackgen ${TRACKGEN_SOURCES} ../../linux/linuxspec.cpp)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF (WIN32)
|
||||
ADD_EXECUTABLE(sd-trackgen ${TRACKGEN_SOURCES} ../../windows/windowsspec.cpp)
|
||||
ADD_EXECUTABLE(${SD_TOOLS_EXECPREFIX}trackgen ${TRACKGEN_SOURCES} ../../windows/windowsspec.cpp)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
ADD_SDLIB_LIBRARY(sd-trackgen robottools tgf tgfclient client)
|
||||
|
||||
ADD_SDLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}trackgen robottools tgf tgfclient client)
|
||||
|
||||
IF(OPENGL_FOUND)
|
||||
TARGET_LINK_LIBRARIES(sd-trackgen ${OPENGL_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(${SD_TOOLS_EXECPREFIX}trackgen ${OPENGL_LIBRARY})
|
||||
ENDIF(OPENGL_FOUND)
|
||||
|
||||
ADD_PNG_LIBRARY(sd-trackgen)
|
||||
ADD_SDL_LIBRARY(sd-trackgen)
|
||||
ADD_PNG_LIBRARY(${SD_TOOLS_EXECPREFIX}trackgen)
|
||||
ADD_SDL_LIBRARY(${SD_TOOLS_EXECPREFIX}trackgen)
|
||||
ADD_PLIB_LIBRARY(${SD_TOOLS_EXECPREFIX}trackgen sg ssg ul)
|
||||
ADD_DL_LIBRARY(${SD_TOOLS_EXECPREFIX}trackgen)
|
||||
|
||||
ADD_PLIB_LIBRARY(sd-trackgen sg ssg ul)
|
||||
ADD_DL_LIBRARY(sd-trackgen)
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS sd-trackgen)
|
||||
SD_INSTALL_FILES(BIN TARGETS ${SD_TOOLS_EXECPREFIX}trackgen)
|
||||
|
||||
|
|
|
@ -14,16 +14,16 @@ if (COMMAND cmake_policy)
|
|||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
ADD_EXECUTABLE(speed-dreams ${SD_SOURCES})
|
||||
ADD_EXECUTABLE(speed-dreams-2 ${SD_SOURCES})
|
||||
|
||||
include_directories(../libs)
|
||||
ADD_SDLIB_LIBRARY(speed-dreams client tgf ssggraph)
|
||||
ADD_SDLIB_LIBRARY(speed-dreams-2 client tgf ssggraph)
|
||||
|
||||
ADD_PLIB_LIBRARY(speed-dreams sg ssg ul)
|
||||
ADD_PLIB_LIBRARY(speed-dreams-2 sg ssg ul)
|
||||
|
||||
SD_INSTALL_FILES(INCLUDE FILES osspec.h)
|
||||
|
||||
SD_INSTALL_FILES(BIN TARGETS speed-dreams)
|
||||
SD_INSTALL_FILES(BIN TARGETS speed-dreams-2)
|
||||
|
||||
# Install OpenAL and SDL DLLs close to Speed Dreams executable
|
||||
FIND_PACKAGE(OpenAL)
|
||||
|
|
Loading…
Reference in a new issue