Remove unused documentation and tool files
This commit is contained in:
parent
fb226a717f
commit
4ce6fb04ea
34
SVN-CONFIG
34
SVN-CONFIG
@ -1,34 +0,0 @@
|
||||
# Please, make sure your SVN client uses something that matches the
|
||||
# following config. Specially the autoprops part, that way new files
|
||||
# will be added with the right settings. Default config for command line
|
||||
# svn is in ~/.subversion/config. If you use SVN for multiple projects
|
||||
# simultaneously, remember you can use different configs, at least in
|
||||
# cmd line (via --config-dir and for example ~/.subversion/supertuxkart/
|
||||
# with a new config file inside).
|
||||
|
||||
[miscellany]
|
||||
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* ._* .DS_Store *.blend1 *.blend2
|
||||
enable-auto-props = yes
|
||||
|
||||
[auto-props]
|
||||
*.c = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
||||
*.cpp = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
||||
*.h = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
||||
*.hpp = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
||||
*.dsp = svn:eol-style=CRLF
|
||||
*.dsw = svn:eol-style=CRLF
|
||||
*.sh = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision
|
||||
*.txt = svn:eol-style=native
|
||||
*.png = svn:mime-type=image/png
|
||||
*.jpg = svn:mime-type=image/jpeg
|
||||
Makefile = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
||||
*.jpeg = svn:mime-type=image/jpeg
|
||||
*.gif = svn:mime-type=image/gif
|
||||
*.svg = svn:mime-type=image/svg+xml
|
||||
*.htm = svn:mime-type=text/html
|
||||
*.html = svn:mime-type=text/html
|
||||
*.css = svn:mime-type=text/css
|
||||
*.pdf = svn:mime-type=application/pdf
|
||||
SConstruct = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
||||
*.xml = svn:eol-style=LF;svn:mime-type=text/xml
|
||||
*.py = svn:eol-style=native;svn:keywords=Author Date Id Revision
|
30
TODO.md
30
TODO.md
@ -1,30 +0,0 @@
|
||||
##TODO
|
||||
|
||||
SuperTuxKart is looking for additional man power to make this
|
||||
one of the best free linux games out there :) We need (in
|
||||
no particular order):
|
||||
|
||||
- Musicians/sound engineers
|
||||
- Create additional background soundtracks
|
||||
- Create sound effects
|
||||
- Artists and track designer
|
||||
- Create additional tracks
|
||||
- Create additional artwork for tracks and background images
|
||||
- Developers
|
||||
- Work on network play support
|
||||
- Check our bug and enhancement request tracker on
|
||||
https://github.com/supertuxkart/stk-code/issues
|
||||
- Extend the current web page and keep it up to date
|
||||
- Testers
|
||||
- For just about everything, especially different platforms and graphics cards
|
||||
- Writers
|
||||
- Write documentation, ranging from man page, to a description for the web, to a design document, etc...
|
||||
|
||||
If you want to help the SuperTuxKart Project, please contact us on the email list: [supertuxkart-devel@lists.sourceforge.net](mailto:supertuxkart-devel@lists.sourceforge.net)
|
||||
|
||||
Thanks in advance!
|
||||
|
||||
-- The SuperTuxKart Team
|
||||
|
||||
|
||||
For details, see <http://supertuxkart.net/Community>
|
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Library directory
|
||||
LIBDIR="bin"
|
||||
|
||||
# If we are launching from a symlink, such as /usr/local/bin/run_supertux.sh, we need to get where
|
||||
# the symlink points to
|
||||
pth="`readlink $0`"
|
||||
|
||||
# $pth will be empty if our start path wasnt a symlink
|
||||
if [ $pth ]; then
|
||||
GAMEDIR="`dirname $pth`"
|
||||
else
|
||||
GAMEDIR="`dirname $0`"
|
||||
fi
|
||||
|
||||
# Change to the game dir, and go!
|
||||
cd $GAMEDIR
|
||||
# export game library directory
|
||||
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
|
||||
|
||||
bin/supertuxkart $*
|
||||
|
@ -1,25 +0,0 @@
|
||||
Here are the guidelines to follow when coding SuperTuxKart:
|
||||
|
||||
Filenames
|
||||
=========
|
||||
|
||||
The filenames should be, with underscores between words. Use the .cpp
|
||||
extension for C++ implementation files and .hpp for C++ headers, .c for
|
||||
C files and .h for C headers.
|
||||
|
||||
|
||||
Coding style
|
||||
============
|
||||
|
||||
The coding style used in Super Tux Kart can be found at
|
||||
http://supertuxkart.net/Coding_Style
|
||||
|
||||
|
||||
Documentation line length
|
||||
=========================
|
||||
|
||||
All the documentation files should have at most 80 characters, because
|
||||
on some displays and on paper you often are limited to 80 characters, and
|
||||
also under some conditions appendices (for example, line numbers) are
|
||||
added. The exception if the player's manual, because it's long, so to
|
||||
understand it better it should be limited to 65 characters.
|
103
tools/batch.py
103
tools/batch.py
@ -1,103 +0,0 @@
|
||||
from matplotlib import pyplot
|
||||
from os import listdir
|
||||
|
||||
|
||||
def is_numeric(x):
|
||||
try:
|
||||
float(x)
|
||||
except ValueError:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
avg_lap_time = {}
|
||||
avg_pos = {}
|
||||
avg_speed = {}
|
||||
avg_top = {}
|
||||
total_rescued = {}
|
||||
|
||||
tests = len(listdir('../../batch'))-1
|
||||
for file in listdir('../../batch'):
|
||||
if (file == '.DS_Store'):
|
||||
continue
|
||||
f = open('../../batch/'+file,'r')
|
||||
|
||||
|
||||
'''
|
||||
name_index = file.find('.')
|
||||
kart_name = str(file[:name_index])
|
||||
first = file.find('.',name_index+1)
|
||||
track_name = file[name_index+1:first]
|
||||
second = file.find('.',first+1)
|
||||
run = int(file[first+1:second])
|
||||
'''
|
||||
track_name = "snowmountain"
|
||||
kart_names = ["gnu", "sara", "tux", "elephpant"]
|
||||
|
||||
if track_name == "snowmountain":
|
||||
contents = f.readlines()
|
||||
'''
|
||||
contents = contents[2:contents.index("[debug ] profile: \n")-1]
|
||||
content = [s for s in contents if kart_name in s]
|
||||
data = [float(x) for x in content[0].split() if is_numeric(x)]
|
||||
if kart_name not in avg_lap_time:
|
||||
avg_lap_time[kart_name] = []
|
||||
avg_pos[kart_name] = []
|
||||
avg_speed[kart_name] = []
|
||||
avg_top[kart_name] = []
|
||||
total_rescued[kart_name] = []
|
||||
|
||||
avg_lap_time[kart_name].append(data[2]/4)
|
||||
avg_pos[kart_name].append(data[1])
|
||||
avg_speed[kart_name].append(data[3])
|
||||
avg_top[kart_name].append(data[4])
|
||||
total_rescued[kart_name].append(data[7])
|
||||
'''
|
||||
|
||||
contents = contents[2:6] #TODO check if all is in here
|
||||
for kart in kart_names:
|
||||
content = [s for s in contents if kart in s]
|
||||
data = [float(x) for x in content[0].split() if is_numeric(x)]
|
||||
if kart not in avg_lap_time:
|
||||
avg_lap_time[kart] = []
|
||||
avg_pos[kart] = []
|
||||
avg_speed[kart] = []
|
||||
avg_top[kart] = []
|
||||
total_rescued[kart] = []
|
||||
|
||||
avg_lap_time[kart].append(data[2]/4)
|
||||
avg_pos[kart].append(data[1])
|
||||
avg_speed[kart].append(data[3])
|
||||
avg_top[kart].append(data[4])
|
||||
total_rescued[kart].append(data[7])
|
||||
|
||||
tests = len(avg_lap_time["gnu"])
|
||||
print total_rescued
|
||||
|
||||
|
||||
for kart in kart_names:
|
||||
print "rescues for ", kart , ": ", sum(total_rescued[kart])/tests
|
||||
print "avg_lap_time for " , kart , ": " , sum(avg_lap_time[kart])/tests
|
||||
print "avg_pos for " , kart , ": " , sum(avg_pos[kart])/tests
|
||||
print "avg_speed for " , kart , ": " , sum(avg_speed[kart])/tests
|
||||
print "avg_top for " , kart , ": " , sum(avg_top[kart])/tests
|
||||
|
||||
|
||||
pyplot.subplot(2,2,1)
|
||||
pyplot.plot(list(xrange(tests)),avg_pos["gnu"], "b-")
|
||||
pyplot.xlabel("tests")
|
||||
pyplot.ylabel("gnu")
|
||||
pyplot.subplot(2,2,2)
|
||||
pyplot.plot(list(xrange(tests)),avg_pos["sara"], "r-")
|
||||
pyplot.xlabel("tests")
|
||||
pyplot.ylabel("sara")
|
||||
pyplot.subplot(2,2,3)
|
||||
pyplot.plot(list(xrange(tests)),avg_pos["elephpant"], "y-")
|
||||
pyplot.xlabel("tests")
|
||||
pyplot.ylabel("elephpant")
|
||||
pyplot.subplot(2,2,4)
|
||||
pyplot.plot(list(xrange(tests)),avg_pos["tux"], "g-")
|
||||
pyplot.xlabel("tests")
|
||||
pyplot.ylabel("tux")
|
||||
|
||||
pyplot.show()
|
@ -1,3 +0,0 @@
|
||||
configuration in config.py
|
||||
|
||||
To launch, python night.py
|
@ -1,52 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
# Class used to build the project
|
||||
################################################################################
|
||||
from subprocess import check_output
|
||||
from utils import *
|
||||
|
||||
class Build:
|
||||
"""
|
||||
Interface for the builder
|
||||
"""
|
||||
|
||||
# if an error occured
|
||||
__noError = True
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def __init__ (self, buildDir):
|
||||
"""
|
||||
Constructor of the builder class
|
||||
"""
|
||||
self.__buildDir = buildDir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def make(self, job):
|
||||
"""
|
||||
the make command
|
||||
"""
|
||||
changeDir = Cdir(self.__buildDir)
|
||||
|
||||
# we try to build supertuxkart
|
||||
try:
|
||||
check_output(["make -j" + str(job)], shell=True)
|
||||
except:
|
||||
self.__noError = False
|
||||
del changeDir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def clean(self):
|
||||
"""
|
||||
the clean command
|
||||
"""
|
||||
changeDir = Cdir(self.__buildDir)
|
||||
check_output(["make clean"], shell=True)
|
||||
del changeDir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def noError(self):
|
||||
"""
|
||||
return true if no error
|
||||
"""
|
||||
return self.__noError
|
@ -1,43 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
|
||||
# configuration for nightly builder
|
||||
|
||||
CONFIG = {
|
||||
# Directory options
|
||||
"WORKINGDIR" : "/home/tux/stkalpha/supertuxkart",
|
||||
"BUILDDIR" : "/home/tux/stkalpha/supertuxkart/cmake_build",
|
||||
"COMPRESSDIR" : "/home/tux/stkbeta",
|
||||
"LOGDIR" : "/home/tux/stkalpha",
|
||||
"SCRIPTDIR" : "/home/tux/stkalpha/nightbuilder",
|
||||
# directory in the server
|
||||
"REMOTEDIR" : "/web/public/stknigtly",
|
||||
|
||||
# Build options
|
||||
"JOBMAX" : 3,
|
||||
|
||||
# FTP options
|
||||
"FTPHOST" : "ftp.tux.net",
|
||||
"FTPUSER" : "tux",
|
||||
"FTPPASS" : "hell0",
|
||||
|
||||
# other
|
||||
"PLATFORM" : "64",
|
||||
"OS" : "lin",
|
||||
"VERSION" : "svn"
|
||||
}
|
||||
|
||||
# arguments by default
|
||||
# PLEASE Don't edit this section if you don't know what you are doing. Thanks
|
||||
ARG = {
|
||||
"BIN" : True,
|
||||
"DATA" : True,
|
||||
"CLEAN" : False,
|
||||
"SEND" : True,
|
||||
"FORCE" : True,
|
||||
"UPDATE" : True,
|
||||
"JOB" : 2,
|
||||
"HELP" : False
|
||||
}
|
||||
|
@ -1,140 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
################################################################################
|
||||
|
||||
# Script used to build nighlies
|
||||
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import getopt
|
||||
|
||||
# import the configuration file
|
||||
from config import *
|
||||
|
||||
# import functions/class
|
||||
from utils import *
|
||||
from svn import *
|
||||
from build import *
|
||||
from package import *
|
||||
from send import *
|
||||
|
||||
def main():
|
||||
# error
|
||||
noBuildErr = False
|
||||
nosvnErr = False
|
||||
isBuilt = False
|
||||
# parse input FIXME The parser doesn't work
|
||||
#parser(sys.argv[1:])
|
||||
# welcome message
|
||||
print
|
||||
print "nightly builder for supertuxkart"
|
||||
print "Copyright (C) 2012 Jean-manuel clemencon (samuncle)"
|
||||
print separator(COLOR.OKBLUE)
|
||||
|
||||
# display help
|
||||
if (ARG["HELP"]):
|
||||
usage()
|
||||
print separator(COLOR.OKBLUE)
|
||||
print
|
||||
exit()
|
||||
|
||||
# svn part -----------------------------------------------------------------
|
||||
# init the svn
|
||||
mysvn = Svn(CONFIG["WORKINGDIR"])
|
||||
print "current svn revision: " + str(mysvn.getLocalRevision())
|
||||
# Update the svn
|
||||
if (ARG["UPDATE"]):
|
||||
space = bufferedOutput("start svn update @ " + getTime())
|
||||
try:
|
||||
mysvn.update()
|
||||
nosvnErr = True
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
except:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
|
||||
# If no error occured
|
||||
if (nosvnErr):
|
||||
print "svn updated rev: " + str(mysvn.getLastRevision())
|
||||
|
||||
# buid part ----------------------------------------------------------------
|
||||
# init the build
|
||||
mybuild = Build(CONFIG["WORKINGDIR"] + "/cmake_build")
|
||||
# Clean the project
|
||||
if (ARG["CLEAN"]):
|
||||
space = bufferedOutput("start clean @ " + getTime())
|
||||
try:
|
||||
mybuild.clean()
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
except:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
|
||||
# build the project (only if no error and the revision has changed
|
||||
if (nosvnErr):
|
||||
if (mysvn.getIsChanged()):
|
||||
print "revision changed"
|
||||
space = bufferedOutput("start compilation @ " + getTime())
|
||||
mybuild.make(ARG["JOB"])
|
||||
isBuilt = True
|
||||
if (mybuild.noError()):
|
||||
noBuildErr = True
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
else:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
else:
|
||||
print "revsion not changed"
|
||||
|
||||
# Build the project (force)
|
||||
if (ARG["FORCE"] and (not isBuilt) ):
|
||||
space = bufferedOutput("start forced compilation @ " + getTime())
|
||||
mybuild.make(ARG["JOB"])
|
||||
if (mybuild.noError()):
|
||||
noBuildErr = True
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
else:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
|
||||
# package part -------------------------------------------------------------
|
||||
mypack = Package(mysvn.getLastRevision(), CONFIG["COMPRESSDIR"],CONFIG["OS"],CONFIG["PLATFORM"])
|
||||
# pack the binary
|
||||
if (noBuildErr and ARG["BIN"]):
|
||||
space = bufferedOutput("start bin file compress @ " + getTime())
|
||||
try:
|
||||
mypack.addFile("supertuxkart", "stkbin", CONFIG["BUILDDIR"] + "/bin")
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
except:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
|
||||
# pack the data
|
||||
if(ARG["DATA"]):
|
||||
space = bufferedOutput("start data file compress @ " + getTime())
|
||||
try:
|
||||
mypack.addDir("data", "stkdat", CONFIG["WORKINGDIR"], "*.svn*")
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
except:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
|
||||
# network part -------------------------------------------------------------
|
||||
if(ARG["SEND"]):
|
||||
# send file by FTP
|
||||
space = bufferedOutput("start file(s) transfer by FTP @ " + getTime())
|
||||
myFiles = mypack.getFiles()
|
||||
mysend = Send(CONFIG["FTPHOST"],CONFIG["FTPUSER"],CONFIG["FTPPASS"],CONFIG["SCRIPTDIR"])
|
||||
for i in myFiles:
|
||||
mysend.add(i, CONFIG["COMPRESSDIR"], CONFIG["REMOTEDIR"])
|
||||
#FIXME The ftp didn't throw an exception.
|
||||
try:
|
||||
mysend.send()
|
||||
sys.stdout.write(COLOR.OKGREEN + space + "[DONE]" + COLOR.ENDC + "\n")
|
||||
except:
|
||||
sys.stdout.write(COLOR.WARNING + 74 * " " + "[FAIL]" + COLOR.ENDC + "\n")
|
||||
|
||||
print separator(COLOR.OKBLUE)
|
||||
print
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
#sys.argv[1:]
|
@ -1,80 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
# Class used to package the project
|
||||
################################################################################
|
||||
from subprocess import check_output
|
||||
from utils import *
|
||||
|
||||
class Package:
|
||||
"""
|
||||
Interface for the builder
|
||||
"""
|
||||
__revision = 0
|
||||
__listFile = []
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def __init__ (self, revision, compressDir, os,platform):
|
||||
"""
|
||||
Constructor of the builder class
|
||||
"""
|
||||
self.__os = os
|
||||
self.__revision = str(revision)
|
||||
self.__platform = platform
|
||||
self.__compressDir = compressDir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def addFile(self, inFile, outFile, workingDir):
|
||||
"""
|
||||
Packing a file
|
||||
"""
|
||||
# filename
|
||||
name = outFile \
|
||||
+ "_" + self.__os \
|
||||
+ self.__platform \
|
||||
+ "_" + self.__revision \
|
||||
+ ".zip"
|
||||
self.__listFile.append(name)
|
||||
|
||||
# prepare the command
|
||||
command = "zip " \
|
||||
+ self.__compressDir \
|
||||
+ "/" + name \
|
||||
+ " " + inFile
|
||||
|
||||
# execute the command to pack the binary
|
||||
changeDir = Cdir(workingDir)
|
||||
check_output([command], shell=True)
|
||||
del changeDir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def addDir(self, inFile, outFile, workingDir, exclude):
|
||||
"""
|
||||
Packing a directory
|
||||
"""
|
||||
# filename
|
||||
name = outFile \
|
||||
+ "_" + self.__os \
|
||||
+ "_" + self.__revision \
|
||||
+ ".zip"
|
||||
self.__listFile.append(name)
|
||||
|
||||
# prepare the command
|
||||
command = "zip -r --exclude=" \
|
||||
+ exclude \
|
||||
+ " " +self.__compressDir \
|
||||
+ "/" + name \
|
||||
+ " " + inFile
|
||||
|
||||
# execute the command to pack the binary
|
||||
changeDir = Cdir(workingDir)
|
||||
check_output([command], shell=True)
|
||||
del changeDir
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def getFiles(self):
|
||||
"""
|
||||
Return the list of file/directory added
|
||||
"""
|
||||
return self.__listFile
|
||||
|
@ -1,65 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
# Class used to package the project
|
||||
################################################################################
|
||||
from subprocess import check_output
|
||||
import os
|
||||
from utils import *
|
||||
|
||||
class Send:
|
||||
"""
|
||||
Interface for the network
|
||||
"""
|
||||
|
||||
def __init__ (self, ftpHost, ftpUser, ftpPass, ftpFileDir):
|
||||
"""
|
||||
Constructor of the builder class
|
||||
"""
|
||||
|
||||
# Get the configuration for the FTP connection
|
||||
lines = [
|
||||
'FTP_HOST="' + ftpHost + '"\n',
|
||||
'FTP_USER="' + ftpUser + '"\n',
|
||||
'FTP_PASS="' + ftpPass + '"\n',
|
||||
'\n',
|
||||
'ftp -n -p $FTP_HOST << EOF\n',
|
||||
'user $FTP_USER $FTP_PASS\n'
|
||||
]
|
||||
|
||||
# open the ftp script
|
||||
self.__ftpCmd = open("ftp.sh", "w")
|
||||
self.__ftpCmd.writelines(lines)
|
||||
self.__ftpFileDir = ftpFileDir
|
||||
|
||||
def add(self, filename, localDir, remoteDir):
|
||||
"""
|
||||
Add a file to the sender
|
||||
"""
|
||||
command = "put " \
|
||||
+ localDir \
|
||||
+ "/" + filename \
|
||||
+ " " + remoteDir \
|
||||
+ "/" + filename \
|
||||
+ "\n"
|
||||
self.__ftpCmd.write(command)
|
||||
|
||||
|
||||
def send(self):
|
||||
"""
|
||||
Send files previously added
|
||||
"""
|
||||
self.__ftpCmd.write("bye\nEOF\n")
|
||||
self.__ftpCmd.close()
|
||||
check_output([self.__ftpFileDir+"/ftp.sh"], shell=True)
|
||||
#os.system("./ftp.sh")
|
||||
|
||||
def alert(self):
|
||||
"""
|
||||
Send an e-mail alert to the mailing list
|
||||
"""
|
||||
#TODO
|
||||
|
||||
|
||||
|
||||
|
@ -1,93 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
# Class for the SVN
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
from subprocess import check_output
|
||||
from utils import *
|
||||
|
||||
class Svn:
|
||||
"""
|
||||
Interface for the SVN
|
||||
"""
|
||||
|
||||
__svnInfoLocal = "" # info of the local repo
|
||||
__svnInfoLast = "" # info when it's updated
|
||||
__localRev = 0 # the local revision number
|
||||
__lastRev = 0 # the updated revision number
|
||||
__isUp = False # is the repo has been already updated
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def __init__ (self, workingDir):
|
||||
"""
|
||||
Constructor of the svn class
|
||||
"""
|
||||
# local copy for the configuration
|
||||
self.__workingDir = workingDir
|
||||
|
||||
# cd to the working dir and get info from current revision
|
||||
changeDir = Cdir(self.__workingDir)
|
||||
self.__svnInfoLocal = check_output(["svn info"], shell=True)
|
||||
del changeDir
|
||||
|
||||
# exctract the local revision
|
||||
self.__localRev = self.__parseInfo(self.__svnInfoLocal)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def __parseInfo(self, strIn):
|
||||
"""
|
||||
Parse info to extract the revision
|
||||
"""
|
||||
workingData = strIn.split("\n")
|
||||
for i in workingData:
|
||||
if "Revision: " in i:
|
||||
return int(i.split("Revision: ")[1])
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def update(self):
|
||||
"""
|
||||
update the repository (svn up)
|
||||
"""
|
||||
# cd to the directory and update the svn
|
||||
changeDir = Cdir(self.__workingDir)
|
||||
self.__svnInfoLocal = check_output(["svn up"], shell=True)
|
||||
self.__svnInfoLast = check_output(["svn info"], shell=True)
|
||||
del changeDir
|
||||
|
||||
# exctract the last revision
|
||||
self.__lastRev = self.__parseInfo(self.__svnInfoLast)
|
||||
|
||||
# now we have updated the SVN
|
||||
self.__isUp = True
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def getLocalRevision(self):
|
||||
"""
|
||||
return the local revision
|
||||
"""
|
||||
return self.__localRev
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def getLastRevision(self):
|
||||
"""
|
||||
return the last revision
|
||||
"""
|
||||
if not (self.__isUp):
|
||||
raise Exception ("The revision has not been updated.")
|
||||
return self.__lastRev
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def getIsChanged(self):
|
||||
"""
|
||||
return true if revision has changed
|
||||
"""
|
||||
if not (self.__isUp):
|
||||
raise Exception ("The revision has not been updated.")
|
||||
|
||||
if (self.__lastRev != self.__localRev):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@ -1,100 +0,0 @@
|
||||
#!/bin/python
|
||||
# From Supertuxkart SVN revision $Revision$
|
||||
# Copyright (C) 2012 Jean-manuel clemencon (samuncle)
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
from time import gmtime, strftime
|
||||
|
||||
# import config
|
||||
from config import *
|
||||
|
||||
|
||||
class Cdir:
|
||||
"""
|
||||
A class used to change the directory and reset it when it's destructed
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def __init__ (self, path):
|
||||
self.oriPath = os.getcwd()
|
||||
os.chdir(path)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def __del__ (self):
|
||||
os.chdir(self.oriPath)
|
||||
|
||||
class COLOR:
|
||||
HEADER = '\033[95m'
|
||||
OKBLUE = '\033[94m'
|
||||
OKGREEN = '\033[92m'
|
||||
WARNING = '\033[93m'
|
||||
FAIL = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
def separator(color):
|
||||
return color + 80 * "-" + COLOR.ENDC
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# usage of the script. Displayed if -h is invoqued
|
||||
def usage(error = ""):
|
||||
if (error):
|
||||
print "[error] " + error
|
||||
h = [
|
||||
" Options avaliables:",
|
||||
" --bin # package the binary",
|
||||
" --data # package the data",
|
||||
" --clean # remove all packages and logs",
|
||||
" --send # send the package via FTP",
|
||||
" --force # force the build (even the revision hasn't changed)",
|
||||
" --update # update the SVN",
|
||||
" --web # html output"
|
||||
" --job= # like -j for make",
|
||||
" --help # display help",
|
||||
]
|
||||
for i in h:
|
||||
print i
|
||||
|
||||
def getTime():
|
||||
return strftime("%a, %d %b %Y %H:%M:%S GMT+01", gmtime())
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Used to format output
|
||||
def bufferedOutput(string, nb = 74):
|
||||
space = (nb - len(string)) * " "
|
||||
sys.stdout.write(string)
|
||||
sys.stdout.flush()
|
||||
return space
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def parser(argv):
|
||||
a = os.system("ls")
|
||||
print a
|
||||
try:
|
||||
opts, args = getopt.getopt(argv, "bdcsfuhj:", ["bin",
|
||||
"data",
|
||||
"clean",
|
||||
"send",
|
||||
"force",
|
||||
"update",
|
||||
"help",
|
||||
"job="
|
||||
])
|
||||
for opt, args in opts:
|
||||
if opt in ("-h", "--help"):
|
||||
ARG["HELP"] = True
|
||||
"""
|
||||
if opt in ("-b", "bin"):
|
||||
ARG["BIN"] = True
|
||||
if opt in ("-d", "data"):
|
||||
ARG["DATA"] = True
|
||||
if opt in ("-s", "send"):
|
||||
ARG["SEND"] = True
|
||||
if opt in ("-f", "force"):
|
||||
ARG["FORCE"] = True
|
||||
if opt in ("-u", "update"):
|
||||
ARG["UPDATE"] = True
|
||||
"""
|
||||
except:
|
||||
usage("unrecognized option")
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ../../batch
|
||||
#tracks='snowmountain city lighthouse olivermath hacienda startrack farm zengarden'
|
||||
#karts='gnu tux sara elephpant'
|
||||
laps=4
|
||||
|
||||
#for track in $tracks; do
|
||||
#for kart in $karts; do
|
||||
for run in {901..1500}; do
|
||||
for lap in $laps; do
|
||||
./../cmake_build/bin/supertuxkart.app/Contents/MacOS/supertuxkart -R --mode=3 --numkarts=4 --track=snowmountain --with-profile --profile-laps=4 --kart=gnu --ai=sara,tux,elephpant --no-graphics > /dev/null
|
||||
#./cmake_build/bin/supertuxkart.app/Contents/MacOS/supertuxkart -R --mode=3 --numkarts=4 --track=$track --with-profile --profile-laps=$lap --kart=$kart --ai=beastie,beastie,beastie --no-graphics > /dev/null
|
||||
#grep "profile" ~/Library/Application\ Support/SuperTuxKart/stdout.log > ../batch/$kart.$track.$run.txt
|
||||
grep "profile" ~/Library/Application\ Support/SuperTuxKart/stdout.log > ../../batch/faceoff.$run.txt
|
||||
done
|
||||
done
|
||||
# done
|
||||
#done
|
Loading…
x
Reference in New Issue
Block a user