[Bf-committers] Scons can't define strings with spaces
Nathan Letwory
nathan at letworyinteractive.com
Thu Jan 27 15:57:24 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 26.1.2011 17:30, Tom Edwards wrote:
> In scons, string defines cannot contain spaces. The entire value is
> wrapped in quote marks even if it has already been escape-quoted.
>
> env['RCFLAGS'].append("-DTEST=\"a space\"")
> env['RCFLAGS'].append("-DTEST=\"nospace\"")
When giving a define like that you should use the Append() function of
the environment. And leave out the -D part, so:
env = BlenderEnvironment(ENV = os.environ)
env.Append(RCFLAGS="Test=\"test it\"")
print env['RCFLAGS']
Exit()
Gives
Test="test it"
This should give correct result when it gets used in the call that
generates the windres command.
/Nathan
>
> Gives:
>
> windres "-DTEST="a space"" -DTEST="nospace"
>
> And the first is, of course, an invalid arg.
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
- --
Nathan Letwory
Letwory Interactive
http://www.letworyinteractive.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNQYfUAAoJEKtfN7KsE0Ttjs8H/1UOaZc4TgLE+q7ZqTOrogsz
hZBxKm1PygWBAxD5ROif5bEjLXhJ2ZUPi6RPw+RisL02nM9hV6lTOasdpZZYWnZD
J068gP/kx6ycIOT7b7VOYvBTMB0xisNSQQ7HyRQjcmZa5+Xt4+ieby3Xje7WUTl7
oFjbPf8eBXjocqDzT31uZ6KgoZEUo7MZ8ejdSAJVNi9L5oW2UVaEmEFE8MMbToVa
cWJpYIgjBaj/Z7mEJnZ9xKC82bkMKy1uOnsVRevsqHKuKrJYGGylTqlxlzn8uXVP
KSL3BYpL0vWvOfaFwV4/GyhPYltaXOrkBRgXtlQFPdNvWbLMa6z5mvW8LyKgEFc=
=lKf0
-----END PGP SIGNATURE-----
More information about the Bf-committers
mailing list