diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..dee217a776 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 3c039a8497..ca728508fa 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -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 diff --git a/.github/workflows/tvos-ci.yml b/.github/workflows/tvos-ci.yml new file mode 100644 index 0000000000..c878985f2f --- /dev/null +++ b/.github/workflows/tvos-ci.yml @@ -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 " + run: tools/unix-ci/run-script.sh diff --git a/AUTHORS b/AUTHORS index c6dc2d0bc0..8d5ee0622e 100644 --- a/AUTHORS +++ b/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 smart pointer support + Added RefPtr 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, Map, 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! diff --git a/README.md b/README.md index 6458064d25..c7ae4bcfaf 100644 --- a/README.md +++ b/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` diff --git a/README_CN.md b/README_CN.md index 114287bf63..6af5233c45 100644 --- a/README_CN.md +++ b/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编译运行 diff --git a/cmake/Modules/AXConfigDefine.cmake b/cmake/Modules/AXConfigDefine.cmake index 5de2f3eb33..c467ea8843 100644 --- a/cmake/Modules/AXConfigDefine.cmake +++ b/cmake/Modules/AXConfigDefine.cmake @@ -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 $<$:_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 ) diff --git a/cmake/Modules/AXConfigDepend.cmake b/cmake/Modules/AXConfigDepend.cmake index 5112a1aa9a..80e8554f04 100644 --- a/cmake/Modules/AXConfigDepend.cmake +++ b/cmake/Modules/AXConfigDepend.cmake @@ -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() diff --git a/cmake/README.md b/cmake/README.md index 9e13fd56a7..635df89ebb 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -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 ``` diff --git a/cmake/ios.mini.cmake b/cmake/ios.mini.cmake deleted file mode 100644 index fa742157b0..0000000000 --- a/cmake/ios.mini.cmake +++ /dev/null @@ -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() diff --git a/cmake/ios.toolchain.cmake b/cmake/ios.toolchain.cmake new file mode 100644 index 0000000000..7ccb1c9a17 --- /dev/null +++ b/cmake/ios.toolchain.cmake @@ -0,0 +1,1014 @@ +# This file is part of the ios-cmake project. It was retrieved from +# https://github.com/leetal/ios-cmake.git, which is a fork of +# https://github.com/gerstrong/ios-cmake.git, which is a fork of +# https://github.com/cristeab/ios-cmake.git, which is a fork of +# https://code.google.com/p/ios-cmake/. Which in turn is based off of +# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which +# are included with CMake 2.8.4 +# +# The ios-cmake project is licensed under the new BSD license. +# +# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software, +# Kitware, Inc., Insight Software Consortium. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# This file is based off of the Platform/Darwin.cmake and +# Platform/UnixPaths.cmake files which are included with CMake 2.8.4 +# It has been altered for iOS development. +# +# Updated by Alex Stewart (alexs.mac@gmail.com) +# +# ***************************************************************************** +# Now maintained by Alexander Widerberg (widerbergaren [at] gmail.com) +# under the BSD-3-Clause license +# https://github.com/leetal/ios-cmake +# ***************************************************************************** +# +# INFORMATION / HELP +# +############################################################################### +# OPTIONS # +############################################################################### +# +# PLATFORM: (default "OS64") +# OS = Build for iPhoneOS. +# OS64 = Build for arm64 iphoneOS. +# OS64COMBINED = Build for arm64 x86_64 iphoneOS + iphoneOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# SIMULATOR = Build for x86 i386 iphoneOS Simulator. +# SIMULATOR64 = Build for x86_64 iphoneOS Simulator. +# SIMULATORARM64 = Build for arm64 iphoneOS Simulator. +# TVOS = Build for arm64 tvOS. +# TVOSCOMBINED = Build for arm64 x86_64 tvOS + tvOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# SIMULATOR_TVOS = Build for x86_64 tvOS Simulator. +# WATCHOS = Build for armv7k arm64_32 for watchOS. +# WATCHOSCOMBINED = Build for armv7k arm64_32 x86_64 watchOS + watchOS Simulator. Combined into FAT STATIC lib (only supported on 3.14+ of CMake with "-G Xcode" argument in combination with the "cmake --install" CMake build step) +# SIMULATOR_WATCHOS = Build for x86_64 for watchOS Simulator. +# MAC = Build for x86_64 macOS. +# MAC_ARM64 = Build for Apple Silicon macOS. +# MAC_CATALYST = Build for x86_64 macOS with Catalyst support (iOS toolchain on macOS). +# Note: The build argument "MACOSX_DEPLOYMENT_TARGET" can be used to control min-version of macOS +# MAC_CATALYST_ARM64 = Build for Apple Silicon macOS with Catalyst support (iOS toolchain on macOS). +# Note: The build argument "MACOSX_DEPLOYMENT_TARGET" can be used to control min-version of macOS +# +# CMAKE_OSX_SYSROOT: Path to the SDK to use. By default this is +# automatically determined from PLATFORM and xcodebuild, but +# can also be manually specified (although this should not be required). +# +# CMAKE_DEVELOPER_ROOT: Path to the Developer directory for the platform +# being compiled for. By default this is automatically determined from +# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should +# not be required). +# +# DEPLOYMENT_TARGET: Minimum SDK version to target. Default 2.0 on watchOS and 9.0 on tvOS+iOS +# +# NAMED_LANGUAGE_SUPPORT: +# ON (default) = Will require "enable_language(OBJC) and/or enable_language(OBJCXX)" for full OBJC|OBJCXX support +# OFF = Will embed the OBJC and OBJCXX flags into the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (legacy behaviour, CMake version < 3.16) +# +# ENABLE_BITCODE: (ON|OFF) Enables or disables bitcode support. Default ON +# +# ENABLE_ARC: (ON|OFF) Enables or disables ARC support. Default ON (ARC enabled by default) +# +# ENABLE_VISIBILITY: (ON|OFF) Enables or disables symbol visibility support. Default OFF (visibility hidden by default) +# +# ENABLE_STRICT_TRY_COMPILE: (ON|OFF) Enables or disables strict try_compile() on all Check* directives (will run linker +# to actually check if linking is possible). Default OFF (will set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY) +# +# ARCHS: (armv7 armv7s armv7k arm64 arm64_32 i386 x86_64) If specified, will override the default architectures for the given PLATFORM +# OS = armv7 armv7s arm64 (if applicable) +# OS64 = arm64 (if applicable) +# SIMULATOR = i386 +# SIMULATOR64 = x86_64 +# SIMULATORARM64 = arm64 +# TVOS = arm64 +# SIMULATOR_TVOS = x86_64 (i386 has since long been deprecated) +# WATCHOS = armv7k arm64_32 (if applicable) +# SIMULATOR_WATCHOS = x86_64 (i386 has since long been deprecated) +# MAC = x86_64 +# MAC_ARM64 = arm64 +# MAC_CATALYST = x86_64 +# MAC_CATALYST_ARM64 = arm64 +# +# NOTE: When manually specifying ARCHS, put a semi-colon between the entries. E.g., -DARCHS="armv7;arm64" +# +############################################################################### +# END OPTIONS # +############################################################################### +# +# This toolchain defines the following properties (available via get_property()) for use externally: +# +# PLATFORM: The currently targeted platform. +# XCODE_VERSION: Version number (not including Build version) of Xcode detected. +# SDK_VERSION: Version of SDK being used. +# OSX_ARCHITECTURES: Architectures being compiled for (generated from PLATFORM). +# APPLE_TARGET_TRIPLE: Used by autoconf build systems. NOTE: If "ARCHS" are overridden, this will *NOT* be set! +# +# This toolchain defines the following macros for use externally: +# +# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT) +# A convenience macro for setting xcode specific properties on targets. +# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel +# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all"). +# +# find_host_package (PROGRAM ARGS) +# A macro used to find executable programs on the host system, not within the +# environment. Thanks to the android-cmake project for providing the +# command. +# + +cmake_minimum_required(VERSION 3.8.0) + +# CMake invokes the toolchain file twice during the first build, but only once during subsequent rebuilds. +if(DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN}) + return() +endif() +set(ENV{_IOS_TOOLCHAIN_HAS_RUN} true) + +# List of supported platform values +list(APPEND _supported_platforms + "OS" "OS64" "OS64COMBINED" "SIMULATOR" "SIMULATOR64" "SIMULATORARM64" + "TVOS" "TVOSCOMBINED" "SIMULATOR_TVOS" + "WATCHOS" "WATCHOSCOMBINED" "SIMULATOR_WATCHOS" + "MAC" "MAC_ARM64" + "MAC_CATALYST" "MAC_CATALYST_ARM64") + +# Cache what generator is used +set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}") + +# Check if using a CMake version capable of building combined FAT builds (simulator and target slices combined in one static lib) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14") + set(MODERN_CMAKE YES) +endif() + +# Get the Xcode version being used. +# Problem: CMake runs toolchain files multiple times, but can't read cache variables on some runs. +# Workaround: On first run (in which cache variables are always accessible), set an intermediary environment variable. +# +# NOTE: This pattern is used i many places in this toolchain to speed up checks of all sorts +if(DEFINED XCODE_VERSION_INT) + # Environment variables are always preserved. + set(ENV{_XCODE_VERSION_INT} "${XCODE_VERSION_INT}") +elseif(DEFINED ENV{_XCODE_VERSION_INT}) + set(XCODE_VERSION_INT "$ENV{_XCODE_VERSION_INT}") +elseif(NOT DEFINED XCODE_VERSION_INT) + find_program(XCODEBUILD_EXECUTABLE xcodebuild) + if(NOT XCODEBUILD_EXECUTABLE) + message(FATAL_ERROR "xcodebuild not found. Please install either the standalone commandline tools or Xcode.") + endif() + execute_process(COMMAND ${XCODEBUILD_EXECUTABLE} -version + OUTPUT_VARIABLE XCODE_VERSION_INT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION_INT "${XCODE_VERSION_INT}") + string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION_INT "${XCODE_VERSION_INT}") + set(XCODE_VERSION_INT "${XCODE_VERSION_INT}" CACHE INTERNAL "") +endif() + +# Assuming that xcode 12.0 is installed you most probably have ios sdk 14.0 or later installed (tested on Big Sur) +# if you don't set a deployment target it will be set the way you only get 64-bit builds +if(NOT DEFINED DEPLOYMENT_TARGET AND XCODE_VERSION_INT VERSION_GREATER 12.0) + # Temporarily fix the arm64 issues in CMake install-combined by excluding arm64 for simulator builds (needed for Apple Silicon...) + set(CMAKE_XCODE_ATTRIBUTE_EXCLUDED_ARCHS[sdk=iphonesimulator*] "arm64") +endif() + +# Check if the platform variable is set +if(DEFINED PLATFORM) + # Environment variables are always preserved. + set(ENV{_PLATFORM} "${PLATFORM}") +elseif(DEFINED ENV{_PLATFORM}) + set(PLATFORM "$ENV{_PLATFORM}") +elseif(NOT DEFINED PLATFORM) + message(FATAL_ERROR "PLATFORM argument not set. Bailing configure since I don't know what target you want to build for!") +endif () + +if(PLATFORM MATCHES ".*COMBINED" AND NOT CMAKE_GENERATOR MATCHES "Xcode") + message(FATAL_ERROR "The combined builds support requires Xcode to be used as generator via '-G Xcode' command-line argument in CMake") +endif() + +# Safeguard that the platform value is set and is one of the supported values +list(FIND _supported_platforms ${PLATFORM} contains_PLATFORM) +if("${contains_PLATFORM}" EQUAL "-1") + string(REPLACE ";" "\n * " _supported_platforms_formatted "${_supported_platforms}") + message(FATAL_ERROR " Invalid PLATFORM specified! Current value: ${PLATFORM}.\n" + " Supported PLATFORM values: \n * ${_supported_platforms_formatted}") +endif() + +# Check if Apple Silicon is supported +if(PLATFORM MATCHES "^(MAC_ARM64)$|^(MAC_CATALYST_ARM64)$" AND ${CMAKE_VERSION} VERSION_LESS "3.19.5") + message(FATAL_ERROR "Apple Silicon builds requires a minimum of CMake 3.19.5") +endif() + +# Touch toolchain variable to suppress "unused variable" warning. +# This happens if CMake is invoked with the same command line the second time. +if(CMAKE_TOOLCHAIN_FILE) +endif() + +# Fix for PThread library not in path +set(CMAKE_THREAD_LIBS_INIT "-lpthread") +set(CMAKE_HAVE_THREADS_LIBRARY 1) +set(CMAKE_USE_WIN32_THREADS_INIT 0) +set(CMAKE_USE_PTHREADS_INIT 1) + +# Specify named language support defaults. +if(NOT DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16") + set(NAMED_LANGUAGE_SUPPORT ON) + message(STATUS "[DEFAULTS] Using explicit named language support! E.g., enable_language(CXX) is needed in the project files.") +elseif(NOT DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_LESS "3.16") + set(NAMED_LANGUAGE_SUPPORT OFF) + message(STATUS "[DEFAULTS] Disabling explicit named language support. Falling back to legacy behaviour.") +elseif(DEFINED NAMED_LANGUAGE_SUPPORT AND ${CMAKE_VERSION} VERSION_LESS "3.16") + message(FATAL_ERROR "CMake named language support for OBJC and OBJCXX was added in CMake 3.16.") +endif() +set(NAMED_LANGUAGE_SUPPORT_INT ${NAMED_LANGUAGE_SUPPORT} CACHE BOOL + "Whether or not to enable explicit named language support" FORCE) + +# Specify minimum version of deployment target. +if(NOT DEFINED DEPLOYMENT_TARGET) + if (PLATFORM MATCHES "WATCHOS") + # Unless specified, SDK version 4.0 is used by default as minimum target version (watchOS). + set(DEPLOYMENT_TARGET "4.0") + elseif(PLATFORM STREQUAL "MAC") + # Unless specified, SDK version 10.13 (High sierra) is used by default as minimum target version (macos). + set(DEPLOYMENT_TARGET "10.13") + elseif(PLATFORM STREQUAL "MAC_ARM64") + # Unless specified, SDK version 11.0 (Big Sur) is used by default as minimum target version (macos on arm). + set(DEPLOYMENT_TARGET "11.0") + elseif(PLATFORM STREQUAL "MAC_CATALYST" OR PLATFORM STREQUAL "MAC_CATALYST_ARM64") + # Unless specified, SDK version 13.0 is used by default as minimum target version (mac catalyst minimum requirement). + set(DEPLOYMENT_TARGET "13.1") + else() + # Unless specified, SDK version 11.0 is used by default as minimum target version (iOS, tvOS). + set(DEPLOYMENT_TARGET "11.0") + endif() + message(STATUS "[DEFAULTS] Using the default min-version since DEPLOYMENT_TARGET not provided!") +elseif(DEFINED DEPLOYMENT_TARGET AND PLATFORM MATCHES "^MAC_CATALYST" AND ${DEPLOYMENT_TARGET} VERSION_LESS "13.1") + message(FATAL_ERROR "Mac Catalyst builds requires a minimum deployment target of 13.1!") +endif() + +# Store the DEPLOYMENT_TARGET in the cache +set(DEPLOYMENT_TARGET "${DEPLOYMENT_TARGET}" CACHE INTERNAL "") + +# Handle the case where we are targeting iOS and a version above 10.3.4 (32-bit support dropped officially) +if(PLATFORM STREQUAL "OS" AND DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.3.4) + set(PLATFORM "OS64") + message(STATUS "Targeting minimum SDK version ${DEPLOYMENT_TARGET}. Dropping 32-bit support.") +elseif(PLATFORM STREQUAL "SIMULATOR" AND DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.3.4) + set(PLATFORM "SIMULATOR64") + message(STATUS "Targeting minimum SDK version ${DEPLOYMENT_TARGET}. Dropping 32-bit support.") +endif() + +set(PLATFORM_INT "${PLATFORM}") + +if(DEFINED ARCHS) + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") +endif() + +# Determine the platform name and architectures for use in xcodebuild commands +# from the specified PLATFORM_INT name. +if(PLATFORM_INT STREQUAL "OS") + set(SDK_NAME iphoneos) + if(NOT ARCHS) + set(ARCHS armv7 armv7s arm64) + set(APPLE_TARGET_TRIPLE_INT arm-apple-ios${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "OS64") + set(SDK_NAME iphoneos) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS arm64) # FIXME: Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example + else() + set(ARCHS arm64) + endif() + set(APPLE_TARGET_TRIPLE_INT aarch64-apple-ios${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "OS64COMBINED") + set(SDK_NAME iphoneos) + if(MODERN_CMAKE) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS arm64 x86_64) # FIXME: Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64") + else() + set(ARCHS arm64 x86_64) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64") + endif() + set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-ios${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the OS64COMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR") + set(SDK_NAME iphonesimulator) + if(NOT ARCHS) + set(ARCHS i386) + set(APPLE_TARGET_TRIPLE_INT i386-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() + message(DEPRECATION "SIMULATOR IS DEPRECATED. Consider using SIMULATOR64 instead.") +elseif(PLATFORM_INT STREQUAL "SIMULATOR64") + set(SDK_NAME iphonesimulator) + if(NOT ARCHS) + set(ARCHS x86_64) + set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATORARM64") + set(SDK_NAME iphonesimulator) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT aarch64-apple-ios${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "TVOS") + set(SDK_NAME appletvos) + if(NOT ARCHS) + set(ARCHS arm64) + set(APPLE_TARGET_TRIPLE_INT aarch64-apple-tvos${DEPLOYMENT_TARGET}) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}) + endif() +elseif (PLATFORM_INT STREQUAL "TVOSCOMBINED") + set(SDK_NAME appletvos) + if(MODERN_CMAKE) + if(NOT ARCHS) + set(ARCHS arm64 x86_64) + set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-tvos${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=appletvos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=appletvsimulator*] "x86_64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=appletvos*] "arm64") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=appletvsimulator*] "x86_64") + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the TVOSCOMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR_TVOS") + set(SDK_NAME appletvsimulator) + if(NOT ARCHS) + set(ARCHS x86_64) + set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "WATCHOS") + set(SDK_NAME watchos) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS armv7k arm64_32) + set(APPLE_TARGET_TRIPLE_INT aarch64_32-apple-watchos${DEPLOYMENT_TARGET}) + else() + set(ARCHS armv7k) + set(APPLE_TARGET_TRIPLE_INT arm-apple-watchos${DEPLOYMENT_TARGET}) + endif() + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}) + endif() +elseif(PLATFORM_INT STREQUAL "WATCHOSCOMBINED") + set(SDK_NAME watchos) + if(MODERN_CMAKE) + if(NOT ARCHS) + if (XCODE_VERSION_INT VERSION_GREATER 10.0) + set(ARCHS armv7k arm64_32 i386) + set(APPLE_TARGET_TRIPLE_INT aarch64_32-i386-apple-watchos${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchos*] "armv7k arm64_32") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchsimulator*] "i386") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchos*] "armv7k arm64_32") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchsimulator*] "i386") + else() + set(ARCHS armv7k i386) + set(APPLE_TARGET_TRIPLE_INT arm-i386-apple-watchos${DEPLOYMENT_TARGET}) + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchos*] "armv7k") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchsimulator*] "i386") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchos*] "armv7k") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchsimulator*] "i386") + endif() + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}) + endif() + else() + message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the WATCHOSCOMBINED setting work") + endif() +elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") + set(SDK_NAME watchsimulator) + if(NOT ARCHS) + set(ARCHS i386) + set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos${DEPLOYMENT_TARGET}-simulator) + else() + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}-simulator) + endif() +elseif(PLATFORM_INT STREQUAL "MAC" OR PLATFORM_INT STREQUAL "MAC_CATALYST") + set(SDK_NAME macosx) + if(NOT ARCHS) + set(ARCHS x86_64) + endif() + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") + if(PLATFORM_INT STREQUAL "MAC") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET}) + elseif(PLATFORM_INT STREQUAL "MAC_CATALYST") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi) + endif() +elseif(PLATFORM_INT MATCHES "^(MAC_ARM64)$|^(MAC_CATALYST_ARM64)$") + set(SDK_NAME macosx) + if(NOT ARCHS) + set(ARCHS arm64) + endif() + string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}") + if(PLATFORM_INT STREQUAL "MAC_ARM64") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET}) + elseif(PLATFORM_INT STREQUAL "MAC_CATALYST_ARM64") + set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi) + endif() +else() + message(FATAL_ERROR "Invalid PLATFORM: ${PLATFORM_INT}") +endif() + +string(REPLACE ";" " " ARCHS_SPACED "${ARCHS}") + +if(MODERN_CMAKE AND PLATFORM_INT MATCHES ".*COMBINED" AND NOT CMAKE_GENERATOR MATCHES "Xcode") + message(FATAL_ERROR "The COMBINED options only work with Xcode generator, -G Xcode") +endif() + +if(CMAKE_GENERATOR MATCHES "Xcode" AND PLATFORM_INT MATCHES "^MAC_CATALYST") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") + set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx") + set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst") + if(NOT DEFINED MACOSX_DEPLOYMENT_TARGET) + set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15") + else() + set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}") + endif() +elseif(CMAKE_GENERATOR MATCHES "Xcode") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") + set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${DEPLOYMENT_TARGET}") + if(NOT PLATFORM_INT MATCHES ".*COMBINED") + set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=${SDK_NAME}*] "${ARCHS_SPACED}") + set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=${SDK_NAME}*] "${ARCHS_SPACED}") + endif() +endif() + +# If user did not specify the SDK root to use, then query xcodebuild for it. +if(DEFINED CMAKE_OSX_SYSROOT_INT) + # Environment variables are always preserved. + set(ENV{_CMAKE_OSX_SYSROOT_INT} "${CMAKE_OSX_SYSROOT_INT}") +elseif(DEFINED ENV{_CMAKE_OSX_SYSROOT_INT}) + set(CMAKE_OSX_SYSROOT_INT "$ENV{_CMAKE_OSX_SYSROOT_INT}") +elseif(NOT DEFINED CMAKE_OSX_SYSROOT_INT) + execute_process(COMMAND ${XCODEBUILD_EXECUTABLE} -version -sdk ${SDK_NAME} Path + OUTPUT_VARIABLE CMAKE_OSX_SYSROOT_INT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +if (NOT DEFINED CMAKE_OSX_SYSROOT_INT AND NOT DEFINED CMAKE_OSX_SYSROOT) + message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain" + "is pointing to the correct path. Please run:" + "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" + "and see if that fixes the problem for you.") + message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} " + "does not exist.") +elseif(DEFINED CMAKE_OSX_SYSROOT_INT) + set(CMAKE_OSX_SYSROOT_INT "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") + # Specify the location or name of the platform SDK to be used in CMAKE_OSX_SYSROOT. + set(CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") +endif() + +# Use bitcode or not +if(NOT DEFINED ENABLE_BITCODE AND NOT ARCHS MATCHES "((^|;|, )(i386|x86_64))+") + # Unless specified, enable bitcode support by default + message(STATUS "[DEFAULTS] Enabling bitcode support by default. ENABLE_BITCODE not provided!") + set(ENABLE_BITCODE ON) +elseif(NOT DEFINED ENABLE_BITCODE) + message(STATUS "[DEFAULTS] Disabling bitcode support by default on simulators. ENABLE_BITCODE not provided for override!") + set(ENABLE_BITCODE OFF) +endif() +set(ENABLE_BITCODE_INT ${ENABLE_BITCODE} CACHE BOOL + "Whether or not to enable bitcode" FORCE) +# Use ARC or not +if(NOT DEFINED ENABLE_ARC) + # Unless specified, enable ARC support by default + set(ENABLE_ARC ON) + message(STATUS "[DEFAULTS] Enabling ARC support by default. ENABLE_ARC not provided!") +endif() +set(ENABLE_ARC_INT ${ENABLE_ARC} CACHE BOOL "Whether or not to enable ARC" FORCE) +# Use hidden visibility or not +if(NOT DEFINED ENABLE_VISIBILITY) + # Unless specified, disable symbols visibility by default + set(ENABLE_VISIBILITY OFF) + message(STATUS "[DEFAULTS] Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!") +endif() +set(ENABLE_VISIBILITY_INT ${ENABLE_VISIBILITY} CACHE BOOL "Whether or not to hide symbols from the dynamic linker (-fvisibility=hidden)" FORCE) +# Set strict compiler checks or not +if(NOT DEFINED ENABLE_STRICT_TRY_COMPILE) + # Unless specified, disable strict try_compile() + set(ENABLE_STRICT_TRY_COMPILE ON) + message(STATUS "[DEFAULTS] Using strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided!") +endif() +set(ENABLE_STRICT_TRY_COMPILE_INT ${ENABLE_STRICT_TRY_COMPILE} CACHE BOOL + "Whether or not to use strict compiler checks" FORCE) + +# Get the SDK version information. +if(DEFINED SDK_VERSION) + # Environment variables are always preserved. + set(ENV{_SDK_VERSION} "${SDK_VERSION}") +elseif(DEFINED ENV{_SDK_VERSION}) + set(SDK_VERSION "$ENV{_SDK_VERSION}") +elseif(NOT DEFINED SDK_VERSION) + execute_process(COMMAND ${XCODEBUILD_EXECUTABLE} -sdk ${CMAKE_OSX_SYSROOT_INT} -version SDKVersion + OUTPUT_VARIABLE SDK_VERSION + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +# Find the Developer root for the specific iOS platform being compiled for +# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in +# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain +# this information from xcrun or xcodebuild. +if (NOT DEFINED CMAKE_DEVELOPER_ROOT AND NOT CMAKE_GENERATOR MATCHES "Xcode") + get_filename_component(PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT_INT} PATH) + get_filename_component(CMAKE_DEVELOPER_ROOT ${PLATFORM_SDK_DIR} PATH) + if (NOT EXISTS "${CMAKE_DEVELOPER_ROOT}") + message(FATAL_ERROR "Invalid CMAKE_DEVELOPER_ROOT: ${CMAKE_DEVELOPER_ROOT} does not exist.") + endif() +endif() + +# Find the C & C++ compilers for the specified SDK. +if(DEFINED CMAKE_C_COMPILER) + # Environment variables are always preserved. + set(ENV{_CMAKE_C_COMPILER} "${CMAKE_C_COMPILER}") +elseif(DEFINED ENV{_CMAKE_C_COMPILER}) + set(CMAKE_C_COMPILER "$ENV{_CMAKE_C_COMPILER}") + set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) +elseif(NOT DEFINED CMAKE_C_COMPILER) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find clang + OUTPUT_VARIABLE CMAKE_C_COMPILER + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) +endif() +if(DEFINED CMAKE_CXX_COMPILER) + # Environment variables are always preserved. + set(ENV{_CMAKE_CXX_COMPILER} "${CMAKE_CXX_COMPILER}") +elseif(DEFINED ENV{_CMAKE_CXX_COMPILER}) + set(CMAKE_CXX_COMPILER "$ENV{_CMAKE_CXX_COMPILER}") +elseif(NOT DEFINED CMAKE_CXX_COMPILER) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find clang++ + OUTPUT_VARIABLE CMAKE_CXX_COMPILER + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() +# Find (Apple's) libtool. +if(DEFINED BUILD_LIBTOOL) + # Environment variables are always preserved. + set(ENV{_BUILD_LIBTOOL} "${BUILD_LIBTOOL}") +elseif(DEFINED ENV{_BUILD_LIBTOOL}) + set(BUILD_LIBTOOL "$ENV{_BUILD_LIBTOOL}") +elseif(NOT DEFINED BUILD_LIBTOOL) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find libtool + OUTPUT_VARIABLE BUILD_LIBTOOL + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() +# Find the toolchain's provided install_name_tool if none is found on the host +if(DEFINED CMAKE_INSTALL_NAME_TOOL) + # Environment variables are always preserved. + set(ENV{_CMAKE_INSTALL_NAME_TOOL} "${CMAKE_INSTALL_NAME_TOOL}") +elseif(DEFINED ENV{_CMAKE_INSTALL_NAME_TOOL}) + set(CMAKE_INSTALL_NAME_TOOL "$ENV{_CMAKE_INSTALL_NAME_TOOL}") +elseif(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find install_name_tool + OUTPUT_VARIABLE CMAKE_INSTALL_NAME_TOOL_INT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CMAKE_INSTALL_NAME_TOOL ${CMAKE_INSTALL_NAME_TOOL_INT} CACHE INTERNAL "") +endif() + +# Configure libtool to be used instead of ar + ranlib to build static libraries. +# This is required on Xcode 7+, but should also work on previous versions of +# Xcode. +get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES) +foreach(lang ${languages}) + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "${BUILD_LIBTOOL} -static -o " CACHE INTERNAL "") +endforeach() + +# CMake 3.14+ support building for iOS, watchOS and tvOS out of the box. +if(MODERN_CMAKE) + if(SDK_NAME MATCHES "iphone") + set(CMAKE_SYSTEM_NAME iOS) + elseif(SDK_NAME MATCHES "macosx") + set(CMAKE_SYSTEM_NAME Darwin) + elseif(SDK_NAME MATCHES "appletv") + set(CMAKE_SYSTEM_NAME tvOS) + elseif(SDK_NAME MATCHES "watch") + set(CMAKE_SYSTEM_NAME watchOS) + endif() + # Provide flags for a combined FAT library build on newer CMake versions + if(PLATFORM_INT MATCHES ".*COMBINED") + set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO") + set(CMAKE_IOS_INSTALL_COMBINED YES) + endif() +elseif(NOT DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.10") + # Legacy code path prior to CMake 3.14 or fallback if no CMAKE_SYSTEM_NAME specified + set(CMAKE_SYSTEM_NAME iOS) +elseif(NOT DEFINED CMAKE_SYSTEM_NAME) + # Legacy code path prior to CMake 3.14 or fallback if no CMAKE_SYSTEM_NAME specified + set(CMAKE_SYSTEM_NAME Darwin) +endif() +# Standard settings. +set(CMAKE_SYSTEM_VERSION ${SDK_VERSION} CACHE INTERNAL "") +set(UNIX ON CACHE BOOL "") +set(APPLE ON CACHE BOOL "") +if(PLATFORM STREQUAL "MAC" OR PLATFORM STREQUAL "MAC_ARM64") + set(IOS OFF CACHE BOOL "") + set(MACOS ON CACHE BOOL "") +elseif(PLATFORM STREQUAL "MAC_CATALYST" OR PLATFORM STREQUAL "MAC_CATALYST_ARM64") + set(IOS ON CACHE BOOL "") + set(MACOS ON CACHE BOOL "") +else() + set(IOS ON CACHE BOOL "") +endif() +set(CMAKE_AR ar CACHE FILEPATH "" FORCE) +set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) +set(CMAKE_STRIP strip CACHE FILEPATH "" FORCE) +# Set the architectures for which to build. +set(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE INTERNAL "") +# Change the type of target generated for try_compile() so it'll work when cross-compiling, weak compiler checks +if(NOT ENABLE_STRICT_TRY_COMPILE_INT) + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +endif() +# All iOS/Darwin specific settings - some may be redundant. +set(CMAKE_MACOSX_BUNDLE YES) +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_SHARED_LIBRARY_PREFIX "lib") +set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") +set(CMAKE_SHARED_MODULE_PREFIX "lib") +set(CMAKE_SHARED_MODULE_SUFFIX ".so") +set(CMAKE_C_COMPILER_ABI ELF) +set(CMAKE_CXX_COMPILER_ABI ELF) +set(CMAKE_C_HAS_ISYSROOT 1) +set(CMAKE_CXX_HAS_ISYSROOT 1) +set(CMAKE_MODULE_EXISTS 1) +set(CMAKE_DL_LIBS "") +set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") +set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") +set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") + +if(ARCHS MATCHES "((^|;|, )(arm64|arm64e|x86_64))+") + set(CMAKE_C_SIZEOF_DATA_PTR 8) + set(CMAKE_CXX_SIZEOF_DATA_PTR 8) + if(ARCHS MATCHES "((^|;|, )(arm64|arm64e))+") + set(CMAKE_SYSTEM_PROCESSOR "aarch64") + else() + set(CMAKE_SYSTEM_PROCESSOR "x86_64") + endif() +else() + set(CMAKE_C_SIZEOF_DATA_PTR 4) + set(CMAKE_CXX_SIZEOF_DATA_PTR 4) + set(CMAKE_SYSTEM_PROCESSOR "arm") +endif() + +# Note that only Xcode 7+ supports the newer more specific: +# -m${SDK_NAME}-version-min flags, older versions of Xcode use: +# -m(ios/ios-simulator)-version-min instead. +if(${CMAKE_VERSION} VERSION_LESS "3.11") + if(PLATFORM_INT STREQUAL "OS" OR PLATFORM_INT STREQUAL "OS64") + if(XCODE_VERSION_INT VERSION_LESS 7.0) + set(SDK_NAME_VERSION_FLAGS + "-mios-version-min=${DEPLOYMENT_TARGET}") + else() + # Xcode 7.0+ uses flags we can build directly from SDK_NAME. + set(SDK_NAME_VERSION_FLAGS + "-m${SDK_NAME}-version-min=${DEPLOYMENT_TARGET}") + endif() + elseif(PLATFORM_INT STREQUAL "TVOS") + set(SDK_NAME_VERSION_FLAGS + "-mtvos-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "SIMULATOR_TVOS") + set(SDK_NAME_VERSION_FLAGS + "-mtvos-simulator-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "WATCHOS") + set(SDK_NAME_VERSION_FLAGS + "-mwatchos-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") + set(SDK_NAME_VERSION_FLAGS + "-mwatchos-simulator-version-min=${DEPLOYMENT_TARGET}") + elseif(PLATFORM_INT STREQUAL "MAC") + set(SDK_NAME_VERSION_FLAGS + "-mmacosx-version-min=${DEPLOYMENT_TARGET}") + else() + # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min. + set(SDK_NAME_VERSION_FLAGS + "-mios-simulator-version-min=${DEPLOYMENT_TARGET}") + endif() +elseif(NOT PLATFORM_INT MATCHES "^MAC_CATALYST") + # Newer versions of CMake sets the version min flags correctly, skip this for Mac Catalyst targets + set(CMAKE_OSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET}) +endif() + +if(DEFINED APPLE_TARGET_TRIPLE_INT) + set(APPLE_TARGET_TRIPLE ${APPLE_TARGET_TRIPLE_INT} CACHE INTERNAL "") + set(CMAKE_C_COMPILER_TARGET ${APPLE_TARGET_TRIPLE}) + set(CMAKE_CXX_COMPILER_TARGET ${APPLE_TARGET_TRIPLE}) + set(CMAKE_ASM_COMPILER_TARGET ${APPLE_TARGET_TRIPLE}) +endif() + +if(PLATFORM_INT MATCHES "^MAC_CATALYST") + set(C_TARGET_FLAGS "-isystem ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/usr/include -iframework ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/System/Library/Frameworks") +endif() + +if(ENABLE_BITCODE_INT) + set(BITCODE "-fembed-bitcode") + set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES") +else() + set(BITCODE "") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") +endif() + +if(ENABLE_ARC_INT) + set(FOBJC_ARC "-fobjc-arc") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "YES") +else() + set(FOBJC_ARC "-fno-objc-arc") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "NO") +endif() + +if(NAMED_LANGUAGE_SUPPORT_INT) + set(OBJC_VARS "-fobjc-abi-version=2 -DOBJC_OLD_DISPATCH_PROTOTYPES=0") + set(OBJC_LEGACY_VARS "") +else() + set(OBJC_VARS "") + set(OBJC_LEGACY_VARS "-fobjc-abi-version=2 -DOBJC_OLD_DISPATCH_PROTOTYPES=0") +endif() + +if(NOT ENABLE_VISIBILITY_INT) + foreach(lang ${languages}) + set(CMAKE_${lang}_VISIBILITY_PRESET "hidden" CACHE INTERNAL "") + endforeach() + set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES") + set(VISIBILITY "-fvisibility=hidden -fvisibility-inlines-hidden") +else() + foreach(lang ${languages}) + set(CMAKE_${lang}_VISIBILITY_PRESET "default" CACHE INTERNAL "") + endforeach() + set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "NO") + set(VISIBILITY "-fvisibility=default") +endif() + +if(DEFINED APPLE_TARGET_TRIPLE) + set(APPLE_TARGET_TRIPLE_FLAG "-target ${APPLE_TARGET_TRIPLE}") +endif() + +#Check if Xcode generator is used, since that will handle these flags automagically +if(CMAKE_GENERATOR MATCHES "Xcode") + message(STATUS "Not setting any manual command-line buildflags, since Xcode is selected as generator. Modifying the Xcode build-settings directly instead.") +else() + set(CMAKE_C_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${OBJC_LEGACY_VARS} ${BITCODE} ${VISIBILITY} ${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS_DEBUG "-O0 -g ${CMAKE_C_FLAGS_DEBUG}") + set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_C_FLAGS_MINSIZEREL}") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_C_FLAGS_RELWITHDEBINFO}") + set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_CXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${OBJC_LEGACY_VARS} ${BITCODE} ${VISIBILITY} ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g ${CMAKE_CXX_FLAGS_DEBUG}") + set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_CXX_FLAGS_MINSIZEREL}") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_CXX_FLAGS_RELEASE}") + if(NAMED_LANGUAGE_SUPPORT_INT) + set(CMAKE_OBJC_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} ${FOBJC_ARC} ${OBJC_VARS} ${CMAKE_OBJC_FLAGS}") + set(CMAKE_OBJC_FLAGS_DEBUG "-O0 -g ${CMAKE_OBJC_FLAGS_DEBUG}") + set(CMAKE_OBJC_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_OBJC_FLAGS_MINSIZEREL}") + set(CMAKE_OBJC_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_OBJC_FLAGS_RELWITHDEBINFO}") + set(CMAKE_OBJC_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_OBJC_FLAGS_RELEASE}") + set(CMAKE_OBJCXX_FLAGS "${C_TARGET_FLAGS} ${APPLE_TARGET_TRIPLE_FLAG} ${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} ${FOBJC_ARC} ${OBJC_VARS} ${CMAKE_OBJCXX_FLAGS}") + set(CMAKE_OBJCXX_FLAGS_DEBUG "-O0 -g ${CMAKE_OBJCXX_FLAGS_DEBUG}") + set(CMAKE_OBJCXX_FLAGS_MINSIZEREL "-DNDEBUG -Os ${CMAKE_OBJCXX_FLAGS_MINSIZEREL}") + set(CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g ${CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO}") + set(CMAKE_OBJCXX_FLAGS_RELEASE "-DNDEBUG -O3 ${CMAKE_OBJCXX_FLAGS_RELEASE}") + endif() + set(CMAKE_C_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") + set(CMAKE_CXX_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") + if(NAMED_LANGUAGE_SUPPORT_INT) + set(CMAKE_OBJC_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_OBJC_LINK_FLAGS}") + set(CMAKE_OBJCXX_LINK_FLAGS "${C_TARGET_FLAGS} ${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_OBJCXX_LINK_FLAGS}") + endif() + set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp -arch ${CMAKE_OSX_ARCHITECTURES} ${APPLE_TARGET_TRIPLE_FLAG}") +endif() + +## Print status messages to inform of the current state +message(STATUS "Configuring ${SDK_NAME} build for platform: ${PLATFORM_INT}, architecture(s): ${ARCHS}") +message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT_INT}") +message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}") +message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}") +message(STATUS "Using libtool: ${BUILD_LIBTOOL}") +message(STATUS "Using install name tool: ${CMAKE_INSTALL_NAME_TOOL}") +if(DEFINED APPLE_TARGET_TRIPLE) + message(STATUS "Autoconf target triple: ${APPLE_TARGET_TRIPLE}") +endif() +message(STATUS "Using minimum deployment version: ${DEPLOYMENT_TARGET}" + " (SDK version: ${SDK_VERSION})") +if(MODERN_CMAKE) + message(STATUS "Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain!") + if(PLATFORM_INT MATCHES ".*COMBINED") + message(STATUS "Will combine built (static) artifacts into FAT lib...") + endif() +endif() +if(CMAKE_GENERATOR MATCHES "Xcode") + message(STATUS "Using Xcode version: ${XCODE_VERSION_INT}") +endif() +message(STATUS "CMake version: ${CMAKE_VERSION}") +if(DEFINED SDK_NAME_VERSION_FLAGS) + message(STATUS "Using version flags: ${SDK_NAME_VERSION_FLAGS}") +endif() +message(STATUS "Using a data_ptr size of: ${CMAKE_CXX_SIZEOF_DATA_PTR}") +if(ENABLE_BITCODE_INT) + message(STATUS "Bitcode: Enabled") +else() + message(STATUS "Bitcode: Disabled") +endif() + +if(ENABLE_ARC_INT) + message(STATUS "ARC: Enabled") +else() + message(STATUS "ARC: Disabled") +endif() + +if(ENABLE_VISIBILITY_INT) + message(STATUS "Hiding symbols: Disabled") +else() + message(STATUS "Hiding symbols: Enabled") +endif() + +# Set global properties +set_property(GLOBAL PROPERTY PLATFORM "${PLATFORM}") +set_property(GLOBAL PROPERTY APPLE_TARGET_TRIPLE "${APPLE_TARGET_TRIPLE_INT}") +set_property(GLOBAL PROPERTY SDK_VERSION "${SDK_VERSION}") +set_property(GLOBAL PROPERTY XCODE_VERSION "${XCODE_VERSION_INT}") +set_property(GLOBAL PROPERTY OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") + +# Export configurable variables for the try_compile() command. +set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + PLATFORM + XCODE_VERSION_INT + SDK_VERSION + NAMED_LANGUAGE_SUPPORT + DEPLOYMENT_TARGET + CMAKE_DEVELOPER_ROOT + CMAKE_OSX_SYSROOT_INT + ENABLE_BITCODE + ENABLE_ARC + CMAKE_ASM_COMPILER + CMAKE_C_COMPILER + CMAKE_C_COMPILER_TARGET + CMAKE_CXX_COMPILER + CMAKE_CXX_COMPILER_TARGET + BUILD_LIBTOOL + CMAKE_INSTALL_NAME_TOOL + CMAKE_C_FLAGS + CMAKE_C_DEBUG + CMAKE_C_MINSIZEREL + CMAKE_C_RELWITHDEBINFO + CMAKE_C_RELEASE + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_LINK_FLAGS + CMAKE_CXX_LINK_FLAGS + CMAKE_ASM_FLAGS +) + +if(NAMED_LANGUAGE_SUPPORT_INT) + list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + CMAKE_OBJC_FLAGS + CMAKE_OBJC_DEBUG + CMAKE_OBJC_MINSIZEREL + CMAKE_OBJC_RELWITHDEBINFO + CMAKE_OBJC_RELEASE + CMAKE_OBJCXX_FLAGS + CMAKE_OBJCXX_DEBUG + CMAKE_OBJCXX_MINSIZEREL + CMAKE_OBJCXX_RELWITHDEBINFO + CMAKE_OBJCXX_RELEASE + CMAKE_OBJC_LINK_FLAGS + CMAKE_OBJCXX_LINK_FLAGS + ) +endif() + +set(CMAKE_PLATFORM_HAS_INSTALLNAME 1) +set(CMAKE_SHARED_LINKER_FLAGS "-rpath @executable_path/Frameworks -rpath @loader_path/Frameworks") +set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") +set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a") +set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") + +# Set the find root to the SDK developer roots. +# Note: CMAKE_FIND_ROOT_PATH is only useful when cross-compiling. Thus, do not set on macOS builds. +if(NOT PLATFORM_INT MATCHES "^MAC.*$") + list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") + set(CMAKE_IGNORE_PATH "/System/Library/Frameworks;/usr/local/lib" CACHE INTERNAL "") +endif() + +# Default to searching for frameworks first. +set(CMAKE_FIND_FRAMEWORK FIRST) + +# Set up the default search directories for frameworks. +if(PLATFORM_INT MATCHES "^MAC_CATALYST") + set(CMAKE_FRAMEWORK_PATH + ${CMAKE_DEVELOPER_ROOT}/Library/PrivateFrameworks + ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks + ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/System/Library/Frameworks + ${CMAKE_FRAMEWORK_PATH} CACHE INTERNAL "") +else() + set(CMAKE_FRAMEWORK_PATH + ${CMAKE_DEVELOPER_ROOT}/Library/PrivateFrameworks + ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks + ${CMAKE_FRAMEWORK_PATH} CACHE INTERNAL "") +endif() + +# By default, search both the specified iOS SDK and the remainder of the host filesystem. +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE INTERNAL "") +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH CACHE INTERNAL "") +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH CACHE INTERNAL "") +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH CACHE INTERNAL "") +endif() + +# +# Some helper-macros below to simplify and beautify the CMakeFile +# + +# This little macro lets you set any Xcode specific property. +macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION) + set(XCODE_RELVERSION_I "${XCODE_RELVERSION}") + if(XCODE_RELVERSION_I STREQUAL "All") + set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}") + else() + set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}") + endif() +endmacro(set_xcode_property) + +# This macro lets you find executable programs on the host system. +macro(find_host_package) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) + set(_TOOLCHAIN_IOS ${IOS}) + set(IOS OFF) + find_package(${ARGN}) + set(IOS ${_TOOLCHAIN_IOS}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) +endmacro(find_host_package) diff --git a/core/base/CCConsole.cpp b/core/base/CCConsole.cpp index 40714d7652..7857ea507c 100644 --- a/core/base/CCConsole.cpp +++ b/core/base/CCConsole.cpp @@ -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" diff --git a/core/platform/android/javaactivity-android.cpp b/core/platform/android/javaactivity-android.cpp index 25f40bca3a..555c6c3bb0 100644 --- a/core/platform/android/javaactivity-android.cpp +++ b/core/platform/android/javaactivity-android.cpp @@ -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(); } diff --git a/core/platform/ios/CCEAGLView-ios.mm b/core/platform/ios/CCEAGLView-ios.mm index 760be68d9d..d7e2087252 100644 --- a/core/platform/ios/CCEAGLView-ios.mm +++ b/core/platform/ios/CCEAGLView-ios.mm @@ -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 diff --git a/core/platform/ios/CCGLViewImpl-ios.h b/core/platform/ios/CCGLViewImpl-ios.h index d4d6c43d88..804597e08b 100644 --- a/core/platform/ios/CCGLViewImpl-ios.h +++ b/core/platform/ios/CCGLViewImpl-ios.h @@ -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 diff --git a/core/platform/ios/CCGLViewImpl-ios.mm b/core/platform/ios/CCGLViewImpl-ios.mm index 465a798cb3..05c956a5a7 100644 --- a/core/platform/ios/CCGLViewImpl-ios.mm +++ b/core/platform/ios/CCGLViewImpl-ios.mm @@ -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); diff --git a/core/platform/linux/CCApplication-linux.cpp b/core/platform/linux/CCApplication-linux.cpp index e92e2d7968..7b861b670f 100644 --- a/core/platform/linux/CCApplication-linux.cpp +++ b/core/platform/linux/CCApplication-linux.cpp @@ -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; } diff --git a/core/platform/mac/CCApplication-mac.mm b/core/platform/mac/CCApplication-mac.mm index 3a00eba13e..662e29cbd8 100644 --- a/core/platform/mac/CCApplication-mac.mm +++ b/core/platform/mac/CCApplication-mac.mm @@ -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; } diff --git a/core/platform/mac/CCCommon-mac.mm b/core/platform/mac/CCCommon-mac.mm index 3fd04f41d5..bc398fd76b 100644 --- a/core/platform/mac/CCCommon-mac.mm +++ b/core/platform/mac/CCCommon-mac.mm @@ -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]; } diff --git a/core/platform/win32/CCApplication-win32.cpp b/core/platform/win32/CCApplication-win32.cpp index f18ae181d1..bfdc508c2d 100644 --- a/core/platform/win32/CCApplication-win32.cpp +++ b/core/platform/win32/CCApplication-win32.cpp @@ -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 diff --git a/core/ui/CMakeLists.txt b/core/ui/CMakeLists.txt index e18184e932..53e778cdea 100644 --- a/core/ui/CMakeLists.txt +++ b/core/ui/CMakeLists.txt @@ -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 diff --git a/core/ui/LayoutHelper.cpp b/core/ui/LayoutHelper.cpp index 05da316199..c64d380f79 100644 --- a/core/ui/LayoutHelper.cpp +++ b/core/ui/LayoutHelper.cpp @@ -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(); diff --git a/core/ui/UIEditBox/Mac/CCUIEditBoxMac.mm b/core/ui/UIEditBox/Mac/CCUIEditBoxMac.mm index 2ab420cf0e..fcc61b23bf 100644 --- a/core/ui/UIEditBox/Mac/CCUIEditBoxMac.mm +++ b/core/ui/UIEditBox/Mac/CCUIEditBoxMac.mm @@ -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 diff --git a/core/ui/UIEditBox/UIEditBoxImpl-ios.mm b/core/ui/UIEditBox/UIEditBoxImpl-ios.mm index b14ba4dd79..bf0397e2b6 100644 --- a/core/ui/UIEditBox/UIEditBoxImpl-ios.mm +++ b/core/ui/UIEditBox/UIEditBoxImpl-ios.mm @@ -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(ax::Director::getInstance()->getOpenGLView()->getEAGLView()); - float retinaFactor = eaglview.contentScaleFactor; + CCEAGLView* eaglView = static_cast(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) { diff --git a/core/ui/UIEditBox/UIEditBoxImpl-mac.mm b/core/ui/UIEditBox/UIEditBoxImpl-mac.mm index 9a7887d654..22543bf657 100644 --- a/core/ui/UIEditBox/UIEditBoxImpl-mac.mm +++ b/core/ui/UIEditBox/UIEditBoxImpl-mac.mm @@ -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) { diff --git a/core/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm b/core/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm index 5a716a66be..1f4b183f49 100644 --- a/core/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm +++ b/core/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm @@ -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]; } diff --git a/core/ui/UIEditBox/iOS/CCUIMultilineTextField.mm b/core/ui/UIEditBox/iOS/CCUIMultilineTextField.mm index bb938e35de..3b24de4307 100644 --- a/core/ui/UIEditBox/iOS/CCUIMultilineTextField.mm +++ b/core/ui/UIEditBox/iOS/CCUIMultilineTextField.mm @@ -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); } diff --git a/core/ui/UIEditBox/iOS/CCUISingleLineTextField.mm b/core/ui/UIEditBox/iOS/CCUISingleLineTextField.mm index 71eb753553..f01361f5b0 100644 --- a/core/ui/UIEditBox/iOS/CCUISingleLineTextField.mm +++ b/core/ui/UIEditBox/iOS/CCUISingleLineTextField.mm @@ -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); } diff --git a/core/ui/UILayout.cpp b/core/ui/UILayout.cpp index d1a14c79c3..3987126170 100644 --- a/core/ui/UILayout.cpp +++ b/core/ui/UILayout.cpp @@ -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); } } diff --git a/core/ui/UIScrollView.cpp b/core/ui/UIScrollView.cpp index 88703bc28c..f18bba585c 100644 --- a/core/ui/UIScrollView.cpp +++ b/core/ui/UIScrollView.cpp @@ -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; } diff --git a/core/ui/UIVideoPlayer/UIVideoPlayer-ios.mm b/core/ui/UIVideoPlayer/UIVideoPlayer-ios.mm index 75a6a11f36..57ce24ca1a 100644 --- a/core/ui/UIVideoPlayer/UIVideoPlayer-ios.mm +++ b/core/ui/UIVideoPlayer/UIVideoPlayer-ios.mm @@ -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]; } diff --git a/core/ui/UIWebView/UIWebViewImpl-ios.mm b/core/ui/UIWebView/UIWebViewImpl-ios.mm index 3605437415..0a90e776d0 100644 --- a/core/ui/UIWebView/UIWebViewImpl-ios.mm +++ b/core/ui/UIWebView/UIWebViewImpl-ios.mm @@ -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]; } } diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index 9684e44f76..71fa80857b 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -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 { diff --git a/extensions/fairygui/display/FUIContainer.cpp b/extensions/fairygui/display/FUIContainer.cpp index a2ba71b8f5..4a56f187e5 100644 --- a/extensions/fairygui/display/FUIContainer.cpp +++ b/extensions/fairygui/display/FUIContainer.cpp @@ -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); diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt index ed1de8ef03..fbab2064dc 100644 --- a/templates/cpp-template-default/CMakeLists.txt +++ b/templates/cpp-template-default/CMakeLists.txt @@ -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() \ No newline at end of file +endif() diff --git a/templates/cpp-template-default/Classes/AppDelegate.cpp b/templates/cpp-template-default/Classes/AppDelegate.cpp index fbd67fe58c..f50a482a1a 100644 --- a/templates/cpp-template-default/Classes/AppDelegate.cpp +++ b/templates/cpp-template-default/Classes/AppDelegate.cpp @@ -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) { diff --git a/templates/cpp-template-default/axproj-template.json b/templates/cpp-template-default/axproj-template.json index 7e924a7aa7..5005cb7778 100644 --- a/templates/cpp-template-default/axproj-template.json +++ b/templates/cpp-template-default/axproj-template.json @@ -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" }, diff --git a/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm b/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm index 28c5b7e56b..3ffe805524 100644 --- a/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm +++ b/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm @@ -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(); diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png deleted file mode 100644 index a5b49ccbb1..0000000000 Binary files a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png and /dev/null differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm b/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm index a5ded72f81..7afae07746 100644 --- a/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm +++ b/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm @@ -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); } } diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 60% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Contents.json rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json index 51cbd32fe0..8e4b1753ce 100644 --- a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -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 } -} \ No newline at end of file +} diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000000..128675aeb2 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000000..928bee6570 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/Contents.json rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Info.plist b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Info.plist similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/Info.plist rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/Info.plist diff --git a/templates/cpp-template-default/proj.ios_mac/ios/LaunchScreen.storyboard b/templates/cpp-template-default/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard similarity index 100% rename from templates/cpp-template-default/proj.ios_mac/ios/LaunchScreen.storyboard rename to templates/cpp-template-default/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000..0407a30bfa --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json @@ -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 + } +} diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000000..5d09d3be41 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000000..dda6d337e3 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000000..93db39306b --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000000..707d2e02e4 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000000..242ab9b0f3 Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000000..3d278051ab Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000000..0d9a5d26eb --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000000..9d2b5cf5ee Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000000..5e42ab310c Binary files /dev/null and b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png differ diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Info.plist b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Info.plist new file mode 100644 index 0000000000..55da67af4f --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. + + diff --git a/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000000..b8319fd335 --- /dev/null +++ b/templates/cpp-template-default/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/lua-template-default/CMakeLists.txt b/templates/lua-template-default/CMakeLists.txt index 9623332c9e..c2390b1539 100644 --- a/templates/lua-template-default/CMakeLists.txt +++ b/templates/lua-template-default/CMakeLists.txt @@ -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") diff --git a/templates/lua-template-default/axproj-template.json b/templates/lua-template-default/axproj-template.json index d8ce414985..c7d019ce3f 100644 --- a/templates/lua-template-default/axproj-template.json +++ b/templates/lua-template-default/axproj-template.json @@ -89,7 +89,8 @@ "project_replace_ios_bundleid": { "src_bundle_id": "org.axys1.hellolua", "files": [ - "frameworks/runtime-src/proj.ios_mac/ios/Info.plist" + "frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist", + "frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Info.plist" ] } }, @@ -111,12 +112,12 @@ "replace_string": "height = 960," }, { - "file_path": "frameworks/runtime-src/proj.ios_mac/ios/Info.plist", + "file_path": "frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist", "pattern": "UIInterfaceOrientationLandscapeRight", "replace_string": "UIInterfaceOrientationPortrait" }, { - "file_path": "frameworks/runtime-src/proj.ios_mac/ios/Info.plist", + "file_path": "frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist", "pattern": "UIInterfaceOrientationLandscapeLeft", "replace_string": "UIInterfaceOrientationPortraitUpsideDown" }, diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm index 28c5b7e56b..3ffe805524 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm @@ -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(); diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png deleted file mode 100644 index a5b49ccbb1..0000000000 Binary files a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png and /dev/null differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm index 9550ce2961..f74e522971 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm @@ -93,15 +93,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); } } diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000000..5d09d3be41 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000000..dda6d337e3 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000000..93db39306b --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000000..707d2e02e4 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000000..242ab9b0f3 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000000..3d278051ab Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000000..0d9a5d26eb --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000000..9d2b5cf5ee Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000000..5e42ab310c Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/Contents.json rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json diff --git a/tests/live2d-tests/proj.ios_mac/ios/Info.plist b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Info.plist rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/LaunchScreen.storyboard b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/LaunchScreen.storyboard rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard diff --git a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 60% rename from templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Contents.json index 51cbd32fe0..8e4b1753ce 100644 --- a/templates/cpp-template-default/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Contents.json @@ -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 } -} \ No newline at end of file +} diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000000..128675aeb2 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000000..928bee6570 Binary files /dev/null and b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-29.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-29.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-50.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-50.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-57.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-57.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/Contents.json b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/Contents.json rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Info.plist similarity index 89% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist rename to templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Info.plist index 9460b4640a..6a5e22f8a6 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Info.plist +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Info.plist @@ -14,8 +14,6 @@ $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 - CFBundleVersion - 1 CFBundleName ${PROJECT_NAME} CFBundleShortVersionString @@ -24,19 +22,16 @@ APPL CFBundleSignature ???? + CFBundleVersion + 1 LSRequiresIPhoneOS + UIAppFonts + UILaunchStoryboardName LaunchScreen UIPrerenderedIcon - UIRequiredDeviceCapabilities - - accelerometer - - opengles-1 - - UIStatusBarHidden UISupportedInterfaceOrientations diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000000..b8319fd335 --- /dev/null +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index c1c66ccecb..02d250c846 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -70,11 +70,21 @@ elseif(APPLE) proj.ios/Classes/testsAppDelegate.h proj.ios/Classes/RootViewController.h ) - set(APP_UI_RES - proj.ios/LaunchScreen.storyboard - proj.ios/LaunchScreenBackground.png - proj.ios/Images.xcassets - ) + + if (TVOS) + set(APP_UI_RES + proj.ios/LaunchScreenBackground.png + proj.ios/targets/tvos/LaunchScreen.storyboard + proj.ios/targets/tvos/Images.xcassets + ) + else() + set(APP_UI_RES + proj.ios/LaunchScreenBackground.png + proj.ios/targets/ios/LaunchScreen.storyboard + proj.ios/targets/ios/Images.xcassets + ) + endif() + list(APPEND GAME_SOURCE proj.ios/main.m proj.ios/Classes/testsAppDelegate.mm @@ -565,8 +575,11 @@ if(APPLE) if(MACOSX) set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist") + elseif(TVOS) + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.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/Info.plist") + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/targets/ios/Info.plist") set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon") endif() @@ -585,7 +598,7 @@ endif() if(WINDOWS) # precompiled header. Compilation time speedup ~4x, but don't know how Ninja to support PCH yet and needs help from someone. - if(NOT CMAKE_GENERATOR STREQUAL "Ninja") + if(NOT CMAKE_GENERATOR STREQUAL "Ninja") target_sources(${APP_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Classes/precheader.cpp") set_target_properties(${APP_NAME} PROPERTIES COMPILE_FLAGS "/Yuprecheader.h /FIprecheader.h") set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/Classes/precheader.cpp" PROPERTIES COMPILE_FLAGS "/Ycprecheader.h") diff --git a/tests/cpp-tests/Classes/AppDelegate.cpp b/tests/cpp-tests/Classes/AppDelegate.cpp index ac4c25034f..4a0bd4c99f 100644 --- a/tests/cpp-tests/Classes/AppDelegate.cpp +++ b/tests/cpp-tests/Classes/AppDelegate.cpp @@ -73,15 +73,15 @@ bool AppDelegate::applicationDidFinishLaunching() // initialize director auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if (!glview) + auto glView = director->getOpenGLView(); + if (!glView) { std::string title = "Cpp Tests"; #ifndef NDEBUG title += " *Debug*", #endif - glview = GLViewImpl::createWithRect(title, Rect(0, 0, resourceSize.width, resourceSize.height)); - director->setOpenGLView(glview); + glView = GLViewImpl::createWithRect(title, Rect(0, 0, resourceSize.width, resourceSize.height)); + director->setOpenGLView(glView); } director->setStatsDisplay(true); @@ -92,7 +92,7 @@ bool AppDelegate::applicationDidFinishLaunching() director->setAnimationInterval(1.0f / 60); #endif - auto screenSize = glview->getFrameSize(); + auto screenSize = glView->getFrameSize(); auto fileUtils = FileUtils::getInstance(); std::vector searchPaths; @@ -116,7 +116,7 @@ bool AppDelegate::applicationDidFinishLaunching() fileUtils->setSearchPaths(searchPaths); - glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); + glView->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); // Enable Remote Console auto console = director->getConsole(); diff --git a/tests/cpp-tests/Classes/BaseTest.cpp b/tests/cpp-tests/Classes/BaseTest.cpp index f1298a171e..1d9ab03137 100644 --- a/tests/cpp-tests/Classes/BaseTest.cpp +++ b/tests/cpp-tests/Classes/BaseTest.cpp @@ -155,14 +155,14 @@ void TestList::runThisTest() * otherwise, the layout will incorrect */ - GLViewImpl* glview = (GLViewImpl*)Director::getInstance()->getOpenGLView(); + GLViewImpl* glView = (GLViewImpl*)Director::getInstance()->getOpenGLView(); #if defined(AX_PLATFORM_PC) Size resourceSize(960, 640); - glview->setWindowed(resourceSize.width, resourceSize.height); + glView->setWindowed(resourceSize.width, resourceSize.height); #endif Size designSize(480, 320); - glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); + glView->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); auto director = Director::getInstance(); auto scene = Scene::create(); diff --git a/tests/cpp-tests/Classes/BugsTest/Bug-14327.cpp b/tests/cpp-tests/Classes/BugsTest/Bug-14327.cpp index 48076f5a02..2ad151f13d 100644 --- a/tests/cpp-tests/Classes/BugsTest/Bug-14327.cpp +++ b/tests/cpp-tests/Classes/BugsTest/Bug-14327.cpp @@ -41,9 +41,9 @@ bool Bug14327Layer::init() { if (BugsTestBase::init()) { - auto glview = Director::getInstance()->getOpenGLView(); - auto visibleOrigin = glview->getVisibleOrigin(); - auto visibleSize = glview->getVisibleSize(); + auto glView = Director::getInstance()->getOpenGLView(); + auto visibleOrigin = glView->getVisibleOrigin(); + auto visibleSize = glView->getVisibleSize(); auto pBg = Sprite::create("Images/HelloWorld.png"); pBg->setPosition(Vec2(visibleOrigin.x + visibleSize.width / 2, visibleOrigin.y + visibleSize.height / 2)); diff --git a/tests/cpp-tests/Classes/ChipmunkTestBed/ChipmunkTestBed.cpp b/tests/cpp-tests/Classes/ChipmunkTestBed/ChipmunkTestBed.cpp index 20859f836e..11f2fc7c95 100644 --- a/tests/cpp-tests/Classes/ChipmunkTestBed/ChipmunkTestBed.cpp +++ b/tests/cpp-tests/Classes/ChipmunkTestBed/ChipmunkTestBed.cpp @@ -308,9 +308,9 @@ ChipmunkTestBed::ChipmunkTestBed() // halx99: since axis init scene default camera at 'initWithXXX' function, only change design size at scene // construct is ok see also: https://github.com/axys1/axys/commit/581a7921554c09746616759d5a5ca6ce9d3eaa22 auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); + auto glView = director->getOpenGLView(); Size designSize(960 * 0.85, 640 * 0.85); - glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); + glView->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); // creating a keyboard event listener auto listener = EventListenerKeyboard::create(); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp index 63174f7931..c71de26605 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp @@ -44,9 +44,9 @@ bool UIEditBoxTest::init() { if (UIScene::init()) { - auto glview = Director::getInstance()->getOpenGLView(); - auto visibleOrigin = glview->getVisibleOrigin(); - auto visibleSize = glview->getVisibleSize(); + auto glView = Director::getInstance()->getOpenGLView(); + auto visibleOrigin = glView->getVisibleOrigin(); + auto visibleSize = glView->getVisibleSize(); auto pBg = Sprite::create("Images/HelloWorld.png"); pBg->setPosition(Vec2(visibleOrigin.x + visibleSize.width / 2, visibleOrigin.y + visibleSize.height / 2)); @@ -178,9 +178,9 @@ bool UIEditBoxTestToggleVisibility::init() { if (UIScene::init()) { - auto glview = Director::getInstance()->getOpenGLView(); - auto visibleOrigin = glview->getVisibleOrigin(); - auto visibleSize = glview->getVisibleSize(); + auto glView = Director::getInstance()->getOpenGLView(); + auto visibleOrigin = glView->getVisibleOrigin(); + auto visibleSize = glView->getVisibleSize(); auto pBg = Sprite::create("Images/HelloWorld.png"); pBg->setPosition(Vec2(visibleOrigin.x + visibleSize.width / 2, visibleOrigin.y + visibleSize.height / 2)); @@ -307,9 +307,9 @@ bool UIEditBoxTestTextHorizontalAlignment::init() return false; } - const auto glview = Director::getInstance()->getOpenGLView(); - const auto visibleOrigin = glview->getVisibleOrigin(); - const auto visibleSize = glview->getVisibleSize(); + const auto glView = Director::getInstance()->getOpenGLView(); + const auto visibleOrigin = glView->getVisibleOrigin(); + const auto visibleSize = glView->getVisibleSize(); const auto editBoxSize = Size(visibleSize.width - 100, visibleSize.height * 0.1f); const auto createEditBox = [this, editBoxSize, visibleOrigin, visibleSize]( @@ -343,9 +343,9 @@ bool UIEditBoxTestPressedAndDisabled::init() return false; } - auto glview = Director::getInstance()->getOpenGLView(); - auto visibleOrigin = glview->getVisibleOrigin(); - auto visibleSize = glview->getVisibleSize(); + auto glView = Director::getInstance()->getOpenGLView(); + auto visibleOrigin = glView->getVisibleOrigin(); + auto visibleSize = glView->getVisibleSize(); const auto editBoxSize = Size(visibleSize.width - 100, visibleSize.height * 0.1f); ui::EditBox* editbox = diff --git a/tests/cpp-tests/Classes/VRTest/VRTest.cpp b/tests/cpp-tests/Classes/VRTest/VRTest.cpp index 305cd5efae..7d4fb310b5 100644 --- a/tests/cpp-tests/Classes/VRTest/VRTest.cpp +++ b/tests/cpp-tests/Classes/VRTest/VRTest.cpp @@ -48,16 +48,16 @@ VRTest1::VRTest1() addChild(image); auto button = MenuItemFont::create("Enable / Disable VR", [](Ref* ref) { - auto glview = Director::getInstance()->getOpenGLView(); - auto vrimpl = glview->getVR(); + auto glView = Director::getInstance()->getOpenGLView(); + auto vrimpl = glView->getVR(); if (vrimpl) { - glview->setVR(nullptr); + glView->setVR(nullptr); } else { auto genericvr = new VRGenericRenderer; - glview->setVR(genericvr); + glView->setVR(genericvr); } }); button->setFontSizeObj(16); diff --git a/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm b/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm index 716a06a4e0..115e5c92e4 100644 --- a/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm +++ b/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm @@ -90,8 +90,8 @@ static AppDelegate s_sharedApplication; #endif // IMPORTANT: Setting the GLView should be done after creating the RootViewController - axis::GLView* glview = axis::GLViewImpl::createWithEAGLView(eaglView); - axis::Director::getInstance()->setOpenGLView(glview); + axis::GLView* glView = axis::GLViewImpl::createWithEAGLView(eaglView); + axis::Director::getInstance()->setOpenGLView(glView); app->run(); diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png deleted file mode 100644 index a5b49ccbb1..0000000000 Binary files a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png and /dev/null differ diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 60% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Contents.json rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json index 51cbd32fe0..8e4b1753ce 100644 --- a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -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 } -} \ No newline at end of file +} diff --git a/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000000..128675aeb2 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png diff --git a/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000000..928bee6570 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from tests/cpp-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/Contents.json b/tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/Contents.json similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/Contents.json rename to tests/cpp-tests/proj.ios/targets/ios/Images.xcassets/Contents.json diff --git a/tests/fairygui-tests/proj.ios/Info.plist b/tests/cpp-tests/proj.ios/targets/ios/Info.plist similarity index 79% rename from tests/fairygui-tests/proj.ios/Info.plist rename to tests/cpp-tests/proj.ios/targets/ios/Info.plist index f979cc849b..6a5e22f8a6 100644 --- a/tests/fairygui-tests/proj.ios/Info.plist +++ b/tests/cpp-tests/proj.ios/targets/ios/Info.plist @@ -10,35 +10,24 @@ ${MACOSX_BUNDLE_EXECUTABLE_NAME} CFBundleIconFile Icon-57.png - CFBundleIconFiles - - Icon.png - Icon@2x.png - Icon-57.png - Icon-114.png - Icon-72.png - Icon-144.png - - CFBundleIcons - - CFBundleIcons~ipad - CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PROJECT_NAME} - CFBundlePackageType - APPL CFBundleShortVersionString 1.0 + CFBundlePackageType + APPL CFBundleSignature ???? CFBundleVersion 1 LSRequiresIPhoneOS + UIAppFonts + UILaunchStoryboardName LaunchScreen UIPrerenderedIcon @@ -48,6 +37,7 @@ UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft NSHumanReadableCopyright Copyright © 2019. All rights reserved. diff --git a/tests/cpp-tests/proj.ios/LaunchScreen.storyboard b/tests/cpp-tests/proj.ios/targets/ios/LaunchScreen.storyboard similarity index 100% rename from tests/cpp-tests/proj.ios/LaunchScreen.storyboard rename to tests/cpp-tests/proj.ios/targets/ios/LaunchScreen.storyboard diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000..0407a30bfa --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json @@ -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 + } +} diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000000..5d09d3be41 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000000..dda6d337e3 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000000..93db39306b --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000000..707d2e02e4 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000000..242ab9b0f3 Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000000..3d278051ab Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000000..0d9a5d26eb --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000000..9d2b5cf5ee Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000000..5e42ab310c Binary files /dev/null and b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png differ diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Contents.json b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tests/cpp-tests/proj.ios/targets/tvos/Info.plist b/tests/cpp-tests/proj.ios/targets/tvos/Info.plist new file mode 100644 index 0000000000..55da67af4f --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. + + diff --git a/tests/cpp-tests/proj.ios/targets/tvos/LaunchScreen.storyboard b/tests/cpp-tests/proj.ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000000..b8319fd335 --- /dev/null +++ b/tests/cpp-tests/proj.ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fairygui-tests/CMakeLists.txt b/tests/fairygui-tests/CMakeLists.txt index b5fe46a6ff..5a6fd88cf2 100644 --- a/tests/fairygui-tests/CMakeLists.txt +++ b/tests/fairygui-tests/CMakeLists.txt @@ -79,11 +79,21 @@ elseif(APPLE) proj.ios/AppController.h proj.ios/RootViewController.h ) - set(APP_UI_RES - proj.ios/LaunchScreen.storyboard - proj.ios/LaunchScreenBackground.png - proj.ios/Images.xcassets - ) + + if (TVOS) + set(APP_UI_RES + proj.ios/LaunchScreenBackground.png + proj.ios/targets/tvos/LaunchScreen.storyboard + proj.ios/targets/tvos/Images.xcassets + ) + else() + set(APP_UI_RES + proj.ios/LaunchScreenBackground.png + proj.ios/targets/ios/LaunchScreen.storyboard + proj.ios/targets/ios/Images.xcassets + ) + endif() + list(APPEND GAME_SOURCE proj.ios/main.m proj.ios/AppController.mm @@ -134,8 +144,11 @@ if(XCODE) if(MACOSX) set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist") + elseif(TVOS) + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.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/Info.plist") + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/targets/ios/Info.plist") set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon") endif() diff --git a/tests/fairygui-tests/Classes/AppDelegate.cpp b/tests/fairygui-tests/Classes/AppDelegate.cpp index 0db17f4941..24b1072004 100644 --- a/tests/fairygui-tests/Classes/AppDelegate.cpp +++ b/tests/fairygui-tests/Classes/AppDelegate.cpp @@ -29,7 +29,7 @@ void AppDelegate::initGLContextAttrs() GLView::setGLContextAttrs(glContextAttrs); } -// if you want to use the package manager to install more packages, +// if you want to use the package manager to install more packages, // don't modify or remove this function static int register_all_packages() { @@ -39,14 +39,14 @@ static int register_all_packages() bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if (!glview) { + auto glView = director->getOpenGLView(); + if (!glView) { #if (AX_TARGET_PLATFORM == AX_PLATFORM_WIN32) || (AX_TARGET_PLATFORM == AX_PLATFORM_MAC) || (AX_TARGET_PLATFORM == AX_PLATFORM_LINUX) - glview = GLViewImpl::createWithRect("Examples", axis::Rect(0, 0, 1280, 720)); + glView = GLViewImpl::createWithRect("Examples", axis::Rect(0, 0, 1280, 720)); #else - glview = GLViewImpl::create("Examples"); + glView = GLViewImpl::create("Examples"); #endif - director->setOpenGLView(glview); + director->setOpenGLView(glView); } // turn on display FPS @@ -56,8 +56,8 @@ bool AppDelegate::applicationDidFinishLaunching() { director->setAnimationInterval(1.0f / 60); // Set the design resolution - glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::SHOW_ALL); - /*auto frameSize = glview->getFrameSize(); + glView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::SHOW_ALL); + /*auto frameSize = glView->getFrameSize(); // if the frame's height is larger than the height of medium size. if (frameSize.height > mediumResolutionSize.height) { diff --git a/tests/fairygui-tests/proj.ios/AppController.mm b/tests/fairygui-tests/proj.ios/AppController.mm index 75aec66990..b05de5beb1 100644 --- a/tests/fairygui-tests/proj.ios/AppController.mm +++ b/tests/fairygui-tests/proj.ios/AppController.mm @@ -1,19 +1,19 @@ /**************************************************************************** Copyright (c) 2010 cocos2d-x.org Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - + https://axys1.github.io/ - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -37,17 +37,17 @@ // cocos2d application instance static AppDelegate s_sharedApplication; -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + axis::Application *app = axis::Application::getInstance(); app->initGLContextAttrs(); axis::GLViewImpl::convertAttrs(); - + // Override point for customization after application launch. // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: (NSString*)axis::GLViewImpl::_pixelFormat depthFormat: axis::GLViewImpl::_depthFormat @@ -55,8 +55,8 @@ static AppDelegate s_sharedApplication; sharegroup: nil multiSampling: axis::GLViewImpl::_multisamplingCount > 0 ? YES : NO numberOfSamples: axis::GLViewImpl::_multisamplingCount]; - - + + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.extendedLayoutIncludesOpaqueBars = YES; @@ -73,11 +73,11 @@ static AppDelegate s_sharedApplication; // use this method on ios6 [window setRootViewController:viewController]; } - + [window makeKeyAndVisible]; [[UIApplication sharedApplication] setStatusBarHidden: YES]; - + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) { @@ -85,9 +85,9 @@ static AppDelegate s_sharedApplication; } // IMPORTANT: Setting the GLView should be done after creating the RootViewController - axis::GLViewImpl *glview = axis::GLViewImpl::createWithEAGLView(eaglView); - axis::Director::getInstance()->setOpenGLView(glview); - + axis::GLViewImpl *glView = axis::GLViewImpl::createWithEAGLView(eaglView); + axis::Director::getInstance()->setOpenGLView(glView); + app->run(); return YES; } @@ -110,7 +110,7 @@ static AppDelegate s_sharedApplication; - (void)applicationDidEnterBackground:(UIApplication *)application { /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, called instead of applicationWillTerminate: when the user quits. */ axis::Application::getInstance()->applicationDidEnterBackground(); diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png deleted file mode 100644 index a5b49ccbb1..0000000000 Binary files a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png and /dev/null differ diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 60% rename from templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json index 51cbd32fe0..8e4b1753ce 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -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 } -} \ No newline at end of file +} diff --git a/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000000..128675aeb2 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png diff --git a/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000000..928bee6570 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from tests/fairygui-tests/proj.ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/Contents.json b/tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/Contents.json similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/Contents.json rename to tests/fairygui-tests/proj.ios/targets/ios/Images.xcassets/Contents.json diff --git a/tests/cpp-tests/proj.ios/Info.plist b/tests/fairygui-tests/proj.ios/targets/ios/Info.plist similarity index 76% rename from tests/cpp-tests/proj.ios/Info.plist rename to tests/fairygui-tests/proj.ios/targets/ios/Info.plist index 0171598f6c..6a5e22f8a6 100644 --- a/tests/cpp-tests/proj.ios/Info.plist +++ b/tests/fairygui-tests/proj.ios/targets/ios/Info.plist @@ -9,39 +9,25 @@ CFBundleExecutable ${MACOSX_BUNDLE_EXECUTABLE_NAME} CFBundleIconFile - Icon + Icon-57.png CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PROJECT_NAME} - CFBundlePackageType - APPL CFBundleShortVersionString 1.0 + CFBundlePackageType + APPL CFBundleSignature ???? CFBundleVersion 1 - NSHumanReadableCopyright - Copyright © 2019. All rights reserved. LSRequiresIPhoneOS - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - UIAppFonts - - fonts/A Damn Mess.ttf - fonts/Abberancy.ttf - fonts/Abduction.ttf - fonts/Paint Boy.ttf - fonts/Schwarzwald.ttf - fonts/Scissor Cuts.ttf - + UILaunchStoryboardName LaunchScreen UIPrerenderedIcon @@ -53,5 +39,7 @@ UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. diff --git a/tests/fairygui-tests/proj.ios/LaunchScreen.storyboard b/tests/fairygui-tests/proj.ios/targets/ios/LaunchScreen.storyboard similarity index 100% rename from tests/fairygui-tests/proj.ios/LaunchScreen.storyboard rename to tests/fairygui-tests/proj.ios/targets/ios/LaunchScreen.storyboard diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000..0407a30bfa --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json @@ -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 + } +} diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000000..5d09d3be41 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000000..dda6d337e3 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000000..93db39306b --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000000..707d2e02e4 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000000..242ab9b0f3 Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000000..3d278051ab Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000000..0d9a5d26eb --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000000..9d2b5cf5ee Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000000..5e42ab310c Binary files /dev/null and b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png differ diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Contents.json b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/Info.plist b/tests/fairygui-tests/proj.ios/targets/tvos/Info.plist new file mode 100644 index 0000000000..55da67af4f --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. + + diff --git a/tests/fairygui-tests/proj.ios/targets/tvos/LaunchScreen.storyboard b/tests/fairygui-tests/proj.ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000000..b8319fd335 --- /dev/null +++ b/tests/fairygui-tests/proj.ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/live2d-tests/CMakeLists.txt b/tests/live2d-tests/CMakeLists.txt index 7454938e56..a9341cc41b 100644 --- a/tests/live2d-tests/CMakeLists.txt +++ b/tests/live2d-tests/CMakeLists.txt @@ -88,11 +88,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 @@ -145,8 +155,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() diff --git a/tests/live2d-tests/Classes/AppDelegate.cpp b/tests/live2d-tests/Classes/AppDelegate.cpp index b6b1a6549a..718c3c9008 100644 --- a/tests/live2d-tests/Classes/AppDelegate.cpp +++ b/tests/live2d-tests/Classes/AppDelegate.cpp @@ -68,15 +68,15 @@ bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if(!glview) + auto glView = director->getOpenGLView(); + if(!glView) { #if (AX_TARGET_PLATFORM == AX_PLATFORM_WIN32) || (AX_TARGET_PLATFORM == AX_PLATFORM_MAC) || (AX_TARGET_PLATFORM == AX_PLATFORM_LINUX) - glview = GLViewImpl::createWithRect("Demo", axis::Rect(0, 0, designResolutionSize.width, designResolutionSize.height)); + glView = GLViewImpl::createWithRect("Demo", axis::Rect(0, 0, designResolutionSize.width, designResolutionSize.height)); #else - glview = GLViewImpl::create("Demo"); + glView = GLViewImpl::create("Demo"); #endif - director->setOpenGLView(glview); + director->setOpenGLView(glView); } // turn on display FPS @@ -86,8 +86,8 @@ bool AppDelegate::applicationDidFinishLaunching() director->setAnimationInterval(1.0f / 60); // Set the design resolution - glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::SHOW_ALL); -// auto frameSize = glview->getFrameSize(); + glView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::SHOW_ALL); +// auto frameSize = glView->getFrameSize(); // // if the frame's height is larger than the height of medium size. // if (frameSize.height > mediumResolutionSize.height) // { diff --git a/tests/live2d-tests/proj.ios_mac/ios/AppController.mm b/tests/live2d-tests/proj.ios_mac/ios/AppController.mm index 28c5b7e56b..3ffe805524 100644 --- a/tests/live2d-tests/proj.ios_mac/ios/AppController.mm +++ b/tests/live2d-tests/proj.ios_mac/ios/AppController.mm @@ -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(); diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 51cbd32fe0..0000000000 --- a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-40@3x.png", - "scale" : "3x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon-57.png", - "scale" : "1x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon-57@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-20.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-40.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-40@2x.png", - "scale" : "2x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "Icon-50.png", - "scale" : "1x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "Icon-50@2x.png", - "scale" : "2x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "Icon-72.png", - "scale" : "1x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "Icon-72@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-76.png", - "scale" : "1x" - }, - { - "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" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png deleted file mode 100644 index a5b49ccbb1..0000000000 Binary files a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png and /dev/null differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/RootViewController.mm b/tests/live2d-tests/proj.ios_mac/ios/RootViewController.mm index a5ded72f81..7afae07746 100644 --- a/tests/live2d-tests/proj.ios_mac/ios/RootViewController.mm +++ b/tests/live2d-tests/proj.ios_mac/ios/RootViewController.mm @@ -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); } } diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..8e4b1753ce --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,158 @@ +{ + "images" : [ + { + "filename" : "Icon-20@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-20@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "Icon-29.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "Icon-40@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-40@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "Icon-57.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "57x57" + }, + { + "filename" : "Icon-57@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" + }, + { + "filename" : "Icon-60@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "Icon-60@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "Icon-20.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "Icon-20@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-29.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-40.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "Icon-40@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-50.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "50x50" + }, + { + "filename" : "Icon-50@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "50x50" + }, + { + "filename" : "Icon-72.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "72x72" + }, + { + "filename" : "Icon-72@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "72x72" + }, + { + "filename" : "Icon-76.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "Icon-76@2x.png", + "idiom" : "ipad", + "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", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000000..128675aeb2 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000000..928bee6570 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/Contents.json rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Info.plist b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Info.plist similarity index 58% rename from tests/lua-tests/project/proj.ios_mac/ios/Info.plist rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/Info.plist index a3cf6e2c4d..6a5e22f8a6 100644 --- a/tests/lua-tests/project/proj.ios_mac/ios/Info.plist +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/Info.plist @@ -7,55 +7,31 @@ CFBundleDisplayName ${PROJECT_NAME} CFBundleExecutable - ${MACOSX_BUNDLE_EXECUTABLE_NAME} + ${MACOSX_BUNDLE_EXECUTABLE_NAME} CFBundleIconFile - Icon - CFBundleIconFiles - - Icon-57.png - Icon-114.png - Icon-72.png - Icon-144.png - + Icon-57.png CFBundleIdentifier - ${PRODUCT_BUNDLE_INDENTIFIER} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - $(PROJECT_NAME) + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 CFBundlePackageType APPL CFBundleSignature ???? - CFBundleShortVersionString - 1.0 CFBundleVersion 1 LSRequiresIPhoneOS - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - UIAppFonts - - fonts/A Damn Mess.ttf - fonts/Abberancy.ttf - fonts/Abduction.ttf - fonts/Paint Boy.ttf - fonts/Schwarzwald.ttf - fonts/Scissor Cuts.ttf - + UILaunchStoryboardName LaunchScreen UIPrerenderedIcon - UIRequiredDeviceCapabilities - - accelerometer - - UIStatusBarHidden UISupportedInterfaceOrientations diff --git a/tests/live2d-tests/proj.ios_mac/ios/LaunchScreen.storyboard b/tests/live2d-tests/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard similarity index 100% rename from tests/live2d-tests/proj.ios_mac/ios/LaunchScreen.storyboard rename to tests/live2d-tests/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000..0407a30bfa --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json @@ -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 + } +} diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000000..5d09d3be41 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000000..dda6d337e3 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000000..93db39306b --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000000..707d2e02e4 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000000..242ab9b0f3 Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000000..3d278051ab Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000000..0d9a5d26eb --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000000..9d2b5cf5ee Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000000..5e42ab310c Binary files /dev/null and b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png differ diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Info.plist b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Info.plist new file mode 100644 index 0000000000..55da67af4f --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. + + diff --git a/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000000..b8319fd335 --- /dev/null +++ b/tests/live2d-tests/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/lua-tests/project/CMakeLists.txt b/tests/lua-tests/project/CMakeLists.txt index 1eea597ab7..dbefb8f6a6 100644 --- a/tests/lua-tests/project/CMakeLists.txt +++ b/tests/lua-tests/project/CMakeLists.txt @@ -12,7 +12,7 @@ if(NOT DEFINED BUILD_ENGINE_DONE) set(_AX_ROOT "$ENV{AX_ROOT}") if(NOT (_AX_ROOT STREQUAL "")) set(_AX_ROOT_PATH "${_AX_ROOT}") - file(TO_CMAKE_PATH ${_AX_ROOT_PATH} _AX_ROOT_PATH) # string(REPLACE "\\" "/" _AX_ROOT_PATH ${_AX_ROOT_PATH}) + file(TO_CMAKE_PATH ${_AX_ROOT_PATH} _AX_ROOT_PATH) # string(REPLACE "\\" "/" _AX_ROOT_PATH ${_AX_ROOT_PATH}) message(STATUS "Using system env var _AX_ROOT=${_AX_ROOT}") else() message(FATAL_ERROR "Please run setup.py add system env var 'AX_ROOT' to specific the engine root") @@ -79,11 +79,21 @@ elseif(APPLE) proj.ios_mac/ios/LuaObjectCBridgeTest.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/LuaObjectCBridgeTest.mm @@ -152,8 +162,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 "${CMAKE_CURRENT_SOURCE_DIR}//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_IDENTIFY "iPhone Developer") 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") set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "") set_xcode_property(${APP_NAME} CODE_SIGN_IDENTIFY "iPhone Developer") diff --git a/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm b/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm index 08bbfe3194..2308fdd028 100644 --- a/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm +++ b/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm @@ -92,8 +92,8 @@ static AppDelegate s_sharedApplication; } // IMPORTANT: Setting the GLView should be done after creating the RootViewController - axis::GLView* glview = axis::GLViewImpl::createWithEAGLView(eaglView); - axis::Director::getInstance()->setOpenGLView(glview); + axis::GLView* glView = axis::GLViewImpl::createWithEAGLView(eaglView); + axis::Director::getInstance()->setOpenGLView(glView); app->run(); return YES; diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 51cbd32fe0..0000000000 --- a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-40@3x.png", - "scale" : "3x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon-57.png", - "scale" : "1x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon-57@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-20.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-40.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-40@2x.png", - "scale" : "2x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "Icon-50.png", - "scale" : "1x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "Icon-50@2x.png", - "scale" : "2x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "Icon-72.png", - "scale" : "1x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "Icon-72@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-76.png", - "scale" : "1x" - }, - { - "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" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png deleted file mode 100644 index a5b49ccbb1..0000000000 Binary files a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png and /dev/null differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..8e4b1753ce --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,158 @@ +{ + "images" : [ + { + "filename" : "Icon-20@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-20@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "Icon-29.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "Icon-40@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-40@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "Icon-57.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "57x57" + }, + { + "filename" : "Icon-57@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" + }, + { + "filename" : "Icon-60@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "Icon-60@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "Icon-20.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "Icon-20@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-29.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-40.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "Icon-40@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-50.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "50x50" + }, + { + "filename" : "Icon-50@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "50x50" + }, + { + "filename" : "Icon-72.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "72x72" + }, + { + "filename" : "Icon-72@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "72x72" + }, + { + "filename" : "Icon-76.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "Icon-76@2x.png", + "idiom" : "ipad", + "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", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000000..128675aeb2 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000000..928bee6570 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json new file mode 100644 index 0000000000..da4a164c91 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Info.plist b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Info.plist new file mode 100644 index 0000000000..6a5e22f8a6 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIconFile + Icon-57.png + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. + + diff --git a/tests/lua-tests/project/proj.ios_mac/ios/LaunchScreen.storyboard b/tests/lua-tests/project/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard similarity index 100% rename from tests/lua-tests/project/proj.ios_mac/ios/LaunchScreen.storyboard rename to tests/lua-tests/project/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000..0407a30bfa --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json @@ -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 + } +} diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000000..5d09d3be41 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..008b25dac4 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000000..e127f95334 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..f652e9b441 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000000..dda6d337e3 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000000..1e90ad97da --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000000..a1162d3fbc Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000000..0bee2b8677 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000000..929319b6ff --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000000..93db39306b --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000000..707d2e02e4 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000000..242ab9b0f3 Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000000..3d278051ab Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000000..0d9a5d26eb --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -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" +} \ No newline at end of file diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000000..9d2b5cf5ee Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000000..5e42ab310c Binary files /dev/null and b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png differ diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Info.plist b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Info.plist new file mode 100644 index 0000000000..55da67af4f --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + NSHumanReadableCopyright + Copyright © 2019. All rights reserved. + + diff --git a/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000000..b8319fd335 --- /dev/null +++ b/tests/lua-tests/project/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/console/plugins/plugin_clean.py b/tools/console/plugins/plugin_clean.py index 7234c2b510..4b7c6ba990 100644 --- a/tools/console/plugins/plugin_clean.py +++ b/tools/console/plugins/plugin_clean.py @@ -51,6 +51,15 @@ class CCPluginClean(axys.CCPlugin): self._run_cmd("cd \"%s\" && xcodebuild clean" % project_dir) self._rmdir(CCPluginDist.target_path(project_dir)) + def clean_tvos(self): + if not self._platforms.is_tvos_active(): + return + project_dir = self._platforms.project_path() + + axys.Logging.info("removing intermediate files") + self._run_cmd("cd \"%s\" && xcodebuild clean" % project_dir) + self._rmdir(CCPluginDist.target_path(project_dir)) + def _rmdir(self, path): if os.path.exists(path): try: @@ -63,3 +72,4 @@ class CCPluginClean(axys.CCPlugin): self.parse_args(argv) self.clean_android() self.clean_ios() + self.clean_tvos() diff --git a/tools/console/plugins/plugin_compile/project_compile.py b/tools/console/plugins/plugin_compile/project_compile.py index 18557cabc4..1ed0e7ce04 100644 --- a/tools/console/plugins/plugin_compile/project_compile.py +++ b/tools/console/plugins/plugin_compile/project_compile.py @@ -107,7 +107,7 @@ class CCPluginCompile(axys.CCPlugin): group = parser.add_argument_group(MultiLanguage.get_string('COMPILE_ARG_GROUP_IOS')) group.add_argument("--sign-identity", dest="sign_id", help=MultiLanguage.get_string('COMPILE_ARG_IOS_SIGN')) - group.add_argument("-sdk", dest="use_sdk", metavar="USE_SDK", nargs='?', default='iphonesimulator', + group.add_argument("-sdk", dest="use_sdk", metavar="USE_SDK", nargs='?', default='', help=MultiLanguage.get_string('COMPILE_ARG_IOS_SDK')) group = parser.add_argument_group(MultiLanguage.get_string('COMPILE_ARG_GROUP_LUA_JS')) @@ -189,7 +189,13 @@ class CCPluginCompile(axys.CCPlugin): self._output_dir = os.path.abspath(args.output_dir) self._sign_id = args.sign_id - self._use_sdk = args.use_sdk + + if args.platform == "ios" and args.use_sdk == "": + self._use_sdk = "iphonesimulator" + elif args.platform == "tvos" and args.use_sdk == "": + self._use_sdk = "appletvsimulator" + else: + self._use_sdk = args.use_sdk if self._project._is_lua_project(): self._lua_encrypt = args.lua_encrypt @@ -257,6 +263,8 @@ class CCPluginCompile(axys.CCPlugin): ret = self._platforms.project_path() elif self._platforms.is_ios_active(): ret = os.path.join(self._platforms.project_path(), "ios") + elif self._platforms.is_tvos_active(): + ret = os.path.join(self._platforms.project_path(), "tvos") elif self._platforms.is_mac_active(): ret = os.path.join(self._platforms.project_path(), "mac") else: @@ -480,7 +488,7 @@ class CCPluginCompile(axys.CCPlugin): # axys always support ndk gradle_support_ndk = True - + if(sys.version_info.major >= 3): from .build_android import AndroidBuilder @@ -793,7 +801,7 @@ class CCPluginCompile(axys.CCPlugin): indexHtmlOutputFile = open(os.path.join(publish_dir, "index.html"), "w") indexHtmlOutputFile.write(indexContent) indexHtmlOutputFile.close() - + # copy res dir if cfg_obj.copy_res is None: dst_dir = os.path.join(publish_dir, 'res') @@ -826,11 +834,16 @@ class CCPluginCompile(axys.CCPlugin): raise axys.CCPluginError(MultiLanguage.get_string('COMPILE_ERROR_BUILD_ON_MAC'), axys.CCPluginError.ERROR_WRONG_ARGS) + if platform == 'tvos': + if not self._platforms.is_tvos_active() or not axys.os_is_mac: + raise axys.CCPluginError(MultiLanguage.get_string('COMPILE_ERROR_BUILD_ON_MAC'), + axys.CCPluginError.ERROR_WRONG_ARGS) + if platform == 'win32': if not self._platforms.is_win32_active or not axys.os_is_win32: raise axys.CCPluginError(MultiLanguage.get_string('COMPILE_ERROR_BUILD_ON_WIN'), axys.CCPluginError.ERROR_WRONG_ARGS) - + if platform == 'linux': if not self._platforms.is_linux_active(): raise axys.CCPluginError("Please build on linux") @@ -852,12 +865,12 @@ class CCPluginCompile(axys.CCPlugin): self.compile_lua_scripts(script_path, folder_64bit, True) if build_32bit: - self.compile_lua_scripts(script_path, script_path, False) + self.compile_lua_scripts(script_path, script_path, False) # mac only support 64bit, so should remove .lua files not int folder_64bit if platform == 'mac' and self._compile_script: self._remove_file_with_ext(script_path, '.lua') - + # self.compile_js_script(path) # if only support 64bit, then move to @@ -903,7 +916,11 @@ class CCPluginCompile(axys.CCPlugin): # iOS need to generate Xcode project file first if platform == 'ios': engine_dir = self.get_engine_dir() - self._run_cmd('cmake %s -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=%s' % + self._run_cmd('cmake %s -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=%s' % + ( os.path.relpath(cmakefile_dir, build_dir), self._use_sdk ) ) + elif platform == 'tvos': + engine_dir = self.get_engine_dir() + self._run_cmd('cmake %s -GXcode -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=%s' % ( os.path.relpath(cmakefile_dir, build_dir), self._use_sdk ) ) elif platform == 'mac': self._run_cmd('cmake -GXcode %s' % os.path.relpath(cmakefile_dir, build_dir)) @@ -915,10 +932,10 @@ class CCPluginCompile(axys.CCPlugin): if generator is not None: if ver_num >= 16: # for vs2019 x64 is the default target - self._run_cmd('cmake %s -G "%s" -A win32' % + self._run_cmd('cmake %s -G "%s" -A win32' % (os.path.relpath(cmakefile_dir, build_dir), generator)) - else: - self._run_cmd('cmake %s -G "%s"' % + else: + self._run_cmd('cmake %s -G "%s"' % (os.path.relpath(cmakefile_dir, build_dir), generator)) else: axys.Logging.warning(MultiLanguage.get_string("COMPILE_VS_VERSION_NOT_REGISTER") % (ret[2])) @@ -951,7 +968,7 @@ class CCPluginCompile(axys.CCPlugin): self.run_root = output_dir # set application path and application name - if platform == 'mac' or platform == 'ios': + if platform == 'mac' or platform == 'ios' or platform == 'tvos': self.app_path = os.path.join(output_dir, self.project_name + '.app') else: self.app_path = output_dir diff --git a/tools/console/plugins/plugin_deploy.py b/tools/console/plugins/plugin_deploy.py index 09c9ddc9ec..40294de7f7 100644 --- a/tools/console/plugins/plugin_deploy.py +++ b/tools/console/plugins/plugin_deploy.py @@ -62,6 +62,14 @@ class CCPluginDeploy(axys.CCPlugin): self._iosapp_path = compile_dep.app_path self._use_sdk = compile_dep._use_sdk + def deploy_tvos(self, dependencies): + if not self._platforms.is_tvos_active(): + return + + compile_dep = dependencies['compile'] + self._tvosapp_path = compile_dep.app_path + self._use_sdk = compile_dep._use_sdk + def deploy_mac(self, dependencies): if not self._platforms.is_mac_active(): return @@ -88,7 +96,7 @@ class CCPluginDeploy(axys.CCPlugin): def find_xap_deploy_tool(self): if(sys.version_info.major >= 3): - import winreg + import winreg else: import _winreg as winreg import re @@ -185,6 +193,7 @@ class CCPluginDeploy(axys.CCPlugin): self.parse_args(argv) axys.Logging.info(MultiLanguage.get_string('DEPLOY_INFO_MODE_FMT', self._mode)) self.deploy_ios(dependencies) + self.deploy_tvos(dependencies) self.deploy_mac(dependencies) self.deploy_android(dependencies) self.deploy_web(dependencies) diff --git a/tools/console/plugins/plugin_dist.py b/tools/console/plugins/plugin_dist.py index 1427bb98d9..c23c2a37d8 100644 --- a/tools/console/plugins/plugin_dist.py +++ b/tools/console/plugins/plugin_dist.py @@ -38,11 +38,17 @@ class CCPluginDist(axys.CCPlugin): else: self._provisioning = options.provisioning + if self._platforms.is_tvos_active(): + if not options.provisioning: + raise axys.CCPluginError("Provisioning profile is needed") + else: + self._provisioning = options.provisioning + def _add_custom_options(self, parser): parser.add_option("-f", "--provisioning", dest="provisioning", help="provisioning profile to use (needed for iOS distribution)") - + def dist_android(self): if not self._platforms.is_android_active(): return @@ -60,14 +66,14 @@ class CCPluginDist(axys.CCPlugin): schemes = match.group(1).split() if len(schemes) == 0: raise axys.CCPluginError("Couldn't find a scheme") - + return schemes[0] @staticmethod def target_path(project_dir): return os.path.join(project_dir, '..', 'target') - + def dist_ios(self): if not self._platforms.is_ios_active(): return @@ -88,7 +94,28 @@ class CCPluginDist(axys.CCPlugin): axys.Logging.info("\nThe ipa was created at:\n%s" % os.path.abspath(ipa_path)) axys.Logging.info("\nNow you can use 'Application Loader' to submit the .ipa\n") + def dist_tvos(self): + if not self._platforms.is_tvos_active(): + return + project_dir = self._platforms.project_path() + + scheme = self._find_ios_scheme(project_dir) + axys.Logging.info("using scheme %s" % scheme) + + archive_path = os.path.join(CCPluginDist.target_path(project_dir), scheme + '.xcarchive') + axys.Logging.info("archiving") + self._run_cmd("cd '%s' && xcodebuild -scheme '%s' -archivePath '%s' archive" % (project_dir, scheme, archive_path)) + + axys.Logging.info("exporting archive") + ipa_path = os.path.join(os.path.dirname(archive_path), scheme + '.ipa') + if os.path.exists(ipa_path): + os.remove(ipa_path) + self._run_cmd("cd '%s' && xcodebuild -exportArchive -exportFormat IPA -archivePath '%s' -exportPath '%s' -exportProvisioningProfile '%s'" % (project_dir, archive_path, ipa_path, self._provisioning)) + axys.Logging.info("\nThe ipa was created at:\n%s" % os.path.abspath(ipa_path)) + axys.Logging.info("\nNow you can use 'Application Loader' to submit the .ipa\n") + def run(self, argv, dependencies): self.parse_args(argv) self.dist_android() self.dist_ios() + self.dist_tvos() diff --git a/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/Classes/AppDelegate.cpp b/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/Classes/AppDelegate.cpp index 49dd6796b8..742945e667 100644 --- a/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/Classes/AppDelegate.cpp +++ b/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/Classes/AppDelegate.cpp @@ -7,7 +7,7 @@ AppDelegate::AppDelegate() { } -AppDelegate::~AppDelegate() +AppDelegate::~AppDelegate() { } @@ -25,10 +25,10 @@ void AppDelegate::initGLContextAttrs() bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if(!glview) { - glview = GLViewImpl::createWithRect("HelloCpp", Rect(0, 0, 960, 640)); - director->setOpenGLView(glview); + auto glView = director->getOpenGLView(); + if(!glView) { + glView = GLViewImpl::createWithRect("HelloCpp", Rect(0, 0, 960, 640)); + director->setOpenGLView(glView); } director->getOpenGLView()->setDesignResolutionSize(960, 640, ResolutionPolicy::SHOW_ALL); diff --git a/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/axis-project-template.json b/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/axis-project-template.json index f39489c6fb..402b6812d4 100644 --- a/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/axis-project-template.json +++ b/tools/console/plugins/plugin_generate/bin-templates/cpp-template-default/axis-project-template.json @@ -62,7 +62,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" ] } }, @@ -83,12 +84,12 @@ "replace_string": "setDesignResolutionSize(\\2, \\1,\\3)" }, { - "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" }, diff --git a/tools/console/plugins/plugin_generate/bin-templates/lua-template-runtime/axis-project-template.json b/tools/console/plugins/plugin_generate/bin-templates/lua-template-runtime/axis-project-template.json index b28342590b..789b584b59 100644 --- a/tools/console/plugins/plugin_generate/bin-templates/lua-template-runtime/axis-project-template.json +++ b/tools/console/plugins/plugin_generate/bin-templates/lua-template-runtime/axis-project-template.json @@ -95,7 +95,8 @@ "project_replace_ios_bundleid": { "src_bundle_id": "org.axys1.hellolua", "files": [ - "frameworks/runtime-src/proj.ios_mac/ios/Info.plist" + "frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist", + "frameworks/runtime-src/proj.ios_mac/ios/targets/tvos/Info.plist" ] } }, @@ -116,12 +117,12 @@ "replace_string": "height = 960," }, { - "file_path": "frameworks/runtime-src/proj.ios_mac/ios/Info.plist", + "file_path": "frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist", "pattern": "UIInterfaceOrientationLandscapeRight", "replace_string": "UIInterfaceOrientationPortrait" }, { - "file_path": "frameworks/runtime-src/proj.ios_mac/ios/Info.plist", + "file_path": "frameworks/runtime-src/proj.ios_mac/ios/targets/ios/Info.plist", "pattern": "UIInterfaceOrientationLandscapeLeft", "replace_string": "UIInterfaceOrientationPortraitUpsideDown" }, diff --git a/tools/console/plugins/plugin_run/project_run.py b/tools/console/plugins/plugin_run/project_run.py index fc737967d5..f0db43d2a0 100644 --- a/tools/console/plugins/plugin_run/project_run.py +++ b/tools/console/plugins/plugin_run/project_run.py @@ -62,7 +62,7 @@ class CCPluginRun(axys.CCPlugin): help=MultiLanguage.get_string('RUN_ARG_WORKING_DIR')) group = parser.add_argument_group(MultiLanguage.get_string('RUN_ARG_GROUP_IOS')) - group.add_argument("-sdk", dest="use_sdk", metavar="USE_SDK", nargs='?', default='iphonesimulator', + group.add_argument("-sdk", dest="use_sdk", metavar="USE_SDK", nargs='?', default='', help=MultiLanguage.get_string('RUN_ARG_IOS_SDK')) def _check_custom_options(self, args): @@ -88,6 +88,20 @@ class CCPluginRun(axys.CCPlugin): return ret + def get_tvos_sim_name(self): + # get the version of xcodebuild + ver = axys.get_xcode_version() + match = re.match(r'(\d+).*', ver) + ret = None + if match: + ver_num = int(match.group(1)) + if ver_num <= 5: + ret = "ios-sim-xcode5" + elif ver_num < 8: + ret = "ios-sim-xcode6" + + return ret + def _get_cmd_output(self, cmds): child = subprocess.Popen(cmds, stdout=subprocess.PIPE) out = child.stdout.read() @@ -96,18 +110,18 @@ class CCPluginRun(axys.CCPlugin): return (errCode, out) - def _get_simulator_id(self): - (errCode, out) = self._get_cmd_output([ "xcrun", "instruments", "-s" ]) + def _get_ios_simulator_id(self): + (errCode, out) = self._get_cmd_output([ "xcrun", "xctrace", "list", "devices" ]) names = [] if errCode == 0: - pattern = r'(^iPhone[^\[]+)\[(.*)\]\s*\(Simulator\)' - lines = out.split('\n') + pattern = r'(.+)(?:\s\(([^\)]+)\))\s\(([^\)]+)\)' + lines = out.decode("utf-8").split('\n') for line in lines: match = re.match(pattern, line) if match: info = { "name" : match.group(1), - 'id' : match.group(2) + 'id' : match.group(3) } names.append(info) @@ -115,9 +129,8 @@ class CCPluginRun(axys.CCPlugin): retName = None phoneTypeNum = 0 phoneType = '' - iosVer = 0 if len(names) > 0: - name_pattern = r'iPhone\s+((\d+)[^\(]+)\((.*)\)' + name_pattern = r'(iPhone)\s+((\d+))' for info in names: name = info["name"] id = info["id"] @@ -129,17 +142,51 @@ class CCPluginRun(axys.CCPlugin): # get the matched data typeNum = int(match.group(2)) tmpType = match.group(1) - tmpIOSVer = match.group(3) if ((typeNum > phoneTypeNum) or - (typeNum == phoneTypeNum and tmpType > phoneType) or - (typeNum == phoneTypeNum and tmpType == phoneType and axys.version_compare(tmpIOSVer, '>', iosVer))): + (typeNum == phoneTypeNum and tmpType > phoneType)): # find the max phone type number first ret = id retName = name.strip() phoneTypeNum = typeNum phoneType = tmpType - iosVer = tmpIOSVer + + if ret is None: + raise axys.CCPluginError('Get simulator failed!') + + print('Using simulator: %s' % retName) + return ret + + def _get_tvos_simulator_id(self): + (errCode, out) = self._get_cmd_output([ "xcrun", "xctrace", "list", "devices" ]) + names = [] + if errCode == 0: + pattern = r'(.+)(?:\s\(([^\)]+)\))\s\(([^\)]+)\)' + lines = out.decode("utf-8").split('\n') + for line in lines: + match = re.match(pattern, line) + if match: + info = { + "name" : match.group(1), + 'id' : match.group(3) + } + names.append(info) + + ret = None + retName = None + if len(names) > 0: + name_pattern = r'(Apple TV Simulator)' + for info in names: + name = info["name"] + id = info["id"] + + match = re.match(name_pattern, name) + if match: + # get the matched data + tmpType = match.group(1) + + ret = id + retName = name.strip() if ret is None: raise axys.CCPluginError('Get simulator failed!') @@ -154,7 +201,7 @@ class CCPluginRun(axys.CCPlugin): if errCode == 0: import json jsonObj = json.loads(out) - if jsonObj is not None and jsonObj.has_key('CFBundleIdentifier'): + if jsonObj is not None and 'CFBundleIdentifier' in jsonObj: ret = jsonObj['CFBundleIdentifier'] if ret is None: @@ -170,7 +217,7 @@ class CCPluginRun(axys.CCPlugin): bundle_id = self._get_bundle_id(ios_app_path) # find simulator - simulator_id = self._get_simulator_id() + simulator_id = self._get_ios_simulator_id() try: # run the simulator @@ -196,8 +243,7 @@ class CCPluginRun(axys.CCPlugin): deploy_dep = dependencies['deploy'] if deploy_dep._use_sdk == 'iphoneos': - axys.Logging.warning(MultiLanguage.get_string('RUN_WARNING_IOS_FOR_DEVICE_FMT', - os.path.dirname(deploy_dep._iosapp_path))) + axys.Logging.warning(MultiLanguage.get_string('RUN_WARNING_IOS_FOR_DEVICE_FMT', os.path.dirname(deploy_dep._iosapp_path))) else: ios_sim_name = self.get_ios_sim_name() if ios_sim_name is None: @@ -219,6 +265,62 @@ class CCPluginRun(axys.CCPlugin): axys.Logging.warning('Do not support running on iOS devices.') + def _run_tvos_app(self, tvos_app_path): + if not axys.os_is_mac(): + raise axys.CCPluginError('Now only support run tvOS simulator on Mac OS') + + # get bundle id + bundle_id = self._get_bundle_id(tvos_app_path) + + # find simulator + simulator_id = self._get_tvos_simulator_id() + + try: + # run the simulator + xcode_version = axys.get_xcode_version() + xcode9_and_upper = axys.version_compare(xcode_version,">=",9) + if xcode9_and_upper: + self._run_cmd('xcrun simctl boot "%s"' % simulator_id) + self._run_cmd('open `xcode-select -p`/Applications/Simulator.app') + else: + self._run_cmd('xcrun instruments -w "%s"' % simulator_id) + except Exception as e: + pass + + # install app + self._run_cmd('xcrun simctl install "%s" "%s"' % (simulator_id, tvos_app_path)) + + # run app + self._run_cmd('xcrun simctl launch "%s" "%s"' % (simulator_id, bundle_id)) + + def run_tvos_sim(self, dependencies): + if not self._platforms.is_tvos_active(): + return + + deploy_dep = dependencies['deploy'] + if deploy_dep._use_sdk == 'appletvos': + axys.Logging.warning(MultiLanguage.get_string('RUN_WARNING_IOS_FOR_DEVICE_FMT', os.path.dirname(deploy_dep._tvosapp_path))) + else: + tvos_sim_name = self.get_tvos_sim_name() + if tvos_sim_name is None: + # there is not a tvos-sim for current installed xcode + # try to use xcrun commands + self._run_tvos_app(deploy_dep._tvosapp_path) + else: + if getattr(sys, 'frozen', None): + cur_dir = os.path.realpath(os.path.dirname(sys.executable)) + else: + cur_dir = os.path.realpath(os.path.dirname(__file__)) + tvossim_exe_path = os.path.join(cur_dir, 'bin', tvos_sim_name) + launch_sim = "%s launch \"%s\" &" % (tvossim_exe_path, deploy_dep._tvosapp_path) + self._run_cmd(launch_sim) + + def run_tvos_device(self): + if not self._platforms.is_tvos_active(): + return + + axys.Logging.warning('Do not support running on tvOS devices.') + def _run_with_desktop_options(self, cmd): if self._no_console: cmd += ' -console no' @@ -356,6 +458,7 @@ class CCPluginRun(axys.CCPlugin): self.run_android_device(dependencies) self.run_ios_sim(dependencies) # self.run_ios_device() + self.run_tvos_sim(dependencies) self.run_mac(dependencies) self.run_web(dependencies) self.run_win32(dependencies) diff --git a/tools/unix-ci/before-install.sh b/tools/unix-ci/before-install.sh index 1c2dd87407..1f67fe11e1 100644 --- a/tools/unix-ci/before-install.sh +++ b/tools/unix-ci/before-install.sh @@ -57,7 +57,7 @@ function install_environement() sudo apt-get install nasm nasm -v - + if [ "$BUILD_TARGET" == "linux" ]; then install_linux_environment fi @@ -70,7 +70,7 @@ function install_environement() if [ "$GH_OS_NAME" == "osx" ]; then brew install nasm nasm -v - + install_python_module_for_osx fi } diff --git a/tools/unix-ci/config.gitignore b/tools/unix-ci/config.gitignore index 7781e7f192..10c1797ac2 100644 --- a/tools/unix-ci/config.gitignore +++ b/tools/unix-ci/config.gitignore @@ -134,4 +134,4 @@ metal-support*.zip # vscode folder .vs -.vscode \ No newline at end of file +.vscode diff --git a/tools/unix-ci/run-script.sh b/tools/unix-ci/run-script.sh index ff05847c62..70e69bea24 100644 --- a/tools/unix-ci/run-script.sh +++ b/tools/unix-ci/run-script.sh @@ -55,9 +55,20 @@ function build_ios() cd $AX_ROOT - cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DAX_USE_ALSOFT=ON - # cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DCMAKE_SYSTEM_NAME=iOS -DPLATFORM=OS -DENABLE_ARC=0 # too much logs on console when "cmake --build ." - cmake --build build --config Release --target cpp_tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" + cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DENABLE_ARC=OFF -DDEPLOYMENT_TARGET=9.0 -DAX_USE_ALSOFT=ON + cmake --build build --config Release --target cpp_tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" + + exit 0 +} + +function build_tvos() +{ + NUM_OF_CORES=`getconf _NPROCESSORS_ONLN` + + cd $AX_ROOT + + cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR_TVOS -DENABLE_ARC=OFF -DDEPLOYMENT_TARGET=9.0 -DAX_USE_ALSOFT=ON + cmake --build build --config Release --target cpp_tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=tvOS Simulator,name=Apple TV Simulator" exit 0 } @@ -67,20 +78,20 @@ function build_android() # print jdk detail echo "JAVA_HOME=$JAVA_HOME" java -version - + # Build all samples echo "Building Android samples ..." source ../environment.sh # build fairygui_tests pushd $AX_ROOT/tests/fairygui-tests/proj.android - + do_retry ./gradlew assembleRelease -PPROP_BUILD_TYPE=cmake -PPROP_APP_ABI=$BUILD_ARCH --parallel --info popd # build cpp_tests pushd $AX_ROOT/tests/cpp-tests/proj.android - + do_retry ./gradlew assembleRelease -PPROP_BUILD_TYPE=cmake -PPROP_APP_ABI=$BUILD_ARCH --parallel --info popd } @@ -88,7 +99,7 @@ function build_android() function run_build() { echo "Building..." - + if [ $BUILD_TARGET == 'osx' ]; then set -x build_osx @@ -101,6 +112,12 @@ function run_build() exit 0 fi + if [ $BUILD_TARGET == 'tvos' ]; then + set -x + build_tvos + exit 0 + fi + # linux if [ $BUILD_TARGET == 'linux' ]; then build_linux diff --git a/tools/unix-ci/setup_android.py b/tools/unix-ci/setup_android.py index a615ea3681..bcfb540892 100644 --- a/tools/unix-ci/setup_android.py +++ b/tools/unix-ci/setup_android.py @@ -96,7 +96,7 @@ def install_android_cmdline_tools(): def install_android_sdk(): # list packages run_with_yes(SDK_MANAGER + " --list --sdk_root=" + ANDROID_SDK_ROOT) - + switches = " --verbose --sdk_root=" + ANDROID_SDK_ROOT + " " cmd_base = SDK_MANAGER + switches packages = [