2013-07-16 11:28:28 +00:00
|
|
|
__cdrom_devices_map__ = {
|
|
|
|
'win32': 'D:',
|
|
|
|
'cygwin': 'D:',
|
|
|
|
'darwin': '/dev/disk1',
|
|
|
|
'freebsd': '/dev/cd0',
|
2014-05-12 18:45:17 +00:00
|
|
|
'openbsd': '/dev/rcd0c',
|
2014-06-30 08:53:59 +00:00
|
|
|
'linux': '/dev/sr0',
|
2013-07-16 11:28:28 +00:00
|
|
|
'default': '/dev/cdrom'
|
|
|
|
}
|
|
|
|
|
|
|
|
__dvd_devices_map__ = {
|
|
|
|
'win32': 'D:',
|
|
|
|
'cygwin': 'D:',
|
|
|
|
'darwin': '/dev/rdiskN',
|
|
|
|
'freebsd': '/dev/cd0',
|
2014-05-12 18:45:17 +00:00
|
|
|
'openbsd': '/dev/rcd0c',
|
2014-06-30 08:53:59 +00:00
|
|
|
'linux': '/dev/sr0',
|
2013-07-16 11:28:28 +00:00
|
|
|
'default': '/dev/dvd'
|
|
|
|
}
|
|
|
|
|
|
|
|
def __default_cdrom_device__(ctx):
|
|
|
|
default = __cdrom_devices_map__['default']
|
|
|
|
return __cdrom_devices_map__.get(ctx.env.DEST_OS, default)
|
|
|
|
|
|
|
|
def __default_dvd_device__(ctx):
|
|
|
|
default = __dvd_devices_map__['default']
|
|
|
|
return __dvd_devices_map__.get(ctx.env.DEST_OS, default)
|
|
|
|
|
|
|
|
def configure(ctx):
|
|
|
|
ctx.define('DEFAULT_DVD_DEVICE', __default_dvd_device__(ctx))
|
|
|
|
ctx.define('DEFAULT_CDROM_DEVICE', __default_cdrom_device__(ctx))
|