Skip to content

Commit 1e23fd7

Browse files
committed
Merge branch 'release/2.x' into dev
2 parents 5ea5d48 + 53ba20c commit 1e23fd7

24 files changed

Lines changed: 84 additions & 74 deletions

File tree

1k/1kiss.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,15 @@ if (!$setupOnly) {
18751875
$SOURCE_DIR = $null
18761876

18771877
function resolve_out_dir($prefix) {
1878+
if ($prefix.EndsWith('/') -or $prefix.EndsWith('\')) {
1879+
if ($is_host_target) {
1880+
return $1k.realpath("$prefix$TARGET_CPU/")
1881+
}
1882+
else {
1883+
return $1k.realpath("$prefix${TARGET_OS}_$TARGET_CPU/")
1884+
}
1885+
}
1886+
18781887
if ($is_host_target) {
18791888
if (!$is_host_cpu) {
18801889
$out_dir = "${prefix}${TARGET_CPU}"
@@ -2246,7 +2255,6 @@ if (!$setupOnly) {
22462255
Write-Output ("gn_buildargs_overrides=$gn_buildargs_overrides, Count={0}" -f $gn_buildargs_overrides.Count)
22472256

22482257
$BUILD_DIR = resolve_out_dir 'out/'
2249-
22502258
if ($rebuild) {
22512259
$1k.rmdirs($BUILD_DIR)
22522260
}

1k/build.profiles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ min_sdk=21
5858

5959
# The gradle version, @setup.ps1
6060
# as latest as possible
61-
gradle=9.0.0
61+
gradle=9.1.0
6262

6363
# The android gradle plugin, @setup.ps1
6464
# as stable as possible, match with build-tools,android-studio

1k/fetch.ps1

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,14 @@ if ($is_git_repo) {
212212
}
213213

214214
if ($old_rev_hash -ne $new_rev_hash) {
215-
git -C $lib_src checkout $revision 1>$null 2>$null
215+
git -C $lib_src checkout -- .
216+
git -C $lib_src checkout $revision 1>$null
217+
if ($LASTEXITCODE -ne 0) {
218+
throw "fetch.ps1: checkout $lib_src to version: $revision fail"
219+
}
216220
$cur_rev_hash = $(git -C $lib_src rev-parse HEAD)
217221
if ($cur_rev_hash -ne $new_rev_hash) {
218-
println "fetch.ps1: warning: cur_rev_hash($cur_rev_hash) != new_rev_hash($new_rev_hash)"
222+
throw "fetch.ps1: cur_rev_hash($cur_rev_hash) != new_rev_hash($new_rev_hash)"
219223
}
220224

221225
$is_rev_mod = $true
@@ -232,11 +236,16 @@ if ($is_git_repo) {
232236
}
233237
}
234238

239+
# whether the repo use gn build system?
240+
$is_gn = Test-Path (Join-Path $lib_src '.gn') -PathType Leaf
241+
235242
if ($is_rev_mod) {
236243
$sentry_content = "ver: $version"
237244
if ($is_git_repo) {
238245
if ((Test-Path (Join-Path $lib_src '.gitmodules') -PathType Leaf)) {
239-
git -C $lib_src submodule update --recursive --init
246+
if (!$is_gn) {
247+
git -C $lib_src submodule update --recursive --init
248+
}
240249
}
241250
if ($branch_name) {
242251
# tracking branch
@@ -258,11 +267,17 @@ if ($is_rev_mod) {
258267
}
259268

260269
# google gclient spec
261-
if (Test-Path (Join-Path $lib_src '.gn') -PathType Leaf) {
270+
if ($is_gn) {
262271
# the repo use google gn build system manage deps and build
263272
Push-Location $lib_src
264273
# angle (A GLES native implementation by google)
265274
if (Test-Path 'scripts/bootstrap.py' -PathType Leaf) {
275+
# need reset local modifications before execute gclient sync -D
276+
git -C $lib_src checkout -- .
277+
$build_tool_dir = Join-Path $lib_src 'build'
278+
if (Test-Path $build_tool_dir -PathType Container) {
279+
git -C $build_tool_dir checkout -- .
280+
}
266281
python scripts/bootstrap.py
267282
}
268283
# darwin (A WebGPU native implementation by google)

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- Fix `ui::MediaPlayer` may crash on Apple platforms by @halx99 in [#2704](https://github.com/axmolengine/axmol/pull/2704)
2323
- Fix occasional missing Android assets in AAB build by @paulocoutinhox in [#2713](https://github.com/axmolengine/axmol/pull/2713)
2424
- Fix format specifiers in logging calls by @rh101 in [#2749](https://github.com/axmolengine/axmol/pull/2749)
25+
- Fix for crash when director is reset during scene transition by @halx99 [#2802](https://github.com/axmolengine/axmol/pull/2802)
2526

2627

2728
## Improvements
@@ -37,6 +38,8 @@
3738
- Remove CI pull-request trigger event: `ready_for_review` by @halx99
3839
- Update kcp to resolve cmake error by @halx99
3940
- Dispatch applicationScreenSizeChanged when layoutSubviews on ios by @halx99
41+
- Rename internal ios class: EARenderView => RenderHostView by @halx99
42+
- Make Director::getRunningScene() return the expected result for any type of scene switch when called from Node::onEnter() by @rh101 in [#2799](https://github.com/axmolengine/axmol/pull/2799)
4043

4144
## SDK & Tools updates
4245

INFRA.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
## gradle
2020

2121
- [![github](https://img.shields.io/github/v/release/gradle/gradle?label=Upstream)](https://github.com/gradle/gradle)
22-
- Version: 9.0.0
22+
- Version: 9.1.0
2323
- License: Apache-2.0
2424
- Platform: Android
2525
- Manged by: `1k/build.profiles`

axmol/base/Director.cpp

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,13 @@ void Director::reset()
10211021
}
10221022
#endif // AX_ENABLE_GC_FOR_NATIVE_OBJECTS
10231023
_runningScene->onExit();
1024+
1025+
// Ensure incoming scene is correctly deactivated if the
1026+
// director is reset during a scene transition
1027+
auto transition = dynamic_cast<TransitionScene*>(_runningScene);
1028+
if (transition)
1029+
transition->getInScene()->onExit();
1030+
10241031
_runningScene->cleanup();
10251032
_runningScene->release();
10261033
}
@@ -1168,41 +1175,42 @@ void Director::setNextScene()
11681175
{
11691176
_eventDispatcher->dispatchEvent(_beforeSetNextScene);
11701177

1171-
bool runningIsTransition = dynamic_cast<TransitionScene*>(_runningScene) != nullptr;
1172-
bool newIsTransition = dynamic_cast<TransitionScene*>(_nextScene) != nullptr;
1178+
auto outgoingScene = _runningScene;
1179+
_runningScene = _nextScene;
1180+
_nextScene = nullptr;
11731181

1174-
// If it is not a transition, call onExit/cleanup
1175-
if (!newIsTransition)
1182+
bool outgoingSceneIsTransition = dynamic_cast<TransitionScene*>(outgoingScene) != nullptr;
1183+
1184+
if (outgoingScene)
11761185
{
1177-
if (_runningScene)
1178-
{
1179-
_runningScene->onExitTransitionDidStart();
1180-
_runningScene->onExit();
1181-
}
1186+
bool incomingSceneIsTransition = dynamic_cast<TransitionScene*>(_runningScene) != nullptr;
11821187

1183-
// issue #709. the root node (scene) should receive the cleanup message too
1184-
// otherwise it might be leaked.
1185-
if (_sendCleanupToScene && _runningScene)
1188+
// If it is not a transition, call onExit/cleanup
1189+
if (!incomingSceneIsTransition)
11861190
{
1187-
_runningScene->cleanup();
1191+
outgoingScene->onExitTransitionDidStart();
1192+
outgoingScene->onExit();
1193+
1194+
// issue #709. the root node (scene) should receive the cleanup message too
1195+
// otherwise it might be leaked.
1196+
if (_sendCleanupToScene)
1197+
{
1198+
outgoingScene->cleanup();
1199+
}
11881200
}
1201+
1202+
outgoingScene->release();
11891203
}
11901204

11911205
if (_runningScene)
11921206
{
1193-
_runningScene->release();
1194-
}
1195-
_runningScene = _nextScene;
1196-
if (_nextScene)
1197-
{
1198-
_nextScene->retain();
1199-
}
1200-
_nextScene = nullptr;
1207+
_runningScene->retain();
12011208

1202-
if ((!runningIsTransition) && _runningScene)
1203-
{
1204-
_runningScene->onEnter();
1205-
_runningScene->onEnterTransitionDidFinish();
1209+
if (!outgoingSceneIsTransition)
1210+
{
1211+
_runningScene->onEnter();
1212+
_runningScene->onEnterTransitionDidFinish();
1213+
}
12061214
}
12071215

12081216
_eventDispatcher->dispatchEvent(_afterSetNextScene);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Aug 8 15:49:42 UTC+08 2025
1+
#Wed Sep 24 23:21:50 UTC+08 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

templates/common/proj.android/gradlew

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/common/proj.android/gradlew.bat

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Aug 8 15:49:42 UTC+08 2025
1+
#Wed Sep 24 23:21:50 UTC+08 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)