|
@@ -412,45 +412,6 @@ def open_file(path):
|
412
|
412
|
# end - open_file
|
413
|
413
|
|
414
|
414
|
|
415
|
|
-#
|
416
|
|
-# move custom board definitions from project folder to PlatformIO
|
417
|
|
-#
|
418
|
|
-def copy_boards_dir():
|
419
|
|
-
|
420
|
|
- temp = os.environ
|
421
|
|
- for key in temp:
|
422
|
|
- if 0 <= os.environ[key].find('.platformio'):
|
423
|
|
- part = os.environ[key].split(';')
|
424
|
|
- for part2 in part:
|
425
|
|
- if 0 <= part2.find('.platformio'):
|
426
|
|
- path = part2
|
427
|
|
- break
|
428
|
|
-
|
429
|
|
- PIO_path = path[ : path.find('.platformio') + 11]
|
430
|
|
-
|
431
|
|
-# import sys
|
432
|
|
-# import subprocess
|
433
|
|
-# pio_subprocess = subprocess.Popen(['platformio', 'run', '-t', 'envdump'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
434
|
|
-#
|
435
|
|
-# # stream output from subprocess and split it into lines
|
436
|
|
-# for line in iter(pio_subprocess.stdout.readline, ''):
|
437
|
|
-# if 0 <= line.find('PIOHOME_DIR'):
|
438
|
|
-# start = line.find(':') + 3
|
439
|
|
-# end = line.find(',') - 1
|
440
|
|
-# PIO_path = line[start:end]
|
441
|
|
-
|
442
|
|
-
|
443
|
|
- PIO_path = PIO_path.replace("\\", "/")
|
444
|
|
- PIO_path = PIO_path.replace("//", "/") + '/boards'
|
445
|
|
-
|
446
|
|
- board_path = 'buildroot/share/PlatformIO/boards'
|
447
|
|
-
|
448
|
|
- from distutils.dir_util import copy_tree
|
449
|
|
- copy_tree(board_path, PIO_path)
|
450
|
|
-
|
451
|
|
-# end copy_boards_dir
|
452
|
|
-
|
453
|
|
-
|
454
|
415
|
# gets the last build environment
|
455
|
416
|
def get_build_last():
|
456
|
417
|
env_last = ''
|
|
@@ -1265,9 +1226,6 @@ def main():
|
1265
|
1226
|
os.environ["BOARD_NAME"] = board_name
|
1266
|
1227
|
|
1267
|
1228
|
auto_build = output_window()
|
1268
|
|
- if 0 <= target_env.find('USB1286'):
|
1269
|
|
- copy_boards_dir() # copy custom boards over to PlatformIO if using custom board
|
1270
|
|
- # causes 3-5 second delay in main window appearing
|
1271
|
1229
|
auto_build.start_thread() # executes the "run_PIO" function
|
1272
|
1230
|
|
1273
|
1231
|
auto_build.root.mainloop()
|