create_examples.py (a7649d03c91293b8e581bf553bc7be28d14a13da) | create_examples.py (bd8e4ef6a3436905ed5e1e8ec73ecac69ed95b50) |
---|---|
1#!/usr/bin/env python 2# 3# Create project files for all BTstack embedded examples in local port/esp32 folder 4 5import os 6import shutil 7import sys 8import time --- 103 unchanged lines hidden (view full) --- 112 with open(apps_folder + "CMakeLists.txt", "wt") as fout: 113 fout.write(example_cmake_template.replace("EXAMPLE", example).replace("TOOL", script_path).replace("DATE",time.strftime("%c"))) 114 115 # create main folder 116 main_folder = apps_folder + "main/" 117 if not os.path.exists(main_folder): 118 os.makedirs(main_folder) 119 | 1#!/usr/bin/env python 2# 3# Create project files for all BTstack embedded examples in local port/esp32 folder 4 5import os 6import shutil 7import sys 8import time --- 103 unchanged lines hidden (view full) --- 112 with open(apps_folder + "CMakeLists.txt", "wt") as fout: 113 fout.write(example_cmake_template.replace("EXAMPLE", example).replace("TOOL", script_path).replace("DATE",time.strftime("%c"))) 114 115 # create main folder 116 main_folder = apps_folder + "main/" 117 if not os.path.exists(main_folder): 118 os.makedirs(main_folder) 119 |
120 # copy main file 121 shutil.copyfile(script_path + '/template/main/main.c', apps_folder + "/main/main.c") 122 |
|
120 # copy example file 121 shutil.copyfile(examples_embedded + file, apps_folder + "/main/" + example + ".c") 122 123 # add sco_demo_util.c for audio examples 124 if example in ['hfp_ag_demo','hfp_hf_demo', 'hsp_ag_demo', 'hsp_hs_demo']: 125 shutil.copy(examples_embedded + 'sco_demo_util.c', apps_folder + '/main/') 126 shutil.copy(examples_embedded + 'sco_demo_util.h', apps_folder + '/main/') 127 --- 30 unchanged lines hidden --- | 123 # copy example file 124 shutil.copyfile(examples_embedded + file, apps_folder + "/main/" + example + ".c") 125 126 # add sco_demo_util.c for audio examples 127 if example in ['hfp_ag_demo','hfp_hf_demo', 'hsp_ag_demo', 'hsp_hs_demo']: 128 shutil.copy(examples_embedded + 'sco_demo_util.c', apps_folder + '/main/') 129 shutil.copy(examples_embedded + 'sco_demo_util.h', apps_folder + '/main/') 130 --- 30 unchanged lines hidden --- |