add_hog_custom_button.tcl
Go to the documentation of this file.
17 # Creates two custom buttons in Vivado gui with Hog logo, to update automatically list files and hog.conf
23 set usage "Creates two custom buttons in Vivado gui with Hog logo, to update automatically list files and hog.conf.\nUSAGE: $::argv0"
30 create_gui_custom_command -name Hog_check -description "Check Hog listFiles and hog.conf" -show_on_toolbar -toolbar_icon $hog_path/images/hog_check.png -command "if {\[info exists env(HOG_EXTERNAL_PATH)\]} {set argv \[list \"-ext_path\" \"\$env(HOG_EXTERNAL_PATH)\"]} else { set argv \"\" }; set proj_file \[get_property DIRECTORY \[current_project\]\]; set index \[string last \"Projects/\" \$proj_file\]; set index \[expr \$index - 2\]; set repo_path \[string range \$proj_file 0 \$index\];
35 create_gui_custom_command -name Hog_listFiles -description "Recreate Hog listFiles (overwrites the old ones)" -show_on_toolbar -toolbar_icon $hog_path/images/hog_list.png -command "if {\[info exists env(HOG_EXTERNAL_PATH)\]} {set argv \[list \"-recreate\" \"-force\"\ \"-ext_path\" \"\$env(HOG_EXTERNAL_PATH)\"]} else { set argv \[list \"-recreate\" \"-force\"\] }; set proj_file \[get_property DIRECTORY \[current_project\]\]; set index \[string last \"Projects/\" \$proj_file\]; set index \[expr \$index - 2\]; set repo_path \[string range \$proj_file 0 \$index\];
40 create_gui_custom_command -name Hog_conf -description "Recreate hog.conf (overwrites the old ones)" -show_on_toolbar -toolbar_icon $hog_path/images/hog_cfg.png -command "if {\[info exists env(HOG_EXTERNAL_PATH)\]} {set argv \[list \"-recreate_conf\" \"-force\"\ \"-ext_path\" \"\$env(HOG_EXTERNAL_PATH)\"]} else { set argv \[list \"-recreate_conf\" \"-force\"\] }; set proj_file \[get_property DIRECTORY \[current_project\]\]; set index \[string last \"Projects/\" \$proj_file\]; set index \[expr \$index - 2\]; set repo_path \[string range \$proj_file 0 \$index\]; source -notrace \$repo_path/Hog/Tcl/utils/check_list_files.tcl; set argv \[list\]"