From 15711be5d45736ca3bfa9a60b5186fc53071071b Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 4 Jan 2025 23:16:06 +0800 Subject: [PATCH] Version 2.3.1 --- .github/workflows/build.yml | 22 ++++------------- .github/workflows/genbindings.yml | 4 ++-- 1k/1kiss.ps1 | 24 +++++++++++++++---- 1k/extensions.ps1 | 7 +++--- CHANGELOG.md | 16 +++++++++++++ core/axmolver.h.in | 2 +- tools/cmdline/build.ps1 | 39 ++++++++++++++++--------------- 7 files changed, 68 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0df4eebf45e..c40c4c3cbec9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,9 +25,7 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - .\tools\cmdline\axmol -p win32 -a x64 - .\tools\cmdline\axmol run -p win32 -a x64 -xb '--target,unit-tests' + run: .\tools\cmdline\axmol -p win32 -a x64 && .\tools\cmdline\axmol run -p win32 -a x64 -t unit-tests - uses: actions/upload-artifact@v4 with: name: windows_x64 @@ -78,10 +76,7 @@ jobs: - name: Build shell: pwsh - run: | - ./tools/cmdline/axmol -p linux -a x64 - ./tools/cmdline/axmol -p linux -a x64 -xb '--target,lua-tests' - ./tools/cmdline/axmol run -p linux -a x64 -xb '--target,unit-tests' -wait + run: ./tools/cmdline/axmol -p linux -a x64 -t 'cpp-tests,lua-tests' && ./tools/cmdline/axmol run -p linux -a x64 -t unit-tests -wait osx-arm64: runs-on: macos-latest steps: @@ -90,9 +85,7 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - ./tools/cmdline/axmol -p osx - ./tools/cmdline/axmol run -p osx -xb '--target,unit-tests' + run: ./tools/cmdline/axmol -p osx && ./tools/cmdline/axmol run -p osx -t unit-tests osx-x64: runs-on: macos-13 steps: @@ -101,9 +94,7 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - ./tools/cmdline/axmol -p osx - ./tools/cmdline/axmol run -p osx -xb '--target,unit-tests' + run: ./tools/cmdline/axmol -p osx && ./tools/cmdline/axmol run -p osx -t unit-tests android: runs-on: ubuntu-latest strategy: @@ -154,10 +145,7 @@ jobs: submodules: 'recursive' - name: Build shell: pwsh - run: | - ./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 - ./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -xb '--target,fairygui-tests' - ./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -xb '--target,lua-tests' + run: ./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -t 'cpp-tests,fairygui-tests,lua-tests' - uses: actions/upload-artifact@v4 with: name: wasm diff --git a/.github/workflows/genbindings.yml b/.github/workflows/genbindings.yml index 157fb625da7a..7d27d967daa8 100644 --- a/.github/workflows/genbindings.yml +++ b/.github/workflows/genbindings.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: jobs: - build: + genbindings: runs-on: windows-latest steps: @@ -25,7 +25,7 @@ jobs: with: python-version: '3.11.5' - - name: Build + - name: Genbindings run: tools\ci\genbindings.ps1 - name: Create pull request diff --git a/1k/1kiss.ps1 b/1k/1kiss.ps1 index 7e5b7ef12037..d8d57bbe24a6 100644 --- a/1k/1kiss.ps1 +++ b/1k/1kiss.ps1 @@ -1762,6 +1762,7 @@ elseif ($Global:is_wasm) { $is_host_target = $Global:is_win32 -or $Global:is_linux -or $Global:is_mac $is_host_cpu = $HOST_CPU -eq $TARGET_CPU +$cmake_target = $null if (!$setupOnly) { $BUILD_DIR = $null @@ -2030,10 +2031,25 @@ if (!$setupOnly) { $forward_options += '--', '-quiet' } - if ($options.t) { $cmake_target = $options.t } - if ($cmake_target) { - $cmake_targets = $cmake_target.Split(',') - foreach ($target in $cmake_targets) { + $cm_targets = $options.t + + if($cm_targets) { + if($cm_targets -isnot [array]) { + $cm_targets = "$cm_targets".Split(',') + } + } else { + $cm_targets = @() + } + if($cmake_target) { + if ($cm_targets.Contains($cmake_target)) { + $cm_targets += $cmake_target + } + } else { + $cmake_target = $cm_targets[-1] + } + + if ($cm_targets) { + foreach ($target in $cm_targets) { $1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target") cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target $forward_options | Out-Host if (!$?) { diff --git a/1k/extensions.ps1 b/1k/extensions.ps1 index 081ebe894bcc..c2feae8c7ac1 100644 --- a/1k/extensions.ps1 +++ b/1k/extensions.ps1 @@ -2,7 +2,7 @@ # So provide a spec VersionEx make [VersionEx]'1.0' -eq [VersionEx]'1.0.0' == true available if (-not ([System.Management.Automation.PSTypeName]'System.VersionEx').Type) { - Add-Type -TypeDefinition @" + $code_str = @" namespace System { @@ -216,8 +216,9 @@ namespace System } "@ -$TrimLastMethod = [ExtensionMethods].GetMethod('TrimLast') -Update-TypeData -TypeName System.String -MemberName TrimLast -MemberType CodeMethod -Value $TrimLastMethod + Add-Type -TypeDefinition $code_str + $TrimLastMethod = [ExtensionMethods].GetMethod('TrimLast') + Update-TypeData -TypeName System.String -MemberName TrimLast -MemberType CodeMethod -Value $TrimLastMethod } diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ec4ffa9030..66531c1b1d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## axmol-2.3.1 Jan.5 2025 + +### Bug fixes + +- Fix RenderTexture internal sprite positioning and test cases by @rh101 in https://github.com/axmolengine/axmol/pull/2301 +- Fix imgui compile and link error for wasm by @halx99 in https://github.com/axmolengine/axmol/pull/2297 + +### Improvements + +- Improve CI, raise error when build fail by @halx99 +- Improve DevSetup.md by @rh101 in https://github.com/axmolengine/axmol/pull/2298 + +### 3rdparty updates + +- xxhash: 0.8.2 ==> 0.8.3 + ## axmol-2.3.0 Jan.1 2025 ### Significant changes relative to 2.2.x: diff --git a/core/axmolver.h.in b/core/axmolver.h.in index ac498ec58fae..b61559923ec7 100644 --- a/core/axmolver.h.in +++ b/core/axmolver.h.in @@ -5,7 +5,7 @@ // 00 03 08 00 #define AX_VERSION_MAJOR 2 #define AX_VERSION_MINOR 3 -#define AX_VERSION_PATCH 0 +#define AX_VERSION_PATCH 1 /* Define axmol version helper macros */ #define AX_VERSION_MAKE(a, b, c) ((a << 16) | (b << 8) | (c & 0xff)) diff --git a/tools/cmdline/build.ps1 b/tools/cmdline/build.ps1 index f62adb1c5cf6..dc157441c989 100644 --- a/tools/cmdline/build.ps1 +++ b/tools/cmdline/build.ps1 @@ -39,7 +39,7 @@ param( $unhandled_args = @() -$options = @{p = $null; d = $null; xc = @(); xb = @(); } +$options = @{p = $null; d = $null; xc = @(); xb = @(); t = @() } $optName = $null foreach ($arg in $args) { @@ -150,14 +150,17 @@ if ($use_gradle) { if (!$use_gradle) { if (!$cmake_target) { # non android, specific cmake target - $cmake_targets = @( - # project - $proj_name, - # engine - 'cpp-tests' - ) - $cmake_target = $cmake_targets[$is_axmol_engine] - $options.xb += '--target', $cmake_target + if($options.t) { + if($options.t -isnot [array]) { + $options.t = "$($options.t)".Split(',') + } + } + + if(!$options.t) { + $options.t = @(@($proj_name, 'cpp-tests')[$is_axmol_engine]) + } + + $cmake_target = $options.t[-1] } if ($is_android -and !"$($options.xc)".Contains('-DANDROID_STL')) { @@ -196,15 +199,13 @@ if ($forceConfig) { $forward_args['forceConfig'] = $true } -. $1k_script @1k_args @forward_args @unhandled_args +$op_name = @('Generate', 'Build')[!$configOnly] -if (!$configOnly) { - if ($?) { - $1k.pause('Build success') - } else { - throw "Build fail, ret=$LASTEXITCODE" - } -} -else { - $1k.pause('Generate done') +. $1k_script @1k_args @forward_args @unhandled_args +if ($?) { + $1k.pause("$op_name success") +} else { + Write-Error "$op_name fail, ret=$LASTEXITCODE" } + +exit $LASTEXITCODE