Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion scripts/toninstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ git clone --recursive https://github.com/ton-blockchain/mytonctrl.git
git config --global --add safe.directory $SOURCES_DIR/ton
git config --global --add safe.directory $SOURCES_DIR/mytonctrl

cd $BIN_DIR
rm -rf openssl_3
git clone https://github.com/openssl/openssl openssl_3
cd openssl_3
opensslPath=`pwd`
git checkout openssl-3.1.4
./config
make build_libs -j12

# Подготавливаем папки для компиляции
echo -e "${COLOR}[3/6]${ENDC} Preparing for compilation"
rm -rf $BIN_DIR/ton
Expand All @@ -163,7 +172,7 @@ if [[ "$OSTYPE" =~ darwin.* ]]; then
cmake -DCMAKE_BUILD_TYPE=Release $SOURCES_DIR/ton -GNinja
fi
else
cmake -DCMAKE_BUILD_TYPE=Release $SOURCES_DIR/ton -GNinja
cmake -DCMAKE_BUILD_TYPE=Release $SOURCES_DIR/ton -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$opensslPath/include -DOPENSSL_CRYPTO_LIBRARY=$opensslPath/libcrypto.a
fi

# Компилируем из исходников
Expand Down
12 changes: 11 additions & 1 deletion scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,23 @@ export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CCACHE_DISABLE=1

cd ${bindir}
rm -rf openssl_3
git clone https://github.com/openssl/openssl openssl_3
cd openssl_3
opensslPath=`pwd`
git checkout openssl-3.1.4
./config
make build_libs -j12

# Update binary
cd ${bindir}/${repo}
ls --hide=global.config.json | xargs -d '\n' rm -rf
rm -rf .ninja_*
memory=$(cat /proc/meminfo | grep MemAvailable | awk '{print $2}')
let "cpuNumber = memory / 2100000" || cpuNumber=1
cmake -DCMAKE_BUILD_TYPE=Release ${srcdir}/${repo} -GNinja

cmake -DCMAKE_BUILD_TYPE=Release ${srcdir}/${repo} -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$opensslPath/include -DOPENSSL_CRYPTO_LIBRARY=$opensslPath/libcrypto.a
ninja -j ${cpuNumber} fift validator-engine lite-client pow-miner validator-engine-console generate-random-id dht-server func tonlibjson rldp-http-proxy
systemctl restart validator

Expand Down