Add apple tvos support (#846)
* support tvos * support tvos and fix run command * support tvos, fix run script and fix windows files * support tvos on ci * support tvos on ci and fix windows zlib * support tvos on ci * support tvos * support tvos and tvos tests
|
@ -0,0 +1,38 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[{*[Mm]akefile*,*.mak,*.mk,depend}]
|
||||
indent_style = tab
|
||||
|
||||
[*.{bat, cmd, cmd.*}]
|
||||
end_of_line = crlf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.gemspec]
|
||||
indent_size = 2
|
||||
|
||||
[*.rb]
|
||||
indent_size = 2
|
||||
|
||||
[*.bat]
|
||||
end_of_line = crlf
|
|
@ -5,7 +5,7 @@ on:
|
|||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
@ -98,7 +98,7 @@ jobs:
|
|||
run: |
|
||||
tools/unix-ci/before-install.sh
|
||||
tools/unix-ci/run-script.sh
|
||||
|
||||
|
||||
build-ios:
|
||||
name: build-ios
|
||||
runs-on: macos-latest
|
||||
|
@ -118,3 +118,23 @@ jobs:
|
|||
run: |
|
||||
tools/unix-ci/before-install.sh
|
||||
tools/unix-ci/run-script.sh
|
||||
|
||||
build-tvos:
|
||||
name: build-tvos
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
GH_OS_NAME: osx
|
||||
BUILD_TARGET: tvos
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
# since github latest macos-latest(220807) env(3.24.0) break our ci, so we set cmake version explicit
|
||||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v1.12
|
||||
with:
|
||||
cmake-version: '3.23.3'
|
||||
- name: Build
|
||||
run: |
|
||||
tools/unix-ci/before-install.sh
|
||||
tools/unix-ci/run-script.sh
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
name: tvos
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- release
|
||||
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
GH_OS_NAME: osx
|
||||
BUILD_TARGET: tvos
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ !startsWith(github.event.commits[0].message, 'Merge pull request') }}
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
# since github latest macos-latest(220807) env(3.24.0) break our ci, so we set cmake version explicit
|
||||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v1.12
|
||||
with:
|
||||
cmake-version: '3.23.3'
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all
|
||||
run: tools/unix-ci/before-install.sh
|
||||
|
||||
- name: Build
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: tools/unix-ci/run-script.sh
|
368
AUTHORS
|
@ -40,7 +40,7 @@ Windows Platforms Developers (Collaborators from Microsoft):
|
|||
|
||||
Community Evangelism / Programmers Guide Author:
|
||||
Jason Slack-Moehrle (slackmoehrle)
|
||||
|
||||
|
||||
Developers:
|
||||
halx99(Guo Xiaodong)
|
||||
Add ETC1 builtin alpha support.
|
||||
|
@ -48,43 +48,43 @@ Developers:
|
|||
Add script with utf-8 bom support for luabindings.
|
||||
Add captureNode for cocos2d::utils.
|
||||
fix AudioEngine bug for iOS, UTF8 filePath.
|
||||
|
||||
|
||||
|
||||
|
||||
Rolando Abarca
|
||||
Javascript Binding and testjs
|
||||
|
||||
|
||||
Squallium
|
||||
Added ccFPSImages entity as linked resource on linux eclipse project setting.
|
||||
Added CocosDenshion dependency to libextension project for eclipse project of linux.
|
||||
|
||||
|
||||
longlene
|
||||
Improve android project creation script
|
||||
|
||||
|
||||
reneklacan
|
||||
Hardware keyboard support
|
||||
|
||||
|
||||
liuyq
|
||||
CCTextureAtlas::updateQuad modify for the memcpy hot spot.
|
||||
|
||||
frranck
|
||||
|
||||
frranck
|
||||
adding norwegian language
|
||||
Added "a unsupport image format!" log when creating a sprite in CCImage.cpp.
|
||||
|
||||
|
||||
varlucian
|
||||
fix the bug that OnEnterTransitionDidFinish was called twice when a node is added in onEnter.
|
||||
|
||||
|
||||
carlomorgantinizynga
|
||||
CCLabelTTF supports for shadow and stroke
|
||||
Adding CCLabelTTF::createWithFontDefinition.
|
||||
New label support.
|
||||
|
||||
|
||||
James Gregory (j4m3z0r, Zynga)
|
||||
Maintainer of Emscripten port.
|
||||
Initial Emscripten port.
|
||||
Use browser font rendering instead of FreeType.
|
||||
Add destructor to CCGLBufferedNode.
|
||||
Asynchronous Image loading for Emscripten
|
||||
|
||||
|
||||
DarraghCoy
|
||||
Fixed a potential crash SimpleAudioEngineOpenSL::playEffect
|
||||
Fixed some bugs with Set class
|
||||
|
@ -100,7 +100,7 @@ Developers:
|
|||
Fixed potential crashes in EventDispatch while using SceneGraphPriroity listeners and added helper function to check it
|
||||
Fixed a protential crash in EventDispatch while unregistering listener right after it was registered
|
||||
Adding an extra verification in Node's destructor
|
||||
Added RefPtr<T> smart pointer support
|
||||
Added RefPtr<T> smart pointer support
|
||||
|
||||
silverscania
|
||||
Pass correct parameter to glPixelStorei when creating a texture
|
||||
|
@ -132,7 +132,7 @@ Developers:
|
|||
Implemented pitch, pan and gain.
|
||||
Using SDL backend instead of glfw for Linux.
|
||||
|
||||
savdalion
|
||||
savdalion
|
||||
Added example for russian language in TestCpp
|
||||
Added const modifier for classes CCArray, CCObject
|
||||
Deprecated method fixes
|
||||
|
@ -571,15 +571,15 @@ Developers:
|
|||
|
||||
Xander84
|
||||
Fixing a bug in CCBValue::getByteValue.
|
||||
|
||||
|
||||
smshuja
|
||||
Fixing a bug that pointQueryFirst returns invalid Shape when a shape is not found in JSB.
|
||||
Fixing a bug that New PivotJoint can't access 4 parameters like in html5 version.
|
||||
Fixing a bug that Pivotjoint constructor and pointQueryFirst in Space class will return false instead of invalid shape object.
|
||||
|
||||
|
||||
Carsten Sandtner (casarock)
|
||||
Adding XMLHttpRequest support for JSB.
|
||||
|
||||
|
||||
Lee, Jae-Hong (pyrasis)
|
||||
Maintainer of tizen port.
|
||||
localStorageGetItem crashes when column text is NULL.
|
||||
|
@ -587,10 +587,10 @@ Developers:
|
|||
|
||||
lumendes
|
||||
Updating spine-runtime to EsotericSoftware/spine-runtimes@5f90386.
|
||||
|
||||
|
||||
sunxiaoyu
|
||||
Refactoring CCEditBox to add UITextField only when keyboard was opened, remove it when keyboard was closed.
|
||||
|
||||
|
||||
edwardzhou (Edward Zhou)
|
||||
Correcting the type detecting order for Lua CCBProxy::getNodeTypeName.
|
||||
Casting variables to their own type, and print warning info if no corresponding lua callback function instead of crash.
|
||||
|
@ -601,77 +601,77 @@ Developers:
|
|||
musikov
|
||||
Fixing a bug that missing precision when getting strokeColor and fontFillColor
|
||||
added Turkish and Ukrainian language support
|
||||
|
||||
|
||||
hawkwood (Justin Hawkwood)
|
||||
Fixing a bug that EditBox doesn't show any text if it's initialized with text.
|
||||
Fixed a memory leak in new Audio.
|
||||
|
||||
|
||||
wtyqm (zhang peng)
|
||||
Fixing a bug that ccbRootPath wasn't passed to sub ccb nodes.
|
||||
|
||||
|
||||
smilingpoplar (YangLe)
|
||||
Fixing a bug that CCScale9Sprite doesn't support rotated spriteframe in atlas.
|
||||
|
||||
|
||||
xxuejie
|
||||
Add namespace prefix to selector macros
|
||||
|
||||
|
||||
hannon235 (Chris)
|
||||
Fixing a bug that the submenu of ExtensionTest in TestCpp can't scroll.
|
||||
Implements a socket.io client extension and adds a test case.
|
||||
Implements 'SIODelegate::fireEventToScript' method to integrate JSB event handling with the original native code.
|
||||
Update socket.io network extension to correctly detect and manage connection to socket.io server versions 0.9.x-1.x
|
||||
|
||||
|
||||
pktangyue
|
||||
Fixing a bug that CCScale9Sprite::setInsetLeft/XXX can't work for rotated sprite frame.
|
||||
Fixing a bug that Color and Opacity of Scale9Sprite will not be changed when it's added to NodeRGBA and run with FadeIn/Out actions.
|
||||
Adding *.xccheckout to gitignore.
|
||||
|
||||
|
||||
jllust
|
||||
Fixing a bug that CCLabelBMFont crashes in glDrawElements of CCTextureAtlas::drawNumberOfQuads sometimes.
|
||||
|
||||
|
||||
Sam Gross (colesbury)
|
||||
Ignoring formatting specifiers in JavaScript log messages.
|
||||
Make bindings-generator supports to bind std::function argument.
|
||||
|
||||
|
||||
James Munro (jdmunro)
|
||||
Added JSB support for ccpDistanceSQ.
|
||||
|
||||
|
||||
Rafael (rafaelx)
|
||||
A warning fix of AL_INVALID_NAME and AL_INVALID_OPERATION in SimpleAudioEngineOpenAL.cpp.
|
||||
|
||||
|
||||
metalbass
|
||||
Fixing an issue that sigslot::_connection_base# (from 0 to 8) don't have virtual destructors.
|
||||
|
||||
|
||||
thp
|
||||
Port Cocos2D-X to Qt 5
|
||||
|
||||
|
||||
Nako Sung (nakosung)
|
||||
Fixing a bug that wrong logic when pass an empty std::vector to WebSocket::init.
|
||||
Exposing cc.RemoveSelf to JS.
|
||||
exposed AssetsManager to javascript and added multiple-assetsManager support
|
||||
|
||||
|
||||
dotsquid
|
||||
Fixed the crash caused by improper deletion of VBOs and VAO in ParticleSystemQuad.
|
||||
|
||||
|
||||
maciekczwa
|
||||
Fixing a bug that stroke color with channel color values other than 255 doesn't take effect on android.
|
||||
|
||||
|
||||
zcgit
|
||||
a potential bug fix in Layer::init.
|
||||
|
||||
|
||||
gkosciolek
|
||||
Fixing a bug that observers with the same target and name but different sender are the same observer in NotificationCenter.
|
||||
|
||||
xbruce
|
||||
Fixing a bug that crash appears when extending cc.ScrollView in JS.
|
||||
Fixing a bug that cc.registerTargettedDelegate doesn't support pure js object as its target.
|
||||
|
||||
|
||||
elwinarens (Elwin Arens)
|
||||
Minor spelling changes in description of CCScene.h
|
||||
|
||||
|
||||
signmotion (Andrey Syrokomsky)
|
||||
Fixed some compiling-warnings (MSVC2012).
|
||||
|
||||
|
||||
michaelcontento
|
||||
[Android] use onWindowFocusChanged(bool) instead of onResume()/onPause()
|
||||
Prevent nullptr access in AssetsManager
|
||||
|
@ -680,7 +680,7 @@ Developers:
|
|||
Android: add xlargeScreens="true" to supports-screens
|
||||
Trigger onKeyReleased only after the key has been released.
|
||||
Makes Colors are now comparable and explicit convertible
|
||||
|
||||
|
||||
bmanGH
|
||||
Used gl caching functions in TexturePVR::createGLTexture()
|
||||
Configuration of VAO in runtime
|
||||
|
@ -688,15 +688,15 @@ Developers:
|
|||
Fixed a bug that object which isn't in Vector would also be released when invoking Vector::eraseObject.
|
||||
Fixed a bug that Timer::cancel always call Director::getInstance()->getScheduler() even in another Scheduler.
|
||||
Fix crash if label's type is STRING_TEXTURE and label->sortAllChildren is called
|
||||
|
||||
|
||||
metadao
|
||||
make create_project.py more pythonic and fix some typoes
|
||||
|
||||
|
||||
timothyqiu
|
||||
Project creator: use absolute path for json config files
|
||||
Documentation fixes
|
||||
A better way to locate project creator
|
||||
|
||||
|
||||
rablwupei
|
||||
Fixed a memory leak in ScriptingCore::runScript()
|
||||
Fixed a memory leak in Spine.
|
||||
|
@ -704,26 +704,26 @@ Developers:
|
|||
Fixed a bug that sys.localStorage.getItem() does not support non-ascii string.
|
||||
Fixed a memory leak in XMLHttpRequest.
|
||||
Fixed a bug that wrong convention to jsval in cccolor4f_to_jsval and cccolor3b_to_jsval.
|
||||
|
||||
|
||||
Keita Obo (ktaobo)
|
||||
Avoid unnecessary object duplication for Scale9Sprite.
|
||||
|
||||
|
||||
jimmystar
|
||||
Fixed a bug that cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device.
|
||||
|
||||
|
||||
XiaoLongHan (kpkhxlgy0)
|
||||
Fixed a bug that outside of keyboard can't be responded to close keyboard when using EditBox.
|
||||
|
||||
|
||||
lettas
|
||||
A fix for multi-platform template.
|
||||
|
||||
|
||||
HoGarfield (garfield_ho)
|
||||
Fixed a bug that CCBReader can't play sequence automatically in JSB.
|
||||
Could not set next animation in CCBAnimationCompleted callback.
|
||||
Fixed missing to add JSAutoCompartment when invoking JS functions from C++.
|
||||
CCBReader: To set anchor point to 0,0 when created by loader.
|
||||
Potential crash when websocket connection closes.
|
||||
|
||||
|
||||
lite3
|
||||
Fixed a bug that Node's anchor point was changed after being added to ScrollView.
|
||||
Added HttpClient::sendImmediate()
|
||||
|
@ -731,105 +731,105 @@ Developers:
|
|||
Replace dynamic_cast to std::is_base_of in object_to_luaval
|
||||
Added support normalize path on android
|
||||
FileUtils: Remove old path while adding existing search path
|
||||
|
||||
|
||||
superrad
|
||||
Clear NoSuchMethodError Exception when JniHelper fails to find methodID
|
||||
|
||||
|
||||
Nite Luo (darkdukey)
|
||||
Added Mouse Support For Desktop Platforms.
|
||||
|
||||
|
||||
ledyba
|
||||
Fixed a bug that EventListeners can't be removed sometimes.
|
||||
Fixed a bug that the data size has to be specified when parsing XML using TinyXML.
|
||||
Closed X display after getting DPI on Linux.
|
||||
|
||||
|
||||
Luis Parravicini (luisparravicini)
|
||||
Fixed typos in create_project.py.
|
||||
|
||||
|
||||
xhcnb
|
||||
Device::setAccelerometerEnabled needs to be invoked before adding ACC listener.
|
||||
Fixed a bug that it will get wrong custom properties when use different count custom properties in CocosBuilder.
|
||||
Correct TotalTime of ActionObject
|
||||
|
||||
|
||||
bopohaa
|
||||
Fixed a bug that Webp test crashes.
|
||||
|
||||
|
||||
lajos
|
||||
FontTest isn't rendered correctly with custom TTF font on Mac platform.
|
||||
|
||||
|
||||
hulefei
|
||||
Added gui namespace before SEL_TouchEvent.
|
||||
|
||||
|
||||
zhiqiangxu
|
||||
Fixed a logic error in ControlUtils::RectUnion.
|
||||
Fixed an issue that there is an useless conversion in ScrollView::onTouchBegan.
|
||||
Deleted several lines of useless code in ScrollView::deaccelerateScrolling.
|
||||
Fixed that ScrollView should implement ActionTweenDelegate.
|
||||
Fixed LabelBMFont::getBoundingBox() position error
|
||||
|
||||
|
||||
yinkaile (2youyouo2)
|
||||
Maintainer of Armature Bone Animation.
|
||||
|
||||
|
||||
dmurtagh
|
||||
Fixed a bug that UserDefault::getDoubleForKey() doesn't pass default value to Java.
|
||||
Fixed a compile error when CC_SPRITE_DEBUG_DRAW is on
|
||||
|
||||
|
||||
seobyeongky
|
||||
Updates spine runtime.
|
||||
Fixed a potential bug in Data's copy constructor.
|
||||
Fixed a potential bug in Data's copy constructor.
|
||||
Fixed the bug that MotionStreak can not work with MoveTo and MoveBy
|
||||
Fixed a bug that HttpAsynConnection can not get error content if response code less than 200 or response code greater or equal than 300
|
||||
|
||||
|
||||
luocker
|
||||
Fix a bug that string itself is also modified in `String::componentsSeparatedByString`.
|
||||
|
||||
|
||||
omersaeed
|
||||
Fix a bug that game will crash if connection breaks during download using AssetManager.
|
||||
|
||||
|
||||
SBKarr
|
||||
AngelCode binary file format support for LabelBMFont.
|
||||
|
||||
|
||||
zarelaky
|
||||
OpenAL context isn't destroyed correctly on mac and ios.
|
||||
|
||||
|
||||
kicktheken (Kenneth Chan)
|
||||
Fixed a bug that the setBlendFunc method of some classes wasn't exposed to LUA.
|
||||
Fix lua project template crash on iOS5.1 device
|
||||
Fix layout constant syntax error in lua-binding
|
||||
|
||||
|
||||
zilongshanren
|
||||
Fixed a bug that missing to check self assignment of Vector<T>, Map<K,V>, Value and String.
|
||||
Fixed a bug that move assignment operator doesn't clear previous content bug.
|
||||
Fixed the compile error of Map's getRandomObject.
|
||||
|
||||
|
||||
daltomi
|
||||
Fixed a typo in Director class.
|
||||
Removed an unnecessary boolean flag in CCFontAtlasCache.cpp.
|
||||
Used 'cbegin/cend', 'const std::string' where it's reasonable.
|
||||
|
||||
|
||||
v1ctor
|
||||
ControlSlider supports to set selected thumb sprite.
|
||||
ControlButton supports to set scale ratio of touchdown state
|
||||
|
||||
|
||||
akof1314
|
||||
TestCpp works by using CMake and mingw on Windows.
|
||||
|
||||
|
||||
Pisces000221
|
||||
Corrected a few mistakes in the README file of project-creator.
|
||||
Corrected a mistake in README.
|
||||
Fixed a bug that a string which only contains CJK characters can't make a line-break when it's needed.
|
||||
Fixed a bug that if the UISlider is faded, the slide ball won't fade together
|
||||
|
||||
|
||||
hbbalfred
|
||||
Fixed a bug that crash if file doesn't exist when using FileUtils::getStringFromFile.
|
||||
Fixed a bug that cc.BuilderReader.load( path, null, parentSize ); was not allowed.
|
||||
|
||||
|
||||
liang8305
|
||||
Use multiple processes according the number of cores to build android project
|
||||
|
||||
|
||||
pandamicro
|
||||
Exposed SAXParser to JS, it is used for parsing XML in JS.
|
||||
|
||||
|
||||
hanjukim
|
||||
Fixed a bug that color and opacity settings were not applied when invoking Label::alignText.
|
||||
Fixed the bug that FileUtils:getStringFromFile() may return a unterminated string
|
||||
|
@ -838,38 +838,38 @@ Developers:
|
|||
bagobor
|
||||
Fixed a memory leak in AssetsManager::uncompress.
|
||||
Code format fix and small optimizations in cocostudio/CCActionNode.cpp.
|
||||
|
||||
|
||||
ucchen
|
||||
Exposed the missing data structures of Spine to JS.
|
||||
|
||||
|
||||
justmao945
|
||||
Corrected the definition of CMake variables.
|
||||
|
||||
|
||||
maksqwe
|
||||
Fixed string size check in BitmapDC::utf8ToUtf16 on win32 and assert condition in TriggerMng.
|
||||
|
||||
|
||||
wefiends
|
||||
s3tc compressed textures with no mipmaps fail to be loaded.
|
||||
Added createWithFullscreen overloaded method that sets video mode
|
||||
|
||||
|
||||
floatinghotpot
|
||||
Fixed a bug that no callback is invoked when websocket connection fails
|
||||
|
||||
|
||||
Linghui
|
||||
Updated README of template: fix wrong platform java path.
|
||||
|
||||
|
||||
seemk
|
||||
Fixed crash if invoking Director::end() on WINDOWS.
|
||||
|
||||
|
||||
odedsh
|
||||
Fixed a bug that loading custom fonts from ttf file fails on windows.
|
||||
|
||||
|
||||
Wilhansen
|
||||
Fixed a bug that spine::Skeleton would not be updated after re-adding to scene.
|
||||
|
||||
|
||||
huangml
|
||||
Fixed a bug that Node::removeAllChildrenWithCleanup() does not remove PhysicsBody.
|
||||
|
||||
|
||||
newnon
|
||||
Adds getCurrentLanguageCode() which returns iso 639-1 language code.
|
||||
Adds support for get response when Activity's onActivityResult is triggered.
|
||||
|
@ -893,31 +893,31 @@ Developers:
|
|||
|
||||
youknowone
|
||||
Adds iOS-like elastic bounceback support for cocos2d::extension::ScrollView
|
||||
|
||||
|
||||
aeonmine
|
||||
Fixed ActionObject memory leak in ActionManagerEx::initWithDictionary
|
||||
Fixed memory leak in cocos studiov2.0 reader
|
||||
|
||||
|
||||
LoungeKatt
|
||||
Corrected a mistake of building android project in README.md
|
||||
|
||||
|
||||
flashjay
|
||||
Remove deprecated code in lua tests & template
|
||||
luaLoadChunksFromZip should just remove .lua or .luac extension
|
||||
|
||||
|
||||
zukkun
|
||||
Fixed incorrect function invocation in PhysicsBody::setAngularVelocityLimit
|
||||
|
||||
|
||||
dbaack
|
||||
Fixed a bug that removing and re-adding an event listener will trigger assert
|
||||
|
||||
|
||||
zakmandhro
|
||||
A typo fix in RELEASE_NOTES.md
|
||||
|
||||
|
||||
mgcL
|
||||
A potential memory leak fix in value's default constructor
|
||||
Added ScriptHandlerMgr::destroyInstance to avoid memory leak
|
||||
|
||||
|
||||
Mazyod
|
||||
Fixed a bug that HTTPClient reports 2xx status codes as errors
|
||||
Added missing Text Font and Placeholder feature of EditBox for Mac platform
|
||||
|
@ -926,7 +926,7 @@ Developers:
|
|||
Fix a bug that can not get/set text in password mode on Mac OS X
|
||||
Make sure TableView parents are visible before handling touch
|
||||
Fixed memory leak in HttpRequest
|
||||
|
||||
|
||||
iSevenDays
|
||||
Fixed a bug that the result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG
|
||||
Fixed a potential memory leak in CCEditBoxImplIOS.mm
|
||||
|
@ -935,75 +935,75 @@ Developers:
|
|||
Fixed loosing precision when using 'recv' in 'Console'
|
||||
Fixed link error with Xcode 6 when building with 32-bit architecture
|
||||
Fixed CMake for Mac OS X
|
||||
|
||||
|
||||
ololomax
|
||||
Fixed a potential crash in SceneReader::createNodeWithSceneFile
|
||||
|
||||
|
||||
gaoxiaosong
|
||||
Fixed a warning in cpCollision.c
|
||||
|
||||
|
||||
sachingarg05
|
||||
Re-added orientation change callback in java activity
|
||||
GLProgram should not abort() if shader compilation fails, returning false is better.
|
||||
|
||||
|
||||
dplusic
|
||||
Fixed that cc.pGetAngle may return wrong value
|
||||
|
||||
|
||||
zifter
|
||||
Fixed a bug that the effect of particle loaded from CocosBuilder is incorrectly
|
||||
Fix twice calling onExit
|
||||
Fixed bug with cascade opacity and color for control button
|
||||
Fix Progress Action. Not working with charging from 100 to 0.
|
||||
|
||||
Fix Progress Action. Not working with charging from 100 to 0.
|
||||
|
||||
twhittock
|
||||
Fixed a bug that Application::run returns wrong value on Mac platform
|
||||
|
||||
|
||||
asmodehn
|
||||
Added SDK / NDK detection based on PATH in Setup.py
|
||||
|
||||
|
||||
myourys
|
||||
Make cpp template support Eclipse c++ project
|
||||
|
||||
|
||||
NatWeiss
|
||||
Fix compilation error using arch i386
|
||||
Fixed debug-config crash if a FrameBuffer has no RenderTargetDepthStencil.
|
||||
|
||||
|
||||
favorcode
|
||||
Correct some doxygen comment
|
||||
|
||||
|
||||
asuuma
|
||||
Fix Repeat will run one more over in rare situations.
|
||||
|
||||
uqtimes
|
||||
|
||||
uqtimes
|
||||
Fix NSNotificationCenter and NSTimer leaks
|
||||
|
||||
|
||||
ntotani
|
||||
fix building error in lua-binding in release mode
|
||||
Fixed WebView lua-bind method name.
|
||||
|
||||
|
||||
kezhuw
|
||||
AutoReleasePool manager improvement
|
||||
Fixed a bug that condition variable sleep on unrelated mutex in HttpClient
|
||||
|
||||
|
||||
zhouxiaoxiaoxujian
|
||||
Added TextField::getStringLength()
|
||||
Add shadow, outline, glow filter support for UIText
|
||||
Fix UITextField IME can't auto detach
|
||||
Add getChildByName method for get a node that can be cast to Type T
|
||||
Improvement ImageViewReader don't necessary loadTexture when imageFilePath is empty
|
||||
|
||||
|
||||
QiuleiWang
|
||||
Fix the bug that calculated height of multi-line string was incorrect on iOS
|
||||
|
||||
|
||||
Rumist
|
||||
Fix the bug that the result of Director->convertToUI() is error.
|
||||
|
||||
|
||||
kyokomi
|
||||
Fix the bug that UIButton doesn't support TTF font
|
||||
Fix a bug of TextReader
|
||||
Fix a bug that UITextField doesn't support TTF font
|
||||
Setted contentSize in CSLoader
|
||||
|
||||
|
||||
gin0606
|
||||
Add a new line at the end of a file
|
||||
Fix a bug that crash happened when try to remove videoView(STATE_PLAYBACK_COMPLETED) in android
|
||||
|
@ -1011,127 +1011,127 @@ Developers:
|
|||
Fix iOS VideoPlayer memory leak
|
||||
Added c++11 random library support
|
||||
Added WebView widget which supports iOS and Android
|
||||
|
||||
|
||||
billtt
|
||||
Fixed a bug that Node::setScale(float) may not work properly
|
||||
network: Fixed a problem where WebSocket messages may pile up
|
||||
|
||||
|
||||
Teivaz
|
||||
Custom uniform search optimization
|
||||
Fixed compiling error on WP8.
|
||||
Added method for custom precompiled shader program loading on WP8
|
||||
Enable screen orientation change handling on WP8
|
||||
Enabled GLProgramState restoring on render recreated on WP8
|
||||
|
||||
|
||||
chareice
|
||||
Make `setup.py` work on zsh
|
||||
|
||||
|
||||
taug
|
||||
Could add seach path and resolution order path in front.
|
||||
|
||||
|
||||
CaiCQ
|
||||
Fix a but that LabelTTF may lost chinese characters on linux
|
||||
|
||||
|
||||
chenguangqi
|
||||
Fixed a compiling error on Android
|
||||
Fixed an error when importing project using Eclipse on Android
|
||||
|
||||
|
||||
uorbe001
|
||||
Allow setting bundle to use in file utils on iOS and Mac OS X
|
||||
|
||||
|
||||
yongkangchen
|
||||
Fixed a bug that font size of EditBox is not scaled when glview is scaled on Mac OS X
|
||||
Fixed a bug that font size of EditBox is not scaled when glView is scaled on Mac OS X
|
||||
Fixed a bug that Label::setTextColor does not have any effect on Mac OS X
|
||||
|
||||
|
||||
wagulu
|
||||
Fixed a bug that particle effect is wrong when scaled
|
||||
|
||||
|
||||
reckhou
|
||||
Optimize FPS control on Android
|
||||
|
||||
|
||||
dzl-ian
|
||||
Added getter and setter for TextColor for UIText
|
||||
|
||||
|
||||
zii
|
||||
Added utils::gettime()
|
||||
|
||||
|
||||
takaken1994
|
||||
Added function for setting min/max scale for ScrollView
|
||||
studio: Removed "using namespace cocos2d" from CCFrame.h
|
||||
|
||||
maltium
|
||||
|
||||
maltium
|
||||
Added 3D rotation support to RotateTo action
|
||||
|
||||
|
||||
Hamken100per
|
||||
Added a function getAssetManager() on CCFileUtilsAndroid
|
||||
|
||||
|
||||
rny
|
||||
Fixed LabelTTF::getBoundingBox() position error
|
||||
SpriteFrameCache load from plist file content data
|
||||
|
||||
|
||||
AppleJDay
|
||||
Add Feature:EventMouse should support getDelta, getDeltaX, getDeltaY functions
|
||||
|
||||
|
||||
GavinThornton
|
||||
Fixed a bug that when a sprite added into SpriteBatchNod it will turn black if setting opacity
|
||||
|
||||
|
||||
DavidPartouche
|
||||
Fixed the bug that video player not showing on iOS if it's not in FullScreen mode
|
||||
|
||||
|
||||
zaWasp
|
||||
Added support for applicationDidEnterBackground / applicationWillEnterForeground on win32
|
||||
|
||||
|
||||
xiangxw
|
||||
Fixed the bug that Console::sendPrompt() will send extra `\0`
|
||||
|
||||
|
||||
kaishiqi
|
||||
Fixed a but that cursor postion is wrong on desktop.
|
||||
|
||||
|
||||
jagd
|
||||
Added setSubsteps() and getSubsteps() in PhysicsWorld
|
||||
|
||||
|
||||
denpen
|
||||
Fixed a bug that scroll view hidden picks up the touch events.
|
||||
|
||||
|
||||
joewan
|
||||
Fixed memory leak when use menu_selector
|
||||
|
||||
|
||||
zhongfq
|
||||
Optimize decompress jpg data
|
||||
Fixed memory leak of TextureCache::reloadTexture()
|
||||
|
||||
|
||||
wohaaitinciu
|
||||
WebView support on windows.
|
||||
Fix a fatal bug in EditBox implement for platform win32.
|
||||
|
||||
|
||||
guykogus
|
||||
Implemented Application::openUrl for WP8 and WinRT
|
||||
|
||||
|
||||
tttreal
|
||||
Fixed Label::getStringNumLines()
|
||||
|
||||
|
||||
hongliang-goudou
|
||||
Fixed the bug that UI animation playing crash if GUI JSON file is loaded again
|
||||
|
||||
|
||||
yestein
|
||||
Add Cocostudio Armature getOffsetPoints API for Lua
|
||||
|
||||
|
||||
coldfog
|
||||
Fix bug that ActionManagerEx::initWithBinary can only load one UI animation
|
||||
|
||||
|
||||
timur-losev
|
||||
Fix a bug that GLProgramCache::addGLProgram() can not replace existing program
|
||||
|
||||
|
||||
TimothyZhang
|
||||
Fixed a potential memory leak in GLProgram::setGLProgram()
|
||||
Add jsb.fileUtils.writeDataToFile().
|
||||
|
||||
|
||||
ahlwong
|
||||
Fix Label Kerning on Single Characters
|
||||
|
||||
|
||||
Svenito
|
||||
Add greater than operator to Vec2
|
||||
|
||||
|
||||
liamcindy
|
||||
Update ui button size changed logic.
|
||||
Added support for Cocos Studio Light3D.
|
||||
|
@ -1139,39 +1139,39 @@ Developers:
|
|||
Update for text effect clone.
|
||||
Update controlButton size calculate with new Scale9Sprite logic.
|
||||
Update pageview to support adjust child size.
|
||||
|
||||
|
||||
vovkasm
|
||||
Fix warnings for Xcode6.1
|
||||
|
||||
|
||||
nilium
|
||||
Unignore libs dir in plugin and fix Travis script to descend into included directories
|
||||
|
||||
|
||||
shrimpz
|
||||
Fix two typos in luaval_to_quaternion
|
||||
Fix label crashed on android
|
||||
|
||||
|
||||
ton1517
|
||||
Fix the issue that JumpTo can not be applied more than once
|
||||
|
||||
|
||||
takaokato
|
||||
Fix wrong result in Node:getParenttoNodeTransform() if node is transformed
|
||||
|
||||
|
||||
AknEp
|
||||
Fix FileUtils::fullPathForFilename return empty string if file not found
|
||||
|
||||
|
||||
kompjoefriek
|
||||
Fix compiling warnings
|
||||
Device: Added vibrate support to enable vibration for a duration.
|
||||
|
||||
|
||||
tmr111116
|
||||
fix random int overflow
|
||||
|
||||
|
||||
flamefox
|
||||
fix the bug that Sprite3D::getAttachNode() should failed when there is no bone with name
|
||||
|
||||
|
||||
ryule
|
||||
Fixed HttpClient-ios request to work when the data is started by 0x00
|
||||
|
||||
|
||||
loadrunner
|
||||
Added romanian languange support
|
||||
Added sensor property for PhysicsShape
|
||||
|
@ -1179,24 +1179,24 @@ Developers:
|
|||
Changed label font size type to float.
|
||||
Removed scale factor for label shadow.
|
||||
Fixed a TMXLayer bug: When using float values (for example the actual position of the character) to get the current tile, the wrong tile is sometimes/usually returned.
|
||||
|
||||
|
||||
Almax27
|
||||
RenderQueue command buffer optimize.
|
||||
Removed ScrollView::_innerContainer pointer copy.
|
||||
|
||||
|
||||
IgorMats
|
||||
Added MotionStreak::getStroke/setStroke
|
||||
|
||||
|
||||
matsuokah
|
||||
Fixed the bug that JNI illegal start byte error causes crashing error on Android 5.0
|
||||
|
||||
|
||||
babcca
|
||||
Fixed crashing when playing streamed MP4 file on iOS
|
||||
|
||||
|
||||
milos1290
|
||||
Added Lerp for Vec3
|
||||
Added ActionFloat
|
||||
|
||||
|
||||
perminovVS
|
||||
Optimize Vec3 and Vec2
|
||||
Added `UserDefault::setDelegate()`
|
||||
|
@ -1210,13 +1210,13 @@ Developers:
|
|||
Corrected the keyboard codes for Desktop and WinRT.
|
||||
Added some support for mouse on WinRT.
|
||||
Correct the convertion between unicode and utf8 on WinRT.
|
||||
|
||||
|
||||
qiutaoleo
|
||||
Added a feature to check case characters for filename on windows
|
||||
|
||||
|
||||
HueyPark
|
||||
Fixed memory leak in HttpClient on iOS
|
||||
|
||||
|
||||
Dimon4eg
|
||||
Fixed crash on AssetsManager
|
||||
Fixed memory leak of WebView on iOS
|
||||
|
@ -1226,7 +1226,7 @@ Developers:
|
|||
Fixed a crash bug in LoadingBar.
|
||||
Fixed a crash bug in destructor of FontFreeType.
|
||||
UI: Set focus to Widget when touched.
|
||||
|
||||
|
||||
tankorsmash
|
||||
Fixed the bug that ProgressTimer::setSprite() doesn't take effect
|
||||
|
||||
|
@ -1290,7 +1290,7 @@ Developers:
|
|||
|
||||
GuoLunHao
|
||||
Add quiet option for Cocos Toolkit.
|
||||
|
||||
|
||||
|
||||
Retired Core Developers:
|
||||
WenSheng Yang
|
||||
|
@ -1314,16 +1314,16 @@ Retired Core Developers:
|
|||
|
||||
geron-cn
|
||||
Removed redundant interface in CCSkeletonNode.
|
||||
Fixed a bug that a same frame index is inserted after animation speed is scaled.
|
||||
Fixed a bug that a same frame index is inserted after animation speed is scaled.
|
||||
Fixed crash when recall a cached timeline after scene exited.
|
||||
Added ActionTimeline::setAnimationEndCallBack and ActionTimeline::addFrameEndCallFunc.
|
||||
|
||||
|
||||
igorzel
|
||||
Fixed a crash bug caused by integer overflow in Device::getTextureDataForText on iOS.
|
||||
|
||||
KAIO2
|
||||
Fixed typos and syntax errors.
|
||||
|
||||
|
||||
kammy
|
||||
Moved initialization of image to an appropriate location, because it always called twice in SpriteFrameCache::addSpriteFramesWithFile()
|
||||
|
||||
|
@ -1332,7 +1332,7 @@ Retired Core Developers:
|
|||
|
||||
linguofeng
|
||||
Added UPDATE_FAILED and ERROR_DECOMPRESS in Lua.
|
||||
|
||||
|
||||
|
||||
lsybblll
|
||||
Fixed a bug in CCPhysics3DComponent.cpp that oldBool is set with a wrong value.
|
||||
|
@ -1378,7 +1378,7 @@ Retired Core Developers:
|
|||
thuydx55
|
||||
Fixed a bug of loading pluginx lib when compile Android with --compile-script flag.
|
||||
|
||||
|
||||
|
||||
|
||||
Cocos2d-x can not grow so fast without the active community.
|
||||
Thanks to all developers who report & trace bugs, discuss the engine usage in forum & QQ groups!
|
||||
|
|
25
README.md
|
@ -13,6 +13,7 @@
|
|||
[![Windows Build Status](https://github.com/axys1/axys/actions/workflows/windows-ci.yml/badge.svg)](https://github.com/axys1/axys/actions/workflows/windows-ci.yml)
|
||||
[![Android Build Status](https://github.com/axys1/axys/workflows/android/badge.svg)](https://github.com/axys1/axys/actions?query=workflow%3Aandroid)
|
||||
[![iOS Build Status](https://github.com/axys1/axys/workflows/ios/badge.svg)](https://github.com/axys1/axys/actions?query=workflow%3Aios)
|
||||
[![tvOS Build Status](https://github.com/axys1/axys/workflows/tvos/badge.svg)](https://github.com/axys1/axys/actions?query=workflow%3Atvos)
|
||||
[![Linux Build Status](https://github.com/axys1/axys/workflows/linux/badge.svg)](https://github.com/axys1/axys/actions?query=workflow%3Alinux)
|
||||
[![macOS Build Status](https://github.com/axys1/axys/workflows/osx/badge.svg)](https://github.com/axys1/axys/actions?query=workflow%3Aosx)
|
||||
|
||||
|
@ -46,14 +47,14 @@
|
|||
* Extensions having own license as part of there package.
|
||||
* Refactor AudioEngine, OpenAL for all platforms
|
||||
* [OpenAL Soft](https://github.com/kcat/openal-soft), pass -DAX_USE_ALSOFT=ON to cmake to force enabling it
|
||||
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no ```AX_USE_ALSOFT``` option specified, cmake script will choose it on osx/ios, even though it was marked as deprecated, but still available.
|
||||
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no ```AX_USE_ALSOFT``` option specified, cmake script will choose it on osx/ios/tvos, even though it was marked as deprecated, but still available.
|
||||
* Refactor UserDefault with [mio](https://github.com/mandreyel/mio)
|
||||
* Modularize all optional extensions, move from engine core folder to an extensions folder
|
||||
* Implement all .wav formats supported by ```OpenAL Soft```, such as MS-ADPCM, ADPCM, ...
|
||||
* Use a modern GL loader ```Glad```
|
||||
* Google [angle](https://github.com/google/angle) renderer backend support
|
||||
* C++ 17 standard
|
||||
* IOS SDK 9.0 as minimal deployment
|
||||
* IOS/TVOS SDK 9.0 as minimal deployment
|
||||
* Use fast pugixml
|
||||
* Use [curl](https://github.com/curl/curl) for transferring data with URL syntax
|
||||
* Use SAX parser for all plist files
|
||||
|
@ -134,24 +135,30 @@ See [windows workflow guide](https://github.com/axys1/axys/issues/564)
|
|||
.\gradlew.bat assembleRelease -PPROP_BUILD_TYPE=cmake -PPROP_APP_ABI=arm64-v8a --parallel --info
|
||||
```
|
||||
|
||||
#### iOS and macOS
|
||||
#### iOS, tvOS and macOS
|
||||
1. Ensure xcode12+ & [cmake3.21+](https://github.com/Kitware/CMake/releases) are installed, install cmake command line support: ```sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install```
|
||||
2. Execute the following command
|
||||
```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer```
|
||||
3. Generate xcode project
|
||||
- for ios arm64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64```
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=OS64```
|
||||
- for ios armv7,arm64 combined:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=OS```
|
||||
- for ios simulator x86_64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64```
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64```
|
||||
- for tvos arm64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=TVOS```
|
||||
- for tvos simulator x86_64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR_TVOS```
|
||||
- for macos x86_64(Intel)
|
||||
`cmake -S . -B build -GXcode -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
```cmake -S . -B build -GXcode -DCMAKE_OSX_ARCHITECTURES=x86_64```
|
||||
- for macos arm64(M1)
|
||||
`cmake -S . -B build -GXcode -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
```cmake -S . -B build -GXcode -DCMAKE_OSX_ARCHITECTURES=arm64```
|
||||
|
||||
4. After cmake finishes generating, you can open the xcode project at ```build``` folder and run cpp-tests or other test targets.
|
||||
5. Notes
|
||||
- **The code signing is required to run the ios app on your device, just change the bundle identifier until the auto manage signing is solved**
|
||||
- **axys only provides armv7, arm64, x86_64 prebuilt libraries for ios**
|
||||
- **The code signing is required to run the ios/tvos app on your device, just change the bundle identifier until the auto manage signing is solved**
|
||||
- **axys only provides armv7, arm64, x86_64 prebuilt libraries for ios/tvos**
|
||||
|
||||
### New Project
|
||||
- Cpp: `axys new -p org.axys1.hellocpp -d D:\dev\projects\ -l cpp --portrait HelloCpp`
|
||||
|
|
20
README_CN.md
|
@ -86,12 +86,20 @@
|
|||
2. 执行如下命令确保cmake能成功生成xcode工程:
|
||||
```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer```
|
||||
3. 生成xcode工程, 进入axys根目录执行如下命令之一:
|
||||
- for arm64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64```
|
||||
- for armv7,arm64 combined:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.mini.cmake "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64"```
|
||||
- for simulator x86_64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64```
|
||||
- for ios arm64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=OS64```
|
||||
- for ios armv7,arm64 combined:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=OS```
|
||||
- for ios simulator x86_64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64```
|
||||
- for tvos arm64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=TVOS```
|
||||
- for tvos simulator x86_64:
|
||||
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR_TVOS```
|
||||
- for macos x86_64(Intel)
|
||||
```cmake -S . -B build -GXcode -DCMAKE_OSX_ARCHITECTURES=x86_64```
|
||||
- for macos arm64(M1)
|
||||
```cmake -S . -B build -GXcode -DCMAKE_OSX_ARCHITECTURES=arm64```
|
||||
|
||||
4. 之后就可以用xcode打开, 选择cpp-tests编译运行
|
||||
|
||||
|
|
|
@ -38,6 +38,11 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "iOS")
|
|||
set(APPLE TRUE)
|
||||
set(IOS TRUE)
|
||||
set(PLATFORM_FOLDER ios)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "tvOS")
|
||||
set(APPLE TRUE)
|
||||
set(IOS TRUE)
|
||||
set(TVOS TRUE)
|
||||
set(PLATFORM_FOLDER tvos)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported platform, CMake will exit")
|
||||
return()
|
||||
|
@ -58,7 +63,7 @@ define_property(TARGET
|
|||
PROPERTY AX_LUA_DEPEND
|
||||
BRIEF_DOCS "axis lua depend libs"
|
||||
FULL_DOCS "use to save depend libs of axis lua project"
|
||||
)
|
||||
)
|
||||
|
||||
# config c standard
|
||||
if (NOT WINDOWS)
|
||||
|
@ -110,21 +115,29 @@ endif()
|
|||
# Set macro definitions for special platforms
|
||||
function(use_ax_compile_define target)
|
||||
target_compile_definitions(${target} PUBLIC $<$<CONFIG:Debug>:_AX_DEBUG=1>)
|
||||
|
||||
|
||||
# !important axis not use double precision
|
||||
# target_compile_definitions(${target} PUBLIC CP_USE_CGTYPES=0)
|
||||
# target_compile_definitions(${target} PUBLIC CP_USE_DOUBLES=0)
|
||||
|
||||
|
||||
if(APPLE)
|
||||
target_compile_definitions(${target} PUBLIC __APPLE__)
|
||||
target_compile_definitions(${target} PUBLIC USE_FILE32API)
|
||||
if(AX_USE_COMPAT_GL)
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC AX_USE_COMPAT_GL=1
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC AX_USE_COMPAT_GL=1
|
||||
PUBLIC GL_SILENCE_DEPRECATION=1
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if(IOS)
|
||||
if(TVOS)
|
||||
target_compile_definitions(${target} PUBLIC AX_TARGET_OS_TVOS)
|
||||
else()
|
||||
target_compile_definitions(${target} PUBLIC AX_TARGET_OS_IPHONE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
elseif(LINUX)
|
||||
target_compile_definitions(${target} PUBLIC LINUX)
|
||||
target_compile_definitions(${target} PUBLIC _GNU_SOURCE)
|
||||
|
@ -135,7 +148,7 @@ function(use_ax_compile_define target)
|
|||
if(AX_USE_COMPAT_GL)
|
||||
target_compile_definitions(${target} PUBLIC AX_USE_COMPAT_GL=1)
|
||||
endif()
|
||||
target_compile_definitions(${target}
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC WIN32
|
||||
PUBLIC _WIN32
|
||||
PUBLIC _WINDOWS
|
||||
|
@ -146,7 +159,7 @@ function(use_ax_compile_define target)
|
|||
# PUBLIC GLAD_GLAPI_EXPORT
|
||||
)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${target}
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE _USRDLL
|
||||
PRIVATE _USEGUIDLL # ui
|
||||
)
|
||||
|
|
|
@ -74,32 +74,41 @@ macro(ax_depend)
|
|||
elseif(IOS)
|
||||
# Locate system libraries on iOS
|
||||
find_library(UIKIT_LIBRARY UIKit)
|
||||
find_library(OPENGLES_LIBRARY OpenGLES)
|
||||
find_library(CORE_MOTION_LIBRARY CoreMotion)
|
||||
find_library(OPENGLES_LIBRARY OpenGLES)
|
||||
find_library(AVKIT_LIBRARY AVKit)
|
||||
find_library(CORE_MEDIA_LIBRARY CoreMedia)
|
||||
find_library(CORE_TEXT_LIBRARY CoreText)
|
||||
find_library(SECURITY_LIBRARY Security)
|
||||
find_library(CORE_GRAPHICS_LIBRARY CoreGraphics)
|
||||
find_library(AV_FOUNDATION_LIBRARY AVFoundation)
|
||||
find_library(WEBKIT_LIBRARY WebKit)
|
||||
find_library(ZLIB z)
|
||||
#find_library(ICONVLIB iconv)
|
||||
|
||||
if(NOT TVOS)
|
||||
find_library(CORE_MOTION_LIBRARY CoreMotion)
|
||||
find_library(WEBKIT_LIBRARY WebKit)
|
||||
endif()
|
||||
|
||||
list(APPEND PLATFORM_SPECIFIC_LIBS
|
||||
${UIKIT_LIBRARY}
|
||||
${OPENGLES_LIBRARY}
|
||||
${CORE_MOTION_LIBRARY}
|
||||
${AVKIT_LIBRARY}
|
||||
${CORE_MEDIA_LIBRARY}
|
||||
${CORE_TEXT_LIBRARY}
|
||||
${SECURITY_LIBRARY}
|
||||
${CORE_GRAPHICS_LIBRARY}
|
||||
${AV_FOUNDATION_LIBRARY}
|
||||
${WEBKIT_LIBRARY}
|
||||
${_AX_APPLE_LIBS}
|
||||
${ZLIB}
|
||||
#${ICONVLIB}
|
||||
)
|
||||
|
||||
if(NOT TVOS)
|
||||
list(APPEND PLATFORM_SPECIFIC_LIBS
|
||||
${CORE_MOTION_LIBRARY}
|
||||
${WEBKIT_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
|
@ -50,7 +50,7 @@ open mac-build/axys.xcodeproj
|
|||
```sh
|
||||
cd axys
|
||||
mkdir ios-build
|
||||
cmake -B ios-build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake
|
||||
cmake -B ios-build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AX_ROOT/cmake/ios.toolchain.cmake -DPLATFORM=OS64
|
||||
open ios-build/axys.xcodeproj
|
||||
```
|
||||
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
# See: https://github.com/yasio/ios.mini.cmake
|
||||
|
||||
if(NOT DEFINED CMAKE_SYSTEM_NAME)
|
||||
set(CMAKE_SYSTEM_NAME "iOS" CACHE STRING "The CMake system name for iOS")
|
||||
endif()
|
||||
|
||||
# The best solution for fix try_compile failed with code sign currently
|
||||
# since cmake-3.18.2, not required
|
||||
# everyting for cmake toolchain config before project(xxx) is better
|
||||
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
|
||||
${CMAKE_TRY_COMPILE_PLATFORM_VARIABLES}
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED"
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED NO)
|
||||
|
||||
# set(CMAKE_BUILD_WITH_INSTALL_RPATH YES)
|
||||
# set(CMAKE_INSTALL_RPATH "@executable_path/Frameworks")
|
||||
# set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks" ${CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS})
|
||||
|
||||
# Default deployment target is 9.0
|
||||
# a. armv7 maximum deployment 10.x
|
||||
# b. armv7 TLS require minimal deployment 9.0
|
||||
set(IOS_DEFAULT_DEPLOYMENT_TARGET "9.0")
|
||||
|
||||
# Fix compile failed with armv7 deployment target >= 11.0, xcode clang will report follow error
|
||||
# clang: error: invalid iOS deployment version '--target=armv7-apple-ios13.6',
|
||||
# iOS 10 is the maximum deployment target for 32-bit targets
|
||||
# If not defined CMAKE_OSX_DEPLOYMENT_TARGET, cmake will choose latest deployment target
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ".*armv7.*")
|
||||
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET
|
||||
OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_GREATER "11.0"
|
||||
OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_EQUAL "11.0")
|
||||
message(STATUS "Forcing osx minimum deployment target to ${IOS_DEFAULT_DEPLOYMENT_TARGET} for armv7")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${IOS_DEFAULT_DEPLOYMENT_TARGET} CACHE STRING "Minimum OS X deployment version")
|
||||
endif()
|
||||
else()
|
||||
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
message(STATUS "The CMAKE_OSX_DEPLOYMENT_TARGET not defined, sets iOS minimum deployment target to ${IOS_DEFAULT_DEPLOYMENT_TARGET}")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${IOS_DEFAULT_DEPLOYMENT_TARGET} CACHE STRING "Minimum OS X deployment version")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET} CACHE STRING "Minimum iphoneos deployment version")
|
||||
endif()
|
||||
|
||||
# Regard x86_64 as iphonesimulator
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES "x86_64")
|
||||
set(CMAKE_OSX_SYSROOT "iphonesimulator" CACHE STRING "")
|
||||
endif()
|
||||
|
||||
# Sets CMAKE_SYSTEM_PROCESSOR for iphoneos and iphonesimulator
|
||||
string(TOLOWER "${CMAKE_OSX_SYSROOT}" lowercase_CMAKE_OSX_SYSROOT)
|
||||
if("${lowercase_CMAKE_OSX_SYSROOT}" MATCHES "iphonesimulator")
|
||||
set(IMC_IOS_PLAT "SIMULATOR" CACHE STRING "")
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES "i386")
|
||||
set(CMAKE_SYSTEM_PROCESSOR i386)
|
||||
elseif("${CMAKE_OSX_ARCHITECTURES}" MATCHES "x86_64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
else() # Since xcode12, default arch for iphonesimulator is arm64
|
||||
if(${XCODE_VERSION} LESS "12.0.0")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
else()
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(IMC_IOS_PLAT "DEVICE" CACHE STRING "")
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
||||
endif()
|
|
@ -1323,10 +1323,10 @@ void Console::commandResolutionSubCommandEmpty(socket_native_type fd, std::strin
|
|||
auto director = Director::getInstance();
|
||||
Vec2 points = director->getWinSize();
|
||||
Vec2 pixels = director->getWinSizeInPixels();
|
||||
auto glview = director->getOpenGLView();
|
||||
Vec2 design = glview->getDesignResolutionSize();
|
||||
ResolutionPolicy res = glview->getResolutionPolicy();
|
||||
Rect visibleRect = glview->getVisibleRect();
|
||||
auto glView = director->getOpenGLView();
|
||||
Vec2 design = glView->getDesignResolutionSize();
|
||||
ResolutionPolicy res = glView->getResolutionPolicy();
|
||||
Rect visibleRect = glView->getVisibleRect();
|
||||
|
||||
Console::Utility::mydprintf(fd,
|
||||
"Window size:\n"
|
||||
|
|
|
@ -82,12 +82,12 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
|
|||
JNIEXPORT void JNICALL Java_org_axys1_lib_AxysRenderer_nativeInit(JNIEnv*, jclass, jint w, jint h)
|
||||
{
|
||||
auto director = ax::Director::getInstance();
|
||||
auto glview = director->getOpenGLView();
|
||||
if (!glview)
|
||||
auto glView = director->getOpenGLView();
|
||||
if (!glView)
|
||||
{
|
||||
glview = ax::GLViewImpl::create("Android app");
|
||||
glview->setFrameSize(w, h);
|
||||
director->setOpenGLView(glview);
|
||||
glView = ax::GLViewImpl::create("Android app");
|
||||
glView->setFrameSize(w, h);
|
||||
director->setOpenGLView(glView);
|
||||
|
||||
ax::Application::getInstance()->run();
|
||||
}
|
||||
|
|
|
@ -464,8 +464,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
++i;
|
||||
}
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
glview->handleTouchesBegin(i, (intptr_t*)ids, xs, ys);
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
glView->handleTouchesBegin(i, (intptr_t*)ids, xs, ys);
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event
|
||||
|
@ -499,8 +499,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
++i;
|
||||
}
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
glview->handleTouchesMove(i, (intptr_t*)ids, xs, ys, fs, ms);
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
glView->handleTouchesMove(i, (intptr_t*)ids, xs, ys, fs, ms);
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
|
||||
|
@ -524,8 +524,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
++i;
|
||||
}
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
glview->handleTouchesEnd(i, (intptr_t*)ids, xs, ys);
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
glView->handleTouchesEnd(i, (intptr_t*)ids, xs, ys);
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event
|
||||
|
@ -549,8 +549,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
++i;
|
||||
}
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
glview->handleTouchesCancel(i, (intptr_t*)ids, xs, ys);
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
glView->handleTouchesCancel(i, (intptr_t*)ids, xs, ys);
|
||||
}
|
||||
|
||||
- (void)showKeyboard
|
||||
|
@ -577,8 +577,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
if (dis < 0.0f)
|
||||
dis = 0.0f;
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
dis *= glview->getScaleY();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
dis *= glView->getScaleY();
|
||||
|
||||
dis /= self.contentScaleFactor;
|
||||
|
||||
|
@ -666,6 +666,7 @@ UIInterfaceOrientation getFixedOrientation(UIInterfaceOrientation statusBarOrien
|
|||
|
||||
- (void)onUIKeyboardNotification:(NSNotification*)notif
|
||||
{
|
||||
#if !defined(AX_TARGET_OS_TVOS)
|
||||
NSString* type = notif.name;
|
||||
|
||||
NSDictionary* info = [notif userInfo];
|
||||
|
@ -718,9 +719,9 @@ UIInterfaceOrientation getFixedOrientation(UIInterfaceOrientation statusBarOrien
|
|||
break;
|
||||
}
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
float scaleX = glview->getScaleX();
|
||||
float scaleY = glview->getScaleY();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
float scaleX = glView->getScaleX();
|
||||
float scaleY = glView->getScaleY();
|
||||
|
||||
// Convert to pixel coordinate
|
||||
begin = CGRectApplyAffineTransform(
|
||||
|
@ -728,7 +729,7 @@ UIInterfaceOrientation getFixedOrientation(UIInterfaceOrientation statusBarOrien
|
|||
end = CGRectApplyAffineTransform(
|
||||
end, CGAffineTransformScale(CGAffineTransformIdentity, self.contentScaleFactor, self.contentScaleFactor));
|
||||
|
||||
float offestY = glview->getViewPortRect().origin.y;
|
||||
float offestY = glView->getViewPortRect().origin.y;
|
||||
if (offestY < 0.0f)
|
||||
{
|
||||
begin.origin.y += offestY;
|
||||
|
@ -766,6 +767,7 @@ UIInterfaceOrientation getFixedOrientation(UIInterfaceOrientation statusBarOrien
|
|||
self.isKeyboardShown = NO;
|
||||
dispatcher->dispatchKeyboardDidHide(notiInfo);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Close the keyboard opened by EditBox
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
virtual bool isRetinaDisplay() const override { return getContentScaleFactor() == 2.0; }
|
||||
|
||||
/** returns the objective-c CCEAGLView instance */
|
||||
virtual void* getEAGLView() const override { return _eaglview; }
|
||||
virtual void* getEAGLView() const override { return _eaglView; }
|
||||
|
||||
// overrides
|
||||
virtual bool isOpenGLReady() override;
|
||||
|
@ -82,7 +82,7 @@ protected:
|
|||
bool initWithFullScreen(std::string_view viewName);
|
||||
|
||||
// the objective-c CCEAGLView instance
|
||||
void* _eaglview;
|
||||
void* _eaglView;
|
||||
};
|
||||
|
||||
NS_AX_END
|
||||
|
|
|
@ -37,10 +37,10 @@ void* GLViewImpl::_pixelFormat = kEAGLColorFormatRGB565;
|
|||
int GLViewImpl::_depthFormat = GL_DEPTH_COMPONENT16;
|
||||
int GLViewImpl::_multisamplingCount = 0;
|
||||
|
||||
GLViewImpl* GLViewImpl::createWithEAGLView(void* eaglview)
|
||||
GLViewImpl* GLViewImpl::createWithEAGLView(void* eaglView)
|
||||
{
|
||||
auto ret = new GLViewImpl;
|
||||
if (ret->initWithEAGLView(eaglview))
|
||||
if (ret->initWithEAGLView(eaglView))
|
||||
{
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -122,18 +122,18 @@ GLViewImpl::GLViewImpl() {}
|
|||
|
||||
GLViewImpl::~GLViewImpl()
|
||||
{
|
||||
// CCEAGLView *glview = (CCEAGLView*) _eaglview;
|
||||
//[glview release];
|
||||
// CCEAGLView *glView = (CCEAGLView*) _eaglView;
|
||||
//[glView release];
|
||||
}
|
||||
|
||||
bool GLViewImpl::initWithEAGLView(void* eaglview)
|
||||
bool GLViewImpl::initWithEAGLView(void* eaglView)
|
||||
{
|
||||
_eaglview = eaglview;
|
||||
CCEAGLView* glview = (CCEAGLView*)_eaglview;
|
||||
_eaglView = eaglView;
|
||||
CCEAGLView* glView = (CCEAGLView*)_eaglView;
|
||||
|
||||
_screenSize.width = _designResolutionSize.width = [glview getWidth];
|
||||
_screenSize.height = _designResolutionSize.height = [glview getHeight];
|
||||
// _scaleX = _scaleY = [glview contentScaleFactor];
|
||||
_screenSize.width = _designResolutionSize.width = [glView getWidth];
|
||||
_screenSize.height = _designResolutionSize.height = [glView getHeight];
|
||||
// _scaleX = _scaleY = [glView contentScaleFactor];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ bool GLViewImpl::initWithRect(std::string_view viewName, const Rect& rect, float
|
|||
{
|
||||
CGRect r = CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
|
||||
convertAttrs();
|
||||
CCEAGLView* eaglview = [CCEAGLView viewWithFrame:r
|
||||
CCEAGLView* eaglView = [CCEAGLView viewWithFrame:r
|
||||
pixelFormat:(NSString*)_pixelFormat
|
||||
depthFormat:_depthFormat
|
||||
preserveBackbuffer:NO
|
||||
|
@ -152,14 +152,14 @@ bool GLViewImpl::initWithRect(std::string_view viewName, const Rect& rect, float
|
|||
|
||||
// Not available on tvOS
|
||||
#if !defined(AX_TARGET_OS_TVOS)
|
||||
[eaglview setMultipleTouchEnabled:YES];
|
||||
[eaglView setMultipleTouchEnabled:YES];
|
||||
#endif
|
||||
|
||||
_screenSize.width = _designResolutionSize.width = [eaglview getWidth];
|
||||
_screenSize.height = _designResolutionSize.height = [eaglview getHeight];
|
||||
// _scaleX = _scaleY = [eaglview contentScaleFactor];
|
||||
_screenSize.width = _designResolutionSize.width = [eaglView getWidth];
|
||||
_screenSize.height = _designResolutionSize.height = [eaglView getHeight];
|
||||
// _scaleX = _scaleY = [eaglView contentScaleFactor];
|
||||
|
||||
_eaglview = eaglview;
|
||||
_eaglView = eaglView;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ bool GLViewImpl::initWithFullScreen(std::string_view viewName)
|
|||
|
||||
bool GLViewImpl::isOpenGLReady()
|
||||
{
|
||||
return _eaglview != nullptr;
|
||||
return _eaglView != nullptr;
|
||||
}
|
||||
|
||||
bool GLViewImpl::setContentScaleFactor(float contentScaleFactor)
|
||||
|
@ -186,17 +186,17 @@ bool GLViewImpl::setContentScaleFactor(float contentScaleFactor)
|
|||
AX_ASSERT(_resolutionPolicy == ResolutionPolicy::UNKNOWN); // cannot enable retina mode
|
||||
_scaleX = _scaleY = contentScaleFactor;
|
||||
|
||||
CCEAGLView* eaglview = (CCEAGLView*)_eaglview;
|
||||
[eaglview setNeedsLayout];
|
||||
CCEAGLView* eaglView = (CCEAGLView*)_eaglView;
|
||||
[eaglView setNeedsLayout];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
float GLViewImpl::getContentScaleFactor() const
|
||||
{
|
||||
CCEAGLView* eaglview = (CCEAGLView*)_eaglview;
|
||||
CCEAGLView* eaglView = (CCEAGLView*)_eaglView;
|
||||
|
||||
float scaleFactor = [eaglview contentScaleFactor];
|
||||
float scaleFactor = [eaglView contentScaleFactor];
|
||||
|
||||
// AXASSERT(scaleFactor == _scaleX == _scaleY, "Logic error in GLView::getContentScaleFactor");
|
||||
|
||||
|
@ -208,36 +208,36 @@ void GLViewImpl::end()
|
|||
[CCDirectorCaller destroy];
|
||||
|
||||
// destroy EAGLView
|
||||
CCEAGLView* eaglview = (CCEAGLView*)_eaglview;
|
||||
CCEAGLView* eaglView = (CCEAGLView*)_eaglView;
|
||||
|
||||
[eaglview removeFromSuperview];
|
||||
//[eaglview release];
|
||||
[eaglView removeFromSuperview];
|
||||
//[eaglView release];
|
||||
release();
|
||||
}
|
||||
|
||||
void GLViewImpl::swapBuffers()
|
||||
{
|
||||
CCEAGLView* eaglview = (CCEAGLView*)_eaglview;
|
||||
[eaglview swapBuffers];
|
||||
CCEAGLView* eaglView = (CCEAGLView*)_eaglView;
|
||||
[eaglView swapBuffers];
|
||||
}
|
||||
|
||||
void GLViewImpl::setIMEKeyboardState(bool open)
|
||||
{
|
||||
CCEAGLView* eaglview = (CCEAGLView*)_eaglview;
|
||||
CCEAGLView* eaglView = (CCEAGLView*)_eaglView;
|
||||
|
||||
if (open)
|
||||
{
|
||||
[eaglview showKeyboard];
|
||||
[eaglView showKeyboard];
|
||||
}
|
||||
else
|
||||
{
|
||||
[eaglview hideKeyboard];
|
||||
[eaglView hideKeyboard];
|
||||
}
|
||||
}
|
||||
|
||||
Rect GLViewImpl::getSafeAreaRect() const
|
||||
{
|
||||
CCEAGLView* eaglview = (CCEAGLView*)_eaglview;
|
||||
CCEAGLView* eaglView = (CCEAGLView*)_eaglView;
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
|
||||
float version = [[UIDevice currentDevice].systemVersion floatValue];
|
||||
|
@ -245,14 +245,14 @@ Rect GLViewImpl::getSafeAreaRect() const
|
|||
{
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wpartial-availability"
|
||||
UIEdgeInsets safeAreaInsets = eaglview.safeAreaInsets;
|
||||
UIEdgeInsets safeAreaInsets = eaglView.safeAreaInsets;
|
||||
# pragma clang diagnostic pop
|
||||
|
||||
// Multiply contentScaleFactor since safeAreaInsets return points.
|
||||
safeAreaInsets.left *= eaglview.contentScaleFactor;
|
||||
safeAreaInsets.right *= eaglview.contentScaleFactor;
|
||||
safeAreaInsets.top *= eaglview.contentScaleFactor;
|
||||
safeAreaInsets.bottom *= eaglview.contentScaleFactor;
|
||||
safeAreaInsets.left *= eaglView.contentScaleFactor;
|
||||
safeAreaInsets.right *= eaglView.contentScaleFactor;
|
||||
safeAreaInsets.top *= eaglView.contentScaleFactor;
|
||||
safeAreaInsets.bottom *= eaglView.contentScaleFactor;
|
||||
|
||||
// Get leftBottom and rightTop point in UI coordinates
|
||||
Vec2 leftBottom = Vec2(safeAreaInsets.left, _screenSize.height - safeAreaInsets.bottom);
|
||||
|
|
|
@ -61,17 +61,17 @@ int Application::run()
|
|||
std::chrono::steady_clock::time_point lastTime{};
|
||||
|
||||
auto director = Director::getInstance();
|
||||
auto glview = director->getOpenGLView();
|
||||
auto glView = director->getOpenGLView();
|
||||
|
||||
// Retain glview to avoid glview being released in the while loop
|
||||
glview->retain();
|
||||
// Retain glView to avoid glView being released in the while loop
|
||||
glView->retain();
|
||||
|
||||
while (!glview->windowShouldClose())
|
||||
while (!glView->windowShouldClose())
|
||||
{
|
||||
lastTime = std::chrono::steady_clock::now();
|
||||
|
||||
director->mainLoop();
|
||||
glview->pollEvents();
|
||||
glView->pollEvents();
|
||||
|
||||
auto interval = std::chrono::steady_clock::now() - lastTime;
|
||||
if (interval < _animationInterval)
|
||||
|
@ -89,13 +89,13 @@ int Application::run()
|
|||
* when we want to close the window, we should call Director::end();
|
||||
* then call Director::mainLoop to do release of internal resources
|
||||
*/
|
||||
if (glview->isOpenGLReady())
|
||||
if (glView->isOpenGLReady())
|
||||
{
|
||||
director->end();
|
||||
director->mainLoop();
|
||||
director = nullptr;
|
||||
}
|
||||
glview->release();
|
||||
glView->release();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,21 +60,21 @@ int Application::run()
|
|||
}
|
||||
|
||||
std::chrono::steady_clock::time_point lastTime{};
|
||||
|
||||
|
||||
constexpr std::chrono::nanoseconds _1ms{1000000};
|
||||
|
||||
auto director = Director::getInstance();
|
||||
auto glview = director->getOpenGLView();
|
||||
auto glView = director->getOpenGLView();
|
||||
|
||||
// Retain glview to avoid glview being released in the while loop
|
||||
glview->retain();
|
||||
// Retain glView to avoid glView being released in the while loop
|
||||
glView->retain();
|
||||
|
||||
while (!glview->windowShouldClose())
|
||||
while (!glView->windowShouldClose())
|
||||
{
|
||||
lastTime = std::chrono::steady_clock::now();
|
||||
|
||||
director->mainLoop();
|
||||
glview->pollEvents();
|
||||
glView->pollEvents();
|
||||
|
||||
auto interval = std::chrono::steady_clock::now() - lastTime;
|
||||
auto waitDuration = _animationInterval - interval - _1ms;
|
||||
|
@ -89,13 +89,13 @@ int Application::run()
|
|||
* when we want to close the window, we should call Director::end();
|
||||
* then call Director::mainLoop to do release of internal resources
|
||||
*/
|
||||
if (glview->isOpenGLReady())
|
||||
if (glView->isOpenGLReady())
|
||||
{
|
||||
director->end();
|
||||
director->mainLoop();
|
||||
}
|
||||
|
||||
glview->release();
|
||||
glView->release();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ void ccMessageBox(const char* msg, const char* title)
|
|||
[alert setInformativeText:tmpTitle];
|
||||
[alert setAlertStyle:NSAlertStyleWarning];
|
||||
|
||||
auto glview = Director::getInstance()->getOpenGLView();
|
||||
id window = glview->getCocoaWindow();
|
||||
auto glView = Director::getInstance()->getOpenGLView();
|
||||
id window = glView->getCocoaWindow();
|
||||
[alert beginSheetModalForWindow:window completionHandler:nil];
|
||||
}
|
||||
|
||||
|
|
|
@ -90,10 +90,10 @@ int Application::run()
|
|||
}
|
||||
|
||||
auto director = Director::getInstance();
|
||||
auto glview = director->getOpenGLView();
|
||||
auto glView = director->getOpenGLView();
|
||||
|
||||
// Retain glview to avoid glview being released in the while loop
|
||||
glview->retain();
|
||||
// Retain glView to avoid glView being released in the while loop
|
||||
glView->retain();
|
||||
|
||||
LONGLONG interval = 0LL;
|
||||
LONG waitMS = 0L;
|
||||
|
@ -101,7 +101,7 @@ int Application::run()
|
|||
LARGE_INTEGER freq;
|
||||
QueryPerformanceFrequency(&freq);
|
||||
|
||||
while (!glview->windowShouldClose())
|
||||
while (!glView->windowShouldClose())
|
||||
{
|
||||
QueryPerformanceCounter(&nNow);
|
||||
interval = nNow.QuadPart - nLast.QuadPart;
|
||||
|
@ -109,7 +109,7 @@ int Application::run()
|
|||
{
|
||||
nLast.QuadPart = nNow.QuadPart;
|
||||
director->mainLoop();
|
||||
glview->pollEvents();
|
||||
glView->pollEvents();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -125,13 +125,13 @@ int Application::run()
|
|||
}
|
||||
|
||||
// Director should still do a cleanup if the window was closed manually.
|
||||
if (glview->isOpenGLReady())
|
||||
if (glView->isOpenGLReady())
|
||||
{
|
||||
director->end();
|
||||
director->mainLoop();
|
||||
director = nullptr;
|
||||
}
|
||||
glview->release();
|
||||
glView->release();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/////////////// restoring timer resolution
|
||||
|
|
|
@ -4,7 +4,7 @@ if(WINDOWS)
|
|||
ui/UIEditBox/UIEditBoxImpl-win32.h
|
||||
ui/UIWebView/UIWebViewImpl-win32.h
|
||||
ui/UIWebView/UIWebView.h
|
||||
|
||||
|
||||
)
|
||||
set(_AX_UI_SPECIFIC_SRC
|
||||
ui/UIEditBox/UIEditBoxImpl-win32.cpp
|
||||
|
@ -19,7 +19,7 @@ if(WINDOWS)
|
|||
ui/UIEditBox/UIEditBoxImpl-win32.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if (AX_ENABLE_MFMEDIA)
|
||||
set(_AX_UI_SPECIFIC_HEADER ${_AX_UI_SPECIFIC_HEADER}
|
||||
ui/UIVideoPlayer/MFUtils.h
|
||||
|
@ -52,29 +52,51 @@ elseif(APPLE)
|
|||
ui/UIEditBox/Mac/CCUITextFieldFormatter.m
|
||||
)
|
||||
elseif(IOS)
|
||||
set(_AX_UI_SPECIFIC_HEADER
|
||||
ui/UIWebView/UIWebView.h
|
||||
ui/UIVideoPlayer/UIVideoPlayer.h
|
||||
ui/UIWebView/UIWebViewImpl-ios.h
|
||||
ui/UIEditBox/UIEditBoxImpl-ios.h
|
||||
ui/UIEditBox/iOS/CCUIEditBoxIOS.h
|
||||
ui/UIEditBox/iOS/CCUIMultilineTextField.h
|
||||
ui/UIEditBox/iOS/CCUITextInput.h
|
||||
ui/UIEditBox/iOS/UITextView+CCUITextInput.h
|
||||
ui/UIEditBox/iOS/UITextField+CCUITextInput.h
|
||||
ui/UIEditBox/iOS/CCUISingleLineTextField.h
|
||||
)
|
||||
set(_AX_UI_SPECIFIC_SRC
|
||||
ui/UIWebView/UIWebView.mm
|
||||
ui/UIVideoPlayer/UIVideoPlayer-ios.mm
|
||||
ui/UIWebView/UIWebViewImpl-ios.mm
|
||||
ui/UIEditBox/UIEditBoxImpl-ios.mm
|
||||
ui/UIEditBox/iOS/CCUIEditBoxIOS.mm
|
||||
ui/UIEditBox/iOS/CCUIMultilineTextField.mm
|
||||
ui/UIEditBox/iOS/CCUISingleLineTextField.mm
|
||||
ui/UIEditBox/iOS/UITextField+CCUITextInput.mm
|
||||
ui/UIEditBox/iOS/UITextView+CCUITextInput.mm
|
||||
)
|
||||
if (TVOS)
|
||||
set(_AX_UI_SPECIFIC_HEADER
|
||||
ui/UIVideoPlayer/UIVideoPlayer.h
|
||||
ui/UIEditBox/UIEditBoxImpl-ios.h
|
||||
ui/UIEditBox/iOS/CCUIEditBoxIOS.h
|
||||
ui/UIEditBox/iOS/CCUIMultilineTextField.h
|
||||
ui/UIEditBox/iOS/CCUITextInput.h
|
||||
ui/UIEditBox/iOS/UITextView+CCUITextInput.h
|
||||
ui/UIEditBox/iOS/UITextField+CCUITextInput.h
|
||||
ui/UIEditBox/iOS/CCUISingleLineTextField.h
|
||||
)
|
||||
set(_AX_UI_SPECIFIC_SRC
|
||||
ui/UIVideoPlayer/UIVideoPlayer-ios.mm
|
||||
ui/UIEditBox/UIEditBoxImpl-ios.mm
|
||||
ui/UIEditBox/iOS/CCUIEditBoxIOS.mm
|
||||
ui/UIEditBox/iOS/CCUIMultilineTextField.mm
|
||||
ui/UIEditBox/iOS/CCUISingleLineTextField.mm
|
||||
ui/UIEditBox/iOS/UITextField+CCUITextInput.mm
|
||||
ui/UIEditBox/iOS/UITextView+CCUITextInput.mm
|
||||
)
|
||||
else()
|
||||
set(_AX_UI_SPECIFIC_HEADER
|
||||
ui/UIWebView/UIWebView.h
|
||||
ui/UIVideoPlayer/UIVideoPlayer.h
|
||||
ui/UIWebView/UIWebViewImpl-ios.h
|
||||
ui/UIEditBox/UIEditBoxImpl-ios.h
|
||||
ui/UIEditBox/iOS/CCUIEditBoxIOS.h
|
||||
ui/UIEditBox/iOS/CCUIMultilineTextField.h
|
||||
ui/UIEditBox/iOS/CCUITextInput.h
|
||||
ui/UIEditBox/iOS/UITextView+CCUITextInput.h
|
||||
ui/UIEditBox/iOS/UITextField+CCUITextInput.h
|
||||
ui/UIEditBox/iOS/CCUISingleLineTextField.h
|
||||
)
|
||||
set(_AX_UI_SPECIFIC_SRC
|
||||
ui/UIWebView/UIWebView.mm
|
||||
ui/UIVideoPlayer/UIVideoPlayer-ios.mm
|
||||
ui/UIWebView/UIWebViewImpl-ios.mm
|
||||
ui/UIEditBox/UIEditBoxImpl-ios.mm
|
||||
ui/UIEditBox/iOS/CCUIEditBoxIOS.mm
|
||||
ui/UIEditBox/iOS/CCUIMultilineTextField.mm
|
||||
ui/UIEditBox/iOS/CCUISingleLineTextField.mm
|
||||
ui/UIEditBox/iOS/UITextField+CCUITextInput.mm
|
||||
ui/UIEditBox/iOS/UITextView+CCUITextInput.mm
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
elseif(LINUX)
|
||||
set(_AX_UI_SPECIFIC_HEADER
|
||||
|
|
|
@ -907,9 +907,9 @@ void LayoutHelper::VisibleRect::lazyInit()
|
|||
if (s_ScreenVisibleRect.size.width == 0.0f && s_ScreenVisibleRect.size.height == 0.0f)
|
||||
{
|
||||
auto director = Director::getInstance();
|
||||
auto glview = director->getOpenGLView();
|
||||
auto glView = director->getOpenGLView();
|
||||
|
||||
if (glview->getResolutionPolicy() == ResolutionPolicy::NO_BORDER)
|
||||
if (glView->getResolutionPolicy() == ResolutionPolicy::NO_BORDER)
|
||||
{
|
||||
s_ScreenVisibleRect.origin = director->getVisibleOrigin();
|
||||
s_ScreenVisibleRect.size = director->getVisibleSize();
|
||||
|
|
|
@ -131,8 +131,8 @@
|
|||
|
||||
- (NSWindow*)window
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
return glview->getCocoaWindow();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
return glView->getCocoaWindow();
|
||||
}
|
||||
|
||||
- (void)openKeyboard
|
||||
|
|
|
@ -62,9 +62,9 @@ EditBoxImplIOS::~EditBoxImplIOS()
|
|||
|
||||
void EditBoxImplIOS::createNativeControl(const Rect& frame)
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
|
||||
Rect rect(0, 0, frame.size.width * glview->getScaleX(), frame.size.height * glview->getScaleY());
|
||||
Rect rect(0, 0, frame.size.width * glView->getScaleX(), frame.size.height * glView->getScaleY());
|
||||
|
||||
float factor = ax::Director::getInstance()->getContentScaleFactor();
|
||||
|
||||
|
@ -179,10 +179,10 @@ void EditBoxImplIOS::setNativeVisible(bool visible)
|
|||
|
||||
void EditBoxImplIOS::updateNativeFrame(const Rect& rect)
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglview = (CCEAGLView*)glview->getEAGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglView = (CCEAGLView*)glView->getEAGLView();
|
||||
|
||||
float factor = eaglview.contentScaleFactor;
|
||||
float factor = eaglView.contentScaleFactor;
|
||||
|
||||
[_systemControl updateFrame:CGRectMake(rect.origin.x / factor, rect.origin.y / factor, rect.size.width / factor,
|
||||
rect.size.height / factor)];
|
||||
|
@ -208,14 +208,14 @@ void EditBoxImplIOS::nativeCloseKeyboard()
|
|||
UIFont* EditBoxImplIOS::constructFont(const char* fontName, int fontSize)
|
||||
{
|
||||
AXASSERT(fontName != nullptr, "fontName can't be nullptr");
|
||||
CCEAGLView* eaglview = static_cast<CCEAGLView*>(ax::Director::getInstance()->getOpenGLView()->getEAGLView());
|
||||
float retinaFactor = eaglview.contentScaleFactor;
|
||||
CCEAGLView* eaglView = static_cast<CCEAGLView*>(ax::Director::getInstance()->getOpenGLView()->getEAGLView());
|
||||
float retinaFactor = eaglView.contentScaleFactor;
|
||||
NSString* fntName = [NSString stringWithUTF8String:fontName];
|
||||
|
||||
fntName = [[fntName lastPathComponent] stringByDeletingPathExtension];
|
||||
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
float scaleFactor = glview->getScaleX();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
float scaleFactor = glView->getScaleX();
|
||||
|
||||
if (fontSize == -1)
|
||||
{
|
||||
|
|
|
@ -57,9 +57,9 @@ EditBoxImplMac::~EditBoxImplMac()
|
|||
|
||||
void EditBoxImplMac::createNativeControl(const ax::Rect& frame)
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
Size size = frame.size;
|
||||
NSRect rect = NSMakeRect(0, 0, size.width * glview->getScaleX(), size.height * glview->getScaleY());
|
||||
NSRect rect = NSMakeRect(0, 0, size.width * glView->getScaleX(), size.height * glView->getScaleY());
|
||||
|
||||
float factor = ax::Director::getInstance()->getContentScaleFactor();
|
||||
|
||||
|
@ -75,8 +75,8 @@ NSFont* EditBoxImplMac::constructFont(const char* fontName, int fontSize)
|
|||
NSString* fntName = [NSString stringWithUTF8String:fontName];
|
||||
fntName = [[fntName lastPathComponent] stringByDeletingPathExtension];
|
||||
float retinaFactor = _inRetinaMode ? 2.0f : 1.0f;
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
float scaleFactor = glview->getScaleX();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
float scaleFactor = glView->getScaleX();
|
||||
|
||||
if (fontSize == -1)
|
||||
{
|
||||
|
|
|
@ -320,9 +320,9 @@
|
|||
- (void)doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance
|
||||
{
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
CCEAGLView* eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
|
||||
[eaglview doAnimationWhenKeyboardMoveWithDuration:duration distance:distance];
|
||||
[eaglView doAnimationWhenKeyboardMoveWithDuration:duration distance:distance];
|
||||
}
|
||||
|
||||
- (void)updateFrame:(CGRect)rect
|
||||
|
@ -337,9 +337,9 @@
|
|||
- (void)openKeyboard
|
||||
{
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
CCEAGLView* eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
|
||||
[eaglview addSubview:self.textInput];
|
||||
[eaglView addSubview:self.textInput];
|
||||
[self.textInput becomeFirstResponder];
|
||||
}
|
||||
|
||||
|
@ -362,9 +362,9 @@
|
|||
- (void)animationSelector
|
||||
{
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
CCEAGLView* eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
|
||||
[eaglview doAnimationWhenAnotherEditBeClicked];
|
||||
[eaglView doAnimationWhenAnotherEditBeClicked];
|
||||
}
|
||||
|
||||
#pragma mark - UITextView delegate methods
|
||||
|
@ -376,9 +376,9 @@
|
|||
_returnPressed = NO;
|
||||
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
CCEAGLView* eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
|
||||
if ([eaglview isKeyboardShown])
|
||||
if ([eaglView isKeyboardShown])
|
||||
{
|
||||
[self performSelector:@selector(animationSelector) withObject:nil afterDelay:0.0f];
|
||||
}
|
||||
|
@ -469,9 +469,9 @@
|
|||
_returnPressed = NO;
|
||||
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
CCEAGLView* eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
CCEAGLView* eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
|
||||
if ([eaglview isKeyboardShown])
|
||||
if ([eaglView isKeyboardShown])
|
||||
{
|
||||
[self performSelector:@selector(animationSelector) withObject:nil afterDelay:0.0f];
|
||||
}
|
||||
|
|
|
@ -84,8 +84,8 @@ CGFloat const UI_PLACEHOLDER_TEXT_CHANGED_ANIMATION_DURATION = 0.25;
|
|||
{
|
||||
if (_placeHolderLabel == nil)
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
float padding = AX_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
float padding = AX_EDIT_BOX_PADDING * glView->getScaleX() / glView->getContentScaleFactor();
|
||||
|
||||
_placeHolderLabel =
|
||||
[[UILabel alloc] initWithFrame:CGRectMake(padding, padding, self.bounds.size.width - padding * 2, 0)];
|
||||
|
@ -106,9 +106,9 @@ CGFloat const UI_PLACEHOLDER_TEXT_CHANGED_ANIMATION_DURATION = 0.25;
|
|||
|
||||
- (CGRect)textRectForBounds:(CGRect)bounds
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
|
||||
float padding = AX_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor();
|
||||
float padding = AX_EDIT_BOX_PADDING * glView->getScaleX() / glView->getContentScaleFactor();
|
||||
return CGRectInset(bounds, padding, padding);
|
||||
}
|
||||
|
||||
|
|
|
@ -76,9 +76,9 @@
|
|||
|
||||
- (CGRect)textRectForBounds:(CGRect)bounds
|
||||
{
|
||||
auto glview = ax::Director::getInstance()->getOpenGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
|
||||
float padding = AX_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor();
|
||||
float padding = AX_EDIT_BOX_PADDING * glView->getScaleX() / glView->getContentScaleFactor();
|
||||
return CGRectInset(bounds, padding, padding);
|
||||
}
|
||||
|
||||
|
|
|
@ -320,9 +320,9 @@ void Layout::stencilClippingVisit(Renderer* renderer, const Mat4& parentTransfor
|
|||
|
||||
void Layout::onBeforeVisitScissor()
|
||||
{
|
||||
auto glview = _director->getOpenGLView();
|
||||
auto glView = _director->getOpenGLView();
|
||||
// apply scissor test
|
||||
_scissorOldState = glview->isScissorEnabled();
|
||||
_scissorOldState = glView->isScissorEnabled();
|
||||
if (false == _scissorOldState)
|
||||
{
|
||||
auto renderer = _director->getRenderer();
|
||||
|
@ -331,10 +331,10 @@ void Layout::onBeforeVisitScissor()
|
|||
|
||||
// apply scissor box
|
||||
Rect clippingRect = getClippingRect();
|
||||
_clippingOldRect = glview->getScissorRect();
|
||||
_clippingOldRect = glView->getScissorRect();
|
||||
if (false == _clippingOldRect.equals(clippingRect))
|
||||
{
|
||||
glview->setScissorInPoints(clippingRect.origin.x, clippingRect.origin.y, clippingRect.size.width,
|
||||
glView->setScissorInPoints(clippingRect.origin.x, clippingRect.origin.y, clippingRect.size.width,
|
||||
clippingRect.size.height);
|
||||
}
|
||||
}
|
||||
|
@ -346,8 +346,8 @@ void Layout::onAfterVisitScissor()
|
|||
// revert scissor box
|
||||
if (false == _clippingOldRect.equals(_clippingRect))
|
||||
{
|
||||
auto glview = _director->getOpenGLView();
|
||||
glview->setScissorInPoints(_clippingOldRect.origin.x, _clippingOldRect.origin.y,
|
||||
auto glView = _director->getOpenGLView();
|
||||
glView->setScissorInPoints(_clippingOldRect.origin.x, _clippingOldRect.origin.y,
|
||||
_clippingOldRect.size.width, _clippingOldRect.size.height);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,9 +40,9 @@ static const float BOUNCE_BACK_DURATION = 1.0f;
|
|||
|
||||
static float convertDistanceFromPointToInch(const Vec2& dis)
|
||||
{
|
||||
auto glview = Director::getInstance()->getOpenGLView();
|
||||
auto glView = Director::getInstance()->getOpenGLView();
|
||||
int dpi = Device::getDPI();
|
||||
float distance = Vec2(dis.x * glview->getScaleX() / dpi, dis.y * glview->getScaleY() / dpi).getLength();
|
||||
float distance = Vec2(dis.x * glView->getScaleX() / dpi, dis.y * glView->getScaleY() / dpi).getLength();
|
||||
return distance;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,8 +177,8 @@ typedef NS_ENUM(NSInteger, PlayerbackState) {
|
|||
[self showPlaybackControls:_showPlaybackControls];
|
||||
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
auto eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
[eaglview addSubview:self.playerController.view];
|
||||
auto eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
[eaglView addSubview:self.playerController.view];
|
||||
[self registerPlayerEventListener];
|
||||
}
|
||||
|
||||
|
|
|
@ -132,8 +132,8 @@
|
|||
if (!self.wkWebView.superview)
|
||||
{
|
||||
auto view = ax::Director::getInstance()->getOpenGLView();
|
||||
auto eaglview = (CCEAGLView*)view->getEAGLView();
|
||||
[eaglview addSubview:self.wkWebView];
|
||||
auto eaglView = (CCEAGLView*)view->getEAGLView();
|
||||
[eaglView addSubview:self.wkWebView];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@ NS_AX_EXT_BEGIN
|
|||
|
||||
static float convertDistanceFromPointToInch(float pointDis)
|
||||
{
|
||||
auto glview = Director::getInstance()->getOpenGLView();
|
||||
float factor = (glview->getScaleX() + glview->getScaleY()) / 2;
|
||||
auto glView = Director::getInstance()->getOpenGLView();
|
||||
float factor = (glView->getScaleX() + glView->getScaleY()) / 2;
|
||||
return pointDis * factor / Device::getDPI();
|
||||
}
|
||||
|
||||
|
@ -582,25 +582,25 @@ void ScrollView::onBeforeDraw()
|
|||
// {
|
||||
// _scissorRestored = false;
|
||||
// Rect frame = getViewRect();
|
||||
// auto glview = Director::getInstance()->getOpenGLView();
|
||||
// auto glView = Director::getInstance()->getOpenGLView();
|
||||
//
|
||||
// if (glview->getVR() == nullptr) {
|
||||
// if (glview->isScissorEnabled()) {
|
||||
// if (glView->getVR() == nullptr) {
|
||||
// if (glView->isScissorEnabled()) {
|
||||
// _scissorRestored = true;
|
||||
// _parentScissorRect = glview->getScissorRect();
|
||||
// _parentScissorRect = glView->getScissorRect();
|
||||
// //set the intersection of _parentScissorRect and frame as the new scissor rect
|
||||
// if (frame.intersectsRect(_parentScissorRect)) {
|
||||
// float x = MAX(frame.origin.x, _parentScissorRect.origin.x);
|
||||
// float y = MAX(frame.origin.y, _parentScissorRect.origin.y);
|
||||
// float xx = MIN(frame.origin.x + frame.size.width, _parentScissorRect.origin.x +
|
||||
// _parentScissorRect.size.width); float yy = MIN(frame.origin.y + frame.size.height,
|
||||
// _parentScissorRect.origin.y + _parentScissorRect.size.height); glview->setScissorInPoints(x,
|
||||
// _parentScissorRect.origin.y + _parentScissorRect.size.height); glView->setScissorInPoints(x,
|
||||
// y, xx - x, yy - y);
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// glEnable(GL_SCISSOR_TEST);
|
||||
// glview->setScissorInPoints(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
|
||||
// glView->setScissorInPoints(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -623,10 +623,10 @@ void ScrollView::onAfterDraw()
|
|||
// TODO:minggo
|
||||
// if (_clippingToBounds)
|
||||
// {
|
||||
// auto glview = Director::getInstance()->getOpenGLView();
|
||||
// if (glview->getVR() == nullptr) {
|
||||
// auto glView = Director::getInstance()->getOpenGLView();
|
||||
// if (glView->getVR() == nullptr) {
|
||||
// if (_scissorRestored) {//restore the parent's scissor rect
|
||||
// glview->setScissorInPoints(_parentScissorRect.origin.x, _parentScissorRect.origin.y,
|
||||
// glView->setScissorInPoints(_parentScissorRect.origin.x, _parentScissorRect.origin.y,
|
||||
// _parentScissorRect.size.width, _parentScissorRect.size.height);
|
||||
// }
|
||||
// else {
|
||||
|
|
|
@ -273,7 +273,7 @@ void FUIContainer::onExit()
|
|||
|
||||
if (_stencilClippingSupport != nullptr && _stencilClippingSupport->_stencil != nullptr)
|
||||
_stencilClippingSupport->_stencil->onExit();
|
||||
|
||||
|
||||
Node::onExit();
|
||||
}
|
||||
|
||||
|
@ -310,8 +310,8 @@ void FUIContainer::restoreAllProgramStates()
|
|||
|
||||
void FUIContainer::onBeforeVisitScissor()
|
||||
{
|
||||
auto glview = Director::getInstance()->getOpenGLView();
|
||||
_rectClippingSupport->_scissorOldState = glview->isScissorEnabled();
|
||||
auto glView = Director::getInstance()->getOpenGLView();
|
||||
_rectClippingSupport->_scissorOldState = glView->isScissorEnabled();
|
||||
Rect clippingRect = getClippingRect();
|
||||
if (false == _rectClippingSupport->_scissorOldState)
|
||||
{
|
||||
|
@ -323,11 +323,11 @@ void FUIContainer::onBeforeVisitScissor()
|
|||
}
|
||||
else
|
||||
{
|
||||
_rectClippingSupport->_clippingOldRect = glview->getScissorRect();
|
||||
_rectClippingSupport->_clippingOldRect = glView->getScissorRect();
|
||||
clippingRect = ToolSet::intersection(clippingRect, _rectClippingSupport->_clippingOldRect);
|
||||
}
|
||||
|
||||
glview->setScissorInPoints(clippingRect.origin.x,
|
||||
glView->setScissorInPoints(clippingRect.origin.x,
|
||||
clippingRect.origin.y,
|
||||
clippingRect.size.width,
|
||||
clippingRect.size.height);
|
||||
|
@ -337,8 +337,8 @@ void FUIContainer::onAfterVisitScissor()
|
|||
{
|
||||
if (_rectClippingSupport->_scissorOldState)
|
||||
{
|
||||
auto glview = Director::getInstance()->getOpenGLView();
|
||||
glview->setScissorInPoints(_rectClippingSupport->_clippingOldRect.origin.x,
|
||||
auto glView = Director::getInstance()->getOpenGLView();
|
||||
glView->setScissorInPoints(_rectClippingSupport->_clippingOldRect.origin.x,
|
||||
_rectClippingSupport->_clippingOldRect.origin.y,
|
||||
_rectClippingSupport->_clippingOldRect.size.width,
|
||||
_rectClippingSupport->_clippingOldRect.size.height);
|
||||
|
|
|
@ -33,7 +33,7 @@ if(NOT DEFINED BUILD_ENGINE_DONE) # to test HelloCpp into root project
|
|||
if(XCODE)
|
||||
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
# config quick starter batch script run.bat for windows
|
||||
if(WIN32)
|
||||
file(RELATIVE_PATH CMAKE_BUILD_RELATIVE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")
|
||||
|
@ -74,7 +74,7 @@ if(APPLE OR WINDOWS)
|
|||
ax_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
|
||||
endif()
|
||||
|
||||
# add cross-platforms source files and header files
|
||||
# add cross-platforms source files and header files
|
||||
list(APPEND GAME_SOURCE
|
||||
Classes/AppDelegate.cpp
|
||||
Classes/HelloWorldScene.cpp
|
||||
|
@ -109,11 +109,21 @@ elseif(APPLE)
|
|||
proj.ios_mac/ios/AppController.h
|
||||
proj.ios_mac/ios/RootViewController.h
|
||||
)
|
||||
set(APP_UI_RES
|
||||
proj.ios_mac/ios/LaunchScreen.storyboard
|
||||
proj.ios_mac/ios/LaunchScreenBackground.png
|
||||
proj.ios_mac/ios/Images.xcassets
|
||||
)
|
||||
|
||||
if (TVOS)
|
||||
set(APP_UI_RES
|
||||
proj.ios_mac/ios/LaunchScreenBackground.png
|
||||
proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard
|
||||
proj.ios_mac/ios/targets/tvos/Images.xcassets
|
||||
)
|
||||
else()
|
||||
set(APP_UI_RES
|
||||
proj.ios_mac/ios/LaunchScreenBackground.png
|
||||
proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard
|
||||
proj.ios_mac/ios/targets/ios/Images.xcassets
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND GAME_SOURCE
|
||||
proj.ios_mac/ios/main.m
|
||||
proj.ios_mac/ios/AppController.mm
|
||||
|
@ -168,8 +178,11 @@ if(APPLE)
|
|||
|
||||
if(MACOSX)
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
|
||||
elseif(TVOS)
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/targets/tvos/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "Brand Assets")
|
||||
elseif(IOS)
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/targets/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
||||
endif()
|
||||
|
||||
|
@ -203,4 +216,4 @@ if (_AX_USE_PREBUILT) # support windows only
|
|||
|
||||
include(${_AX_ROOT_PATH}/cmake/Modules/AXLinkHelpers.cmake)
|
||||
ax_link_cxx_prebuilt(${APP_NAME} ${_AX_ROOT_PATH} ${AX_PREBUILT_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -64,17 +64,17 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
{
|
||||
// initialize director
|
||||
auto director = Director::getInstance();
|
||||
auto glview = director->getOpenGLView();
|
||||
if (!glview)
|
||||
auto glView = director->getOpenGLView();
|
||||
if (!glView)
|
||||
{
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || \
|
||||
(CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||
glview = GLViewImpl::createWithRect(
|
||||
glView = GLViewImpl::createWithRect(
|
||||
"HelloCpp", axis::Rect(0, 0, designResolutionSize.width, designResolutionSize.height));
|
||||
#else
|
||||
glview = GLViewImpl::create("HelloCpp");
|
||||
glView = GLViewImpl::create("HelloCpp");
|
||||
#endif
|
||||
director->setOpenGLView(glview);
|
||||
director->setOpenGLView(glView);
|
||||
}
|
||||
|
||||
// turn on display FPS
|
||||
|
@ -84,9 +84,9 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
director->setAnimationInterval(1.0f / 60);
|
||||
|
||||
// Set the design resolution
|
||||
glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height,
|
||||
glView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height,
|
||||
ResolutionPolicy::NO_BORDER);
|
||||
auto frameSize = glview->getFrameSize();
|
||||
auto frameSize = glView->getFrameSize();
|
||||
// if the frame's height is larger than the height of medium size.
|
||||
if (frameSize.height > mediumResolutionSize.height)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
"project_replace_ios_bundleid": {
|
||||
"src_bundle_id": "org.axys1.hellocpp",
|
||||
"files": [
|
||||
"proj.ios_mac/ios/Info.plist"
|
||||
"proj.ios_mac/ios/targets/ios/Info.plist",
|
||||
"proj.ios_mac/ios/targets/tvos/Info.plist"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -51,12 +52,12 @@
|
|||
"replace_string": "static cocos2d::Size \\1 = cocos2d::Size(\\3, \\2)"
|
||||
},
|
||||
{
|
||||
"file_path": "proj.ios_mac/ios/Info.plist",
|
||||
"file_path": "proj.ios_mac/ios/targets/ios/Info.plist",
|
||||
"pattern": "UIInterfaceOrientationLandscapeRight",
|
||||
"replace_string": "UIInterfaceOrientationPortrait"
|
||||
},
|
||||
{
|
||||
"file_path": "proj.ios_mac/ios/Info.plist",
|
||||
"file_path": "proj.ios_mac/ios/targets/ios/Info.plist",
|
||||
"pattern": "UIInterfaceOrientationLandscapeLeft",
|
||||
"replace_string": "UIInterfaceOrientationPortraitUpsideDown"
|
||||
},
|
||||
|
|
|
@ -55,7 +55,9 @@ static AppDelegate s_sharedApplication;
|
|||
|
||||
// Use RootViewController to manage CCEAGLView
|
||||
_viewController = [[RootViewController alloc] init];
|
||||
#if !defined(AX_TARGET_OS_TVOS)
|
||||
_viewController.wantsFullScreenLayout = YES;
|
||||
#endif
|
||||
|
||||
// Set RootViewController to window
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] < 6.0)
|
||||
|
@ -71,7 +73,9 @@ static AppDelegate s_sharedApplication;
|
|||
|
||||
[window makeKeyAndVisible];
|
||||
|
||||
#if !defined(AX_TARGET_OS_TVOS)
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:true];
|
||||
#endif
|
||||
|
||||
// Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
|
||||
|
@ -80,8 +84,8 @@ static AppDelegate s_sharedApplication;
|
|||
}
|
||||
|
||||
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
|
||||
axis::GLView* glview = axis::GLViewImpl::createWithEAGLView((__bridge void*)_viewController.view);
|
||||
axis::Director::getInstance()->setOpenGLView(glview);
|
||||
axis::GLView* glView = axis::GLViewImpl::createWithEAGLView((__bridge void*)_viewController.view);
|
||||
axis::Director::getInstance()->setOpenGLView(glView);
|
||||
|
||||
// run the cocos2d-x game scene
|
||||
app->run();
|
||||
|
|
Before Width: | Height: | Size: 23 KiB |
|
@ -54,7 +54,9 @@ customization that is not appropriate for viewDidLoad.
|
|||
numberOfSamples:axis::GLViewImpl::_multisamplingCount];
|
||||
|
||||
// Enable or disable multiple touches
|
||||
#if !defined(AX_TARGET_OS_TVOS)
|
||||
[eaglView setMultipleTouchEnabled:NO];
|
||||
#endif
|
||||
|
||||
// Set EAGLView as view of RootViewController
|
||||
self.view = eaglView;
|
||||
|
@ -93,15 +95,15 @@ customization that is not appropriate for viewDidLoad.
|
|||
{
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
auto glview = axis::Director::getInstance()->getOpenGLView();
|
||||
auto glView = axis::Director::getInstance()->getOpenGLView();
|
||||
|
||||
if (glview)
|
||||
if (glView)
|
||||
{
|
||||
CCEAGLView* eaglview = (__bridge CCEAGLView*)glview->getEAGLView();
|
||||
CCEAGLView* eaglView = (__bridge CCEAGLView*)glView->getEAGLView();
|
||||
|
||||
if (eaglview)
|
||||
if (eaglView)
|
||||
{
|
||||
CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
|
||||
CGSize s = CGSizeMake([eaglView getWidth], [eaglView getHeight]);
|
||||
axis::Application::getInstance()->applicationScreenSizeChanged((int)s.width, (int)s.height);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,157 +1,158 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-20@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-20@3x.png",
|
||||
"scale" : "3x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-29.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-29@3x.png",
|
||||
"scale" : "3x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-40@3x.png",
|
||||
"scale" : "3x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-57.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "1x",
|
||||
"size" : "57x57"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-57@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "57x57"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-60@3x.png",
|
||||
"scale" : "3x"
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-20.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-20@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-29.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-40.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "50x50",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-50.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "50x50"
|
||||
},
|
||||
{
|
||||
"size" : "50x50",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-50@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "50x50"
|
||||
},
|
||||
{
|
||||
"size" : "72x72",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-72.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "72x72"
|
||||
},
|
||||
{
|
||||
"size" : "72x72",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-72@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "72x72"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-76.png",
|
||||
"scale" : "1x"
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-83.5@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-1024.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 644 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "display-p3",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.447",
|
||||
"green" : "0.282",
|
||||
"red" : "0.129"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"size" : "1280x768",
|
||||
"filename" : "icon-0.png"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 374 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
},
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"size" : "1280x768",
|
||||
"filename" : "icon-0.png"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 374 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : "0.4.0",
|
||||
"author" : "Store Assets Generator"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"size" : "1280x768",
|
||||
"filename" : "icon-0.png"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 374 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-400.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-800.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 192 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : "0.4.0",
|
||||
"author" : "Store Assets Generator"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : "0.4.0",
|
||||
"author" : "Store Assets Generator"
|
||||
},
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-400.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-800.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 192 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : "0.4.0",
|
||||
"author" : "Store Assets Generator"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-400.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-800.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 192 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : "0.4.0",
|
||||
"author" : "Store Assets Generator"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
},
|
||||
"assets" : [
|
||||
{
|
||||
"filename" : "App Icon - App Store.imagestack",
|
||||
"role" : "primary-app-icon",
|
||||
"idiom" : "tv",
|
||||
"size" : "1280x768"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"filename" : "App Icon.imagestack",
|
||||
"size" : "400x240",
|
||||
"role" : "primary-app-icon"
|
||||
},
|
||||
{
|
||||
"size" : "2320x720",
|
||||
"filename" : "Top Shelf Image Wide.imageset",
|
||||
"idiom" : "tv",
|
||||
"role" : "top-shelf-image-wide"
|
||||
},
|
||||
{
|
||||
"role" : "top-shelf-image",
|
||||
"size" : "1920x720",
|
||||
"filename" : "Top Shelf Image.imageset",
|
||||
"idiom" : "tv"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "2320x720",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-2320.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "2320x720",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-4640.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 350 KiB |
After Width: | Height: | Size: 950 KiB |
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "1920x720",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-1920.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "1920x720",
|
||||
"idiom" : "tv",
|
||||
"filename" : "icon-3840.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"author" : "Store Assets Generator",
|
||||
"version" : "0.4.0"
|
||||
}
|
After Width: | Height: | Size: 343 KiB |
After Width: | Height: | Size: 927 KiB |
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PROJECT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECT_NAME}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIPrerenderedIcon</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
</array>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2019. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="20037" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="appleTV" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="tvOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="1yf-Ni-PHo"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="b0w-RK-sP3"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="LaunchScreenBackground" translatesAutoresizingMaskIntoConstraints="NO" id="WLf-yP-saP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-32" y="-4"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchScreenBackground" width="2208" height="1242"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -35,7 +35,7 @@ if(NOT DEFINED BUILD_ENGINE_DONE) # to test HelloLua into root project
|
|||
if(XCODE)
|
||||
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
# config quick starter batch script run.bat for windows
|
||||
if(WIN32)
|
||||
file(RELATIVE_PATH CMAKE_BUILD_RELATIVE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")
|
||||
|
@ -56,7 +56,7 @@ if(NOT DEFINED BUILD_ENGINE_DONE) # to test HelloLua into root project
|
|||
|
||||
include(AXBuildSet)
|
||||
set(AX_ENABLE_EXT_LUA ON)
|
||||
|
||||
|
||||
set(_AX_USE_PREBUILT FALSE)
|
||||
if (WIN32 AND DEFINED AX_PREBUILT_DIR AND IS_DIRECTORY ${_AX_ROOT_PATH}/${AX_PREBUILT_DIR})
|
||||
set(_AX_USE_PREBUILT TRUE)
|
||||
|
@ -113,11 +113,21 @@ elseif(APPLE)
|
|||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/AppController.h
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/RootViewController.h
|
||||
)
|
||||
set(APP_UI_RES
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/LaunchScreen.storyboard
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/LaunchScreenBackground.png
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/Images.xcassets
|
||||
|
||||
if (TVOS)
|
||||
set(APP_UI_RES
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/LaunchScreenBackground.png
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/targets/tvos/Images.xcassets
|
||||
)
|
||||
else()
|
||||
set(APP_UI_RES
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/LaunchScreenBackground.png
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/targets/ios/Images.xcassets
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND GAME_SOURCE
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/main.m
|
||||
${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/AppController.mm
|
||||
|
@ -149,7 +159,7 @@ if(NOT ANDROID)
|
|||
add_executable(${APP_NAME} ${APP_SRC})
|
||||
else()
|
||||
add_library(${APP_NAME} SHARED ${APP_SRC})
|
||||
|
||||
|
||||
# whole archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
|
@ -178,8 +188,13 @@ if(APPLE)
|
|||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
LINK_FLAGS "-pagezero_size 10000 -image_base 100000000"
|
||||
)
|
||||
elseif(TVOS)
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/targets/tvos/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "Brand Assets")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
elseif(IOS)
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/Info.plist")
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${RUNTIME_SRC_ROOT}/proj.ios_mac/ios/targets/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
|
||||
|
|