diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000000..520da8290c72 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 01ff9bc151aa..ad5340f72752 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,6 @@ name: publish on: - workflow_run: - workflows: [build] - types: [completed] workflow_dispatch: # Inputs the workflow accepts. inputs: diff --git a/1k/build.ps1 b/1k/build.ps1 index 1b08cf282270..271ebb745d0c 100644 --- a/1k/build.ps1 +++ b/1k/build.ps1 @@ -1578,10 +1578,9 @@ if (!$setupOnly) { $b1k.println("CONFIG_ALL_OPTIONS=$CONFIG_ALL_OPTIONS, Count={0}" -f $CONFIG_ALL_OPTIONS.Count) if ($Global:is_android -and $is_gradlew) { - $storedLocation = (Get-Location).Path $build_tool = (Get-Command $options.xt).Source $build_tool_dir = Split-Path $build_tool -Parent - Set-Location $build_tool_dir + Push-Location $build_tool_dir if (!$configOnly) { if ($optimize_flag -eq 'Debug') { & $build_tool assembleDebug $CONFIG_ALL_OPTIONS | Out-Host @@ -1593,65 +1592,64 @@ if (!$setupOnly) { else { & $build_tool tasks } - Set-Location $storedLocation + Pop-Location } else { # step3. configure - $workDir = $(Get-Location).Path - $mainDep = Join-Path $workDir 'CMakeLists.txt' - if (!$b1k.isfile($mainDep)) { - $b1k.println("Missing CMakeLists.txt in $workDir") - Set-Location $stored_cwd - return - } - - $mainDepChanged = $false - # A Windows file time is a 64-bit value that represents the number of 100-nanosecond - $tempFileItem = Get-Item $mainDep - $lastWriteTime = $tempFileItem.LastWriteTime.ToFileTimeUTC() - $tempFile = Join-Path $BUILD_DIR 'b1k_cache.txt' - - $storeHash = 0 - if ($b1k.isfile($tempFile)) { - $storeHash = Get-Content $tempFile -Raw - } - $hashValue = $b1k.hash("$CONFIG_ALL_OPTIONS#$lastWriteTime") - $mainDepChanged = "$storeHash" -ne "$hashValue" - $cmakeCachePath = $b1k.realpath("$BUILD_DIR/CMakeCache.txt") - - if ($mainDepChanged -or !$b1k.isfile($cmakeCachePath) -or $forceConfig) { - if (!$is_wasm) { - cmake -B $BUILD_DIR $CONFIG_ALL_OPTIONS | Out-Host + if ($b1k.isfile($mainDep)) { + $mainDepChanged = $false + # A Windows file time is a 64-bit value that represents the number of 100-nanosecond + $tempFileItem = Get-Item $mainDep + $lastWriteTime = $tempFileItem.LastWriteTime.ToFileTimeUTC() + $tempFile = Join-Path $BUILD_DIR 'b1k_cache.txt' + + $storeHash = 0 + if ($b1k.isfile($tempFile)) { + $storeHash = Get-Content $tempFile -Raw } - else { - emcmake cmake -B $BUILD_DIR $CONFIG_ALL_OPTIONS | Out-Host - } - Set-Content $tempFile $hashValue -NoNewline - } + $hashValue = $b1k.hash("$CONFIG_ALL_OPTIONS#$lastWriteTime") + $mainDepChanged = "$storeHash" -ne "$hashValue" + $cmakeCachePath = $b1k.realpath("$BUILD_DIR/CMakeCache.txt") - if (!$configOnly) { - if (!$is_engine) { - if (!$b1k.isfile($cmakeCachePath)) { - throw "The cmake generate incomplete, pelase add '-f' to re-generate again" + if ($mainDepChanged -or !$b1k.isfile($cmakeCachePath) -or $forceConfig) { + if (!$is_wasm) { + cmake -B $BUILD_DIR $CONFIG_ALL_OPTIONS | Out-Host + } + else { + emcmake cmake -B $BUILD_DIR $CONFIG_ALL_OPTIONS | Out-Host } + Set-Content $tempFile $hashValue -NoNewline } - # step4. build - # apply additional build options - $BUILD_ALL_OPTIONS += "--parallel" - if ($Global:is_linux) { - $BUILD_ALL_OPTIONS += "$(nproc)" - } - if (($cmake_generator -eq 'Xcode') -and ($BUILD_ALL_OPTIONS.IndexOf('--verbose') -eq -1)) { - $BUILD_ALL_OPTIONS += '--', '-quiet' - } - $b1k.println("BUILD_ALL_OPTIONS=$BUILD_ALL_OPTIONS, Count={0}" -f $BUILD_ALL_OPTIONS.Count) + if (!$configOnly) { + if (!$is_engine) { + if (!$b1k.isfile($cmakeCachePath)) { + Set-Location $stored_cwd + throw "The cmake generate incomplete, pelase add '-f' to re-generate again" + } + } - cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS | Out-Host + # step4. build + # apply additional build options + $BUILD_ALL_OPTIONS += "--parallel" + if ($Global:is_linux) { + $BUILD_ALL_OPTIONS += "$(nproc)" + } + if (($cmake_generator -eq 'Xcode') -and ($BUILD_ALL_OPTIONS.IndexOf('--verbose') -eq -1)) { + $BUILD_ALL_OPTIONS += '--', '-quiet' + } + $b1k.println("BUILD_ALL_OPTIONS=$BUILD_ALL_OPTIONS, Count={0}" -f $BUILD_ALL_OPTIONS.Count) + + cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS | Out-Host + } + } else { + $b1k.println("Missing CMakeLists.txt in $workDir") } } + + Set-Location $stored_cwd } else { # google gclient/gn build system # refer: https://chromium.googlesource.com/chromium/src/+/eca97f87e275a7c9c5b7f13a65ff8635f0821d46/tools/gn/docs/reference.md#args_specifies-build-arguments-overrides-examples @@ -1730,7 +1728,5 @@ if (!$setupOnly) { isHostTarget = $is_host_target compilerID = $TOOLCHAIN_NAME } - - Set-Location $stored_cwd } diff --git a/cmake/Modules/AXPlatform.cmake b/1k/platform.cmake similarity index 91% rename from cmake/Modules/AXPlatform.cmake rename to 1k/platform.cmake index 54e0688017cc..6e1ea45cd88c 100644 --- a/cmake/Modules/AXPlatform.cmake +++ b/1k/platform.cmake @@ -69,8 +69,8 @@ elseif(CMAKE_GENERATOR MATCHES Visual) set(VS TRUE) endif() -function(ax_check_archs) +function(_1k_deprecated_32bit project_name release_ver) if(("${ARCH_ALIAS}" MATCHES "x86") OR ("${ARCH_ALIAS}" MATCHES "armeabi-v7a")) - message(WARNING "Building 32-bit[${ARCH_ALIAS}] axmol is deprecated, and will be removed in next release axmol-2.2.0") + message(WARNING "Building 32-bit[${ARCH_ALIAS}] ${project_name} is deprecated, and will be removed in next release ${release_ver}") endif() endfunction() diff --git a/CHANGELOG.md b/CHANGELOG.md index 9954b009c531..8f73d72ba4e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -124,6 +124,7 @@ - KEY_STORE_PASSWORD ==> KEY_STORE_PASSWORD - RELEASE_KEY_ALIAS ==> KEY_ALIAS - RELEASE_KEY_PASSWORD ==> KEY_PASSWORD +- Enable template projects' `aidl` by default for In-app purchases by @armanhossiny ### Break changes diff --git a/cmake/Modules/AXBuildSet.cmake b/cmake/Modules/AXBuildSet.cmake index cb62dca313db..92b521d06176 100644 --- a/cmake/Modules/AXBuildSet.cmake +++ b/cmake/Modules/AXBuildSet.cmake @@ -49,6 +49,7 @@ include(AXConfigDefine) # config libraries dependence include(AXConfigDepend) +message(AUTHOR_WARNING "CMAKE_VERSION:" ${CMAKE_VERSION}) message(STATUS "CMAKE_HOST_SYSTEM_NAME:" ${CMAKE_HOST_SYSTEM_NAME}) message(STATUS "CMAKE_SYSTEM_NAME:" ${CMAKE_SYSTEM_NAME}) message(STATUS "CMAKE_GENERATOR_PLATFORM:" ${CMAKE_GENERATOR_PLATFORM}) @@ -65,4 +66,4 @@ message(STATUS "PROJECT_BINARY_DIR:" ${PROJECT_BINARY_DIR}) message(STATUS "ENGINE_BINARY_PATH:" ${ENGINE_BINARY_PATH}) message(STATUS "ARCH_ALIAS:" ${ARCH_ALIAS}) -ax_check_archs() +_1k_deprecated_32bit(axmol 2.2.0) diff --git a/cmake/Modules/AXConfigDefine.cmake b/cmake/Modules/AXConfigDefine.cmake index 2f6dde47016a..4d97b1a1bf3f 100644 --- a/cmake/Modules/AXConfigDefine.cmake +++ b/cmake/Modules/AXConfigDefine.cmake @@ -1,5 +1,4 @@ - -include(AXPlatform) +include(${_AX_ROOT}/1k/platform.cmake) # custom target property for lua/js link define_property(TARGET diff --git a/cmake/Modules/AXLinkHelpers.cmake b/cmake/Modules/AXLinkHelpers.cmake index 6b9319d4c3f7..0a545a6743a3 100644 --- a/cmake/Modules/AXLinkHelpers.cmake +++ b/cmake/Modules/AXLinkHelpers.cmake @@ -1,6 +1,5 @@ -include(AXPlatform) - -ax_check_archs() +include(${_AX_ROOT}/1k/platform.cmake) +_1k_deprecated_32bit(axmol 2.2.0) if(NOT CMAKE_GENERATOR MATCHES "Ninja") set(BUILD_CONFIG_DIR "\$\(Configuration\)/") diff --git a/templates/cpp-template-default/proj.android/app/build.gradle b/templates/cpp-template-default/proj.android/app/build.gradle index cc1ab50a5ea4..c93e9405c10f 100644 --- a/templates/cpp-template-default/proj.android/app/build.gradle +++ b/templates/cpp-template-default/proj.android/app/build.gradle @@ -86,6 +86,10 @@ android { aaptOptions { noCompress 'mp3','ogg','wav','mp4','ttf','ttc' } + + buildFeatures { + aidl true + } } android.applicationVariants.configureEach { variant -> diff --git a/templates/lua-template-default/proj.android/app/build.gradle b/templates/lua-template-default/proj.android/app/build.gradle index 5735bc41f785..f4a2e5f07398 100644 --- a/templates/lua-template-default/proj.android/app/build.gradle +++ b/templates/lua-template-default/proj.android/app/build.gradle @@ -86,6 +86,10 @@ android { aaptOptions { noCompress 'mp3','ogg','wav','mp4','ttf','ttc' } + + buildFeatures { + aidl true + } } android.applicationVariants.configureEach { variant -> diff --git a/thirdparty/angle/CMakeLists.txt b/thirdparty/angle/CMakeLists.txt index 0392faf3546d..cdc0b5e789b2 100644 --- a/thirdparty/angle/CMakeLists.txt +++ b/thirdparty/angle/CMakeLists.txt @@ -3,7 +3,7 @@ set(lib_name angle) project(${lib_name}) -_1kfetch_dist(angle "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(angle) if(WINRT) # -----macro: set openssl sub target----- diff --git a/thirdparty/c-ares/CMakeLists.txt b/thirdparty/c-ares/CMakeLists.txt index 0a027b29430d..44cbc31ee5bb 100644 --- a/thirdparty/c-ares/CMakeLists.txt +++ b/thirdparty/c-ares/CMakeLists.txt @@ -3,7 +3,7 @@ set(target_name c-ares) project(${target_name}) -_1kfetch_dist(cares "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(cares) if(WINDOWS) add_library(${target_name} SHARED IMPORTED GLOBAL) diff --git a/thirdparty/curl/CMakeLists.txt b/thirdparty/curl/CMakeLists.txt index 886b01e235ab..873097f10636 100644 --- a/thirdparty/curl/CMakeLists.txt +++ b/thirdparty/curl/CMakeLists.txt @@ -3,7 +3,7 @@ set(target_name ${lib_name}) project(${lib_name}) -_1kfetch_dist(curl "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(curl) if(WINDOWS) add_library(${target_name} SHARED IMPORTED GLOBAL) diff --git a/thirdparty/jpeg-turbo/CMakeLists.txt b/thirdparty/jpeg-turbo/CMakeLists.txt index 62c959ec82b5..d5b45e3a67e5 100644 --- a/thirdparty/jpeg-turbo/CMakeLists.txt +++ b/thirdparty/jpeg-turbo/CMakeLists.txt @@ -4,7 +4,7 @@ set(target_name ${lib_name}) project(${lib_name}) -_1kfetch_dist(jpeg-turbo "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(jpeg-turbo) add_library(${target_name} STATIC IMPORTED GLOBAL) diff --git a/thirdparty/lua/luajit/CMakeLists.txt b/thirdparty/lua/luajit/CMakeLists.txt index 7f929d6839b3..ec26b282e6ab 100644 --- a/thirdparty/lua/luajit/CMakeLists.txt +++ b/thirdparty/lua/luajit/CMakeLists.txt @@ -3,7 +3,7 @@ set(lib_name luajit) set(target_name ${lib_name}) project(${lib_name}) -_1kfetch_dist(luajit "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(luajit) if(WINDOWS) add_library(${target_name} SHARED IMPORTED GLOBAL) diff --git a/thirdparty/openssl/CMakeLists.txt b/thirdparty/openssl/CMakeLists.txt index 96b531ec5243..c920bd00398b 100644 --- a/thirdparty/openssl/CMakeLists.txt +++ b/thirdparty/openssl/CMakeLists.txt @@ -3,7 +3,7 @@ set(lib_name openssl) project(${lib_name}) -_1kfetch_dist(openssl "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(openssl) set(OPENSSL_INCLUDE_DIR "${openssl_INC_DIR}" CACHE STRING "OpenSSL include dir" FORCE) diff --git a/thirdparty/zlib/CMakeLists.txt b/thirdparty/zlib/CMakeLists.txt index 7480ff400808..0d7afd673d47 100644 --- a/thirdparty/zlib/CMakeLists.txt +++ b/thirdparty/zlib/CMakeLists.txt @@ -1,7 +1,7 @@ set(target_name "zlib") project(${target_name}) -_1kfetch_dist(zlib "${PARENT_DIRECTORY}/_deps") +_1kfetch_dist(zlib) if(WINDOWS) add_library(${target_name} SHARED IMPORTED GLOBAL) diff --git a/tools/console/axmol.ps1 b/tools/console/axmol.ps1 index ea0984122b93..2f8c935e3286 100644 --- a/tools/console/axmol.ps1 +++ b/tools/console/axmol.ps1 @@ -327,4 +327,4 @@ if ($args[0] -eq 'new') { } } -. $plugin.proc @sub_args @sub_opts +. $plugin.proc $sub_args @sub_opts