mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-09 11:27:32 -03:00
android rebase
This commit is contained in:
parent
b5f9a5c9c4
commit
29d7f4d08e
5 changed files with 656 additions and 1073 deletions
|
@ -42,23 +42,6 @@ printf "${YEL}Building Thorium for Android...\n" &&
|
|||
printf "${YEL}Note: You may want ADB installed.${c0}\n" &&
|
||||
printf "${CYA}\n" &&
|
||||
|
||||
# Workaround for branding dir
|
||||
cd ${CR_SRC_DIR} &&
|
||||
rm -v -r -f chrome/android/java/res_base/drawable-v26/ic_launcher.xml &&
|
||||
rm -v -r -f chrome/android/java/res_base/drawable-v26/ic_launcher_round.xml &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-mdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-mdpi/layered_app_icon.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-xhdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-xhdpi/layered_app_icon.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-nodpi/layered_app_icon_foreground.xml &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-hdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-hdpi/layered_app_icon.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-xxhdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f chrome/android/java/res_chromium_base/mipmap-xxhdpi/layered_app_icon.png &&
|
||||
cd $HOME/thorium &&
|
||||
|
||||
buildARM32 () {
|
||||
# Build Thorium for ARM32
|
||||
export NINJA_SUMMARIZE_BUILD=1 &&
|
||||
|
|
13
setup.sh
13
setup.sh
|
@ -173,6 +173,19 @@ copyAndroid () {
|
|||
cp -r -v arm/build/config/* ${CR_SRC_DIR}/build/config/ &&
|
||||
cp -r -v arm/android/* ${CR_SRC_DIR}/ &&
|
||||
cp -r -v arm/android/third_party/* ${CR_SRC_DIR}/third_party/ &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_base/drawable-v26/ic_launcher.xml &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_base/drawable-v26/ic_launcher_round.xml &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-mdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-mdpi/layered_app_icon.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-xhdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-xhdpi/layered_app_icon.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-nodpi/layered_app_icon_foreground.xml &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-hdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-hdpi/layered_app_icon.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-xxhdpi/layered_app_icon_background.png &&
|
||||
rm -v -r -f ${CR_SRC_DIR}/chrome/android/java/res_chromium_base/mipmap-xxhdpi/layered_app_icon.png &&
|
||||
printf "\n"
|
||||
}
|
||||
case $1 in
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,121 +0,0 @@
|
|||
# Copyright 2023 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//chrome/android/chrome_public_apk_tmpl.gni")
|
||||
|
||||
# Dependencies that are common to any chrome_public derivative targets.
|
||||
chrome_public_shared_deps = [
|
||||
"//chrome/android:chrome_public_apk_base_module_resources",
|
||||
"//chrome/android:chrome_public_apk_resources",
|
||||
"//chrome/android:chrome_public_base_module_java",
|
||||
"//chrome/android:chrome_public_non_pak_assets",
|
||||
"//gin:v8_snapshot_assets",
|
||||
"//third_party/icu:icu_assets",
|
||||
]
|
||||
|
||||
chrome_public_test_manifest_package = "org.chromium.thorium.tests"
|
||||
|
||||
template("chrome_test_apk_tmpl") {
|
||||
chrome_public_common_apk_or_module_tmpl(target_name) {
|
||||
testonly = true
|
||||
target_type = "instrumentation_test_apk"
|
||||
bundles_supported = true
|
||||
jinja_input = "//chrome/android/javatests/AndroidManifest.xml"
|
||||
manifest_package = chrome_public_test_manifest_package
|
||||
|
||||
deps = chrome_public_shared_deps + invoker.deps + [
|
||||
"//chrome/android:chrome_apk_pak_assets",
|
||||
"//chrome/android:chrome_public_base_module_java_for_test",
|
||||
"//third_party/android_sdk:android_test_base_java",
|
||||
"//third_party/android_sdk:android_test_mock_java",
|
||||
"//third_party/android_sdk:android_test_runner_java",
|
||||
"//third_party/android_support_test_runner:runner_java",
|
||||
]
|
||||
if (add_unwind_tables_in_chrome_32bit_apk && current_cpu == "arm") {
|
||||
deps += [ "//chrome/android:libchromefortest_unwind_table_assets" ]
|
||||
}
|
||||
if (enable_vr) {
|
||||
# Contains VrFirstRunActivity, which is referenced by AndroidManifest.xml.
|
||||
deps += [ "//chrome/android/features/vr:java" ]
|
||||
}
|
||||
|
||||
additional_apks = [ "//net/android:net_test_support_apk" ]
|
||||
if (defined(invoker.additional_apks)) {
|
||||
additional_apks += invoker.additional_apks
|
||||
}
|
||||
if (!is_java_debug) {
|
||||
proguard_enabled = true
|
||||
proguard_configs = [ "//chrome/android/proguard/apk_for_test.flags" ]
|
||||
if (defined(invoker.proguard_configs)) {
|
||||
proguard_configs += invoker.proguard_configs
|
||||
}
|
||||
}
|
||||
|
||||
# TODO(crbug.com/993340): Update test goldens with webp versions of images.
|
||||
png_to_webp = false
|
||||
|
||||
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY)
|
||||
forward_variables_from(invoker,
|
||||
"*",
|
||||
TESTONLY_AND_VISIBILITY + [
|
||||
"additional_apks",
|
||||
"deps",
|
||||
"proguard_configs",
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
template("monochrome_test_apk_tmpl") {
|
||||
monochrome_public_common_apk_or_module_tmpl(target_name) {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"apk_name",
|
||||
"data_deps",
|
||||
"is_64_bit_browser",
|
||||
"include_64_bit_webview",
|
||||
"include_32_bit_webview",
|
||||
"loadable_modules",
|
||||
"min_sdk_version",
|
||||
"proguard_configs",
|
||||
"secondary_abi_loadable_modules",
|
||||
"shared_libraries",
|
||||
"target_sdk_version",
|
||||
])
|
||||
testonly = true
|
||||
target_type = "instrumentation_test_apk"
|
||||
|
||||
# TODO(agrieve): Add: manifest_package = chrome_public_test_manifest_package
|
||||
|
||||
jinja_input = "//chrome/android/javatests/AndroidManifest_monochrome.xml"
|
||||
jinja_extra_includes = [ "//chrome/android/javatests/AndroidManifest.xml" ]
|
||||
jinja_extra_variables =
|
||||
[ "test_manifest_package=$chrome_public_test_manifest_package" ]
|
||||
|
||||
deps = chrome_public_shared_deps + invoker.deps + [
|
||||
"//android_webview:platform_service_bridge_upstream_implementation_java",
|
||||
"//chrome/android:chrome_public_base_module_java_for_test",
|
||||
"//chrome/android:monochrome_apk_pak_assets",
|
||||
"//third_party/android_sdk:android_test_base_java",
|
||||
"//third_party/android_sdk:android_test_mock_java",
|
||||
"//third_party/android_sdk:android_test_runner_java",
|
||||
"//third_party/android_support_test_runner:runner_java",
|
||||
]
|
||||
|
||||
if (webview_includes_weblayer) {
|
||||
deps += [ "//weblayer/browser/java:upstream_java" ]
|
||||
}
|
||||
|
||||
additional_apks = [ "//net/android:net_test_support_apk" ]
|
||||
if (defined(invoker.additional_apks)) {
|
||||
additional_apks += invoker.additional_apks
|
||||
}
|
||||
if (!is_java_debug) {
|
||||
if (!defined(proguard_configs)) {
|
||||
proguard_configs = []
|
||||
}
|
||||
proguard_enabled = true
|
||||
proguard_configs += [ "//chrome/android/proguard/apk_for_test.flags" ]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue