How do I define ScriptDefines from either the command line or with executeScript

How do I add ScriptDefines for

<code A>
<code B>

when building from the command line or by using ExecuteScript? I need this for my CI setup.

Scripting define symbols can be set in playersettings.
In a build script you could use this:

Is this what you mean?

A little late to the party, but I want to leave the answer, should someone else stumble upon this.
Create a file csc.rsp in the root of your Asset folder, inject the line:


Delete it or whatever you want to do with it after compiling. The csc.rsp file will setup the defines properly before Unity builds.


For more details.