소스 검색

【添加】文件下载功能配置选项

Signed-off-by: chenyong <1521761801@qq.com>
chenyong 6 년 전
부모
커밋
4afcfe0b42
3개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      README.md
  2. 4 1
      SConscript
  3. 1 0
      docs/samples.md

+ 3 - 0
README.md

@@ -59,6 +59,7 @@ RT-Thread online packages
          [*] WebClient: A HTTP/HTTPS Client for RT-Thread
          [ ]   Enable debug log output
          [ ]   Enable webclient GET/POST samples
+         [ ]   Enable file download feature support
                Select TLS mode (Not support)  --->
                    (x) Not support
                    ( ) SAL TLS support
@@ -70,6 +71,8 @@ RT-Thread online packages
 
 **Enable webclient GET/POST samples** :添加示例代码;
 
+**Enable file download feature support** :开启文件下载功能支持(`wget` 命令支持);
+
 **Select TLS mode** :配置开启 HTTPS 支持,选择支持的模式;
 
 - **Not support**:不支持 TLS 功能;

+ 4 - 1
SConscript

@@ -3,7 +3,10 @@ from building import *
 cwd  = GetCurrentDir()
 path = [cwd + '/inc']
 
-src  = Glob('src/*.c')
+src  = Glob('src/webclient.c')
+
+if GetDepend(['WEBCLIENT_USING_FILE_DOWMLOAD']):
+    src += Glob('src/webclient_file.c')
 
 if GetDepend(['WEBCLIENT_USING_SAMPLES']):
     src += Glob('samples/*.c')

+ 1 - 0
docs/samples.md

@@ -25,6 +25,7 @@ RT-Thread online packages
         [*] WebClient: A HTTP/HTTPS Client for RT-Thread    
         [ ]   Enable debug log output       
         [*]   Enable webclient GET/POST samples # 开启 WebClient 测试例程
+        [ ]   Enable file download feature support
               Select TLS mode (Not support)  --->
               Version (latest)  --->            # 开启使用最新版本软件包
 ```