refactor(platform/xilinx): use tcl command to create links eliminating the need for administrator privileges on Windows
This commit is contained in:
@@ -126,13 +126,12 @@ proc _handle_sources {app_name sources} {
|
|||||||
switch $link_srcs {
|
switch $link_srcs {
|
||||||
"y" {
|
"y" {
|
||||||
# Create symbolic link
|
# Create symbolic link
|
||||||
# -- TCL cannont create symbolic link for files on Windows
|
# -- Symbolic link for file dose not support on NTFS
|
||||||
# -- Fallback to use mklink command
|
if {$::tcl_platform(platform) eq "windows" && [file isfile $eval_source]} {
|
||||||
if {$::tcl_platform(platform) eq "windows" && ![file isdirectory $eval_source]} {
|
|
||||||
if {[catch {
|
if {[catch {
|
||||||
exec cmd /c mklink [file nativename $target_path] [file nativename $eval_source]
|
file link -hard $target_path $eval_source
|
||||||
} err]} {
|
} err]} {
|
||||||
error "Failed to create file symbolic link using mklink: $err"
|
error "Failed to create file hard link: $err"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if {[catch {
|
if {[catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user