Skip to content

Commit

Permalink
update platform-toos to 33.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhiyong committed Oct 18, 2022
0 parents commit ecd825b
Show file tree
Hide file tree
Showing 141 changed files with 35,094 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
build
pack

src/libziparchive/cli-tests
src/libziparchive/testdata
src/zipalign/tests/data

**/*.zip
**/*.apk
140 changes: 140 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
[submodule "src/core"]
shallow = true
path = src/core
url = https://android.googlesource.com/platform/system/core.git
[submodule "src/extras"]
shallow = true
path = src/extras
url = https://android.googlesource.com/platform/system/extras.git
[submodule "src/selinux"]
shallow = true
path = src/selinux
url = https://android.googlesource.com/platform/external/selinux.git
[submodule "src/f2fs-tools"]
shallow = true
path = src/f2fs-tools
url = https://android.googlesource.com/platform/external/f2fs-tools.git
[submodule "src/e2fsprogs"]
shallow = true
path = src/e2fsprogs
url = https://android.googlesource.com/platform/external/e2fsprogs.git
[submodule "src/boringssl"]
shallow = true
path = src/boringssl
url = https://android.googlesource.com/platform/external/boringssl
[submodule "src/mkbootimg"]
shallow = true
path = src/mkbootimg
url = https://android.googlesource.com/platform/system/tools/mkbootimg
[submodule "src/avb"]
shallow = true
path = src/avb
url = https://android.googlesource.com/platform/external/avb
[submodule "src/libbase"]
shallow = true
path = src/libbase
url = https://android.googlesource.com/platform/system/libbase
[submodule "src/base"]
shallow = true
path = src/base
url = https://android.googlesource.com/platform/frameworks/base
[submodule "src/native"]
shallow = true
path = src/native
url = https://android.googlesource.com/platform/frameworks/native
[submodule "src/adb"]
shallow = true
path = src/adb
url = https://android.googlesource.com/platform/packages/modules/adb.git
[submodule "src/logging"]
shallow = true
path = src/logging
url = https://android.googlesource.com/platform/system/logging.git
[submodule "src/incremental_delivery"]
shallow = true
path = src/incremental_delivery
url = https://android.googlesource.com/platform/system/incremental_delivery
[submodule "src/fmtlib"]
shallow = true
path = src/fmtlib
url = https://android.googlesource.com/platform/external/fmtlib.git
[submodule "src/pcre"]
shallow = true
path = src/pcre
url = https://android.googlesource.com/platform/external/pcre.git
[submodule "src/libpng"]
shallow = true
path = src/libpng
url = https://android.googlesource.com/platform/external/libpng.git
[submodule "src/expat"]
shallow = true
path = src/expat
url = https://android.googlesource.com/platform/external/expat.git
[submodule "src/protobuf"]
shallow = true
path = src/protobuf
url = https://android.googlesource.com/platform/external/protobuf.git
[submodule "src/aidl"]
shallow = true
path = src/aidl
url = https://android.googlesource.com/platform/system/tools/aidl
[submodule "src/unwinding"]
shallow = true
path = src/unwinding
url = https://android.googlesource.com/platform/system/unwinding
[submodule "src/zopfli"]
shallow = true
path = src/zopfli
url = https://android.googlesource.com/platform/external/zopfli
[submodule "src/jsoncpp"]
shallow = true
path = src/jsoncpp
url = https://android.googlesource.com/platform/external/jsoncpp
[submodule "jsoncpp"]
shallow = true
path = jsoncpp
url = https://android.googlesource.com/platform/external/jsoncpp
[submodule "src/art"]
shallow = true
path = src/art
url = https://android.googlesource.com/platform/art
[submodule "src/dalvik"]
shallow = true
path = src/dalvik
url = https://android.googlesource.com/platform/dalvik
[submodule "src/sqlite"]
shallow = true
path = src/sqlite
url = https://android.googlesource.com/platform/external/sqlite
[submodule "src/lz4"]
shallow = true
path = src/lz4
url = https://android.googlesource.com/platform/external/lz4
[submodule "src/zstd"]
shallow = true
path = src/zstd
url = https://android.googlesource.com/platform/external/zstd
[submodule "src/libusb"]
shallow = true
path = src/libusb
url = https://android.googlesource.com/platform/external/libusb
[submodule "src/brotli"]
shallow = true
path = src/brotli
url = https://android.googlesource.com/platform/external/brotli
[submodule "src/mdnsresponder"]
shallow = true
path = src/mdnsresponder
url = https://android.googlesource.com/platform/external/mdnsresponder
[submodule "src/abseil-cpp"]
shallow = true
path = src/abseil-cpp
url = https://android.googlesource.com/platform/external/abseil-cpp
[submodule "src/openscreen"]
shallow = true
path = src/openscreen
url = https://android.googlesource.com/platform/external/openscreen
[submodule "src/googletest"]
shallow = true
path = src/googletest
url = https://android.googlesource.com/platform/external/googletest
101 changes: 101 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#
# Copyright © 2022 Github Lzhiyong
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

cmake_minimum_required(VERSION 3.14.2)
project(sdk-tools)

enable_language(ASM)

# set global cflags and cxxflags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics -fPIC -Wno-attributes -std=gnu11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics -fPIC -Wno-attributes -std=gnu++2a")
# static link
#set(CMAKE_EXE_LINKER_FLAGS "-static")

# platform tools version
# see the patches/other/platform_tools_version.h
set(TOOLS_VERSION 33.0.3)
set(SRC ${PROJECT_SOURCE_DIR}/src)

# 64-bit off_t for lseek.
add_definitions(-D_FILE_OFFSET_BITS=64)

set(PROTOC_COMPILER)

if(DEFINED PROTOC_PATH)
set(PROTOC_COMPILER ${PROTOC_PATH})

if(NOT EXISTS ${PROTOC_COMPILER})
unset(PROTOC_PATH CACHE)
message(FATAL_ERROR "Invalid protoc: ${PROTOC_COMPILER}, please check if the path is correct")
endif()

# check protoc version
execute_process(
COMMAND ${PROTOC_COMPILER} --version
OUTPUT_VARIABLE PTOTOBUF_VERSION
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)

if(NOT PTOTOBUF_VERSION MATCHES "^libprotoc*")
unset(PROTOC_PATH CACHE)
message(FATAL_ERROR "Invalid protoc: ${PROTOC_COMPILER}, this may not be an executable")
endif()

string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSIONS ${PTOTOBUF_VERSION})
# please note that if the protobuf version is too high, you may encounter the following error
# error: This file was generated by a newer version of protoc
if(VERSIONS VERSION_GREATER "3.9.1")
message(WARNING "${PTOTOBUF_VERSION}, the protobuf version is too high, may be incompatible!!")
endif()
endif()

# thrid-party libraries
add_subdirectory(src/boringssl/src EXCLUDE_FROM_ALL)
add_subdirectory(src/fmtlib EXCLUDE_FROM_ALL)
add_subdirectory(src/pcre EXCLUDE_FROM_ALL)
add_subdirectory(src/libpng EXCLUDE_FROM_ALL)
add_subdirectory(src/expat EXCLUDE_FROM_ALL)
add_subdirectory(src/zopfli EXCLUDE_FROM_ALL)
add_subdirectory(src/jsoncpp EXCLUDE_FROM_ALL)
add_subdirectory(src/zstd/build/cmake EXCLUDE_FROM_ALL)
add_subdirectory(src/lz4/build/cmake EXCLUDE_FROM_ALL)
add_subdirectory(src/brotli EXCLUDE_FROM_ALL)
add_subdirectory(src/abseil-cpp EXCLUDE_FROM_ALL)
add_subdirectory(src/protobuf/cmake EXCLUDE_FROM_ALL)

# building sdk-tools
add_subdirectory(lib)
add_subdirectory(build-tools)
add_subdirectory(platform-tools)

# creating source tarballs
set(CPACK_PACKAGE_DIRECTORY ${PROJECT_SOURCE_DIR}/pack)
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_SOURCE_GENERATOR "TXZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${TOOLS_VERSION}")
set(CPACK_SOURCE_IGNORE_FILES
${PROJECT_SOURCE_DIR}/.git
${PROJECT_SOURCE_DIR}/.gitignore
${PROJECT_SOURCE_DIR}/.gitmodules
${PROJECT_SOURCE_DIR}/get_source.py
${PROJECT_SOURCE_DIR}/build
${PROJECT_SOURCE_DIR}/patches
${PROJECT_SOURCE_DIR}/pack
)

include(CPack)

Loading

0 comments on commit ecd825b

Please sign in to comment.