@ -23,6 +23,8 @@
#######################################
#######################################
#
#
# Revision: 2.0.1
#
# Description: script to automate PlatformIO builds
# Description: script to automate PlatformIO builds
# CLI: python auto_build.py build_option
# CLI: python auto_build.py build_option
# build_option (required)
# build_option (required)
@ -103,6 +105,7 @@ current_OS = platform.system()
target_env = ' '
target_env = ' '
board_name = ' '
board_name = ' '
#########
#########
# Python 2 error messages:
# Python 2 error messages:
# Can't find a usable init.tcl in the following directories ...
# Can't find a usable init.tcl in the following directories ...
@ -208,6 +211,13 @@ def resolve_path(path):
import os
import os
# turn the selection into a partial path
# turn the selection into a partial path
if 0 < = path . find ( ' " ' ) :
path = path [ path . find ( ' " ' ) : ]
if 0 < = path . find ( ' , line ' ) :
path = path . replace ( ' , line ' , ' : ' )
path = path . replace ( ' " ' , ' ' )
#get line and column numbers
#get line and column numbers
line_num = 1
line_num = 1
column_num = 1
column_num = 1
@ -969,6 +979,7 @@ class output_window(Text):
Text . __init__ ( self , self . frame , borderwidth = 3 , relief = " sunken " )
Text . __init__ ( self , self . frame , borderwidth = 3 , relief = " sunken " )
self . config ( tabs = ( 400 , ) ) # configure Text widget tab stops
self . config ( tabs = ( 400 , ) ) # configure Text widget tab stops
self . config ( background = ' black ' , foreground = ' white ' , font = ( " consolas " , 12 ) , wrap = ' word ' , undo = ' True ' )
self . config ( background = ' black ' , foreground = ' white ' , font = ( " consolas " , 12 ) , wrap = ' word ' , undo = ' True ' )
# self.config(background = 'black', foreground = 'white', font= ("consolas", 12), wrap = 'none', undo = 'True')
self . config ( height = 24 , width = 100 )
self . config ( height = 24 , width = 100 )
self . config ( insertbackground = ' pale green ' ) # keyboard insertion point
self . config ( insertbackground = ' pale green ' ) # keyboard insertion point
self . pack ( side = ' left ' , fill = ' both ' , expand = True )
self . pack ( side = ' left ' , fill = ' both ' , expand = True )
@ -991,6 +1002,25 @@ class output_window(Text):
self . config ( yscrollcommand = scrb . set )
self . config ( yscrollcommand = scrb . set )
scrb . pack ( side = ' right ' , fill = ' y ' )
scrb . pack ( side = ' right ' , fill = ' y ' )
# self.scrb_Y = tk.Scrollbar(self.frame, orient='vertical', command=self.yview)
# self.scrb_Y.config(yscrollcommand=self.scrb_Y.set)
# self.scrb_Y.pack(side='right', fill='y')
#
# self.scrb_X = tk.Scrollbar(self.frame, orient='horizontal', command=self.xview)
# self.scrb_X.config(xscrollcommand=self.scrb_X.set)
# self.scrb_X.pack(side='bottom', fill='x')
# scrb_X = tk.Scrollbar(self, orient=tk.HORIZONTAL, command=self.xview) # tk.HORIZONTAL now have a horizsontal scroll bar BUT... shrinks it to a postage stamp and hides far right behind the vertical scroll bar
# self.config(xscrollcommand=scrb_X.set)
# scrb_X.pack(side='bottom', fill='x')
#
# scrb= tk.Scrollbar(self, orient='vertical', command=self.yview)
# self.config(yscrollcommand=scrb.set)
# scrb.pack(side='right', fill='y')
# self.config(height = 240, width = 1000) # didn't get the size baCK TO NORMAL
# self.pack(side='left', fill='both', expand=True) # didn't get the size baCK TO NORMAL
# pop-up menu
# pop-up menu
self . popup = tk . Menu ( self , tearoff = 0 )
self . popup = tk . Menu ( self , tearoff = 0 )
@ -1230,6 +1260,10 @@ def main():
target_env = get_env ( board_name , Marlin_ver )
target_env = get_env ( board_name , Marlin_ver )
os . environ [ " BUILD_TYPE " ] = build_type # let sub processes know what is happening
os . environ [ " TARGET_ENV " ] = target_env
os . environ [ " BOARD_NAME " ] = board_name
auto_build = output_window ( )
auto_build = output_window ( )
if 0 < = target_env . find ( ' USB1286 ' ) :
if 0 < = target_env . find ( ' USB1286 ' ) :
copy_boards_dir ( ) # copy custom boards over to PlatformIO if using custom board
copy_boards_dir ( ) # copy custom boards over to PlatformIO if using custom board