mirror of https://github.com/axmolengine/axmol.git
Bump 2.1.0
This commit is contained in:
parent
4c3c9bd2ae
commit
8ee68b58c9
|
@ -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']
|
|
@ -1,9 +1,6 @@
|
|||
name: publish
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [build]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
# Inputs the workflow accepts.
|
||||
inputs:
|
||||
|
|
108
1k/build.ps1
108
1k/build.ps1
|
@ -94,7 +94,7 @@ $exeSuffix = if ($HOST_OS -eq 0) { '.exe' } else { '' }
|
|||
$Script:cmake_generator = $null
|
||||
|
||||
# import VersionEx
|
||||
. (Join-Path $PSScriptRoot 'versionex.ps1')
|
||||
. (Join-Path $PSScriptRoot 'extensions.ps1')
|
||||
|
||||
class build1k {
|
||||
[void] println($msg) {
|
||||
|
@ -301,6 +301,8 @@ $Global:is_darwin_embed_family = $Global:is_ios -or $Global:is_tvos -or $Global:
|
|||
$Global:is_darwin_family = $Global:is_mac -or $Global:is_darwin_embed_family
|
||||
$Global:is_gh_act = "$env:GITHUB_ACTIONS" -eq 'true'
|
||||
|
||||
$Script:cmake_ver = ''
|
||||
|
||||
if (!$is_wasm) {
|
||||
$TARGET_CPU = $options.a
|
||||
if (!$TARGET_CPU) {
|
||||
|
@ -665,7 +667,7 @@ function setup_ninja() {
|
|||
function setup_cmake($skipOS = $false) {
|
||||
$cmake_prog, $cmake_ver = find_prog -name 'cmake'
|
||||
if ($cmake_prog -and (!$skipOS -or $cmake_prog.IndexOf($myRoot) -ne -1)) {
|
||||
return $cmake_prog
|
||||
return $cmake_prog, $cmake_ver
|
||||
}
|
||||
|
||||
$cmake_root = $(Join-Path $external_prefix 'cmake')
|
||||
|
@ -731,7 +733,7 @@ function setup_cmake($skipOS = $false) {
|
|||
if (($null -ne $cmake_bin) -and ($env:PATH.IndexOf($cmake_bin) -eq -1)) {
|
||||
$env:PATH = "$cmake_bin$ENV_PATH_SEP$env:PATH"
|
||||
}
|
||||
return $cmake_prog
|
||||
return $cmake_prog, $cmake_ver
|
||||
}
|
||||
|
||||
function ensure_cmake_ninja($cmake_prog, $ninja_prog) {
|
||||
|
@ -1254,7 +1256,7 @@ function preprocess_andorid([string[]]$inputOptions) {
|
|||
|
||||
$archs = $archlist -join ':' # TODO: modify gradle, split by ';'
|
||||
|
||||
$outputOptions += "-P__1K_CMAKE_VERSION=$($manifest['cmake'])"
|
||||
$outputOptions += "-P__1K_CMAKE_VERSION=$($Script:cmake_ver.TrimLast('-'))"
|
||||
$outputOptions += "-P__1K_ARCHS=$archs"
|
||||
$outputOptions += '--parallel', '--info'
|
||||
}
|
||||
|
@ -1374,7 +1376,7 @@ validHostAndToolchain
|
|||
|
||||
$null = setup_glslcc
|
||||
|
||||
$cmake_prog = setup_cmake
|
||||
$cmake_prog,$Script:cmake_ver = setup_cmake
|
||||
|
||||
if ($Global:is_win_family) {
|
||||
find_vs_latest
|
||||
|
@ -1394,7 +1396,7 @@ elseif ($Global:is_android) {
|
|||
$ninja_prog = setup_ninja
|
||||
# ensure ninja in cmake_bin
|
||||
if (!(ensure_cmake_ninja $cmake_prog $ninja_prog)) {
|
||||
$cmake_prog = setup_cmake -Force
|
||||
$cmake_prog,$Script:cmake_ver = setup_cmake -Force
|
||||
if (!(ensure_cmake_ninja $cmake_prog $ninja_prog)) {
|
||||
$b1k.println("Ensure ninja in cmake bin directory fail")
|
||||
}
|
||||
|
@ -1576,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
|
||||
|
@ -1591,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
|
||||
}
|
||||
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'
|
||||
|
||||
$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
|
||||
$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
|
||||
|
@ -1728,7 +1728,5 @@ if (!$setupOnly) {
|
|||
isHostTarget = $is_host_target
|
||||
compilerID = $TOOLCHAIN_NAME
|
||||
}
|
||||
|
||||
Set-Location $stored_cwd
|
||||
}
|
||||
|
||||
|
|
|
@ -201,6 +201,21 @@ namespace System
|
|||
return v1.CompareTo(v2) >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ExtensionMethods
|
||||
{
|
||||
public static string TrimLast(this Management.Automation.PSObject thiz, string separator)
|
||||
{
|
||||
var str = thiz.BaseObject as string;
|
||||
var index = str.LastIndexOf(separator);
|
||||
if (index != -1)
|
||||
return str.Substring(0, index);
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
"@
|
||||
|
||||
$TrimLastMethod = [ExtensionMethods].GetMethod('TrimLast')
|
||||
Update-TypeData -TypeName System.String -MemberName TrimLast -MemberType CodeMethod -Value $TrimLastMethod
|
||||
}
|
|
@ -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()
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
include(AXPlatform)
|
||||
include(${_AX_ROOT}/1k/platform.cmake)
|
||||
|
||||
# custom target property for lua/js link
|
||||
define_property(TARGET
|
||||
|
|
|
@ -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\)/")
|
||||
|
|
|
@ -6,7 +6,7 @@ $AX_ROOT = $myRoot
|
|||
Set-Alias println Write-Host
|
||||
|
||||
# import VersionEx
|
||||
. (Join-Path $PSScriptRoot '1k/versionex.ps1')
|
||||
. (Join-Path $PSScriptRoot '1k/extensions.ps1')
|
||||
|
||||
$pwsh_ver = [VersionEx]$PSVersionTable.PSVersion.ToString()
|
||||
|
||||
|
|
|
@ -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-----
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -90,7 +90,7 @@ function Compress-ArchiveEx() {
|
|||
}
|
||||
|
||||
# import VersionEx
|
||||
. (Join-Path $AX_ROOT '1k/versionex.ps1')
|
||||
. (Join-Path $AX_ROOT '1k/extensions.ps1')
|
||||
|
||||
if (([VersionEx]$PSVersionTable.PSVersion.ToString() -ge [VersionEx]'7.0') -and $IsWindows) {
|
||||
|
||||
|
|
|
@ -327,4 +327,4 @@ if ($args[0] -eq 'new') {
|
|||
}
|
||||
}
|
||||
|
||||
. $plugin.proc @sub_args @sub_opts
|
||||
. $plugin.proc $sub_args @sub_opts
|
||||
|
|
Loading…
Reference in New Issue