highcharts::download (private)

 highcharts::download [ -version version ]

Defined in packages/highcharts/tcl/resource-procs.tcl

Download Highcharts in the specified version and put it into a directory structure similar to the CDN to support the installation of multiple versions.

Switches:
-version (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/highcharts/www/sitewide-admin/download.tcl packages/highcharts/ www/sitewide-admin/download.tcl highcharts::download highcharts::download packages/highcharts/www/sitewide-admin/download.tcl->highcharts::download highcharts::resource_info highcharts::resource_info (public) highcharts::download->highcharts::resource_info util::resources::download util::resources::download (public) highcharts::download->util::resources::download util::resources::version_segment util::resources::version_segment (public) highcharts::download->util::resources::version_segment util::unzip util::unzip (public) highcharts::download->util::unzip util::which util::which (public) highcharts::download->util::which

Testcases:
No testcase defined.
Source code:
        #
        # Get resource_info for the specified version
        #
        set resource_info [resource_info -version $version]
        set resourceDir [dict get $resource_info resourceDir]
        set versionSegment [::util::resources::version_segment -resource_info $resource_info]

        ::util::resources::download -resource_info $resource_info

        #
        # Do we have unzip installed?
        #
        set unzip [::util::which unzip]
        if {$unzip eq ""} {
            error "can't install Highcharts locally; no unzip program found on PATH"
        }

        #
        # Do we have a writable output directory under resourceDir?
        #
        if {![file isdirectory $resourceDir]} {
            file mkdir $resourceDir
        }
        if {![file writable $resourceDir]} {
            error "directory $resourceDir is not writable"
        }

        #
        # So far, everything is fine, unpack the downloaded zip file
        #
        foreach url [dict get $resource_info downloadURLs] {
            set fn [file tail $url]
            util::unzip  -overwrite  -source $resourceDir/$versionSegment/$fn  -destination $resourceDir/$versionSegment
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: