Skip to content

Commit

Permalink
Merge branch 'main' into feature/hermes_engine_v2
Browse files Browse the repository at this point in the history
# Conflicts:
#	driver/js/CMakeLists.txt
#	driver/js/examples/hippy-react-demo/package.json
#	driver/js/examples/hippy-vue-demo/package.json
#	driver/js/examples/hippy-vue-next-demo/package.json
#	driver/js/include/driver/napi/js_ctx.h
#	driver/js/scripts/build-core.js
#	driver/js/scripts/build-example.js
#	driver/js/src/base/js_convert_utils.cc
#	driver/js/src/js_driver_utils.cc
#	driver/js/src/scope.cc
#	framework/ios/base/executors/HippyJSExecutor.mm
#	hippy.podspec
#	modules/footstone/src/platform/ios/looper_driver.cc
  • Loading branch information
wwwcg committed Jan 23, 2025
2 parents 2f245e7 + 5d1df73 commit ba21ba9
Show file tree
Hide file tree
Showing 671 changed files with 58,873 additions and 1,073 deletions.
26 changes: 13 additions & 13 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
#

# universal files
* @ilikethese @etkmao
* @etkmao

# cmake related
*.cmake @ilikethese @etkmao
CMakeLists.txt @ilikethese @etkmao
*.cmake @etkmao
CMakeLists.txt @etkmao

# driver: js
/driver/js/ @etkmao @ilikethese
/driver/js/ @etkmao
/driver/js/*.js @zealotchen0
/driver/js/.eslintignore @zealotchen0
/driver/js/.eslintrc.js @zealotchen0
Expand All @@ -31,11 +31,11 @@ CMakeLists.txt @ilikethese @etkmao
/driver/js/packages/ @zealotchen0

# driver: vl:
/driver/vl/ @ilikethese @etkmao
/driver/vl/ @etkmao

# framework: android
/framework/android/ @siguangli @iPel
/framework/android/**/src/main/cpp/ @etkmao @ilikethese
/framework/android/**/src/main/cpp/ @etkmao

# framework: ios
/framework/ios/ @wwwcg @ruifanyuan
Expand All @@ -44,7 +44,7 @@ CMakeLists.txt @ilikethese @etkmao
/framework/voltron/ @lvfen @henryjin0511

# dom: others
/dom/ @etkmao @ilikethese
/dom/ @etkmao

# renderer: native
/renderer/native/android/ @siguangli @iPel
Expand All @@ -53,16 +53,16 @@ CMakeLists.txt @ilikethese @etkmao
# renderer: tdf
/renderer/tdf/ @vimerzhao
/renderer/tdf/android/ @siguangli @iPel
/renderer/tdf/android/**/src/main/cpp/ @ilikethese @etkmao
/renderer/tdf/android/**/src/main/cpp/ @etkmao
/renderer/tdf/ios/ @wwwcg @ruifanyuan

# renderer: voltron
/renderer/voltron/ @lvfen @henryjin0511

# module: vfs
/modules/vfs/ @etkmao @ilikethese
/modules/vfs/ @etkmao
/modules/vfs/android/ @siguangli @iPel
/modules/vfs/android/**/src/main/cpp/ @etkmao @ilikethese
/modules/vfs/android/**/src/main/cpp/ @etkmao
/modules/vfs/ios/ @wwwcg @ruifanyuan
/modules/vfs/voltron/ @lvfen @henryjin0511

Expand All @@ -71,13 +71,13 @@ CMakeLists.txt @ilikethese @etkmao

# module: android
/modules/android/ @siguangli @iPel
/modules/android/jni/ @etkmao @ilikethese
/modules/android/jni/ @etkmao

# module: ios
/modules/ios/ @wwwcg @ruifanyuan

# module: footstone
/modules/footstone/ @etkmao @ilikethese
/modules/footstone/ @etkmao

# devtools: backend
/devtools/ @lavnFan
Expand Down Expand Up @@ -110,7 +110,7 @@ CMakeLists.txt @ilikethese @etkmao
/xcodeinitscript.sh @wwwcg @ruifanyuan

# build: config
/buildconfig/ @ilikethese @etkmao
/buildconfig/ @etkmao

# build: ci
/package.json @zealotchen0
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@ framework/voltron/VoltronCore/VoltronCore.xcodeproj/project.xcworkspace
framework/voltron/VoltronCore/VoltronCore.xcodeproj/xcuserdata/

renderer/voltron/core/lib/

.hvigor/
oh_modules/*
oh-package-lock.json5
.clang-format
.clang-tidy
.clangd
BuildProfile.ets
10 changes: 10 additions & 0 deletions AppScope/app.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"app": {
"bundleName": "com.tencent.hippydemo",
"vendor": "example",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
}
8 changes: 8 additions & 0 deletions AppScope/resources/base/element/string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"string": [
{
"name": "app_name",
"value": "HippyDemo"
}
]
}
Binary file added AppScope/resources/base/media/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions build-profile.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"app": {
"products": [
{
"name": "default",
"signingConfig": "default",
"compatibleSdkVersion": "5.0.0(12)",
"runtimeOS": "HarmonyOS"
}
],
"buildModeSet": [
{
"name": "debug",
"buildOption": {
"externalNativeOptions": {
"abiFilters": [
"arm64-v8a"
]
}
}
},
{
"name": "release"
}
]
},
"modules": [
{
"name": "entry_har",
"srcPath": "./framework/examples/ohos-har-demo",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "entry",
"srcPath": "./framework/examples/ohos-demo",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "hippy",
"srcPath": "./framework/ohos"
},
]
}
7 changes: 7 additions & 0 deletions buildconfig/cmake/GlobalPackagesModule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ function(GlobalPackages_Add_jni)
endif()
endfunction()

function(GlobalPackages_Add_oh_napi)
if (NOT TARGET oh_napi)
InfraPackage_Add(OH_NAPI
LOCAL "${PROJECT_ROOT_DIR}/modules/ohos/oh_napi")
endif()
endfunction()

function(GlobalPackages_Add_vfs)
if (NOT TARGET vfs)
InfraPackage_Add(VFS
Expand Down
6 changes: 5 additions & 1 deletion devtools/devtools-backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ endif ()
# endregion

# region footstone
GlobalPackages_Add(footstone)
if (OHOS)
GlobalPackages_Add_footstone()
else ()
GlobalPackages_Add(footstone)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE footstone)
# endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@

#include <string>
#include <vector>
// nlohmann/json.hpp:3177:30: error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#include "nlohmann/json.hpp"
#pragma clang diagnostic pop

namespace hippy::devtools {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

#pragma once
#pragma clang diagnostic ignored "-Wdeprecated"

#include <string>
#include "nlohmann/json.hpp"
Expand Down
1 change: 1 addition & 0 deletions devtools/devtools-backend/include/tunnel/tcp/frame_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#pragma once

#include <endian.h>
#include <netinet/in.h>
#include <functional>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions devtools/devtools-backend/src/tunnel/tcp/tcp_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "tunnel/tcp/tcp_channel.h"
#include <arpa/inet.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
#include <thread>
Expand Down
3 changes: 3 additions & 0 deletions devtools/devtools-integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ elseif (ANDROID)
add_subdirectory(${PROJECT_ROOT_DIR}/devtools/devtools-integration/android/src/main/cpp)
elseif (IOS)
add_subdirectory(${PROJECT_ROOT_DIR}/devtools/devtools-integration/ios)
elseif (OHOS)
add_subdirectory(${PROJECT_ROOT_DIR}/devtools/devtools-integration/ohos)
endif()

24 changes: 20 additions & 4 deletions devtools/devtools-integration/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,38 @@ endif ()
# endregion

# region footstone
GlobalPackages_Add(footstone)
if (OHOS)
GlobalPackages_Add_footstone()
else ()
GlobalPackages_Add(footstone)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE footstone)
# endregion

# region vfs
GlobalPackages_Add(vfs)
if (OHOS)
GlobalPackages_Add_vfs()
else ()
GlobalPackages_Add(vfs)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE vfs)
# endregion

# region dom
GlobalPackages_Add(dom)
if (OHOS)
GlobalPackages_Add_dom()
else ()
GlobalPackages_Add(dom)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE dom)
# endregion

# region devtools
GlobalPackages_Add(devtools_backend)
if (OHOS)
GlobalPackages_Add_devtools_backend()
else ()
GlobalPackages_Add(devtools_backend)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE devtools_backend)
# endregion

Expand Down
73 changes: 73 additions & 0 deletions devtools/devtools-integration/ohos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#
# Tencent is pleased to support the open source community by making
# Hippy available.
#
# Copyright (C) 2022 THL A29 Limited, a Tencent company.
# All rights reserved.
#
# 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)

project("devtools_integration")

get_filename_component(PROJECT_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../" REALPATH)

include("${PROJECT_ROOT_DIR}/buildconfig/cmake/InfraPackagesModule.cmake")
include("${PROJECT_ROOT_DIR}/buildconfig/cmake/compiler_toolchain.cmake")

set(CMAKE_CXX_STANDARD 17)

# region library
add_library(${PROJECT_NAME} STATIC)
target_include_directories(${PROJECT_NAME} PUBLIC include)
target_compile_options(${PROJECT_NAME} PRIVATE ${COMPILE_OPTIONS})
# endregion

# region jni
GlobalPackages_Add_oh_napi()
target_link_libraries(${PROJECT_NAME} PUBLIC oh_napi)
# endregion

# region footstone
GlobalPackages_Add_footstone()
target_link_libraries(${PROJECT_NAME} PRIVATE footstone)
# endregion

# region dom
GlobalPackages_Add_dom()
target_link_libraries(${PROJECT_NAME} PRIVATE dom)
# endregion

# region vfs
GlobalPackages_Add_vfs()
target_link_libraries(${PROJECT_NAME} PRIVATE vfs)
# endregion

# region devtools
GlobalPackages_Add_devtools_backend()
target_link_libraries(${PROJECT_NAME} PRIVATE devtools_backend)
# endregion

# region devtools_integration
add_subdirectory(${PROJECT_ROOT_DIR}/devtools/devtools-integration/native ${CMAKE_CURRENT_BINARY_DIR}/devtools-integration/native)
target_link_libraries(${PROJECT_NAME} PUBLIC devtools_integration_native)
# endregion

# region source set
set(SOURCE_SET
src/devtools_napi.cc)

target_sources(${PROJECT_NAME} PUBLIC ${SOURCE_SET})
# endregion
32 changes: 32 additions & 0 deletions devtools/devtools-integration/ohos/include/devtools_napi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2022 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* 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.
*/

#pragma once

#include "footstone/string_view.h"
#include "footstone/task_runner.h"
#include <js_native_api.h>
#include <js_native_api_types.h>

namespace hippy::devtools {


}

Loading

0 comments on commit ba21ba9

Please sign in to comment.