Commit Graph

704 Commits

Author SHA1 Message Date
smilediver ddeb14c160
Fix shaders not copying to final build on macOS for non Xcode builds (2) (#1908)
* Fix shaders not copying to final build on macOS for non Xcode builds

* Fix macOS build after adding minimum CMake 3.20 requirement

* Refactor "Fix macOS build after adding minimum CMake 3.20 requirement"
2024-05-22 01:51:09 +08:00
Deal 004065a054
Rename ax::Ref ==> ax::Object (#1877)
* Rename ax::Ref ==> ax::Object

* Update Object.h [skip ci]
2024-05-03 22:15:08 +08:00
smilediver 561b8c2349
Enable running `unit-tests` in GitHub workflow (#1871)
* Enable running `unit-tests` in GitHub workflow

* Attempt to fix macOS unit-tests run

* Use axmol run to run unit-tests

* Skip launch when desktop cpu mismatch

* Skip launch when desktop cpu mismatch

* Fix unit-tests crash on linux

* GitHub Action: divide osx arm64, x64 to differrent runner image

---------

Co-authored-by: Deal <halx99@live.com>
2024-05-01 22:24:53 +08:00
halx99 d69fdfd038 Fix unit-tests working directory on vs debugger 2024-05-01 02:16:53 +08:00
smilediver dadd5fe983
Fix `unit-tests` build on macOS and Linux (#1870) 2024-04-30 23:26:42 +08:00
smilediver 9ac6db4384
Add unit tests (#1862)
* Add unit-tests app for running automatic unit tests

* Move unit tests from cpp-tests to unit-tests

* TEMP

* Add FileUtils::fullPathForDirectory() tests

* Use test assets from `axmol-sample-assets` repo

* Add more FileUtils::isFileExist(), FileUtils::isDirectoryExist() tests

* Add `unit-tests` builds to GitHub's workflows

* Fix `.github/worflows/build.yml`
2024-04-30 20:52:28 +08:00
halx99 4c59349ac7 Improve cmake scripts 2024-04-30 00:43:54 +08:00
smilediver 354f3abed9
Add ability to create console apps (#1859)
* Print cmake build command when running `axmol build`

* Add option to `ax_setup_app_config()` for building console applications

* Fix console app entrypoint

---------

Co-authored-by: halx99 <halx99@live.com>
2024-04-29 00:24:06 +08:00
RH 3916a2367b
Cross-platform media controller for video playback (#1845)
* Initial work on media controller

* Media player controller for WMF media engine

* Add getDuration and getCurrentTime methods to media engines

* Fix compilation

* Fix Android media timeline issues

* Fix compilation issue

* Fix WinRT compilation issue

* Fix compilation issue

* Add missing header include

* Make it simpler to create a custom media controller

* Ensure the basic media controller widget size is the same size as the media player on initialization

* Add dark media control underlay to give more contrast to the controls
ADd copyright notices

* Removing existing media controller from parent if required

* Adjust for view scaling since embedded resources are created for a scale of 1.

* Scale central media controls if required on content size change

* Remove pointless fast forward and fast reverse buttons
Ensure media controller correctly resizes on full-screen media playback

* Allow enable vlc on windows

* Improve media macro detect

* Add media controls drawn by DrawNode into single texture
Add fullscreen enter and exit controls
setUserInputEnabled and isUserInputEnabled replaced by setMediaControllerEnabled and isMediaControllerEnabled

* Update function calls to new names

* Revert back to setUserInputEnabled and isUserInputEnabled

* Remove embedded circle image and create it with DrawNode

* Change radius of drawn circle to half the total image size

---------

Co-authored-by: halx99 <halx99@live.com>
2024-04-24 22:28:59 +08:00
halx99 f159250c4e Don't assert since we remove deprecated pixel formats 2024-04-22 23:07:09 +08:00
Deal 74612ef296
Remove deprecated pixel formats L8, A8, LA8 (#1839)
* Remove deprecated pixel formats

* Fix ci

* Fixup [skip ci]

* Fixup [skip ci]

* Update tests [skip ci]
2024-04-20 22:29:16 +08:00
halx99 940db1e351 Change android default screenOrientation to sensorLandscape 2024-04-17 22:59:25 +08:00
halx99 68a5c250cd Fix build android with axmol cmdline arch not working 2024-04-09 01:37:04 +08:00
halx99 320124487e Update gradlew scripts 2024-04-08 23:29:45 +08:00
halx99 60c4f6c340 Fix win32 link error
attention linux: the libaxmol.a must first link library, otherwise will cause
link error.
2024-04-08 21:52:50 +08:00
halx99 56fb742c32 Fix linux lua link error 2024-04-08 02:10:31 +08:00
halx99 0ef8d484ce Fix xcode15 warning: ignore link duplicated lib 2024-04-07 22:51:50 +08:00
halx99 bc1bab5a98 Update AGP 8.2.2
- gradle: 8.5 ==> 8.7
- gradle-wapper.jar: NA ==> 8.7
- cmdlinetools: 10406996 ==> 11076708
2024-04-07 02:08:00 +08:00
halx99 0a93419e4b Improve code style 2024-04-03 20:28:20 +08:00
halx99 e8b070c84c Remove unnecessary cmake option AX_VS_DEPLOYMENT_TARGET since we require cmake >= 3.28 2024-04-03 03:57:59 +08:00
RH 690e16df30
Use single macro to control each feature (#1776)
* Use single macro to control each feature

* Allow Physics module to be enabled or disabled via cmake option
2024-03-30 08:56:32 +08:00
halx99 d1ec623bb5 Rename folder thirdparty ==> 3rdparty 2024-03-19 21:33:02 +08:00
Turky Mohammed 28f3915445
Node World Space Positioning (#1743)
* node set world position

* Adapt tests
2024-03-15 09:33:38 +08:00
halx99 444cf160f9 Fix ChipmunkTestBed crash 2024-03-14 23:53:14 +08:00
Deal 76db9007b0
Move color types to math/Color.h (#1741)
* Move color types to math/Color.h

* Use V3F_C4F

* Fix ci
2024-03-14 23:38:45 +08:00
halx99 cb12cbc366 Initial implement wasm EditBox 2024-03-13 01:20:37 +08:00
halx99 d79cda1475 Fix WebSocketTest crash issue [skip ci] 2024-03-11 23:42:12 +08:00
halx99 b265482e12 Enable full log fmt style in cpp-tests for all platforms 2024-03-08 01:54:36 +08:00
Deal 931ca91c71
Logging colorful support (#1735)
* Add logging colorful support

* Enable full log fmt style in cpp-tests
2024-03-08 01:15:26 +08:00
Deal 5d2c42e73f
Implement new axmol log system based on fmtlib (#1732)
* Implement new log macros based on fmtlib

* Fix ci

* Fix ci

* Fix android ci

* Fix warnings

* Replace more ax::log by AXLOGX

* Fix ci

* Fix linux build

* Use stack memory for log prefix

* Fix linux build

* Fix warning

* Add ILogOutput support

* Replace old log calls with new log macros

* Fixup

* Fixup

* Fixup

* Update ci msvc to 14.39

* Update Console.h [skip ci]

* Pass log level to ILogOutput
2024-03-07 08:47:00 +08:00
smilediver d3a0357e84
HttpClient: add support for PATCH method (#1722)
* HttpClient: add support for PATCH method
2024-02-29 11:43:41 +08:00
halx99 f2b8634907 Fix ci 2024-02-27 01:42:53 +08:00
halx99 bd9b593f7a Remove unnecessary string format calls 2024-02-24 12:28:11 +08:00
halx99 5e6b865215 Update cppwinrt: 2.0.230706.1 ==> 2.0.240111.5 2024-02-22 20:03:16 +08:00
Deal adbffdf4a2
Fix #1704, control android cmake options by engine axutils.gradle (#1705) 2024-02-20 00:58:47 +08:00
RH 978d15db78
RichText and ScrollView enhancements (#1696)
* Add id tag to several RichText elements to allow locating the nodes in RichText
Add font related styling to paragraph tags

* Move functionality out of ListView and into ScrollView to allow scrolling to a specific child node within a ScrollView

* Add function to allow finding protected child node by name

* Example of anchor tags to local RichText content in a ScrollView

* Fix string storage type
2024-02-18 20:09:54 +08:00
Lich 8e2e577e2f
Add support for window close button calback (#1697) 2024-02-18 16:08:53 +08:00
RH 8c23d32235
RichText enhancements (#1683)
* Add paragraph tag support
Add HTML header tags support
Add multi-new line rich text element
Add support for end of tag action
General code clean up

* Remove redundant additions

* Fix compilation issue on platforms other than Windows

* Remove redundant constructors and destructors.
Initialize member variables.
Remove explicit inline specifier since all member class functions are implicitly inlined.
2024-02-15 08:33:38 +08:00
RH 0f3c7d3ce7
Disable unused extensions in the FairyGUI and Live2D tests to speed up builds (#1665)
* Disable unused extensions in the FairyGUI and Live2D tests to speed up builds.

* Only disable extensions

* Move option settings to correct location
2024-02-11 22:28:42 +08:00
RH 7dd7dc4ada
LUA build fix for Android, iOS and Windows (#1650)
* Update paths to lua bindings

* Update target include directories due to new extension dir structure

* Add missing libraries and paths for prebuilt option

* Current FairyGUI requires paths to parent and source directory

* Add required thirdparty search path to LUA library
2024-02-04 22:09:36 +08:00
RH 9f8962d47d
Change extension folder structure to reduce file name conflicts (#1647)
* Restructure extension folder structure to reduce conflicts with project source files

* Do not include SDFGen headers for Android builds

* Ensure correct paths are included for the relevant targets

* ImGui is not be enabled for WinUWP, tvOS and iOS

* Fix LUA auto binding generator to work with updated extension folder structure

* Fix path and linker issues for yasio when using prebuilt option
Set correct paths to extensions for prebuilt option
2024-02-03 10:08:22 +08:00
halx99 c06bed508b Rename cocos_android_app_init to axmol_android_app_init and othre code cleanup 2024-01-29 08:51:35 +08:00
Deal 9ec7c54c57
release 2.1.0 finally (#1621) [release 2.1.0]
* Delete deprecated prop `buildconfig` from gradle.properties

* Delete unnecessary props since it's value same with defaults

* Don't need config debug keystore, will auto signed by default debug.keystore

* Update funding [skip ci]

* Fix axmol cmdline tool command 'new'

* Refix c99 for winsdk < 10.0.22000.0

* Fix powershell 3 condition statement: 'xxx = if(c) { v1 } else { v2 }' will lost switch parameter semantic

* Improve code style

* Improve code style

* Fixup
2024-01-20 16:16:53 +08:00
halx99 bef10d0dea Allow generated debug signed apk, and rename keystore props:
- RELEASE_STORE_FILE ==> KEY_STORE_FILE
- KEY_STORE_PASSWORD ==> KEY_STORE_PASSWORD
- RELEASE_KEY_ALIAS ==> KEY_ALIAS
- RELEASE_KEY_PASSWORD ==> KEY_PASSWORD
2024-01-17 03:50:13 +08:00
halx99 32ef79a9f5 Avoid define multi depends of gradle task copyContentToAssets
refer: dd7c9deaf9
2024-01-17 03:45:13 +08:00
halx99 d3e680bc52 Update Android devtools
- AGP 8.2.1
- Android Studio 2023.1.1+
- Android SDK Tools 34.0.0
- Android SDK Platform 34
- Gradle 8.5
2024-01-17 02:59:40 +08:00
halx99 0e650a149b Improve cmake scripts 2024-01-16 01:20:41 +08:00
halx99 dd7c9deaf9 Improve android build gradle script
- Merge tasks copyDebugContentToAssets, copyReleaseContentToAssets to copyContentAssets
- Simplify tasks dependent definations
- Fix tests content not pack into apk
2024-01-16 00:47:19 +08:00
aismann 991e63ab8b
Set DrawNodeEx default to 'OFF" (#1613)
* Set DrawNodeEx default to 'OFF"

* Update controller.cpp

* Update CMakeOptions.md
2024-01-14 15:56:08 +08:00
Lich 0c77e45fb7
Add fixedUpdate method to Scene (#1607) 2024-01-13 01:08:01 +08:00