benlau / qtci

Collection of scripts to build Qt application in command line environment
Apache License 2.0
164 stars 54 forks source link

[Feature request] Allow custom downloader in scripts #14

Closed mrgreywater closed 5 years ago

mrgreywater commented 6 years ago

It would be nice if one could set a custom command for downloading before invoking the scripts. Since some of the downloads are pretty large, having a downloader that supports multiple connections such as aria2c or axel can make the difference between waiting 5 minutes, or waiting 3 seconds in travis.

Something like

export QTCI_DOWNLOAD='axel -q -c -n 16'
./install-qt 5.10.1

Internally, QTCI_DOWNLOAD could be set to a default value of 'wget -c -nv' if not defined previously.

van9konst commented 5 years ago

done. @benlau can you close it?

mrgreywater commented 5 years ago

Thank you! The PR only takes care of the Qt download, and not of any others such as the Android SDK, so I'll let this issue open for now.

van9konst commented 5 years ago

@mrgreywater as far as i see, you can pass QT_VERSION to "install-qt" script as "android-5.5.1" instead of "5.5.1" and it will works. in my opinion we used to have one script to "Rule them all" ))

mrgreywater commented 5 years ago

There are quite a few more downloads that use wget and not the custom downloader, see https://github.com/benlau/qtci/search?q=wget&unscoped_q=wget but most notably bin/install-android-sdk needs to use the custom download for both the NDK and SDK, as they are quite big.

van9konst commented 5 years ago

as you can see at that search resoult, almost all of cases where covered by my one script. only 2 cases where not covered:

  1. Downloading Android NDK...
  2. Downloading version for MAC

so, if you wanna, you can submit patch to that cases ...