Commit dbcfb7d5 authored by Ben Cooksley's avatar Ben Cooksley

Handle some Windows special cases: hopefully at least

parent 18946e80
......@@ -24,12 +24,20 @@ buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.using
sourcesLocation = os.getcwd()
buildLocation = CommonUtils.buildDirectoryForSources( sources=sourcesLocation, inSourceBuild=buildSpecification['in-source-build'] )
# Determine the build command we want to use
# Just about all of our platforms support standard "make" so that is our default...
makeCommand = "make -j {cpuCount} -l {maximumLoad}"
# Windows is a bit special though
if sys.platform == 'win32':
# We use NMake on Windows at the moment
makeCommand = "nmake"
# Compile the project
try:
commandToRun = BuildSystem.substituteCommandTokens( "make -j {cpuCount} -l {maximumLoad}" )
commandToRun = BuildSystem.substituteCommandTokens( makeCommand )
subprocess.check_call( commandToRun, stdout=sys.stdout, stderr=sys.stderr, shell=True, cwd=buildLocation, env=buildEnvironment )
except Exception:
sys.exit(1)
# The project was compiled successfully
sys.exit(0)
\ No newline at end of file
sys.exit(0)
......@@ -31,12 +31,20 @@ if arguments.divertTo != None:
buildEnvironment['DESTDIR'] = arguments.divertTo
buildEnvironment['INSTALL_ROOT'] = arguments.divertTo
# Determine the build command we want to use
# Just about all of our platforms support standard "make" so that is our default...
makeCommand = "make -j {cpuCount} -l {maximumLoad} install"
# Windows is a bit special though
if sys.platform == 'win32':
# We use NMake on Windows at the moment
makeCommand = "nmake install"
# Install the project
try:
commandToRun = BuildSystem.substituteCommandTokens( "make -j {cpuCount} -l {maximumLoad} install" )
commandToRun = BuildSystem.substituteCommandTokens( makeCommand )
subprocess.check_call( commandToRun, stdout=sys.stdout, stderr=sys.stderr, shell=True, cwd=buildLocation, env=buildEnvironment )
except Exception:
sys.exit(1)
# The project was installed successfully
sys.exit(0)
\ No newline at end of file
sys.exit(0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment