-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript_configure_tft_lib.py
29 lines (22 loc) · 1.38 KB
/
script_configure_tft_lib.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Import("env")
import shutil
# print("Current CLI targets", COMMAND_LINE_TARGETS)
# print("Current Build targets", BUILD_TARGETS)
print("===== copying TFT config files ===== ")
# https://stackoverflow.com/questions/123198/how-to-copy-files
# source file location: EleksTubeHAX_pio\src\GLOBAL_DEFINES.h & _USER_DEFINES.h
# target file location: EleksTubeHAX_pio\.pio\libdeps\esp32dev\TFT_eSPI\User_Setup.h
# copy using Python libraries
# "copy" changes file timestamp -> lib is always recompiled.
# "copy2" keeps file timestamp -> lib is compiled once
#shutil.copy2('./include/__CONFIG.h', './.pio/libdeps/JLINK_debug/TFT_eSPI/User_Setup.h')
#shutil.copy2('./include/__CONFIG.h', './.pio/libdeps/RELEASE/TFT_eSPI/User_Setup.h')
#shutil.copy2('./include/__CONFIG.h', './.pio/libdeps/DSP_ST7789/TFT_eSPI/User_Setup.h')
shutil.copy2('./include/__CONFIG.h', 'C:/PIO_LIBDEPS/display_JLINK_debug/TFT_eSPI/User_Setup.h')
shutil.copy2('./include/__CONFIG.h', 'C:/PIO_LIBDEPS/display_RELEASE/TFT_eSPI/User_Setup.h')
shutil.copy2('./include/__CONFIG.h', 'C:/PIO_LIBDEPS/display_DSP_ST7789/TFT_eSPI/User_Setup.h')
# copy using Windows command line
# native "copy" command keeps file timestamp -> lib is compiled once
# env.Execute("copy .\\src\\_USER_DEFINES.h .\\.pio\\libdeps\\esp32dev\\TFT_eSPI")
# env.Execute("copy .\\src\\GLOBAL_DEFINES.h .\\.pio\\libdeps\\esp32dev\\TFT_eSPI\\User_Setup.h")
print("Done.")