- def clean(self, dir=None, projectFile=None):
+ def getProjectFileArg(self, projectFile = None):
+ result = []
+ if projectFile:
+ result.append(projectFile)
+ return result
+
+ def clean(self, dir=None, projectFile=None, options=[]):
"""
dir = the directory containing the project file
projectFile = Some formats need to explicitly specify the project file's name
"""
"""
dir = the directory containing the project file
projectFile = Some formats need to explicitly specify the project file's name
"""
- result = runInDir(args)
+ args = [self.getProgramPath()]
+ args.extend(self.getProjectFileArg(projectFile))
+ args.append("clean")
+ args.extend(options)
+
+ result = runInDir(args, dir)
- def build(self, dir=None, projectFile=None, targets=None, options=None):
+ def build(self, dir=None, projectFile=None, targets=None, options=[]):
- if options:
- optionList = list(options)
- else:
- optionList = []
-
- optionList.insert(0, self.getProgramPath())
+ args = [self.getProgramPath()]
+ args.extend(self.getProjectFileArg(projectFile))
+ args.extend(options)
- def install(self, dir=None, options=None):
+ def install(self, dir=None, projectFile=None, options=[]):
-class XCodeBuilder(Builder):
- def __init__(self, commandName="xcodebuild", formatName="XCode"):
+class XcodeBuilder(Builder):
+ def __init__(self, commandName="xcodebuild", formatName="Xcode"):
- def __init__(self):
- Builder.__init__(self, commandName="nmake.exe", formatName="msvc")
+ def __init__(self, commandName="nmake.exe"):
+ Builder.__init__(self, commandName=commandName, formatName="msvc")
class MSVCProjectBuilder(Builder):
def __init__(self):
Builder.__init__(self, commandName="VCExpress.exe", formatName="msvcProject")
for key in ["VS90COMNTOOLS", "VC80COMNTOOLS", "VC71COMNTOOLS"]:
if os.environ.has_key(key):
class MSVCProjectBuilder(Builder):
def __init__(self):
Builder.__init__(self, commandName="VCExpress.exe", formatName="msvcProject")
for key in ["VS90COMNTOOLS", "VC80COMNTOOLS", "VC71COMNTOOLS"]:
if os.environ.has_key(key):
if self.programDir == None:
for version in ["9.0", "8", ".NET 2003"]:
if self.programDir == None:
for version in ["9.0", "8", ".NET 2003"]:
-builders = [GNUMakeBuilder, XCodeBuilder, AutoconfBuilder, MSVCBuilder, MSVCProjectBuilder]
+builders = [GNUMakeBuilder, XcodeBuilder, AutoconfBuilder, MSVCBuilder, MSVCProjectBuilder]