#!/usr/bin/python
-# Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
+# Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
class DockerTarget(Target):
- def __init__(self, platform, directory, version):
+ def __init__(self, platform, directory):
super(DockerTarget, self).__init__(platform, directory)
- self.version = version
self.mounts = []
self.privileged = False
environment_prefix: path to Windows environment for the appropriate target (libraries and some tools)
tool_path: path to 32- and 64-bit tools
"""
- def __init__(self, version, bits, directory=None):
- super(WindowsTarget, self).__init__('windows', directory, version)
+ def __init__(self, windows_version, bits, directory, environment_version):
+ super(WindowsTarget, self).__init__('windows', directory)
+ self.version = windows_version
self.bits = bits
self.tool_path = '%s/usr/bin' % config.get('mxe_prefix')
self.set('LDFLAGS', '"%s"' % link)
self.image = 'windows'
+ if environment_version is not None:
+ self.image += '_%s' % environment_version
@property
def library_prefix(self):
"""
def __init__(self, distro, version, bits, directory=None):
- super(LinuxTarget, self).__init__('linux', directory, version)
+ super(LinuxTarget, self).__init__('linux', directory)
self.distro = distro
+ self.version = version
self.bits = bits
self.detail = None
if s.startswith('windows-'):
x = s.split('-')
if len(x) == 2:
- target = WindowsTarget(None, int(x[1]), args.work)
+ target = WindowsTarget(None, int(x[1]), args.work, args.environment_version)
elif len(x) == 3:
- target = WindowsTarget(x[1], int(x[2]), args.work)
+ target = WindowsTarget(x[1], int(x[2]), args.work, args.environment_version)
else:
raise Error("Bad Windows target name `%s'")
elif s.startswith('ubuntu-') or s.startswith('debian-') or s.startswith('centos-') or s.startswith('fedora-') or s.startswith('mageia-'):
parser.add_argument('-o', '--output', help='output directory', default='.')
parser.add_argument('-q', '--quiet', help='be quiet', action='store_true')
parser.add_argument('-t', '--target', help='target', action='append')
+ parser.add_argument('--environment-version', help='version of environment to use')
parser.add_argument('-k', '--keep', help='keep working tree', action='store_true')
parser.add_argument('--debug', help='build with debugging symbols where possible', action='store_true')
parser.add_argument('-w', '--work', help='override default work directory')