def build_deploy_webpage(fips_dir, proj_dir, rebuild): # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/oryol-webpage'.format(ws_dir) if rebuild: if os.path.isdir(webpage_dir): shutil.rmtree(webpage_dir) if not os.path.isdir(webpage_dir): os.makedirs(webpage_dir) # compile samples if BuildEmscripten and emscripten.check_exists(fips_dir): project.gen(fips_dir, proj_dir, EmscConfig) project.build(fips_dir, proj_dir, EmscConfig) if BuildWasm and emscripten.check_exists(fips_dir): project.gen(fips_dir, proj_dir, WasmConfig) project.build(fips_dir, proj_dir, WasmConfig) # export sample assets if ExportAssets: export_assets(fips_dir, proj_dir, webpage_dir) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def run(fips_dir, proj_dir, args): """build fips project""" if not util.is_valid_project_dir(proj_dir): log.error('must be run in a project directory') cfg_name = None if len(args) > 0: cfg_name = args[0] if not cfg_name: cfg_name = settings.get(proj_dir, 'config') project.build(fips_dir, proj_dir, cfg_name)
def run(fips_dir, proj_dir, args) : """build fips project""" if not util.is_valid_project_dir(proj_dir) : log.error('must be run in a project directory') cfg_name = None if len(args) > 0 : cfg_name = args[0] if not cfg_name : cfg_name = settings.get(proj_dir, 'config') project.build(fips_dir, proj_dir, cfg_name)
def run(fips_dir, proj_dir, args) : if len(args) > 0 : cfg_name = args[0] project.gen(fips_dir, proj_dir, cfg_name) project.build(fips_dir, proj_dir, cfg_name) success, targets = project.get_target_list(fips_dir, proj_dir, cfg_name) if success : app_targets = [tgt for tgt in targets if targets[tgt] == 'app'] for app in app_targets : project.run(fips_dir, proj_dir, cfg_name, app, None, None) else : log.error("config name expected!")
def run(fips_dir, proj_dir, args): """build fips project""" if not util.is_valid_project_dir(proj_dir): log.error('must be run in a project directory') cfg_name = None build_tool_args = None if '--' in args: idx = args.index('--') build_tool_args = args[(idx + 1):] args = args[:idx] if len(args) > 0: cfg_name = args[0] if not cfg_name: cfg_name = settings.get(proj_dir, 'config') project.build(fips_dir, proj_dir, cfg_name, None, build_tool_args)
def build_deploy_webpage(fips_dir, proj_dir) : # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/voxel-test-webpage'.format(ws_dir) if os.path.isdir(webpage_dir) : shutil.rmtree(webpage_dir) os.makedirs(webpage_dir) # compile emscripten, pnacl and android samples if BuildEmscripten and emscripten.check_exists(fips_dir) : project.gen(fips_dir, proj_dir, 'emsc-ninja-release') project.build(fips_dir, proj_dir, 'emsc-ninja-release') # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir) : # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/oryol-wasm-buildsuite'.format(ws_dir) if not os.path.exists(webpage_dir) : os.makedirs(webpage_dir) config = 'wasmasmjs-make-release' project.clean(fips_dir, proj_dir, config) project.gen(fips_dir, proj_dir, config) for target in Samples : project.build(fips_dir, proj_dir, config, target) copy_build_files(fips_dir, proj_dir, webpage_dir) if ExportAssets : export_assets(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Done. ({})'.format(webpage_dir))
def run(fips_dir, proj_dir, args): """build a single target""" if not util.is_valid_project_dir(proj_dir): log.error("must be run in a project directory") tgt_name = None cfg_name = None if len(args) > 0: tgt_name = args[0] if len(args) > 1: cfg_name = args[1] if not cfg_name: cfg_name = settings.get(proj_dir, "config") if not tgt_name: tgt_name = settings.get(proj_dir, "target") if tgt_name == "clean": project.make_clean(fips_dir, proj_dir, cfg_name) else: project.build(fips_dir, proj_dir, cfg_name, tgt_name)
def build_deploy_webpage(fips_dir, proj_dir, rebuild) : # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/chips-webpage'.format(ws_dir) if rebuild : if os.path.isdir(webpage_dir) : shutil.rmtree(webpage_dir) if not os.path.isdir(webpage_dir) : os.makedirs(webpage_dir) # compile samples project.gen(fips_dir, proj_dir, BuildConfig) project.build(fips_dir, proj_dir, BuildConfig) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def run(fips_dir, proj_dir, args): """build a single target""" if not util.is_valid_project_dir(proj_dir): log.error('must be run in a project directory') tgt_name = None cfg_name = None if len(args) > 0: tgt_name = args[0] if len(args) > 1: cfg_name = args[1] if not cfg_name: cfg_name = settings.get(proj_dir, 'config') if not tgt_name: tgt_name = settings.get(proj_dir, 'target') if tgt_name == 'clean': project.make_clean(fips_dir, proj_dir, cfg_name) else: project.build(fips_dir, proj_dir, cfg_name, tgt_name)
def build_deploy_webpage(fips_dir, proj_dir): ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/v6502r-webpage'.format(ws_dir) if not os.path.isdir(webpage_dir): os.makedirs(webpage_dir) project.gen(fips_dir, proj_dir, BuildConfig) project.build(fips_dir, proj_dir, BuildConfig) src_dir = '{}/fips-deploy/v6502r/{}'.format(ws_dir, BuildConfig) dst_dir = webpage_dir shutil.copy(src_dir + '/v6502r.html', dst_dir + '/index.html') shutil.copy(src_dir + '/v6502r.wasm', dst_dir + '/v6502r.wasm') shutil.copy(src_dir + '/v6502r.js', dst_dir + '/v6502r.js') log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir, chip): ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/{}-webpage'.format(ws_dir, chip) if not os.path.isdir(webpage_dir): os.makedirs(webpage_dir) project.gen(fips_dir, proj_dir, BuildConfig) project.build(fips_dir, proj_dir, BuildConfig) proj_name = util.get_project_name_from_dir(proj_dir) util.ensure_valid_project_dir(proj_dir) src_dir = '{}/fips-deploy/NextSim/{}'.format(ws_dir, BuildConfig) dst_dir = webpage_dir #This area can be cleaned up sometime ns = "NextSim" shutil.copy(src_dir + '/' + ns + '.html', dst_dir + '/index.html') shutil.copy(src_dir + '/' + ns + '.wasm', dst_dir + '/' + ns + '.wasm') shutil.copy(src_dir + '/' + ns + '.js', dst_dir + '/' + ns + '.js') shutil.copy(proj_dir + '/src/res/favicon.png', dst_dir + '/favicon.png') log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir) : # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/oryol-samples-webpage'.format(ws_dir) if os.path.isdir(webpage_dir) : shutil.rmtree(webpage_dir) os.makedirs(webpage_dir) if emscripten.check_exists(fips_dir) : project.gen(fips_dir, proj_dir, BuildConfig) project.build(fips_dir, proj_dir, BuildConfig) # export sample assets if ExportAssets : export_assets(fips_dir, proj_dir, webpage_dir) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir) : # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/yakc-webpage/virtualkc'.format(ws_dir) if os.path.isdir(webpage_dir) : shutil.rmtree(webpage_dir) os.makedirs(webpage_dir) # compile emscripten, pnacl and android samples if emscripten.check_exists(fips_dir) : project.gen(fips_dir, proj_dir, 'yakc-emsc-make-release') project.build(fips_dir, proj_dir, 'yakc-emsc-make-release') # build the webpage via jekyll subprocess.call('jekyll build', cwd=proj_dir+'/web', shell=True) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir) : # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/oryol-webpage'.format(ws_dir) if os.path.isdir(webpage_dir) : shutil.rmtree(webpage_dir) os.makedirs(webpage_dir) # compile emscripten, pnacl and android samples if BuildEmscripten and emscripten.check_exists(fips_dir) : project.gen(fips_dir, proj_dir, 'emsc-make-release') project.build(fips_dir, proj_dir, 'emsc-make-release') if BuildPNaCl and nacl.check_exists(fips_dir) : project.gen(fips_dir, proj_dir, 'pnacl-make-release') project.build(fips_dir, proj_dir, 'pnacl-make-release') if BuildAndroid and android.check_exists(fips_dir) : project.gen(fips_dir, proj_dir, 'android-make-release') project.build(fips_dir, proj_dir, 'android-make-release') # export sample assets export_assets(fips_dir, proj_dir, webpage_dir) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir): # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/oryol-webpage'.format(ws_dir) if os.path.isdir(webpage_dir): shutil.rmtree(webpage_dir) os.makedirs(webpage_dir) # compile emscripten, pnacl and android samples if BuildEmscripten and emscripten.check_exists(fips_dir): project.gen(fips_dir, proj_dir, 'emsc-make-release') project.build(fips_dir, proj_dir, 'emsc-make-release') if BuildPNaCl and nacl.check_exists(fips_dir): project.gen(fips_dir, proj_dir, 'pnacl-make-release') project.build(fips_dir, proj_dir, 'pnacl-make-release') if BuildAndroid and android.check_exists(fips_dir): project.gen(fips_dir, proj_dir, 'android-make-release') project.build(fips_dir, proj_dir, 'android-make-release') # export sample assets export_assets(fips_dir, proj_dir, webpage_dir) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated Samples web page under {}.'.format(webpage_dir))
def build_deploy_webpage(fips_dir, proj_dir): # if webpage dir exists, clear it first ws_dir = util.get_workspace_dir(fips_dir) webpage_dir = '{}/fips-deploy/yakc-webpage/virtualkc'.format(ws_dir) if os.path.isdir(webpage_dir): shutil.rmtree(webpage_dir) os.makedirs(webpage_dir) # compile if emscripten.check_exists(fips_dir): project.gen(fips_dir, proj_dir, 'yakc-emsc-make-release') project.build(fips_dir, proj_dir, 'yakc-emsc-make-release') project.gen(fips_dir, proj_dir, 'yakc-wasm-make-release') project.build(fips_dir, proj_dir, 'yakc-wasm-make-release') # build the webpage via jekyll subprocess.call('jekyll build', cwd=proj_dir + '/web', shell=True) # deploy the webpage deploy_webpage(fips_dir, proj_dir, webpage_dir) log.colored(log.GREEN, 'Generated web page under {}.'.format(webpage_dir))