55# RAPIDJSON is not need any complex setting
66# Only problem is the installation from github.com
77
8- # Last Update in 2024-0119
9- # Last Update in 2025-04-28 by Kai Luo
8+ # Last Update in 2025-05-01
9+ # other contributor: Kai Luo, XingLiang Peng
1010
1111[ " ${BASH_SOURCE[0]} " ] && SCRIPT_NAME=" ${BASH_SOURCE[0]} " || SCRIPT_NAME=$0
1212SCRIPT_DIR=" $( cd " $( dirname " $SCRIPT_NAME " ) /.." && pwd -P) "
1313
1414rapidjson_ver=" master" # latest version, instead of "1.1.0" fixing issue of #5518
15- rapidjson_sha256=" bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e "
15+ rapidjson_sha256=" --no-checksum " # latest version cannot maintain checksum
1616source " ${SCRIPT_DIR} " /common_vars.sh
1717source " ${SCRIPT_DIR} " /tool_kit.sh
1818source " ${SCRIPT_DIR} " /signal_trap.sh
@@ -33,8 +33,8 @@ case "$with_rapidjson" in
3333 # pkg_install_dir="${HOME}/lib/rapidjson/${rapidjson_ver}"
3434 install_lock_file=" $pkg_install_dir /install_successful"
3535 # url="https://github.com/Tencent/rapidjson/archive/refs/tags/v${rapidjson_ver}.tar.gz" # commented by Kai Luo in 2025/04/28
36- url=" https://codeload.github.com/Tencent/rapidjson/zip/refs/heads/master "
37- # filename="rapidjson-${rapidjson_ver}.tar.gz"
36+ url=" https://codeload.github.com/Tencent/rapidjson/zip/refs/heads/${rapidjson_ver} "
37+ # changed by Kai Luo in 2025/04/28, modified by Zhaoqing Liu in 2025/05/01
3838 filename=" rapidjson-${rapidjson_ver} .zip" # changed by Kai Luo in 2025/04/28
3939 if verify_checksums " ${install_lock_file} " ; then
4040 echo " $dirname is already installed, skipping it."
@@ -43,17 +43,16 @@ case "$with_rapidjson" in
4343 echo " $filename is found"
4444 else
4545 # download from github.com and checksum
46- echo " ===> Notice: This version of rapidjson is downloaded in GitHub Release, which will always be out-of-date version <==="
47- # download_pkg_from_url "${rapidjson_sha256}" "${filename}" "${url}"
48- wget " ${url} " -O " ${filename} " --no-check-certificate # use wget directly instead of download_pkg_from_url
46+ echo " ===> Notice: This version of rapidjson is downloaded in GitHub master repository <==="
47+ download_pkg_from_url " ${rapidjson_sha256} " " ${filename} " " ${url} "
48+ # wget "${url}" -O "${filename}" --no-check-certificate # use wget directly instead of download_pkg_from_url
4949 fi
5050 if [ " ${PACK_RUN} " = " __TRUE__" ]; then
5151 echo " --pack-run mode specified, skip installation"
5252 else
5353 echo " Installing from scratch into ${pkg_install_dir} "
5454 [ -d $dirname ] && rm -rf $dirname
55- # tar -xzf $filename
56- unzip -q $filename # downloaded file is a zip file, so use unzip instead of tar, use -q to suppress output
55+ unzip -q $filename # use -q to suppress output
5756 mkdir -p " ${pkg_install_dir} "
5857 cp -r $dirname /* " ${pkg_install_dir} /"
5958 # for CMake to find rapidjson
0 commit comments