check the dependencies directory version

metadata
Wenzel Jakob 2011-08-14 20:05:00 -04:00
parent 26fc39bac0
commit c5a0313c13
1 changed files with 17 additions and 2 deletions

View File

@ -21,8 +21,11 @@ if not os.path.exists(configFile):
print 'A configuration file must be selected! Have a look at http://www.mitsuba-renderer.org/docs.html'
Exit(1)
if (sys.platform == 'win32' or sys.platform == 'darwin') and not os.path.exists(GetBuildPath('#dependencies')):
print 'The dependencies are missing -- see http://www.mitsuba-renderer.org/devblog/archives/11-Build-system-changes.html'
versionFilename = GetBuildPath('#dependencies/version')
if not os.path.exists(versionFilename):
print 'The dependencies are missing -- please check out https://www.mitsuba-renderer.org/hg/dependencies'
print 'and ensure that the newly created directory is a subdirectory of the main Mitsuba folder'
Exit(1)
# Parse configuration options
@ -224,6 +227,18 @@ else:
print MTS_VERSION
Export('MTS_VERSION')
with open(versionFilename) as f:
depVersion = f.readline().strip()
if MTS_VERSION != depVersion:
print '\nThe dependency directory and your Mitsuba codebase have different version numbers!'
print 'Mitsuba has version %s, and the dependencies have version %s. Please bring them ' % (MTS_VERSION, depVersion)
print 'into sync, either by running \n'
print '$ hg update -r v%s\n' % depVersion
print 'in the Mitsuba directory, or by running\n'
print '$ cd dependencies'
print '$ hg update -r v%s\n' % MTS_VERSION
Exit(1)
env = conf.Finish()
dist = GetOption('dist') != None