winres

Process .rc files for C/C++: X{.rc -> [.res|.rc.o]}

waflib.Tools.winres.extension(*k)

Decorator that registers a task generator method which will be invoked during the processing of source files for the extension given:

from waflib import Task
class mytask(Task):
        run_str = 'cp ${SRC} ${TGT}'
@extension('.moo')
def create_maa_file(self, node):
        self.create_task('mytask', node, node.change_ext('.maa'))
def build(bld):
        bld(source='foo.moo')
waflib.Tools.winres.rc_file(self, node)[source]

Binds the .rc extension to a winrc task

class waflib.Tools.winres.rc_parser(nodepaths=None, defines=None)[source]

Calculates dependencies in .rc files

filter_comments(node)[source]

Overrides waflib.Tools.c_preproc.c_parser.filter_comments()

__annotations__ = {}
__firstlineno__ = 33
__static_attributes__ = ()
class waflib.Tools.winres.winrc(*k, **kw)[source]

Compiles resource files

run_str = None
color = 'BLUE'

Color for the console display, see waflib.Logs.colors_lst

scan()[source]

The type of the None singleton.

exec_command(cmd, **kw)[source]

Wrapper for waflib.Context.Context.exec_command(). This version set the current working directory (build.variant_dir), applies PATH settings (if self.env.PATH is provided), and can run long commands through a temporary @argfile.

Parameters:

cmd (list of string (best) or string (process will use a shell)) – process command to execute

Returns:

the return code

Return type:

int

Optional parameters:

  1. cwd: current working directory (Node or string)

  2. stdout: set to None to prevent waf from capturing the process standard output

  3. stderr: set to None to prevent waf from capturing the process standard error

  4. timeout: timeout value (Python 3)

quote_flag(flag)[source]

Surround a process argument by quotes so that a list of arguments can be written to a file

Parameters:

x (string) – flag

Returns:

quoted flag

Return type:

string

hasrun
generator
env

waflib.ConfigSet.ConfigSet object (make sure to provide one)

inputs

List of input nodes, which represent the files used by the task instance

outputs

List of output nodes, which represent the files created by the task instance

dep_nodes

List of additional nodes to depend on

run_after

Set of tasks that must be executed before this one

__dict__ = mappingproxy({'__module__': 'waflib.Tools.winres', '__firstlineno__': 55, '__doc__': '\nCompiles resource files\n', 'run_str': None, 'color': 'BLUE', 'scan': <function winrc.scan>, 'exec_command': <function winrc.exec_command>, 'quote_flag': <function winrc.quote_flag>, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'winrc' objects>, '__weakref__': <attribute '__weakref__' of 'winrc' objects>, 'hcode': b'${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}', 'orig_run_str': '${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}', 'run': <function f>, 'vars': ['CPPPATH_ST', 'DEFINES', 'DEFINES_ST', 'INCPATHS', 'WINRC', 'WINRCFLAGS', 'WINRC_SRC_F', 'WINRC_TGT_F'], '__annotations__': {}})
__firstlineno__ = 55
__static_attributes__ = ()
hcode = b'${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}'

String representing an additional hash for the class representation

orig_run_str = '${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}'
vars = ['CPPPATH_ST', 'DEFINES', 'DEFINES_ST', 'INCPATHS', 'WINRC', 'WINRCFLAGS', 'WINRC_SRC_F', 'WINRC_TGT_F']

ConfigSet variables that should trigger a rebuild (class attribute used for waflib.Task.Task.sig_vars())

waflib.Tools.winres.configure(conf)[source]

Detects the programs RC or windres, depending on the C/C++ compiler in use