6
6
# Only problem is the installation from github.com
7
7
8
8
# Last Update in 2024-0119
9
+ # Last Update in 2025-04-28 by Kai Luo
9
10
10
11
[ " ${BASH_SOURCE[0]} " ] && SCRIPT_NAME=" ${BASH_SOURCE[0]} " || SCRIPT_NAME=$0
11
12
SCRIPT_DIR=" $( cd " $( dirname " $SCRIPT_NAME " ) /.." && pwd -P) "
12
13
13
- rapidjson_ver=" 1.1.0"
14
+ rapidjson_ver=" master " # latest version, instead of " 1.1.0" fixing issue of #5518
14
15
rapidjson_sha256=" bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e"
15
16
source " ${SCRIPT_DIR} " /common_vars.sh
16
17
source " ${SCRIPT_DIR} " /tool_kit.sh
@@ -31,8 +32,10 @@ case "$with_rapidjson" in
31
32
pkg_install_dir=" ${INSTALLDIR} /$dirname "
32
33
# pkg_install_dir="${HOME}/lib/rapidjson/${rapidjson_ver}"
33
34
install_lock_file=" $pkg_install_dir /install_successful"
34
- url=" https://github.com/Tencent/rapidjson/archive/refs/tags/v${rapidjson_ver} .tar.gz"
35
- filename=" rapidjson-${rapidjson_ver} .tar.gz"
35
+ # 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"
38
+ filename=" rapidjson-${rapidjson_ver} .zip" # changed by Kai Luo in 2025/04/28
36
39
if verify_checksums " ${install_lock_file} " ; then
37
40
echo " $dirname is already installed, skipping it."
38
41
else
@@ -41,14 +44,16 @@ case "$with_rapidjson" in
41
44
else
42
45
# download from github.com and checksum
43
46
echo " ===> Notice: This version of rapidjson is downloaded in GitHub Release, which will always be out-of-date version <==="
44
- download_pkg_from_url " ${rapidjson_sha256} " " ${filename} " " ${url} "
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
45
49
fi
46
50
if [ " ${PACK_RUN} " = " __TRUE__" ]; then
47
51
echo " --pack-run mode specified, skip installation"
48
52
else
49
53
echo " Installing from scratch into ${pkg_install_dir} "
50
54
[ -d $dirname ] && rm -rf $dirname
51
- tar -xzf $filename
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
52
57
mkdir -p " ${pkg_install_dir} "
53
58
cp -r $dirname /* " ${pkg_install_dir} /"
54
59
# for CMake to find rapidjson
0 commit comments