mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove outdated install_deps scripts.
This commit is contained in:
parent
213ce785c3
commit
83308184f2
@ -1,61 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM ---------------------------------------------------------------------------
|
||||
REM Batch file for installing pre-requisite packages for solidity on
|
||||
REM Windows platforms. That is implemented using CMake targets which
|
||||
REM extract pre-built ZIPs hosted on GitHub into "deps\install_deps".
|
||||
REM
|
||||
REM See https://github.com/ethereum/cpp-dependencies
|
||||
REM
|
||||
REM The CMake files then point into that directory as an alternative
|
||||
REM to the Homebrew, PPA or other global package server locations
|
||||
REM available on Linux and UNIX platforms.
|
||||
REM
|
||||
REM The lack of a standard C++ packaging system for Windows is problematic
|
||||
REM for us, and we have considered various options for improving the
|
||||
REM situation, such as the following:
|
||||
REM
|
||||
REM See "Windows - Add support for Chocolatey packages"
|
||||
REM https://github.com/ethereum/webthree-umbrella/issues/345
|
||||
REM
|
||||
REM See "Windows - Try to use NuGet C++ packages"
|
||||
REM https://github.com/ethereum/webthree-umbrella/issues/509
|
||||
REM
|
||||
REM See "CM - Can we switch to NuGet delivery for our external dependencies"
|
||||
REM https://github.com/ethereum/webthree-umbrella/issues/376
|
||||
REM
|
||||
REM Another possible option, which would benefit build robustness on
|
||||
REM multiple platforms, not just Windows, is to add dependencies as
|
||||
REM git-submodules (or downloading on demand) so that we aren'targets
|
||||
REM depend on platform-specific packaging systems at all. We have
|
||||
REM already done just that for LLVM within evmjit. The downside of
|
||||
REM that approach is that those dependencies then need to be
|
||||
REM built-from-source, which adds time to the build process. It
|
||||
REM gives us an unbeatable degree of control, though, because we
|
||||
REM then perfectly control versioning and build flags for the binaries
|
||||
REM for those packages.
|
||||
REM
|
||||
REM The documentation for solidity is hosted at:
|
||||
REM
|
||||
REM https://docs.soliditylang.org
|
||||
REM
|
||||
REM ---------------------------------------------------------------------------
|
||||
REM This file is part of solidity.
|
||||
REM
|
||||
REM solidity is free software: you can redistribute it and/or modify
|
||||
REM it under the terms of the GNU General Public License as published by
|
||||
REM the Free Software Foundation, either version 3 of the License, or
|
||||
REM (at your option) any later version.
|
||||
REM
|
||||
REM solidity is distributed in the hope that it will be useful,
|
||||
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
REM GNU General Public License for more details.
|
||||
REM
|
||||
REM You should have received a copy of the GNU General Public License
|
||||
REM along with solidity. If not, see <http://www.gnu.org/licenses/>
|
||||
REM
|
||||
REM Copyright (c) 2016 solidity contributors.
|
||||
REM ---------------------------------------------------------------------------
|
||||
|
||||
cmake -P scripts\install_deps.cmake
|
@ -1,99 +0,0 @@
|
||||
get_filename_component(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../deps" ABSOLUTE)
|
||||
|
||||
set(CACHE_DIR "${ROOT_DIR}/cache")
|
||||
set(PACKAGES_DIR "${ROOT_DIR}/packages")
|
||||
|
||||
function(download URL DST_FILE STATUS)
|
||||
set(TMP_FILE "${DST_FILE}.part")
|
||||
|
||||
get_filename_component(FILE_NAME ${DST_FILE} NAME)
|
||||
if (NOT EXISTS ${DST_FILE})
|
||||
message("Downloading ${FILE_NAME}")
|
||||
file(DOWNLOAD ${URL} ${TMP_FILE} SHOW_PROGRESS STATUS DOWNLOAD_STATUS)
|
||||
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
|
||||
if (STATUS_CODE EQUAL 0)
|
||||
file(RENAME ${TMP_FILE} ${DST_FILE})
|
||||
else()
|
||||
file(REMOVE ${TMP_FILE})
|
||||
list(GET DOWNLOAD_STATUS 1 ERROR_MSG)
|
||||
|
||||
message("ERROR! Downloading '${FILE_NAME}' failed.")
|
||||
message(STATUS "URL: ${URL}")
|
||||
message(STATUS "Error: ${STATUS_CODE} ${ERROR_MSG}")
|
||||
set(STATUS FALSE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
else()
|
||||
message("Using cached ${FILE_NAME}")
|
||||
endif()
|
||||
set(STATUS TRUE PARENT_SCOPE)
|
||||
endfunction(download)
|
||||
|
||||
function(download_and_unpack PACKAGE_URL DST_DIR)
|
||||
get_filename_component(FILE_NAME ${PACKAGE_URL} NAME)
|
||||
|
||||
set(DST_FILE "${CACHE_DIR}/${FILE_NAME}")
|
||||
set(TMP_FILE "${DST_FILE}.part")
|
||||
|
||||
file(MAKE_DIRECTORY ${CACHE_DIR})
|
||||
file(MAKE_DIRECTORY ${DST_DIR})
|
||||
|
||||
download(${PACKAGE_URL} ${DST_FILE} STATUS)
|
||||
|
||||
if (STATUS)
|
||||
message("Unpacking ${FILE_NAME} to ${DST_DIR}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf ${DST_FILE}
|
||||
WORKING_DIRECTORY ${DST_DIR})
|
||||
endif()
|
||||
endfunction(download_and_unpack)
|
||||
|
||||
# Packs installed package binaries and headers into an archive.
|
||||
function(create_package NAME DIR)
|
||||
message("Creating package ${NAME}")
|
||||
file(MAKE_DIRECTORY ${PACKAGES_DIR})
|
||||
|
||||
# To create an archive without addicional top level directory
|
||||
# (like package-X.Y.Z) we need to know all top level files/dirs.
|
||||
# Usually it is just "win64" dir.
|
||||
file(GLOB TOP_FILES RELATIVE ${DIR} "${DIR}/*")
|
||||
|
||||
set(PACKAGE_FILE "${PACKAGES_DIR}/${NAME}.tar.gz")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E
|
||||
tar -czf ${PACKAGE_FILE} ${TOP_FILES}
|
||||
WORKING_DIRECTORY ${DIR})
|
||||
endfunction(create_package)
|
||||
|
||||
# Downloads the source code of the package and unpacks it to dedicated 'src'
|
||||
# dir. Also creates 'build' and 'install' dir to be used by a build script.
|
||||
function(prepare_package_source NAME VERSION URL)
|
||||
set(PACKAGE_NAME "${NAME}-${VERSION}")
|
||||
|
||||
set(PACKAGE_DIR "${CACHE_DIR}/${PACKAGE_NAME}")
|
||||
set(SOURCE_DIR "${PACKAGE_DIR}/src")
|
||||
set(BUILD_DIR "${PACKAGE_DIR}/build")
|
||||
set(INSTALL_DIR "${PACKAGE_DIR}/install")
|
||||
|
||||
if (NOT EXISTS ${SOURCE_DIR})
|
||||
download_and_unpack(${URL} ${PACKAGE_DIR} STATUS)
|
||||
file(GLOB ORIG_SOURCE_DIR_NAME "${PACKAGE_DIR}/*")
|
||||
file(RENAME ${ORIG_SOURCE_DIR_NAME} ${SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY ${BUILD_DIR})
|
||||
file(MAKE_DIRECTORY ${INSTALL_DIR})
|
||||
|
||||
# Export names and dirs to be used by a package-specific build script.
|
||||
set(PACKAGE_NAME ${PACKAGE_NAME} PARENT_SCOPE)
|
||||
set(SOURCE_DIR ${SOURCE_DIR} PARENT_SCOPE)
|
||||
set(BUILD_DIR ${BUILD_DIR} PARENT_SCOPE)
|
||||
set(INSTALL_DIR ${INSTALL_DIR} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
set(INSTALL_DIR "${ROOT_DIR}/install")
|
||||
set(SERVER "https://github.com/ethereum/cpp-dependencies/releases/download/vs2017/")
|
||||
|
||||
function(download_and_install PACKAGE_NAME)
|
||||
download_and_unpack("${SERVER}${PACKAGE_NAME}.tar.gz" ${INSTALL_DIR})
|
||||
endfunction(download_and_install)
|
||||
|
||||
download_and_install("boost-1.67.0")
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
git clone --depth 1 --branch z3-4.8.7 https://github.com/Z3Prover/z3.git
|
||||
cd z3
|
||||
mkdir build
|
||||
cd build
|
||||
LDFLAGS="-static" cmake -DZ3_BUILD_LIBZ3_SHARED=OFF ..
|
||||
make -j 4
|
||||
make install
|
Loading…
Reference in New Issue
Block a user