@ -27,7 +27,7 @@
# D i f f e r e n c e s :
#
# 1 . T h e p r o j e c t d i r e c t o r y i s n o w r e l a t i v e t o t h e s c r i p t s l o c a t i o n .
# P r o j e c t d i r e c t o r y w a s r e l a t i v e t o t h e t c l c o n s o l e c u r r e n t d i r e c t o r y .
# P r o j e c t d i r e c t o r y w a s r e l a t i v e t o t h e t c l c o n s o l e c u r r e n t d i r e c t o r y .
#
# 2 . W h e n r e c r e a t i n g a p r o j e c t , t h e g e n e r a t e d f i l e s w i l l b e p u t i n a " v i v a d o _ p r o j e c t " d i r e c t o r y
# u n d e r t h e t o p d i r e c t o r y . I f " v i v a d o _ p r o j e c t " e x i s t s a l r e a d y , i t w i l l b e r e w r i t t e n .
@ -193,6 +193,7 @@ set a_fileset_types {
{ { BlockSrcs } { blockset } }
{ { Constrs } { constrset } }
{ { SimulationSrcs } { simset } }
{ { Utils } { utilset } }
}
proc reset_global_vars { } {
@ -250,6 +251,7 @@ proc write_project_tcl_script {} {
variable clean_temp
variable l_open_bds [ list ]
variable l_added_bds
variable a_os
set l_script_data [ list ]
set l_local_files [ list ]
@ -266,6 +268,13 @@ proc write_project_tcl_script {} {
file mkdir $temp_dir
}
# G e t O S
if { [ is_win_os ] } {
set a_os " w i n "
} else {
set a_os " "
}
# g e t t h e p r o j e c t n a m e
set tcl_obj [ current_project ]
set proj_name [ file tail [ get_property name $tcl_obj ] ]
@ -323,6 +332,8 @@ proc write_project_tcl_script {} {
wr_runs $proj_dir $proj_name
wr_proj_info $proj_name
# w r i t e d a s h b o a r d s
wr_dashboards $proj_dir $proj_name
# w r i t e h e a d e r
write_header $proj_dir $proj_name $file
@ -355,9 +366,9 @@ proc write_project_tcl_script {} {
path that was specified with this switch. The ' origin_dir' variable is set to ' $a_global_vars ( s_origin_dir_override ) ' in the generated script."
}
} else {
send_msg_id Vivado-projutils-015 INFO " P l e a s e n o t e t h a t b y d e f a u l t , t h e f i l e p a t h f o r t h e p r o j e c t s o u r c e f i l e s w e r e s e t w r t t h e ' o r i g i n _ d i r ' v a r i a b l e i n t h e \n \
generated script. When this script is executed from the output directory, these source files will be referenced wrt this ' origin_dir' path value.\ n\
In case this script was later physically moved to a different directory, the ' origin_dir' value MUST be set manually in the script with the path\ n\
send_msg_id Vivado-projutils-015 INFO " P l e a s e n o t e t h a t b y d e f a u l t , t h e f i l e p a t h f o r t h e p r o j e c t s o u r c e f i l e s w e r e s e t w t h re s p e c t t o t h e ' o r i g i n _ d i r ' v a r i a b l e i n t h e \n \
generated script. When this script is executed from the output directory, these source files will be referenced with respec t to this ' origin_dir' path value.\ n\
In case this script was later moved to a different directory, the ' origin_dir' value must be set manually in the script with the path\ n\
relative to the new output directory to make sure that the source files are referenced correctly from the original project. You can also set the\ n\
' origin_dir ' automatically by setting the ' origin_dir_loc' variable in the tcl shell before sourcing this generated script. The ' origin_dir_loc' \ n\
variable should be set to the path relative to the new output directory. Alternatively, if you are sourcing the script from the Vivado command line, \ n\
@ -399,10 +410,10 @@ proc wr_create_project { proj_dir name part_name } {
lappend l_script_data " "
set var_name " u s e r _ p r o j e c t _ n a m e "
lappend l_script_data " # S e t t h e p r o j e c t n a m e \n s e t p r o j e c t _ n a m e \" $ n a m e \" \n "
lappend l_script_data " # S e t t h e p r o j e c t n a m e \n s e t _ x i l _ p r o j _ n a m e _ \" $ n a m e \" \n "
lappend l_script_data " # U s e p r o j e c t n a m e v a r i a b l e , i f s p e c i f i e d i n t h e t c l s h e l l "
lappend l_script_data " i f \{ \[ i n f o e x i s t s : : $ v a r _ n a m e \] \} \{ "
lappend l_script_data " s e t p r o j e c t _ n a m e \$ : : $ v a r _ n a m e "
lappend l_script_data " s e t _ x i l _ p r o j _ n a m e _ \$ : : $ v a r _ n a m e "
lappend l_script_data " \} \n "
lappend l_script_data " v a r i a b l e s c r i p t _ f i l e "
@ -442,11 +453,11 @@ proc wr_create_project { proj_dir name part_name } {
lappend l_script_data " e x i t 0 "
lappend l_script_data " \} \n "
lappend l_script_data " i f \{ \$ : : a r g c > 0 \} \{ "
lappend l_script_data " f o r \{ s e t i 0 \} \{ \$ i < \[ l l e n g t h \ $ : : a r g c \] \} \{ i n c r i \} \{ "
lappend l_script_data " f o r \{ s e t i 0 \} \{ \$ i < \$ : : a r g c \} \{ i n c r i \} \{ "
lappend l_script_data " s e t o p t i o n \[ s t r i n g t r i m \[ l i n d e x \$ : : a r g v \$ i \] \] "
lappend l_script_data " s w i t c h - r e g e x p - - \$ o p t i o n \{ "
lappend l_script_data " \" - - o r i g i n _ d i r \" \{ i n c r i ; s e t o r i g i n _ d i r \[ l i n d e x \$ : : a r g v \$ i \] \} "
lappend l_script_data " \" - - p r o j e c t _ n a m e \" \{ i n c r i ; s e t p r o j e c t _ n a m e \[ l i n d e x \$ : : a r g v \$ i \] \} "
lappend l_script_data " \" - - p r o j e c t _ n a m e \" \{ i n c r i ; s e t _ x i l _ p r o j _ n a m e _ \[ l i n d e x \$ : : a r g v \$ i \] \} "
lappend l_script_data " \" - - h e l p \" \{ h e l p \} "
lappend l_script_data " d e f a u l t \{ "
lappend l_script_data " i f \{ \[ r e g e x p \{ ^ - \} \$ o p t i o n \] \} \{ "
@ -459,7 +470,7 @@ proc wr_create_project { proj_dir name part_name } {
lappend l_script_data " \} \n "
lappend l_script_data " # S e t t h e d i r e c t o r y p a t h f o r t h e o r i g i n a l p r o j e c t f r o m w h e r e t h i s s c r i p t w a s e x p o r t e d "
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $proj_dir ] } {
lappend l_script_data " s e t o r i g _ p r o j _ d i r \" $ p r o j _ d i r \" "
} else {
set rel_file_path " [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ p r o j _ d i r [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
@ -475,15 +486,15 @@ proc wr_create_project { proj_dir name part_name } {
# s e t t a r g e t p r o j e c t d i r e c t o r y p a t h i f s p e c i f i e d . I f n o t , c r e a t e p r o j e c t d i r i n c u r r e n t d i r .
set target_dir $a_global_vars ( s_target_proj_dir )
if { { } == $target_dir } {
set tcl_cmd " c r e a t e _ p r o j e c t \$ \{ p r o j e c t _ n a m e \} \$ o r i g i n _ d i r / v i v a d o _ p r o j e c t - p a r t $ p a r t _ n a m e - q u i e t - f o r c e "
set tcl_cmd " c r e a t e _ p r o j e c t \$ \{ _ x i l _ p r o j _ n a m e _ \} \$ o r i g i n _ d i r / v i v a d o _ p r o j e c t - p a r t $ p a r t _ n a m e - q u i e t - f o r c e "
} else {
# i s s p e c i f i e d t a r g e t p r o j d i r = = c u r r e n t d i r ?
set cwd [ file normalize [ string map { \ \ / } [ pwd ] ] ]
set dir [ file normalize [ string map { \ \ / } $target_dir ] ]
if { [ string equal $cwd $dir ] } {
set tcl_cmd " c r e a t e _ p r o j e c t \$ p r o j e c t _ n a m e - p a r t $ p a r t _ n a m e "
set tcl_cmd " c r e a t e _ p r o j e c t \$ \{ _ x i l _ p r o j _ n a m e _ \} - p a r t $ p a r t _ n a m e "
} else {
set tcl_cmd " c r e a t e _ p r o j e c t \$ p r o j e c t _ n a m e \" $ t a r g e t _ d i r \" - p a r t $ p a r t _ n a m e "
set tcl_cmd " c r e a t e _ p r o j e c t \$ \{ _ x i l _ p r o j _ n a m e _ \} \" $ t a r g e t _ d i r \" - p a r t $ p a r t _ n a m e "
}
}
@ -493,7 +504,7 @@ proc wr_create_project { proj_dir name part_name } {
lappend l_script_data $tcl_cmd
if { $a_global_vars ( b_arg_dump_proj_info ) } {
puts $a_global_vars ( dp_fh ) " p r o j e c t _ n a m e = \$ \{ p r o j e c t _ n a m e \} "
puts $a_global_vars ( dp_fh ) " p r o j e c t _ n a m e = \$ \{ _ x i l _ p r o j _ n a m e _ \} "
}
lappend l_script_data " "
@ -550,6 +561,7 @@ proc write_bd_as_proc { bd_file } {
variable l_open_bds
variable temp_dir
variable bd_prop_steps
set bd_file [ list " $ b d _ f i l e " ]
if { [ lsearch $l_added_bds $bd_file ] != -1 } { return }
@ -580,8 +592,6 @@ proc write_bd_as_proc { bd_file } {
# C l o s e B D i f o p e n e d i n s t e a l t h m o d e
if { $to_close == 1 } {
# c l o s e _ b d _ d e s i g n - s t e a l t h [ g e t _ f i l e s $ b d _ f i l e ]
# c l o s e _ b d _ d e s i g n [ g e t _ b d _ d e s i g n s [ f i l e r o o t n a m e $ b d _ f i l e n a m e ] ]
close_bd_design [ get_bd_designs [ file rootname $bd_filename ] ]
}
@ -700,7 +710,7 @@ proc wr_bd {} {
foreach bd_file $bd_files {
# M a k i n g s u r e B D i s n o t l o c k e d
set is_locked [ get_property IS_LOCKED [ get_files $bd_file ] ]
set is_locked [ get_property IS_LOCKED [ get_files [ list " $ b d _ f i l e " ] ] ]
if { $is_locked == 1 } {
file delete $a_global_vars ( script_file )
send_msg_id Vivado-projutils-018 ERROR " P r o j e c t t c l c a n n o t b e w r i t t e n a s t h e d e s i g n c o n t a i n s o n e o r m o r e \
@ -764,6 +774,8 @@ proc write_specified_fileset { proj_dir proj_name filesets } {
# i s t h i s a I P b l o c k f i l e s e t ? i f y e s , d o n o t c r e a t e b l o c k f i l e s e t , b u t c r e a t e f o r a p u r e H D L b a s e d f i l e s e t ( n o I P ' s )
if { [ is_ip_fileset $tcl_obj ] } {
# d o n o t c r e a t e b l o c k f i l e s e t
} elseif { [ string equal $tcl_obj " u t i l s _ 1 " ] } {
# d o n o t c r e a t e u t i l s f i l e s e t
} else {
lappend l_script_data " # C r e a t e ' $ t c l _ o b j ' f i l e s e t ( i f n o t f o u n d ) "
lappend l_script_data " i f \{ \[ s t r i n g e q u a l \[ g e t _ f i l e s e t s - q u i e t $ t c l _ o b j \] \" \" \] \} \{ "
@ -797,7 +809,7 @@ proc write_specified_fileset { proj_dir proj_name filesets } {
lappend l_script_data " s e t o b j \[ g e t _ f i l e s e t s $ t c l _ o b j \] "
set path_list [ list ]
foreach path $repo_paths {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $path ] } {
lappend path_list $path
} else {
set rel_file_path " [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ p a t h [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
@ -881,7 +893,7 @@ proc wr_proj_info { proj_name } {
variable l_script_data
lappend l_script_data " \n p u t s \" I N F O : P r o j e c t c r e a t e d : \$ p r o j e c t _ n a m e \" "
lappend l_script_data " \n p u t s \" I N F O : P r o j e c t c r e a t e d : \$ { _ x i l _ p r o j _ n a m e _ } \" "
}
proc write_header { proj_dir proj_name file } {
@ -995,6 +1007,11 @@ proc filter { prop val { file {} } } {
return 1
}
# f i l t e r s i m _ t y p e s
if { [ string equal - nocase $prop { sim_types } ] } {
return 1
}
return 0
}
@ -1037,7 +1054,7 @@ proc is_ip_readonly_prop { name } {
return false
}
proc write_properties { prop_info_list get_what tcl_obj } {
proc write_properties { prop_info_list get_what tcl_obj { delim " # " } } {
# S u m m a r y : w r i t e o b j e c t p r o p e r t i e s
# T h i s h e l p e r c o m m a n d i s u s e d t o s c r i p t h e l p .
# A r g u m e n t U s a g e :
@ -1050,7 +1067,7 @@ proc write_properties { prop_info_list get_what tcl_obj } {
if { [ llength $prop_info_list ] > 0 } {
set b_add_closing_brace 0
foreach x $prop_info_list {
set elem [ split $x " # " ]
set elem [ split $x $delim ]
set name [ lindex $elem 0 ]
set value [ lindex $elem 1 ]
if { ( [ is_ip_readonly_prop $name ] ) && ( [ string equal $get_what " g e t _ f i l e s " ] ) } {
@ -1113,15 +1130,15 @@ proc align_project_properties { prop proj_name proj_file_path } {
set match_str " $ { p r o j _ n a m e } / $ { p r o j _ n a m e } . $ { d i r _ s u f f i x } "
set proj_file_path [ string map { \ \ / } $proj_file_path ]
if { [ regexp $match_str $proj_file_path ] } {
set proj_file_path [ regsub - all " $ { p r o j _ n a m e } " $proj_file_path " \$ \{ p r o j e c t _ n a m e \} " ]
set proj_file_path [ regsub - all " $ { p r o j _ n a m e } " $proj_file_path " \$ \{ _ x i l _ p r o j _ n a m e _ \} " ]
} else {
set match_str " $ { p r o j _ n a m e } . $ { d i r _ s u f f i x } "
set proj_file_path [ regsub " $ { p r o j _ n a m e } \. $ { d i r _ s u f f i x } " $proj_file_path " \$ \{ p r o j e c t _ n a m e \} \. $ { d i r _ s u f f i x } " ]
set proj_file_path [ regsub " $ { p r o j _ n a m e } \. $ { d i r _ s u f f i x } " $proj_file_path " \$ \{ _ x i l _ p r o j _ n a m e _ \} \. $ { d i r _ s u f f i x } " ]
}
return $proj_file_path
}
proc write_props { proj_dir proj_name get_what tcl_obj type } {
proc write_props { proj_dir proj_name get_what tcl_obj type { delim " # " } } {
# S u m m a r y : w r i t e f i r s t c l a s s o b j e c t p r o p e r t i e s
# T h i s h e l p e r c o m m a n d i s u s e d t o s c r i p t h e l p .
# A r g u m e n t U s a g e :
@ -1132,19 +1149,51 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
variable l_script_data
variable b_project_board_set
set obj_name [ get_property name [ $get_what $tcl_obj ] ]
set read_only_props [ rdi : : get_attr_specs - class [ get_property class $tcl_obj ] - filter { is_readonly } ]
if { [ string equal $type " p r o j e c t " ] } {
# e s c a p e e m p t y s p a c e s i n p r o j e c t n a m e
set tcl_obj [ list " $ t c l _ o b j " ]
}
if { [ string first " " $get_what 0 ] != -1 } {
# F o r c a s e s w h e r e g e t _ w h a t i s m u l t i p l e w o r k d s l i k e " g e t _ g a d g e t s - o f _ o b j e c t . . . "
set current_obj [ eval $get_what $tcl_obj ]
} else {
set current_obj [ $get_what $tcl_obj ]
}
if { $current_obj == " " } { return }
set obj_name [ get_property name $current_obj ]
set read_only_props [ rdi : : get_attr_specs - class [ get_property class $current_obj ] - filter { is_readonly } ]
set prop_info_list [ list ]
set properties [ list_property [ $get_what $tcl_obj ] ]
set properties [ list_property $current_obj ]
foreach prop $properties {
if { [ is_deprecated_property $prop ] } { continue }
# s k i p r e a d - o n l y p r o p e r t i e s
if { [ lsearch $read_only_props $prop ] != -1 } { continue }
if { ( [ string equal $type " g a d g e t " ] ) && ( [ string equal - nocase $prop " t y p e " ] ) } {
continue
}
# T o h a n d l e t h e w o r k - a r o u n d s o l u t i o n o f C R - 9 8 8 5 8 8 s e t b o a r d _ p a r t t o b a s e _ b o a r d _ p a r t v a l u e t h e n s e t b o a r d _ c o n n e c t i o n s
if { ( [ string equal $type " p r o j e c t " ] ) && ( [ string equal [ string tolower $prop ] " b o a r d _ c o n n e c t i o n s " ] ) } {
continue
}
if { ( [ string equal $type " p r o j e c t " ] ) && $b_project_board_set && ( [ string equal [ string tolower $prop ] " b o a r d _ p a r t " ] ) } {
set board_part_val [ get_property $prop $current_obj ]
set base_board_part_val [ get_property base_board_part $current_obj ]
set board_connections_val [ get_property board_connections $current_obj ]
if { $base_board_part_val != " " && $base_board_part_val != $board_part_val } {
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ b a s e _ b o a r d _ p a r t _ v a l "
lappend prop_info_list $prop_entry
set prop_entry " b o a r d _ c o n n e c t i o n s $ d e l i m $ b o a r d _ c o n n e c t i o n s _ v a l "
lappend prop_info_list $prop_entry
continue
}
}
# s k i p w r i t i n g P R - C o n f i g u r a t i o n , a t t a c h e d r i g h t a f t e r c r e a t i o n o f i m p l r u n
if { ( [ get_property pr_flow [ current_project ] ] == 1 ) && [ string equal $type " r u n " ] } {
set isImplRun [ get_property is_implementation [ $get_what $tcl_obj ] ]
set isImplRun [ get_property is_implementation $current_obj ]
if { ( $isImplRun == 1 ) && [ string equal - nocase $prop " p r _ c o n f i g u r a t i o n " ] } {
continue
}
@ -1153,7 +1202,7 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
set prop_type " u n k n o w n "
if { [ string equal $type " r u n " ] } {
# s k i p s t e p s . < s t e p _ n a m e > . r e p o r t s d y n a m i c r e a d o n l y p r o p e r t y ( t o b e p o p u l a t e d b y c r e a t i o n o f r e p o r t s )
if { [ regexp - nocase " S T E P S \. . * \. R E P O R T S " $prop ] } {
if { [ regexp - nocase " S T E P S \. . * \. R E P O R T S " $prop ] || [ string equal - nocase " R E P O R T _ S T R A T E G Y " $prop ] } {
continue ;
}
if { [ regexp " S T E P S " $prop ] } {
@ -1165,16 +1214,17 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
}
}
} else {
set attr_spec [ rdi : : get_attr_specs - quiet $prop - object [ $get_what $tcl_obj ] ]
set attr_spec [ rdi : : get_attr_specs - quiet $prop - object $current_obj ]
if { { } == $attr_spec } {
set prop_lower [ string tolower $prop ]
set attr_spec [ rdi : : get_attr_specs - quiet $prop_lower - object [ $get_what $tcl_obj ] ]
set attr_spec [ rdi : : get_attr_specs - quiet $prop_lower - object $current_obj ]
}
set prop_type [ get_property type $attr_spec ]
}
set def_val [ list_property_value - default $prop $tcl_obj ]
set def_val [ list_property_value - default $prop $current_obj ]
set dump_prop_name [ string tolower $ { obj_name } _$ { type } _$prop ]
set cur_val [ get_property $prop $tcl _obj ]
set cur_val [ get_property $prop $current _obj ]
# f i l t e r s p e c i a l p r o p e r t i e s
if { [ filter $prop $cur_val ] } { continue }
@ -1201,18 +1251,18 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
# r e - a l i g n v a l u e s
set cur_val [ get_target_bool_val $def_val $cur_val ]
set abs_proj_file_path [ get_property $prop [ $get_what $tcl_obj ] ]
set abs_proj_file_path [ get_property $prop $current_obj ]
set path_match [ string match $proj_dir * $abs_proj_file_path ]
if { ( $path_match == 1 ) && ( $a_global_vars ( b_absolute_path ) != 1 ) } {
if { ( $path_match == 1 ) && ( $a_global_vars ( b_absolute_path ) != 1 ) && ! [ need_abs_path $abs_proj_file_path ] } {
# c h a n g i n g t h e a b s o l u t e p a t h t o r e l a t i v e
set abs_path_length [ string length $proj_dir ]
set proj_file_path [ string replace $abs_proj_file_path 0 $abs_path_length " \$ p r o j _ d i r / " ]
set proj_file_path [ align_project_properties $prop $proj_name $proj_file_path ]
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # $ p r o j _ f i l e _ p a t h "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ p r o j _ f i l e _ p a t h "
} else {
set abs_proj_file_path [ align_project_properties $prop $proj_name $abs_proj_file_path ]
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # $ a b s _ p r o j _ f i l e _ p a t h "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ a b s _ p r o j _ f i l e _ p a t h "
}
# r e - a l i g n i n c l u d e d i r p a t h w r t o r i g i n d i r
@ -1222,9 +1272,11 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
set incl_paths $abs_proj_file_path
set rel_paths [ list ]
foreach path $incl_paths {
lappend rel_paths " \[ f i l e n o r m a l i z e \" \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ p a t h [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] \" \] "
if { ! [ need_abs_path $path ] } {
lappend rel_paths " \[ f i l e n o r m a l i z e \" \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ p a t h [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] \" \] "
}
}
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # [ j o i n $ r e l _ p a t h s " " ] "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m [ j o i n $ r e l _ p a t h s " " ] "
}
}
}
@ -1237,12 +1289,12 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
set file_dirs [ split [ string trim [ file normalize [ string map { \ \ / } $file ] ] ] " / " ]
set src_file [ join [ lrange $file_dirs [ lsearch - exact $file_dirs " $ s r c s _ d i r " ] end] " / " ]
if { [ is_local_to_project $file ] } {
if { [ is_local_to_project $file ] || [ need_abs_path $file ] } {
set proj_file_path " \$ p r o j _ d i r / $ s r c _ f i l e "
} else {
set proj_file_path " [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ s r c _ f i l e [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
}
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # $ p r o j _ f i l e _ p a t h "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ p r o j _ f i l e _ p a t h "
} elseif { ( [ string equal - nocase $prop " t a r g e t _ c o n s t r s _ f i l e " ] ||
[ string equal - nocase $prop " t a r g e t _ u c f " ] ) &&
@ -1260,7 +1312,7 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
if { $a_global_vars ( b_arg_no_copy_srcs ) } {
set proj_file_path " \$ o r i g _ p r o j _ d i r / $ { p r o j _ n a m e } . s r c s / $ s r c _ f i l e "
} else {
set proj_file_path " \$ p r o j _ d i r / \$ p r o j e c t _ n a m e . s r c s / $ s r c _ f i l e "
set proj_file_path " \$ p r o j _ d i r / \$ \{ _ x i l _ p r o j _ n a m e _ \} . s r c s / $ s r c _ f i l e "
}
} else {
# i s f i l e n e w i n s i d e p r o j e c t ?
@ -1272,7 +1324,7 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
set file $local_constrs_file
set proj_file_path " \[ g e t _ f i l e s * $ l o c a l _ c o n s t r s _ f i l e \] "
} else {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
set proj_file_path " $ f i l e "
} else {
set file_no_quotes [ string trim $file " \" " ]
@ -1282,7 +1334,7 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
}
}
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # $ p r o j _ f i l e _ p a t h "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ p r o j _ f i l e _ p a t h "
}
@ -1300,9 +1352,9 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
if { [ lsearch - exact $path_dirs " $ c a c h e _ d i r " ] > 0 } {
set dir_path [ join [ lrange $path_dirs [ lsearch - exact $path_dirs " $ c a c h e _ d i r " ] end] " / " ]
set compile_lib_dir_path " \$ p r o j _ d i r / $ d i r _ p a t h "
set compile_lib_dir_path [ regsub $cache_dir $compile_lib_dir_path " \$ \{ p r o j e c t _ n a m e \} \. c a c h e " ]
set compile_lib_dir_path [ regsub $cache_dir $compile_lib_dir_path " \$ \{ _ x i l _ p r o j _ n a m e _ \} \. c a c h e " ]
}
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # $ c o m p i l e _ l i b _ d i r _ p a t h "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ c o m p i l e _ l i b _ d i r _ p a t h "
}
# p r o c e s s r u n s t e p t c l p r e / p o s t p r o p e r t i e s
@ -1320,14 +1372,14 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
if { [ is_local_to_project $file ] } {
set tcl_file_path " \$ p r o j _ d i r / $ s r c _ f i l e "
} else {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
set tcl_file_path " $ f i l e "
} else {
set rel_file_path " [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ s r c _ f i l e [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
set tcl_file_path " \[ f i l e n o r m a l i z e \" \$ o r i g i n _ d i r / $ r e l _ f i l e _ p a t h \" \] "
}
}
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] # $ t c l _ f i l e _ p a t h "
set prop_entry " [ s t r i n g t o l o w e r $ p r o p ] $ d e l i m $ t c l _ f i l e _ p a t h "
}
}
}
@ -1369,7 +1421,7 @@ proc write_props { proj_dir proj_name get_what tcl_obj type } {
}
# w r i t e p r o p e r t i e s n o w
write_properties $prop_info_list $get_what $tcl_obj
write_properties $prop_info_list $get_what $tcl_obj $delim
}
@ -1517,25 +1569,25 @@ proc write_files { proj_dir proj_name tcl_obj type } {
# i m p o r t f i l e s
set imported_path [ get_property " i m p o r t e d _ f r o m " $file ]
set rel_file_path [ get_relative_file_path_for_source $file [ get_script_execution_dir ] ]
set proj_file_path " \$ o r i g i n _ d i r / $ r e l _ f i l e _ p a t h "
set proj_file_path " \$ \{ or i g i n _ d i r \} / $ r e l _ f i l e _ p a t h "
set file " \" [ f i l e n o r m a l i z e $ p r o j _ d i r / $ { p r o j _ n a m e } . s r c s / $ s r c _ f i l e ] \" "
if { $a_global_vars ( b_arg_no_copy_srcs ) } {
# a d d t o t h e l o c a l c o l l e c t i o n
lappend l_remote_file_list $file
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend add_file_coln " $ f i l e "
} else {
lappend add_file_coln " \" \ [ f i l e n o r m a l i z e \" $ p r o j _ f i l e _ p a t h \" \] \" "
lappend add_file_coln " \[ f i l e n o r m a l i z e \" $ p r o j _ f i l e _ p a t h \" \] "
}
} else {
# a d d t o t h e i m p o r t c o l l e c t i o n
lappend l_local_file_list $file
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend import_coln " $ f i l e "
} else {
lappend import_coln " \" \ [ f i l e n o r m a l i z e \" $ p r o j _ f i l e _ p a t h \" \] \" "
lappend import_coln " \[ f i l e n o r m a l i z e \" $ p r o j _ f i l e _ p a t h \" \] "
}
}
@ -1549,21 +1601,21 @@ proc write_files { proj_dir proj_name tcl_obj type } {
}
# a d d t o t h e i m p o r t c o l l e c t i o n
if { $a_global_vars ( b_absolute_path ) } {
lappend import_coln [ file normalize [ string trim $file " \" " ] ]
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend import_coln $file
} else {
set file_no_quotes [ string trim $file " \" " ]
set org_file_path " \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e _ n o _ q u o t e s [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
lappend import_coln " \" \ [ f i l e n o r m a l i z e \" $ o r g _ f i l e _ p a t h \" \] \" "
set org_file_path " \$ \{ or i g i n _ d i r \} / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e _ n o _ q u o t e s [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
lappend import_coln " \[ f i l e n o r m a l i z e \" $ o r g _ f i l e _ p a t h \" \] "
}
lappend l_local_file_list $file
} else {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend add_file_coln [ string trim $file " \" " ]
} else {
set file_no_quotes [ string trim $file " \" " ]
set org_file_path " \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e _ n o _ q u o t e s [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
lappend add_file_coln " \" \ [ f i l e n o r m a l i z e \" $ o r g _ f i l e _ p a t h \" \] \" "
set org_file_path " \$ \{ or i g i n _ d i r \} / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e _ n o _ q u o t e s [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] "
lappend add_file_coln " \[ f i l e n o r m a l i z e \" $ o r g _ f i l e _ p a t h \" \] "
}
lappend l_remote_file_list $file
}
@ -1578,7 +1630,7 @@ proc write_files { proj_dir proj_name tcl_obj type } {
if { [ llength $add_file_coln ] > 0 } {
lappend l_script_data " s e t f i l e s \[ l i s t \\ "
foreach file $add_file_coln {
lappend l_script_data " $ f i l e \\ "
lappend l_script_data " $ f i l e \\"
}
lappend l_script_data " \] "
lappend l_script_data " a d d _ f i l e s - n o r e c u r s e - f i l e s e t \$ o b j \$ f i l e s "
@ -1656,26 +1708,26 @@ proc write_constrs { proj_dir proj_name tcl_obj type } {
if { [ lsearch $file_props " I M P O R T E D _ F R O M " ] != -1 } {
set imported_path [ get_property " i m p o r t e d _ f r o m " $file ]
set rel_file_path [ get_relative_file_path_for_source $file [ get_script_execution_dir ] ]
set proj_file_path " \$ o r i g i n _ d i r / $ r e l _ f i l e _ p a t h "
set proj_file_path \ $ \ { origin_dir \ } / $rel_file_path
set file " \" [ f i l e n o r m a l i z e $ p r o j _ d i r / $ { p r o j _ n a m e } . s r c s / $ s r c _ f i l e ] \" "
# d o n o t c o p y i m p o r t e d c o n s t r s i n n e w p r o j e c t ? s e t i t a s r e m o t e f i l e i n n e w p r o j e c t .
if { $a_global_vars ( b_arg_no_copy_srcs ) } {
set constrs_file $file
set file_category " r e m o t e "
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $imported_path ] } {
add_constrs_file " $ f i l e "
} else {
set str " \" \[ f i l e n o r m a l i z e \" $p r o j _ f i l e _ p a t h \" \] \" "
set str " \" \[ f i l e n o r m a l i z e $ p r o j _ f i l e _ p a t h \] \" "
add_constrs_file $str
}
} else {
# c o p y i m p o r t e d c o n s t r s i n n e w p r o j e c t . S e t i t a s l o c a l f i l e i n n e w p r o j e c t .
set constrs_file $file
set file_category " l o c a l "
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
import_constrs_file $tcl_obj " $ f i l e "
} else {
set str " \" \[ f i l e n o r m a l i z e \" $p r o j _ f i l e _ p a t h \" \] \" "
set str " \" \[ f i l e n o r m a l i z e $ p r o j _ f i l e _ p a t h \] \" "
import_constrs_file $tcl_obj $str
}
}
@ -1705,7 +1757,7 @@ proc write_constrs { proj_dir proj_name tcl_obj type } {
set file_category " r e m o t e "
# f i n d r e l a t i v e f i l e p a t h o f t h e a d d e d c o n s t r s i f n o _ c o p y i n t h e n e w p r o j e c t
if { $a_global_vars ( b_arg_no_copy_srcs ) && ( ! $a_global_vars ( b_absolute_path ) ) } {
if { $a_global_vars ( b_arg_no_copy_srcs ) && ( ! $a_global_vars ( b_absolute_path ) ) && ! [ need_abs_path $file ] } {
set file_no_quotes [ string trim $file " \" " ]
set rel_file_path [ get_relative_file_path_for_source $file_no_quotes [ get_script_execution_dir ] ]
set file_1 " \" \[ f i l e n o r m a l i z e \" \$ o r i g i n _ d i r / $ r e l _ f i l e _ p a t h \" \] \" "
@ -1734,7 +1786,7 @@ proc add_constrs_file { file_str } {
variable a_global_vars
variable l_script_data
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file_str ] } {
lappend l_script_data " s e t f i l e $ f i l e _ s t r "
} else {
if { $a_global_vars ( b_arg_no_copy_srcs ) } {
@ -1745,7 +1797,7 @@ proc add_constrs_file { file_str } {
lappend l_script_data " s e t f i l e \" \[ f i l e n o r m a l i z e \" \$ o r i g i n _ d i r / $ r e l _ f i l e _ p a t h \" \] \" "
}
}
lappend l_script_data " s e t f i l e _ a d d e d \[ a d d _ f i l e s - n o r e c u r s e - f i l e s e t \$ o b j \$ f i l e \] "
lappend l_script_data " s e t f i l e _ a d d e d \[ a d d _ f i l e s - n o r e c u r s e - f i l e s e t \$ o b j \[ l i s t \ $ f i l e \] \] "
}
proc import_constrs_file { tcl_obj file_str } {
@ -1761,7 +1813,7 @@ proc import_constrs_file { tcl_obj file_str } {
# n o w i m p o r t l o c a l f i l e s i f - n o _ c o p y _ s o u r c e s i s n o t s p e c i f i e d
if { ! $a_global_vars ( b_arg_no_copy_srcs ) } {
lappend l_script_data " s e t f i l e $ f i l e _ s t r "
lappend l_script_data " s e t f i l e _ i m p o r t e d \[ i m p o r t _ f i l e s - f i l e s e t $ t c l _ o b j \$ f i l e \] "
lappend l_script_data " s e t f i l e _ i m p o r t e d \[ i m p o r t _ f i l e s - f i l e s e t $ t c l _ o b j \[ l i s t \ $ f i l e \] \] "
}
}
@ -1852,7 +1904,7 @@ proc write_constrs_fileset_file_properties { tcl_obj fs_name proj_dir file file_
# w r i t e p r o p e r t i e s n o w
if { $prop_count > 0 } {
if { { remote } == $file_category } {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend l_script_data " s e t f i l e \" $ f i l e \" "
} else {
lappend l_script_data " s e t f i l e \" \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] \" "
@ -1923,6 +1975,13 @@ proc write_specified_run { proj_dir proj_name runs } {
set cmd_str " c r e a t e _ r u n - n a m e $ t c l _ o b j - p a r t $ p a r t - f l o w { $ c u r _ f l o w _ t y p e _ v a l } - s t r a t e g y \" $ c u r _ s t r a t _ t y p e _ v a l \" "
set retVal [ get_param project.enableReportConfiguration]
set report_strategy " "
if { $retVal == 1 } {
set cmd_str " $ c m d _ s t r - r e p o r t _ s t r a t e g y { N o R e p o r t s } "
set report_strategy [ get_property report_strategy $tcl_obj ]
}
if { $isChildImplRun == 1 } {
set cmd_str " $ c m d _ s t r - p r _ c o n f i g $ p r C o n f i g "
}
@ -1942,10 +2001,10 @@ proc write_specified_run { proj_dir proj_name runs } {
}
}
write_report_strategy $tcl_obj $report_strategy
lappend l_script_data " s e t o b j \[ $ g e t _ w h a t $ t c l _ o b j \] "
write_props $proj_dir $proj_name $get_what $tcl_obj " r u n "
write_report_strategy $tcl_obj
}
}
@ -2091,7 +2150,7 @@ proc write_fileset_file_properties { tcl_obj fs_name proj_dir l_file_list file_c
# w r i t e p r o p e r t i e s n o w
if { $prop_count > 0 } {
if { { remote } == $file_category } {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend l_script_data " s e t f i l e \" $ f i l e \" "
} else {
lappend l_script_data " s e t f i l e \" \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] \" "
@ -2271,7 +2330,7 @@ proc is_ip_fileset { fileset } {
set ips [ get_files - all - quiet - of_objects [ get_filesets $fileset ] - filter $ip_filter ]
set b_found false
foreach ip $ips {
if { [ get_property generate_synth_checkpoint [ lindex [ get_files - quiet - all $ip ] 0 ] ] } {
if { [ get_property generate_synth_checkpoint [ lindex [ get_files - quiet - all [ list " $ i p " ] ] 0 ] ] } {
set b_found true
break
}
@ -2315,6 +2374,128 @@ proc is_ip_run { run } {
return [ is_ip_fileset $fileset ]
}
proc is_win_os { } {
# S u m m a r y : D e t e r m i n e i f O S i s W i n d o w s
# R e t u r n V a l u e :
# t r u e ( 1 ) i f w i n d o w s , f a l s e ( 0 ) o t h e r w i s e
set os [ lindex $::tcl_platform ( os ) 0 ]
set plat [ lindex $::tcl_platform ( platform ) 0 ]
if { [ string compare - nocase - length 3 $os " w i n " ] == 0 ||
[ string compare - nocase - length 3 $plat " w i n " ] == 0 } {
return true
} else { return false }
}
proc need_abs_path { src } {
# S u m m a r y : D e t e r m i n e i f s r c p r o v i d e d i s i n a d i f f e r e n t n e t w o r k m o u n t t h a n e x e c u t i o n d i r e c t o r y
# A r g u m e n t U s a g e :
# s r c : s o u r c e f i l e t o c h e c k
# R e t u r n V a l u e :
# t r u e ( 1 ) i f s r c i s i n a d i f f e r e n t d r i v e t h a n s c r i p t e x e c u t i o n d i r e c t o r y , f a l s e ( 0 ) o t h e r w i s e
variable a_os
if { $a_os eq " w i n " } {
set src_path [ file normalize [ string trim $src " \" " ] ]
set ref_path [ file normalize [ get_script_execution_dir ] ]
if { [ string compare - nocase - length 2 $src_path $ref_path ] != 0 } {
return true;
}
}
return false
}
proc wr_dashboards { proj_dir proj_name } {
# S u m m a r y : w r i t e d a s h b o a r d s a n d p r o p e r t i e s
# T h i s h e l p e r c o m m a n d i s u s e d t o s c r i p t h e l p .
# A r g u m e n t U s a g e :
# p r o j _ n a m e : p r o j e c t n a m e
# R e t u r n V a l u e :
# N o n e
# g e t c u r r e n t d a s h b o a r d
# g e t a l l d a s h b o a r d s
# F o r e a c h d a s h b o a r d s
# c r e a t e d a s h b o a r d
variable l_script_data
set dashboardsExist 0
set dashboards [ get_dashboards ]
foreach db $dashboards {
write_specified_dashboard $proj_dir $proj_name $db
set dashboardsExist 1
}
if { $dashboardsExist == 0 } {
return
}
set currentDashboard [ current_dashboard ]
lappend l_script_data " # S e t c u r r e n t d a s h b o a r d t o ' $ c u r r e n t D a s h b o a r d ' "
lappend l_script_data " c u r r e n t _ d a s h b o a r d $ c u r r e n t D a s h b o a r d "
}
proc write_specified_gadget { proj_dir proj_name gadget dashboard} {
# S u m m a r y : w r i t e t h e s p e c i f i e d g a d g e t
# T h i s h e l p e r c o m m a n d i s u s e d t o s c r i p t h e l p .
# A r g u m e n t U s a g e :
# R e t u r n V a l u e :
# n o n e
variable l_script_data
set db_name [ get_property name [ get_dashboards $dashboard ] ]
set gadgetName [ get_property name [ get_gadgets - of_objects [ get_dashboards $db_name ] $gadget ] ]
set gadgetType [ get_property type [ get_gadgets - of_objects [ get_dashboards $db_name ] $gadget ] ]
set cmd_str " c r e a t e _ g a d g e t - n a m e { $ g a d g e t N a m e } - t y p e $ g a d g e t T y p e - d a s h b o a r d $ d a s h b o a r d "
lappend l_script_data " # C r e a t e ' $ g a d g e t N a m e ' g a d g e t ( i f n o t f o u n d ) "
lappend l_script_data " i f \{ \[ s t r i n g e q u a l \[ g e t _ g a d g e t s - o f _ o b j e c t s \[ g e t _ d a s h b o a r d s $ d b _ n a m e \] $ g a d g e t \] \" \" \] \} \{ "
lappend l_script_data " $ c m d _ s t r "
lappend l_script_data " \} "
lappend l_script_data " s e t o b j \[ g e t _ g a d g e t s - o f _ o b j e c t s \[ g e t _ d a s h b o a r d s $ d b _ n a m e \] $ g a d g e t \] "
set tcl_obj [ get_gadgets - of_objects [ get_dashboards $db_name ] $gadget ]
set get_what " g e t _ g a d g e t s - o f _ o b j e c t s \[ g e t _ d a s h b o a r d s $ d b _ n a m e \] "
write_props $proj_dir $proj_name $get_what $tcl_obj " g a d g e t " " $ "
}
proc write_specified_dashboard { proj_dir proj_name dashboard } {
# S u m m a r y : w r i t e t h e s p e c i f i e d d a s h b o a r d
# T h i s h e l p e r c o m m a n d i s u s e d t o s c r i p t h e l p .
# A r g u m e n t U s a g e :
# R e t u r n V a l u e :
# n o n e
variable l_script_data
set get_what " g e t _ d a s h b o a r d s "
set dashboardName [ get_property name [ $get_what $dashboard ] ]
lappend l_script_data " s e t o b j \[ $ g e t _ w h a t $ d a s h b o a r d \] "
write_props $proj_dir $proj_name $get_what $dashboard " d a s h b o a r d "
# # g e t g a d g e t s o f t h i s d a s h b o a r d
set gadgets [ get_gadgets - of_objects [ $get_what $dashboard ] ]
foreach gd $gadgets {
write_specified_gadget $proj_dir $proj_name $gd $dashboard
}
# i f c u r r e n t d a s h b o a r d i s " d e f a u l t _ d a s h b o a r d "
# c h e c k i f t h e a b o v e " g a d g e t s " v a r i a b l e h a s a l l t h e d e f a u l t _ g a d g e t s , i f a n y d e f a u l t g a d g e t i s n o t t h e r e i n " g a d g e t s " v a r i a b l e , i t m e a n s u s e r h a s d e l e t e d t h o s e g a d g e t s b u t a s p a r t o f c r e a t e _ p r o j e c t , a l l t h e d e f a u l t g a d g e t s a r e c r e a t e d . S o w e h a v e t o d e l e t e t h e g a d g e t s w h i c h u s e r h a s d e l e t e d .
set def_db " d e f a u l t _ d a s h b o a r d "
if { [ string equal $def_db $dashboard ] } {
set default_gadgets { " d r c _ 1 " " m e t h o d o l o g y _ 1 " " p o w e r _ 1 " " t i m i n g _ 1 " " u t i l i z a t i o n _ 1 " " u t i l i z a t i o n _ 2 " }
foreach dgd $default_gadgets {
# i f d g d i s n o t i n g a d g e t s , t h e n d e l e t e d g d
if { $dgd ni $gadgets } {
set cmd_str " d e l e t e _ g a d g e t s - g a d g e t s $ d g d "
lappend l_script_data " # D e l e t e t h e g a d g e t ' $ d g d ' "
lappend l_script_data " $ c m d _ s t r "
}
}
}
}
proc wr_prflow { proj_dir proj_name } {
# S u m m a r y : w r i t e p a r t i a l r e c o n f i g u r a t i o n a n d p r o p e r t i e s
# T h i s h e l p e r c o m m a n d i s u s e d t o s c r i p t h e l p .
@ -2528,7 +2709,7 @@ proc write_reconfigmodule_files { proj_dir proj_name reconfigModule } {
if { $a_global_vars ( b_arg_no_copy_srcs ) } {
# a d d t o t h e l o c a l c o l l e c t i o n
lappend l_remote_file_list $file
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend add_file_coln " $ f i l e "
} else {
lappend add_file_coln " \" \[ f i l e n o r m a l i z e \" $ p r o j _ f i l e _ p a t h \" \] \" "
@ -2536,7 +2717,7 @@ proc write_reconfigmodule_files { proj_dir proj_name reconfigModule } {
} else {
# a d d t o t h e i m p o r t c o l l e c t i o n
lappend l_local_file_list $file
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend import_coln " $ f i l e "
} else {
lappend import_coln " \" \[ f i l e n o r m a l i z e \" $ p r o j _ f i l e _ p a t h \" \] \" "
@ -2562,7 +2743,7 @@ proc write_reconfigmodule_files { proj_dir proj_name reconfigModule } {
}
# a d d f i l e t o c o l l e c t i o n
if { $a_global_vars ( b_arg_no_copy_srcs ) && ( ! $a_global_vars ( b_absolute_path ) ) } {
if { $a_global_vars ( b_arg_no_copy_srcs ) && ( ! $a_global_vars ( b_absolute_path ) ) && ! [ need_abs_path $file ] } {
set file_no_quotes [ string trim $file " \" " ]
set rel_file_path [ get_relative_file_path_for_source $file_no_quotes [ get_script_execution_dir ] ]
set file1 " \" \[ f i l e n o r m a l i z e \" \$ o r i g i n _ d i r / $ r e l _ f i l e _ p a t h \" \] \" "
@ -2584,7 +2765,7 @@ proc write_reconfigmodule_files { proj_dir proj_name reconfigModule } {
if { [ llength $add_file_coln ] > 0 } {
lappend l_script_data " s e t f i l e s \[ l i s t \\ "
foreach file $add_file_coln {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend l_script_data " $ f i l e \\ "
} else {
if { $a_global_vars ( b_arg_no_copy_srcs ) } {
@ -2743,7 +2924,7 @@ proc write_reconfigmodule_file_properties { reconfigModule fs_name proj_dir l_fi
# w r i t e p r o p e r t i e s n o w
if { $prop_count > 0 } {
if { { remote } == $file_category } {
if { $a_global_vars ( b_absolute_path ) } {
if { $a_global_vars ( b_absolute_path ) || [ need_abs_path $file ] } {
lappend l_script_data " s e t f i l e \" $ f i l e \" "
} else {
lappend l_script_data " s e t f i l e \" \$ o r i g i n _ d i r / [ g e t _ r e l a t i v e _ f i l e _ p a t h _ f o r _ s o u r c e $ f i l e [ g e t _ s c r i p t _ e x e c u t i o n _ d i r ] ] \" "
@ -2765,9 +2946,9 @@ proc write_reconfigmodule_file_properties { reconfigModule fs_name proj_dir l_fi
lappend l_script_data " "
}
proc write_report_strategy { run } {
proc write_report_strategy { run report_strategy } {
# S u m m a r y :
# d e l e t e a l l r e p o r t s a s s o c i a t e d w i t h r u n , t h e n r e c r e a t e e a c h o n e b y o n e a s p e r i t s c o n f i g u r a t i o n .
# c r e a t e r e p o r t o n e b y o n e a s p e r i t s c o n f i g u r a t i o n .
# A r g u m e n t U s a g e :
# r u n F C O :
# R e t u r n V a l u e : n o n e
@ -2783,10 +2964,10 @@ proc write_report_strategy { run } {
variable l_script_data
lappend l_script_data " s e t r e p o r t s \[ g e t _ r e p o r t _ c o n f i g s - o f _ o b j e c t s \$ o b j \] "
lappend l_script_data " i f { \[ l l e n g t h \$ r e p o r t s \] > 0 } { "
lappend l_script_data " d e l e t e _ r e p o r t _ c o n f i g \[ g e t _ r e p o r t _ c o n f i g s - o f _ o b j e c t s \$ o b j \] "
lappend l_script_data " } "
lappend l_script_data " s e t o b j \[ g e t _ r u n s $ r u n \] "
lappend l_script_data " s e t _ p r o p e r t y s e t _ r e p o r t _ s t r a t e g y _ n a m e 1 \$ o b j "
lappend l_script_data " s e t _ p r o p e r t y r e p o r t _ s t r a t e g y { $ r e p o r t _ s t r a t e g y } \$ o b j "
lappend l_script_data " s e t _ p r o p e r t y s e t _ r e p o r t _ s t r a t e g y _ n a m e 0 \$ o b j "
foreach report $reports {
set report_name [ get_property name $report ]