# Make sure the environment is properly set NQBP_BIN = os.environ.get('NQBP_BIN') if ( NQBP_BIN == None ): sys.exit( "ERROR: The environment variable NQBP_BIN is not set!" ) sys.path.append( NQBP_BIN ) # Find the Package & Workspace root from nqbplib import utils from nqbplib import my_globals utils.set_pkg_and_wrkspace_roots(__file__) #------------------------------------------------------------------------------ # MAIN ENTRY POINT.... # utils.set_verbose_mode( True ) prjdir = os.path.dirname(os.path.abspath(__file__)) srcpath = os.path.join( prjdir, 'src', 'Catch', 'precompiled' ) dstpath_release = os.path.join( my_globals.NQBP_PKG_ROOT(), 'libs', 'x86', 'windows', 'vc14', 'cpp11', '32bit', "release" ) dstpath_debug = os.path.join( my_globals.NQBP_PKG_ROOT(), 'libs', 'x86', 'windows', 'vc14', 'cpp11', '32bit', "debug" ) # # Build non-debug version # err, msg = utils.run_shell2( "nqbp.py -t", True ) if ( err != 0 ): sys.exit( "ERROR: Release build failed.") print( "Copying: {} TO\n {}".format( srcpath, dstpath_release ) ) shutil.rmtree( dstpath_release, True ); shutil.copytree(srcpath,dstpath_release)
print("BUILDING: " + cmd) if (config): cmd = utils.concatenate_commands(cfg, cmd) utils.run_shell2(cmd, verbose, f"ERROR: Build failure ({cmd})") utils.pop_dir() #------------------------------------------------------------------------------ # BEGIN if __name__ == '__main__': # Parse command line args = docopt(__doc__, version=BOB_VERSION, options_first=True) # Set quite & verbose modes utils.set_verbose_mode(args['-v']) # Default the projects/ dir path to the current working directory ppath = os.getcwd() # Project dir path is explicit set if (args['--path']): ppath = args['--path'] # Set which build engine to use build_script = args['-x'] # Get superset of projects to build utils.push_dir(ppath) utils.set_pkg_and_wrkspace_roots(ppath) pkgroot = NQBP_PKG_ROOT()