added ability to build either standalone or from the editor.