diff --git a/.DS_Store b/.DS_Store index 935baed65ff7de0e8daca0e78bfcb10243eb0fe2..1c678bf95e5d84735764ecfde8eb5e07bf8043e6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/play/assets/cocos-generator/scene/cocos-generator.js b/play/assets/cocos-generator/scene/cocos-generator.js deleted file mode 100644 index 3f5c564c29eb25978d1b33b7a60300de018dc81c..0000000000000000000000000000000000000000 --- a/play/assets/cocos-generator/scene/cocos-generator.js +++ /dev/null @@ -1,384 +0,0 @@ -import { onHomeworkFinish } from "../script/util"; -import { defaultData } from "../script/defaultData"; - -cc.Class({ - - extends: cc.Component, - - properties: { - }, - - // 生命周期 onLoad - onLoad() { - this.initSceneData(); - this.initSize(); - }, - - _imageResList: null, - _audioResList: null, - _animaResList: null, - initSceneData() { - this._imageResList = []; - this._audioResList = []; - this._animaResList = []; - }, - - _designSize: null, // 设计分辨率 - _frameSize: null, // å±å¹•分辨率 - _mapScaleMin: null, // 场景ä¸å¸¸ç”¨ç¼©æ”¾ï¼ˆå–大值) - _mapScaleMax: null, // 场景ä¸å¸¸ç”¨ç¼©æ”¾ï¼ˆå–å°å€¼ï¼‰ - _cocosScale: null, // cocos 自缩放 (较少用到) - initSize() { - // 注æ„cc.winSizeåªæœ‰åœ¨é€‚é…åŽ(修改fitHeight/fitWidthåŽ)æ‰èƒ½èŽ·å–到æ£ç¡®çš„值,å› æ¤ä½¿ç”¨cc.getFrameSize()æ¥èŽ·å–åˆå§‹çš„å±å¹•å¤§å° - let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height - let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height - let f = screen_size >= design_size - cc.Canvas.instance.fitHeight = f - cc.Canvas.instance.fitWidth = !f - - const frameSize = cc.view.getFrameSize(); - this._frameSize = frameSize; - - this._designSize = cc.view.getDesignResolutionSize(); - - let sx = cc.winSize.width / frameSize.width; - let sy = cc.winSize.height / frameSize.height; - this._cocosScale = Math.min(sx, sy); - - sx = frameSize.width / this._designSize.width; - sy = frameSize.height / this._designSize.height; - this._mapScaleMin = Math.min(sx, sy) * this._cocosScale; - this._mapScaleMax = Math.max(sx, sy) * this._cocosScale; - - cc.director._scene.width = frameSize.width; - cc.director._scene.height = frameSize.height; - }, - - - // 生命周期 start - start() { - let getData = this.getData.bind(this); - if (window && window.courseware) { - getData = window.courseware.getData; - } - - getData((data) => { - console.log('data:', data); - this.data = data || this.getDefaultData(); - this.data = JSON.parse(JSON.stringify(this.data)) - this.preloadItem() - }) - }, - - getData(func) { - if (window && window.courseware) { - window.courseware.getData(func, 'scene'); - return; - } - - const middleLayer = cc.find('middleLayer'); - if (middleLayer) { - const middleLayerComponent = middleLayer.getComponent('middleLayer'); - middleLayerComponent.getData(func); - return; - } - - func(this.getDefaultData()); - }, - - getDefaultData() { - return defaultData; - }, - - preloadItem() { - this.addPreloadImage(); - this.addPreloadAudio(); - this.addPreloadAnima(); - this.preload(); - }, - - - addPreloadImage() { - - this._imageResList.push({ url: this.data.pic_url }); - this._imageResList.push({ url: this.data.pic_url_2 }); - }, - - addPreloadAudio() { - - this._audioResList.push({ url: this.data.audio_url }); - }, - - addPreloadAnima() { - - }, - - preload() { - const preloadArr = [ - ...this._imageResList, - ...this._audioResList, - ...this._animaResList - ]; - cc.assetManager.loadAny(preloadArr, null, null, (err, data) => { - - if (window && window["air"]) { - cc.find('Canvas').opacity = 0; - window.air.onCourseInScreen = (next) => { - cc.find('Canvas').opacity = 255; - this.loadEnd(); - next(); - } - window.air.hideAirClassLoading(); - } else { - this.loadEnd(); - } - - cc.debug.setDisplayStats(false); - }); - }, - - - - loadEnd() { - this.initData(); - this.initAudio(); - this.initView(); - // this.initListener(); - }, - - _cantouch: null, - initData() { - // 所有全局å˜é‡ 默认都是null - this._cantouch = true; - }, - - audioBtn: null, - initAudio() { - const audioNode = cc.find('Canvas/res/audio'); - - const getAudioByResName = (resName) => { - return audioNode.getChildByName(resName).getComponent(cc.AudioSource); - } - - this.audioBtn = getAudioByResName('btn'); - - }, - - - initView() { - - this.initBg(); - this.initPic(); - this.initBtn(); - this.initIcon(); - }, - - initBg() { - const bgNode = cc.find('Canvas/bg'); - bgNode.scale = this._mapScaleMax; - }, - - pic1: null, - pic2: null, - initPic() { - const canvas = cc.find('Canvas'); - const maxW = canvas.width * 0.7; - - this.getSprNodeByUrl(this.data.pic_url, (sprNode) => { - const picNode1 = sprNode; - picNode1.scale = maxW / picNode1.width; - picNode1.baseX = picNode1.x; - canvas.addChild(picNode1); - this.pic1 = picNode1; - - const labelNode = new cc.Node(); - labelNode.color = cc.Color.YELLOW; - const label = labelNode.addComponent(cc.Label); - label.string = this.data.text; - label.fontSize = 60; - label.lineHeight = 60; - label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent('cc.Label').font; - picNode1.addChild(labelNode); - }); - - this.getSprNodeByUrl(this.data.pic_url_2, (sprNode) => { - const picNode2 = sprNode; - picNode2.scale = maxW / picNode2.width; - canvas.addChild(picNode2); - picNode2.x = canvas.width; - picNode2.baseX = picNode2.x; - this.pic2 = picNode2; - - const labelNode = new cc.Node(); - const label = labelNode.addComponent(cc.RichText); - const size = 60 - label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent(cc.Label).font; - label.string = `<outline color=#751e00 width=4><size=${size}><color=#ffffff>${this.data.text}</color></size></outline>` - label.lineHeight = size; - picNode2.addChild(labelNode); - }); - - }, - - initIcon() { - const iconNode = this.getSprNode('icon'); - iconNode.zIndex = 5; - iconNode.anchorX = 1; - iconNode.anchorY = 1; - iconNode.parent = cc.find('Canvas'); - iconNode.x = iconNode.parent.width / 2 - 10; - iconNode.y = iconNode.parent.height / 2 - 10; - - iconNode.on(cc.Node.EventType.TOUCH_START, () => { - this.playAudioByUrl(this.data.audio_url); - }) - }, - - curPage: null, - initBtn() { - - this.curPage = 0; - const bottomPart = cc.find('Canvas/bottomPart'); - bottomPart.zIndex = 5; // æé«˜å±‚级 - - bottomPart.x = bottomPart.parent.width / 2; - bottomPart.y = -bottomPart.parent.height / 2; - - const leftBtnNode = bottomPart.getChildByName('btn_left'); - //èŠ‚ç‚¹ä¸æ·»åŠ äº†button组件 则å¯ä»¥æ·»åŠ clickäº‹ä»¶ç›‘å¬ - leftBtnNode.on('click', () => { - if (!this._cantouch) { - return; - } - if (this.curPage == 0) { - return; - } - this.curPage = 0 - this.leftMove(); - - // 游æˆç»“æŸæ—¶éœ€è¦è°ƒç”¨è¿™ä¸ªæ–¹æ³•é€šçŸ¥ç³»ç»Ÿä½œä¸šå®Œæˆ - onHomeworkFinish(); - - cc.audioEngine.play(this.audioBtn.clip, false, 0.8) - }) - - const rightBtnNode = bottomPart.getChildByName('btn_right'); - //èŠ‚ç‚¹ä¸æ·»åŠ äº†button组件 则å¯ä»¥æ·»åŠ clickäº‹ä»¶ç›‘å¬ - rightBtnNode.on('click', () => { - if (!this._cantouch) { - return; - } - if (this.curPage == 1) { - return; - } - - this.curPage = 1 - this.rightMove(); - - cc.audioEngine.play(this.audioBtn.clip, false, 0.5) - }) - }, - - leftMove() { - this._cantouch = false; - const len = this.pic1.parent.width; - cc.tween(this.pic1) - .to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' }) - .start(); - - cc.tween(this.pic2) - .to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' }) - .call(() => { - this._cantouch = true; - }) - .start(); - }, - - rightMove() { - this._cantouch = false; - const len = this.pic1.parent.width; - cc.tween(this.pic1) - .to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' }) - .start(); - - cc.tween(this.pic2) - .to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' }) - .call(() => { - this._cantouch = true; - }) - .start(); - }, - // update (dt) {}, - - - - onDestroy() { - // 在æ¤å¤„释放setTimeoutã€setIntervalç‰å¼‚æ¥æ–¹æ³• - // 在æ¤å¤„åœæ¢éžcc.audioEngineçš„éŸ³é¢‘æ’æ”¾ - }, - - - - - - - - - - - - - - - - - - - - - - // ------------------------------------------------ - getSprNode(resName) { - const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame; - const node = new cc.Node(); - node.addComponent(cc.Sprite).spriteFrame = sf; - return node; - }, - - - getSpriteFrimeByUrl(url, cb) { - cc.loader.load({ url }, (err, img) => { - const spriteFrame = new cc.SpriteFrame(img) - if (cb) { - cb(spriteFrame); - } - }) - }, - - getSprNodeByUrl(url, cb) { - const node = new cc.Node(); - const spr = node.addComponent(cc.Sprite); - this.getSpriteFrimeByUrl(url, (sf) => { - spr.spriteFrame = sf; - if (cb) { - cb(node); - } - }) - }, - - playAudioByUrl(audio_url, cb = null) { - if (audio_url) { - cc.assetManager.loadRemote(audio_url, (err, audioClip) => { - const audioId = cc.audioEngine.play(audioClip, false, 0.8); - if (cb) { - cc.audioEngine.setFinishCallback(audioId, () => { - cb(); - }); - } - }); - } - }, - - // ------------------------------------------ - -}); diff --git a/play/assets/cocos-generator.meta b/play/assets/cocos_generator.meta similarity index 100% rename from play/assets/cocos-generator.meta rename to play/assets/cocos_generator.meta diff --git a/play/assets/cocos-generator/audios.meta b/play/assets/cocos_generator/audios.meta similarity index 100% rename from play/assets/cocos-generator/audios.meta rename to play/assets/cocos_generator/audios.meta diff --git a/play/assets/cocos-generator/audios/.keep b/play/assets/cocos_generator/audios/.keep similarity index 100% rename from play/assets/cocos-generator/audios/.keep rename to play/assets/cocos_generator/audios/.keep diff --git a/play/assets/cocos-generator/audios/btn.mp3 b/play/assets/cocos_generator/audios/btn.mp3 similarity index 100% rename from play/assets/cocos-generator/audios/btn.mp3 rename to play/assets/cocos_generator/audios/btn.mp3 diff --git a/play/assets/cocos-generator/audios/btn.mp3.meta b/play/assets/cocos_generator/audios/btn.mp3.meta similarity index 100% rename from play/assets/cocos-generator/audios/btn.mp3.meta rename to play/assets/cocos_generator/audios/btn.mp3.meta diff --git a/play/assets/cocos-generator/dragonBones.meta b/play/assets/cocos_generator/dragonBones.meta similarity index 100% rename from play/assets/cocos-generator/dragonBones.meta rename to play/assets/cocos_generator/dragonBones.meta diff --git a/play/assets/cocos-generator/dragonBones/.keep b/play/assets/cocos_generator/dragonBones/.keep similarity index 100% rename from play/assets/cocos-generator/dragonBones/.keep rename to play/assets/cocos_generator/dragonBones/.keep diff --git a/play/assets/cocos-generator/fonts.meta b/play/assets/cocos_generator/fonts.meta similarity index 100% rename from play/assets/cocos-generator/fonts.meta rename to play/assets/cocos_generator/fonts.meta diff --git a/play/assets/cocos-generator/fonts/.keep b/play/assets/cocos_generator/fonts/.keep similarity index 100% rename from play/assets/cocos-generator/fonts/.keep rename to play/assets/cocos_generator/fonts/.keep diff --git a/play/assets/cocos-generator/fonts/BRLNSDB.TTF b/play/assets/cocos_generator/fonts/BRLNSDB.TTF similarity index 100% rename from play/assets/cocos-generator/fonts/BRLNSDB.TTF rename to play/assets/cocos_generator/fonts/BRLNSDB.TTF diff --git a/play/assets/cocos-generator/fonts/BRLNSDB.TTF.meta b/play/assets/cocos_generator/fonts/BRLNSDB.TTF.meta similarity index 100% rename from play/assets/cocos-generator/fonts/BRLNSDB.TTF.meta rename to play/assets/cocos_generator/fonts/BRLNSDB.TTF.meta diff --git a/play/assets/cocos-generator/scene.meta b/play/assets/cocos_generator/scene.meta similarity index 100% rename from play/assets/cocos-generator/scene.meta rename to play/assets/cocos_generator/scene.meta diff --git a/play/assets/cocos-generator/scene/cocos-generator.fire b/play/assets/cocos_generator/scene/cocos_generator.fire similarity index 98% rename from play/assets/cocos-generator/scene/cocos-generator.fire rename to play/assets/cocos_generator/scene/cocos_generator.fire index 0fa270216363c02303276adf4a4f462400c056c9..dfa9fcd878a63c1ddfcae205a15d2c28b4ca6f71 100644 --- a/play/assets/cocos-generator/scene/cocos-generator.fire +++ b/play/assets/cocos_generator/scene/cocos_generator.fire @@ -58,7 +58,7 @@ "_groupIndex": 0, "groupIndex": 0, "autoReleaseAssets": true, - "_id": "eb8aed66-30b6-4b6d-8111-a56301f794d4" + "_id": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3" }, { "__type__": "cc.Node", @@ -1163,7 +1163,7 @@ "_is3DNode": false, "_groupIndex": 0, "groupIndex": 0, - "_id": "b823DIVC9L+Ihc3T9Bt7m3" + "_id": "d9f+b0lmZGSJJae6zrADhp" }, { "__type__": "cc.Node", @@ -1225,7 +1225,7 @@ "_is3DNode": false, "_groupIndex": 0, "groupIndex": 0, - "_id": "3d0p0/uJZJIoRva5Br2iqv" + "_id": "e87DSaFCVJfb2PAUkf4/o7" }, { "__type__": "cc.AudioSource", @@ -1244,7 +1244,7 @@ "_firstlyEnabled": true, "playOnLoad": false, "preload": false, - "_id": "0adN50f61DlbmppsPkOnjX" + "_id": "dey05oKrBIspvsDa6pOIQz" }, { "__type__": "cc.Canvas", @@ -1259,8 +1259,8 @@ "width": 1280, "height": 720 }, - "_fitWidth": false, - "_fitHeight": false, + "_fitWidth": true, + "_fitHeight": true, "_id": "59Cd0ovbdF4byw5sbjJDx7" }, { @@ -1291,13 +1291,13 @@ "_id": "29zXboiXFBKoIV4PQ2liTe" }, { - "__type__": "62e208/AzZPXZaYlRR8Pd+n", + "__type__": "408a6f4ZfpM8Yzyg+IOGg/V", "_name": "", "_objFlags": 0, "node": { "__id__": 2 }, "_enabled": true, - "_id": "344d011557024326abc643" + "_id": "eaTVUpqahPfZeO9+sUI7RP" } ] \ No newline at end of file diff --git a/play/assets/cocos-generator/scene/cocos-generator.fire.meta b/play/assets/cocos_generator/scene/cocos_generator.fire.meta similarity index 64% rename from play/assets/cocos-generator/scene/cocos-generator.fire.meta rename to play/assets/cocos_generator/scene/cocos_generator.fire.meta index d9a4e1763713f78ae6641f2598cc7c33953bea46..eb04793140a58919f381eafc8e81b66437044c98 100644 --- a/play/assets/cocos-generator/scene/cocos-generator.fire.meta +++ b/play/assets/cocos_generator/scene/cocos_generator.fire.meta @@ -1,6 +1,6 @@ { "ver": "1.2.9", - "uuid": "eb8aed66-30b6-4b6d-8111-a56301f794d4", + "uuid": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3", "asyncLoadAssets": false, "autoReleaseAssets": true, "subMetas": {} diff --git a/play/assets/cocos_generator/scene/cocos_generator.ts b/play/assets/cocos_generator/scene/cocos_generator.ts new file mode 100644 index 0000000000000000000000000000000000000000..263ecff2f37926f79bc7605705ee6096ddb4aa58 --- /dev/null +++ b/play/assets/cocos_generator/scene/cocos_generator.ts @@ -0,0 +1,195 @@ +import { asyncDelay, onHomeworkFinish } from "../script/util"; +import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent"; + +const { ccclass, property } = cc._decorator; + +@ccclass +export default class SceneComponent extends MyCocosSceneComponent { + + addPreloadImage() { + // TODO æ ¹æ®è‡ªå·±çš„é…ç½®é¢„åŠ è½½å›¾ç‰‡èµ„æº + this._imageResList.push({ url: this.data.pic_url }); + this._imageResList.push({ url: this.data.pic_url_2 }); + } + + addPreloadAudio() { + // TODO æ ¹æ®è‡ªå·±çš„é…ç½®é¢„åŠ è½½éŸ³é¢‘èµ„æº + this._audioResList.push({ url: this.data.audio_url }); + } + + addPreloadAnima() { + + } + + onLoadEnd() { + // TODO åŠ è½½å®ŒæˆåŽçš„逻辑写在这里, 下é¢çš„代ç ä»…ä¾›å‚考 + this.initData(); + this.initView(); + this.initListener(); + } + + _cantouch = null; + initData() { + // 所有全局å˜é‡ 默认都是null + this._cantouch = true; + } + + initView() { + this.initBg(); + this.initPic(); + this.initBtn(); + this.initIcon(); + } + + initBg() { + const bgNode = cc.find('Canvas/bg'); + bgNode.scale = this._mapScaleMax; + } + + pic1 = null; + pic2 = null; + initPic() { + const canvas = cc.find('Canvas'); + const maxW = canvas.width * 0.7; + + this.getSprNodeByUrl(this.data.pic_url, (sprNode) => { + const picNode1 = sprNode; + picNode1.scale = maxW / picNode1.width; + picNode1.baseX = picNode1.x; + canvas.addChild(picNode1); + this.pic1 = picNode1; + + const labelNode = new cc.Node(); + labelNode.color = cc.Color.YELLOW; + const label = labelNode.addComponent(cc.Label); + label.string = this.data.text; + label.fontSize = 60; + label.lineHeight = 60; + label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent('cc.Label').font; + picNode1.addChild(labelNode); + }); + + this.getSprNodeByUrl(this.data.pic_url_2, (sprNode) => { + const picNode2 = sprNode; + picNode2.scale = maxW / picNode2.width; + canvas.addChild(picNode2); + picNode2.x = canvas.width; + picNode2.baseX = picNode2.x; + this.pic2 = picNode2; + + const labelNode = new cc.Node(); + const label = labelNode.addComponent(cc.RichText); + const size = 60 + label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent(cc.Label).font; + label.string = `<outline color=#751e00 width=4><size=${size}><color=#ffffff>${this.data.text}</color></size></outline>` + label.lineHeight = size; + picNode2.addChild(labelNode); + }); + + } + + initIcon() { + const iconNode = this.getSprNode('icon'); + iconNode.zIndex = 5; + iconNode.anchorX = 1; + iconNode.anchorY = 1; + iconNode.parent = cc.find('Canvas'); + iconNode.x = iconNode.parent.width / 2 - 10; + iconNode.y = iconNode.parent.height / 2 - 10; + + iconNode.on(cc.Node.EventType.TOUCH_START, () => { + this.playAudioByUrl(this.data.audio_url); + }) + } + + curPage = null; + initBtn() { + + this.curPage = 0; + const bottomPart = cc.find('Canvas/bottomPart'); + bottomPart.zIndex = 5; // æé«˜å±‚级 + + bottomPart.x = bottomPart.parent.width / 2; + bottomPart.y = -bottomPart.parent.height / 2; + + const leftBtnNode = bottomPart.getChildByName('btn_left'); + //èŠ‚ç‚¹ä¸æ·»åŠ äº†button组件 则å¯ä»¥æ·»åŠ clickäº‹ä»¶ç›‘å¬ + leftBtnNode.on('click', () => { + if (!this._cantouch) { + return; + } + if (this.curPage == 0) { + return; + } + this.curPage = 0 + this.leftMove(); + + this.playLocalAudio('btn'); + }) + + const rightBtnNode = bottomPart.getChildByName('btn_right'); + //èŠ‚ç‚¹ä¸æ·»åŠ äº†button组件 则å¯ä»¥æ·»åŠ clickäº‹ä»¶ç›‘å¬ + rightBtnNode.on('click', () => { + if (!this._cantouch) { + return; + } + if (this.curPage == 1) { + return; + } + + this.curPage = 1 + this.rightMove(); + + // 游æˆç»“æŸæ—¶éœ€è¦è°ƒç”¨è¿™ä¸ªæ–¹æ³•é€šçŸ¥ç³»ç»Ÿä½œä¸šå®Œæˆ + onHomeworkFinish(); + + this.playLocalAudio('btn'); + }) + } + + leftMove() { + this._cantouch = false; + const len = this.pic1.parent.width; + cc.tween(this.pic1) + .to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' }) + .start(); + + cc.tween(this.pic2) + .to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' }) + .call(() => { + this._cantouch = true; + }) + .start(); + } + + rightMove() { + this._cantouch = false; + const len = this.pic1.parent.width; + cc.tween(this.pic1) + .to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' }) + .start(); + + cc.tween(this.pic2) + .to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' }) + .call(() => { + this._cantouch = true; + }) + .start(); + } + // update (dt) {}, + + + initListener() { + + } + + playLocalAudio(audioName) { + const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource); + return new Promise((resolve, reject) => { + const id = cc.audioEngine.playEffect(audio.clip, false); + cc.audioEngine.setFinishCallback(id, () => { + resolve(id); + }); + }) + } +} diff --git a/play/assets/cocos-generator/scene/cocos-generator.js.meta b/play/assets/cocos_generator/scene/cocos_generator.ts.meta similarity index 74% rename from play/assets/cocos-generator/scene/cocos-generator.js.meta rename to play/assets/cocos_generator/scene/cocos_generator.ts.meta index bfa0fcbe6d07bad92e8d48310113e5ed03d25d4b..56a6607e07923dfc9a1f7a097a6c6cd2e4c3514b 100644 --- a/play/assets/cocos-generator/scene/cocos-generator.js.meta +++ b/play/assets/cocos_generator/scene/cocos_generator.ts.meta @@ -1,6 +1,6 @@ { "ver": "1.0.8", - "uuid": "62e20f3f-0336-4f5d-9698-95147c3ddfa7", + "uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5", "isPlugin": false, "loadPluginInWeb": true, "loadPluginInNative": true, diff --git a/play/assets/cocos-generator/script.meta b/play/assets/cocos_generator/script.meta similarity index 100% rename from play/assets/cocos-generator/script.meta rename to play/assets/cocos_generator/script.meta diff --git a/play/assets/cocos_generator/script/MyCocosSceneComponent.ts b/play/assets/cocos_generator/script/MyCocosSceneComponent.ts new file mode 100644 index 0000000000000000000000000000000000000000..ccdc6a05ee92ba8129824591c929ba75a871b73a --- /dev/null +++ b/play/assets/cocos_generator/script/MyCocosSceneComponent.ts @@ -0,0 +1,186 @@ +import { defaultData } from "../script/defaultData"; + +export class MyCocosSceneComponent extends cc.Component { + + // 生命周期 onLoad + onLoad() { + this.initSceneData(); + this.initSize(); + } + + _imageResList = null; + _audioResList = null; + _animaResList = null; + initSceneData() { + this._imageResList = []; + this._audioResList = []; + this._animaResList = []; + } + + _designSize = null; // 设计分辨率 + _frameSize = null; // å±å¹•分辨率 + _mapScaleMin = null; // 场景ä¸å¸¸ç”¨ç¼©æ”¾ï¼ˆå–大值) + _mapScaleMax = null; // 场景ä¸å¸¸ç”¨ç¼©æ”¾ï¼ˆå–å°å€¼ï¼‰ + _cocosScale = null; // cocos 自缩放 (较少用到) + initSize() { + // 注æ„cc.winSizeåªæœ‰åœ¨é€‚é…åŽ(修改fitHeight/fitWidthåŽ)æ‰èƒ½èŽ·å–到æ£ç¡®çš„值,å› æ¤ä½¿ç”¨cc.getFrameSize()æ¥èŽ·å–åˆå§‹çš„å±å¹•å¤§å° + let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height + let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height + let f = screen_size >= design_size + cc.Canvas.instance.fitHeight = f + cc.Canvas.instance.fitWidth = !f + + const frameSize = cc.view.getFrameSize(); + this._frameSize = frameSize; + + this._designSize = cc.view.getDesignResolutionSize(); + + let sx = cc.winSize.width / frameSize.width; + let sy = cc.winSize.height / frameSize.height; + this._cocosScale = Math.min(sx, sy); + + sx = frameSize.width / this._designSize.width; + sy = frameSize.height / this._designSize.height; + this._mapScaleMin = Math.min(sx, sy) * this._cocosScale; + this._mapScaleMax = Math.max(sx, sy) * this._cocosScale; + + cc.director['_scene'].width = frameSize.width; + cc.director['_scene'].height = frameSize.height; + } + + data = null; + + // 生命周期 start + start() { + let getData = this.getData.bind(this); + if (window && (<any>window).courseware) { + getData = (<any>window).courseware.getData; + } + + getData((data) => { + console.log('data:', data); + this.data = data || this.getDefaultData(); + this.data = JSON.parse(JSON.stringify(this.data)) + this.preloadItem() + // courseInScreen + // scene.distroy() courseOutScreen + }) + } + + getData(func) { + if (window && (<any>window).courseware) { + (<any>window).courseware.getData(func, 'scene'); + return; + } + + const middleLayer = cc.find('middleLayer'); + if (middleLayer) { + const middleLayerComponent = middleLayer.getComponent('middleLayer'); + middleLayerComponent.getData(func); + return; + } + + func(this.getDefaultData()); + } + + getDefaultData() { + return defaultData; + } + + preloadItem() { + this.addPreloadImage(); + this.addPreloadAudio(); + this.addPreloadAnima(); + this.preload(); + } + + addPreloadImage() { + } + + addPreloadAudio() { + } + + addPreloadAnima() { + } + + preload() { + const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList); + cc.assetManager.loadAny(preloadArr, null, null, (err, data) => { + + if (window && window["air"]) { + // window["air"].onCourseInScreen = (next) => { + // window["air"].isCourseInScreen = true; + // this.onLoadEnd(); + // next(); + // }; + this.onLoadEnd(); + window["air"].hideAirClassLoading(); + } else { + this.onLoadEnd(); + } + + cc.debug.setDisplayStats(false); + }); + } + + onLoadEnd() { + + } + + + + + + + + + + + + + + + + + // ------------------------------------------------ + getSprNode(resName) { + const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame; + const node = new cc.Node(); + node.addComponent(cc.Sprite).spriteFrame = sf; + return node; + } + + + getSpriteFrimeByUrl(url, cb) { + cc.loader.load({ url }, (err, img) => { + const spriteFrame = new cc.SpriteFrame(img) + if (cb) { + cb(spriteFrame); + } + }) + } + + getSprNodeByUrl(url, cb) { + const node = new cc.Node(); + const spr = node.addComponent(cc.Sprite); + this.getSpriteFrimeByUrl(url, (sf) => { + spr.spriteFrame = sf; + if (cb) { + cb(node); + } + }) + } + + playAudioByUrl(audio_url, cb = null) { + if (audio_url) { + cc.assetManager.loadRemote(audio_url, (err, audioClip) => { + const audioId = cc.audioEngine.play(audioClip, false, 0.8); + if (cb) { + cc.audioEngine.setFinishCallback(audioId, () => { + cb(); + }); + } + }); + } + } +} \ No newline at end of file diff --git a/play/assets/cocos_generator/script/MyCocosSceneComponent.ts.meta b/play/assets/cocos_generator/script/MyCocosSceneComponent.ts.meta new file mode 100644 index 0000000000000000000000000000000000000000..820e77c09e12653848439b1870bdf3775b959236 --- /dev/null +++ b/play/assets/cocos_generator/script/MyCocosSceneComponent.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.8", + "uuid": "f8b451ff-857c-4ca8-9870-866bc5154a29", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/play/assets/cocos-generator/script/defaultData.js b/play/assets/cocos_generator/script/defaultData.ts similarity index 100% rename from play/assets/cocos-generator/script/defaultData.js rename to play/assets/cocos_generator/script/defaultData.ts diff --git a/play/assets/cocos-generator/script/defaultData.js.meta b/play/assets/cocos_generator/script/defaultData.ts.meta similarity index 100% rename from play/assets/cocos-generator/script/defaultData.js.meta rename to play/assets/cocos_generator/script/defaultData.ts.meta diff --git a/play/assets/cocos-generator/script/runtime.js b/play/assets/cocos_generator/script/runtime.js similarity index 100% rename from play/assets/cocos-generator/script/runtime.js rename to play/assets/cocos_generator/script/runtime.js diff --git a/play/assets/cocos-generator/script/runtime.js.meta b/play/assets/cocos_generator/script/runtime.js.meta similarity index 100% rename from play/assets/cocos-generator/script/runtime.js.meta rename to play/assets/cocos_generator/script/runtime.js.meta diff --git a/play/assets/cocos-generator/script/util.js b/play/assets/cocos_generator/script/util.ts similarity index 98% rename from play/assets/cocos-generator/script/util.js rename to play/assets/cocos_generator/script/util.ts index 7af7189e0876a8c81ce489ad12ba830b9f98d9d2..ee8e662fc57e9654dbdc89c1a2386a7f25f86b2f 100644 --- a/play/assets/cocos-generator/script/util.js +++ b/play/assets/cocos_generator/script/util.ts @@ -165,7 +165,7 @@ export function getSprNodeByUrl(url, cb) { export function playAudio(audioClip, cb = null) { if (audioClip) { - const audioId = cc.audioEngine.playEffect(audioClip, false, 0.8); + const audioId = cc.audioEngine.playEffect(audioClip, false); if (cb) { cc.audioEngine.setFinishCallback(audioId, () => { cb(); @@ -178,7 +178,7 @@ export async function asyncDelay(time) { return new Promise((resolve, reject) => { try { setTimeout(() => { - resolve(); + resolve(null); }, time * 1000); } catch (e) { reject(e); @@ -296,7 +296,7 @@ export async function asyncTweenTo(node, duration, obj, ease = undefined) { cc.tween(node) .to(duration, obj, ease) .call(() => { - resolve(); + resolve(null); }) .start(); } catch (e) { @@ -311,7 +311,7 @@ export async function asyncTweenBy(node, duration, obj, ease = undefined) { cc.tween(node) .by(duration, obj, ease) .call(() => { - resolve(); + resolve(null); }) .start(); } catch (e) { diff --git a/play/assets/cocos-generator/script/util.js.meta b/play/assets/cocos_generator/script/util.ts.meta similarity index 100% rename from play/assets/cocos-generator/script/util.js.meta rename to play/assets/cocos_generator/script/util.ts.meta diff --git a/play/assets/cocos-generator/textures.meta b/play/assets/cocos_generator/textures.meta similarity index 100% rename from play/assets/cocos-generator/textures.meta rename to play/assets/cocos_generator/textures.meta diff --git a/play/assets/cocos-generator/textures/.keep b/play/assets/cocos_generator/textures/.keep similarity index 100% rename from play/assets/cocos-generator/textures/.keep rename to play/assets/cocos_generator/textures/.keep diff --git a/play/assets/cocos-generator/textures/1orange.png b/play/assets/cocos_generator/textures/1orange.png similarity index 100% rename from play/assets/cocos-generator/textures/1orange.png rename to play/assets/cocos_generator/textures/1orange.png diff --git a/play/assets/cocos-generator/textures/1orange.png.meta b/play/assets/cocos_generator/textures/1orange.png.meta similarity index 100% rename from play/assets/cocos-generator/textures/1orange.png.meta rename to play/assets/cocos_generator/textures/1orange.png.meta diff --git a/play/assets/cocos-generator/textures/bg.jpg b/play/assets/cocos_generator/textures/bg.jpg similarity index 100% rename from play/assets/cocos-generator/textures/bg.jpg rename to play/assets/cocos_generator/textures/bg.jpg diff --git a/play/assets/cocos-generator/textures/bg.jpg.meta b/play/assets/cocos_generator/textures/bg.jpg.meta similarity index 100% rename from play/assets/cocos-generator/textures/bg.jpg.meta rename to play/assets/cocos_generator/textures/bg.jpg.meta diff --git a/play/assets/cocos-generator/textures/btn_left.png b/play/assets/cocos_generator/textures/btn_left.png similarity index 100% rename from play/assets/cocos-generator/textures/btn_left.png rename to play/assets/cocos_generator/textures/btn_left.png diff --git a/play/assets/cocos-generator/textures/btn_left.png.meta b/play/assets/cocos_generator/textures/btn_left.png.meta similarity index 100% rename from play/assets/cocos-generator/textures/btn_left.png.meta rename to play/assets/cocos_generator/textures/btn_left.png.meta diff --git a/play/assets/cocos-generator/textures/btn_right.png b/play/assets/cocos_generator/textures/btn_right.png similarity index 100% rename from play/assets/cocos-generator/textures/btn_right.png rename to play/assets/cocos_generator/textures/btn_right.png diff --git a/play/assets/cocos-generator/textures/btn_right.png.meta b/play/assets/cocos_generator/textures/btn_right.png.meta similarity index 100% rename from play/assets/cocos-generator/textures/btn_right.png.meta rename to play/assets/cocos_generator/textures/btn_right.png.meta diff --git a/play/assets/cocos-generator/textures/icon.png b/play/assets/cocos_generator/textures/icon.png similarity index 100% rename from play/assets/cocos-generator/textures/icon.png rename to play/assets/cocos_generator/textures/icon.png diff --git a/play/assets/cocos-generator/textures/icon.png.meta b/play/assets/cocos_generator/textures/icon.png.meta similarity index 100% rename from play/assets/cocos-generator/textures/icon.png.meta rename to play/assets/cocos_generator/textures/icon.png.meta diff --git a/play/build_ios/jsb-link/.cocos-project.json b/play/build_ios/jsb-link/.cocos-project.json new file mode 100644 index 0000000000000000000000000000000000000000..7c8afcce2430f2761d1b3b8c8bb3efee65922337 --- /dev/null +++ b/play/build_ios/jsb-link/.cocos-project.json @@ -0,0 +1,7 @@ +{ + "engine_version": "2.4.5", + "has_native": true, + "project_type": "js", + "projectName": "play", + "packageName": "org.cocos2d.demo" +} \ No newline at end of file diff --git a/play/build_ios/jsb-link/cocos-project-template.json b/play/build_ios/jsb-link/cocos-project-template.json new file mode 100755 index 0000000000000000000000000000000000000000..50987724f543fcd05085881552378264137ea0fe --- /dev/null +++ b/play/build_ios/jsb-link/cocos-project-template.json @@ -0,0 +1,69 @@ +{ + "do_default": { + "exclude_from_template": [ + "frameworks/runtime-src" + ] + }, + "do_add_native_support": { + "append_from_template": { + "from": "frameworks/runtime-src", + "to": "frameworks/runtime-src", + "exclude": [ + "proj.ios_mac/HelloJavascript.xcodeproj/project.xcworkspace", + "proj.ios_mac/HelloJavascript.xcodeproj/xcuserdata", + "proj.win32/Debug.win32", + "proj.win32/Release.win32", + "proj.win32/HelloJavascript.sdf" + ] + }, + "append_file": [{ + "from": "cocos/scripting/js-bindings/manual/jsb_module_register.cpp", + "to": "frameworks/runtime-src/Classes/jsb_module_register.cpp" + }], + "project_rename": { + "src_project_name": "HelloJavascript", + "files": [ + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.filters", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.user", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.sln", + "frameworks/runtime-src/proj.ios_mac/PROJECT_NAME.xcodeproj" + ] + }, + "project_replace_project_name": { + "src_project_name": "HelloJavascript", + "files": [ + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.filters", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.user", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.sln", + "frameworks/runtime-src/proj.win32/main.cpp", + "frameworks/runtime-src/proj.android-studio/settings.gradle", + "frameworks/runtime-src/proj.android-studio/res/values/strings.xml", + "frameworks/runtime-src/proj.ios_mac/ios/main.m", + "frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch", + "frameworks/runtime-src/proj.ios_mac/PROJECT_NAME.xcodeproj/project.pbxproj", + "frameworks/runtime-src/Classes/AppDelegate.cpp" + ] + }, + "project_replace_package_name": { + "src_package_name": "org.cocos2dx.hellojavascript", + "files": [ + "frameworks/runtime-src/proj.android-studio/app/build.gradle", + "frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml" + ] + }, + "project_replace_mac_bundleid": { + "src_bundle_id": "org.cocos2dx.hellojavascript", + "files": [ + "frameworks/runtime-src/proj.ios_mac/mac/Info.plist" + ] + }, + "project_replace_ios_bundleid": { + "src_bundle_id": "org.cocos2dx.hellojavascript", + "files": [ + "frameworks/runtime-src/proj.ios_mac/ios/Info.plist" + ] + } + } +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp new file mode 100755 index 0000000000000000000000000000000000000000..f6f776c6b7b5eec65af9689bb79c2f577695203d --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -0,0 +1,88 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" + +#include "cocos2d.h" + +#include "cocos/scripting/js-bindings/manual/jsb_module_register.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_global.h" +#include "cocos/scripting/js-bindings/jswrapper/SeApi.h" +#include "cocos/scripting/js-bindings/event/EventDispatcher.h" +#include "cocos/scripting/js-bindings/manual/jsb_classtype.hpp" + +USING_NS_CC; + +AppDelegate::AppDelegate(int width, int height) : Application("Cocos Game", width, height) +{ +} + +AppDelegate::~AppDelegate() +{ +} + +bool AppDelegate::applicationDidFinishLaunching() +{ + se::ScriptEngine *se = se::ScriptEngine::getInstance(); + + jsb_set_xxtea_key(""); + jsb_init_file_operation_delegate(); + +#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0) + // Enable debugger here + jsb_enable_debugger("0.0.0.0", 6086, false); +#endif + + se->setExceptionCallback([](const char *location, const char *message, const char *stack) { + // Send exception information to server like Tencent Bugly. + cocos2d::log("\nUncaught Exception:\n - location : %s\n - msg : %s\n - detail : \n %s\n", location, message, stack); + }); + + jsb_register_all_modules(); + + se->start(); + + se::AutoHandleScope hs; + jsb_run_script("jsb-adapter/jsb-builtin.js"); + jsb_run_script("main.js"); + + se->addAfterCleanupHook([]() { + JSBClassType::destroy(); + }); + + return true; +} + +// This function will be called when the app is inactive. When comes a phone call,it's be invoked too +void AppDelegate::onPause() +{ + EventDispatcher::dispatchOnPauseEvent(); +} + +// this function will be called when the app is active again +void AppDelegate::onResume() +{ + EventDispatcher::dispatchOnResumeEvent(); +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/Classes/AppDelegate.h b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/AppDelegate.h new file mode 100755 index 0000000000000000000000000000000000000000..ed1d75415485266a34bd09a32f160dfca79d0d1a --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/AppDelegate.h @@ -0,0 +1,55 @@ +/**************************************************************************** + Copyright (c) 2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#pragma once + +#include "platform/CCApplication.h" +/** + @brief The cocos2d Application. + + The reason for implement as private inheritance is to hide some interface call by Director. + */ +class AppDelegate : public cocos2d::Application +{ +public: + AppDelegate(int width, int height); + virtual ~AppDelegate(); + + /** + @brief Implement Director and Scene init code here. + @return true Initialize success, app continue. + @return false Initialize failed, app terminate. + */ + virtual bool applicationDidFinishLaunching() override; + + /** + @brief The function be called when the application is paused + */ + virtual void onPause() override; + + /** + @brief The function be called when the application is resumed + */ + virtual void onResume() override; +}; diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/Classes/NativeConfig.h b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/NativeConfig.h new file mode 100755 index 0000000000000000000000000000000000000000..794398ff42353d0bc8c7c05f3ecf9309c173c692 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/NativeConfig.h @@ -0,0 +1,31 @@ +/**************************************************************************** + Copyright (c) 2020 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +//window size for mac +#define MACOS_WIN_SIZE_WIDTH 960 +#define MACOS_WIN_SIZE_HEIGHT 640 + +//window size for win32 +#define WINDOWS_WIN_SIZE_WIDTH 960 +#define WINDOWS_WIN_SIZE_HEIGHT 640 diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/Classes/jsb_module_register.cpp b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/jsb_module_register.cpp new file mode 100644 index 0000000000000000000000000000000000000000..422e82fe6a918e1b1f7985319b4702115d1764a7 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/Classes/jsb_module_register.cpp @@ -0,0 +1,194 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "cocos2d.h" + +#include "cocos/scripting/js-bindings/manual/jsb_module_register.hpp" +#include "cocos/scripting/js-bindings/jswrapper/SeApi.h" + +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp" + +#include "cocos/scripting/js-bindings/manual/jsb_global.h" +#include "cocos/scripting/js-bindings/manual/jsb_node.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_conversions.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_opengl_manual.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_platform.h" +#include "cocos/scripting/js-bindings/manual/jsb_cocos2dx_manual.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_xmlhttprequest.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_cocos2dx_network_manual.h" +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp" +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp" + +#if USE_GFX_RENDERER +#include "cocos/scripting/js-bindings/auto/jsb_gfx_auto.hpp" +#include "cocos/scripting/js-bindings/auto/jsb_renderer_auto.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_gfx_manual.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_renderer_manual.hpp" +#endif + +#if USE_SOCKET +#include "cocos/scripting/js-bindings/manual/jsb_websocket.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_socketio.hpp" +#if USE_WEBSOCKET_SERVER +#include "cocos/scripting/js-bindings/manual/jsb_websocket_server.hpp" +#endif +#endif // USE_SOCKET + +#if USE_AUDIO +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp" +#endif + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +#include "cocos/scripting/js-bindings/manual/JavaScriptObjCBridge.h" +#endif + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "cocos/scripting/js-bindings/manual/JavaScriptJavaBridge.h" +#endif + +#if USE_GFX_RENDERER && USE_MIDDLEWARE +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_editor_support_auto.hpp" + +#if USE_SPINE +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_spine_manual.hpp" +#endif + +#if USE_DRAGONBONES +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.hpp" +#include "cocos/scripting/js-bindings/manual/jsb_dragonbones_manual.hpp" +#endif + +#if USE_PARTICLE +#include "cocos/scripting/js-bindings/auto/jsb_cocos2dx_particle_auto.hpp" +#endif + +#endif // USE_MIDDLEWARE + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + +#if USE_VIDEO +#include "cocos/scripting/js-bindings/auto/jsb_video_auto.hpp" +#endif + +#if USE_WEB_VIEW +#include "cocos/scripting/js-bindings/auto/jsb_webview_auto.hpp" +#endif + +#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + +using namespace cocos2d; + +bool jsb_register_all_modules() +{ + se::ScriptEngine* se = se::ScriptEngine::getInstance(); + + se->addBeforeInitHook([](){ + JSBClassType::init(); + }); + + se->addBeforeCleanupHook([se](){ + se->garbageCollect(); + PoolManager::getInstance()->getCurrentPool()->clear(); + se->garbageCollect(); + PoolManager::getInstance()->getCurrentPool()->clear(); + }); + + se->addRegisterCallback(jsb_register_global_variables); + se->addRegisterCallback(JSB_register_opengl); + se->addRegisterCallback(register_all_engine); + se->addRegisterCallback(register_all_cocos2dx_manual); + se->addRegisterCallback(register_platform_bindings); + + se->addRegisterCallback(register_all_network); + se->addRegisterCallback(register_all_cocos2dx_network_manual); + se->addRegisterCallback(register_all_xmlhttprequest); + // extension depend on network + se->addRegisterCallback(register_all_extension); + +#if USE_GFX_RENDERER + se->addRegisterCallback(register_all_gfx); + se->addRegisterCallback(jsb_register_gfx_manual); + se->addRegisterCallback(register_all_renderer); + se->addRegisterCallback(jsb_register_renderer_manual); +#endif + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + se->addRegisterCallback(register_javascript_objc_bridge); +#endif + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + se->addRegisterCallback(register_javascript_java_bridge); +#endif + +#if USE_AUDIO + se->addRegisterCallback(register_all_audioengine); +#endif + +#if USE_SOCKET + se->addRegisterCallback(register_all_websocket); + se->addRegisterCallback(register_all_socketio); +#if USE_WEBSOCKET_SERVER + se->addRegisterCallback(register_all_websocket_server); +#endif +#endif + +#if USE_GFX_RENDERER && USE_MIDDLEWARE + se->addRegisterCallback(register_all_cocos2dx_editor_support); + +#if USE_SPINE + se->addRegisterCallback(register_all_cocos2dx_spine); + se->addRegisterCallback(register_all_spine_manual); +#endif + +#if USE_DRAGONBONES + se->addRegisterCallback(register_all_cocos2dx_dragonbones); + se->addRegisterCallback(register_all_dragonbones_manual); +#endif + +#if USE_PARTICLE + se->addRegisterCallback(register_all_cocos2dx_particle); +#endif + +#endif // USE_MIDDLEWARE + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + +#if USE_VIDEO + se->addRegisterCallback(register_all_video); +#endif + +#if USE_WEB_VIEW + se->addRegisterCallback(register_all_webview); +#endif + +#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + + se->addAfterCleanupHook([](){ + PoolManager::getInstance()->getCurrentPool()->clear(); + JSBClassType::destroy(); + }); + return true; +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/.gitignore b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..9c4de5825b194f36e90f594c680b6b87ccc56270 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/.gitignore @@ -0,0 +1,7 @@ +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/.gitignore b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..1de99493d640dc79021ae09da4b36db89e29fe30 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/.gitignore @@ -0,0 +1,2 @@ +/build +/jniLibs diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml new file mode 100755 index 0000000000000000000000000000000000000000..18c9b16346348e17e73de7519be0ce1968e68a9b --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="org.cocos2d.demo" + android:installLocation="auto"> + + <uses-feature android:glEsVersion="0x00020000" /> + + <uses-permission android:name="android.permission.INTERNET"/> + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> + + <application + android:allowBackup="true" + android:label="@string/app_name" + android:usesCleartextTraffic="true" + android:icon="@mipmap/ic_launcher"> + <!-- Tell Cocos2dxActivity the name of our .so --> + <meta-data android:name="android.app.lib_name" + android:value="cocos2djs" /> + + <activity + android:name="org.cocos2dx.javascript.AppActivity" + android:screenOrientation="sensorLandscape" + android:configChanges="orientation|keyboardHidden|screenSize|screenLayout" + android:label="@string/app_name" + android:theme="@android:style/Theme.NoTitleBar.Fullscreen" + android:launchMode="singleTask" + android:taskAffinity="" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/build.gradle b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/build.gradle new file mode 100755 index 0000000000000000000000000000000000000000..70e75dbedb1fbd14241310f050f588db1820c8b7 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/build.gradle @@ -0,0 +1,128 @@ +import org.apache.tools.ant.taskdefs.condition.Os + +apply plugin: 'com.android.application' + +android { + compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger() + buildToolsVersion PROP_BUILD_TOOLS_VERSION + + defaultConfig { + applicationId "org.cocos2d.demo" + minSdkVersion PROP_MIN_SDK_VERSION + targetSdkVersion PROP_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + + externalNativeBuild { + ndkBuild { + if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) { + // skip the NDK Build step if PROP_NDK_MODE is none + targets 'cocos2djs' + arguments 'NDK_TOOLCHAIN_VERSION=clang' + + def module_paths = [project.file("/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x"), + project.file("/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos"), + project.file("/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external")] + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + arguments 'NDK_MODULE_PATH=' + module_paths.join(";") + } + else { + arguments 'NDK_MODULE_PATH=' + module_paths.join(':') + } + + arguments '-j' + Runtime.runtime.availableProcessors() + abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String}) + } + } + } + } + + sourceSets.main { + java.srcDirs "../src", "src" + res.srcDirs "../res", 'res' + jniLibs.srcDirs "../libs", 'libs' + manifest.srcFile "AndroidManifest.xml" + } + + externalNativeBuild { + ndkBuild { + if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) { + // skip the NDK Build step if PROP_NDK_MODE is none + path "jni/Android.mk" + } + } + } + + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + + buildTypes { + release { + debuggable false + jniDebuggable false + renderscriptDebuggable false + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } + + externalNativeBuild { + ndkBuild { + arguments 'NDK_DEBUG=0' + } + } + } + + debug { + debuggable true + jniDebuggable true + renderscriptDebuggable true + externalNativeBuild { + ndkBuild { + arguments 'NDK_DEBUG=1' + } + } + } + } +} + +android.applicationVariants.all { variant -> + // delete previous files first + delete "${buildDir}/intermediates/merged_assets/${variant.dirName}" + + variant.mergeAssets.doLast { + def sourceDir = "${buildDir}/../../../../.." + + copy { + from "${sourceDir}" + include "assets/**" + include "src/**" + include "jsb-adapter/**" + into outputDir + } + + copy { + from "${sourceDir}/main.js" + from "${sourceDir}/project.json" + into outputDir + } + } +} + +dependencies { + implementation fileTree(dir: '../libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: 'libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar']) + implementation project(':libcocos2dx') +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk new file mode 100755 index 0000000000000000000000000000000000000000..5abd06518202a1d476e71fffed52aa6cf4c99310 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk @@ -0,0 +1,2 @@ +LOCAL_PATH := $(call my-dir) +include $(LOCAL_PATH)/../../jni/CocosAndroid.mk diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Application.mk b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Application.mk new file mode 100755 index 0000000000000000000000000000000000000000..946b4fdf8f6485d6e88e31b728c9cb26816f163f --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/jni/Application.mk @@ -0,0 +1,2 @@ +LOCAL_PATH :=$(call my-dir) +include $(LOCAL_PATH)/../../jni/CocosApplication.mk \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/proguard-rules.pro b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/proguard-rules.pro new file mode 100755 index 0000000000000000000000000000000000000000..4abbf54cc086665739b2668e032e9e0a3a217a45 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/proguard-rules.pro @@ -0,0 +1,44 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in E:\developSoftware\Android\SDK/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Proguard Cocos2d-x-lite for release +-keep public class org.cocos2dx.** { *; } +-dontwarn org.cocos2dx.** + +# Proguard Apache HTTP for release +-keep class org.apache.http.** { *; } +-dontwarn org.apache.http.** + +# Proguard okhttp for release +-keep class okhttp3.** { *; } +-dontwarn okhttp3.** + +-keep class okio.** { *; } +-dontwarn okio.** + +# Proguard Android Webivew for release. you can comment if you are not using a webview +-keep public class android.net.http.SslError +-keep public class android.webkit.WebViewClient + +-dontwarn android.webkit.WebView +-dontwarn android.net.http.SslError +-dontwarn android.webkit.WebViewClient + +# keep anysdk for release. you can comment if you are not using anysdk +-keep public class com.anysdk.** { *; } +-dontwarn com.anysdk.** diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/project.properties b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/project.properties new file mode 100755 index 0000000000000000000000000000000000000000..f049142c179997a39273e97b75614cf42c9e1b88 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java new file mode 100755 index 0000000000000000000000000000000000000000..2eb59547491f09b34df95cc6d80c69f3e16e3cb8 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java @@ -0,0 +1,144 @@ +/**************************************************************************** +Copyright (c) 2015-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +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 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package org.cocos2dx.javascript; + +import org.cocos2dx.lib.Cocos2dxActivity; +import org.cocos2dx.lib.Cocos2dxGLSurfaceView; + +import android.os.Bundle; + +import android.content.Intent; +import android.content.res.Configuration; + +public class AppActivity extends Cocos2dxActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // Workaround in + // https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + // Android launched another instance of the root activity into an existing task + // so just quietly finish and go away, dropping the user back into the activity + // at the top of the stack (ie: the last state of this task) + // Don't need to finish it again since it's finished in super.onCreate . + return; + } + // DO OTHER INITIALIZATION BELOW + SDKWrapper.getInstance().init(this); + + } + + @Override + public Cocos2dxGLSurfaceView onCreateView() { + Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); + // TestCpp should create stencil buffer + glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8); + SDKWrapper.getInstance().setGLSurfaceView(glSurfaceView, this); + + return glSurfaceView; + } + + @Override + protected void onResume() { + super.onResume(); + SDKWrapper.getInstance().onResume(); + + } + + @Override + protected void onPause() { + super.onPause(); + SDKWrapper.getInstance().onPause(); + + } + + @Override + protected void onDestroy() { + super.onDestroy(); + + // Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + return; + } + + SDKWrapper.getInstance().onDestroy(); + + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + SDKWrapper.getInstance().onActivityResult(requestCode, resultCode, data); + } + + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + SDKWrapper.getInstance().onNewIntent(intent); + } + + @Override + protected void onRestart() { + super.onRestart(); + SDKWrapper.getInstance().onRestart(); + } + + @Override + protected void onStop() { + super.onStop(); + SDKWrapper.getInstance().onStop(); + } + + @Override + public void onBackPressed() { + SDKWrapper.getInstance().onBackPressed(); + super.onBackPressed(); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + SDKWrapper.getInstance().onConfigurationChanged(newConfig); + super.onConfigurationChanged(newConfig); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + SDKWrapper.getInstance().onRestoreInstanceState(savedInstanceState); + super.onRestoreInstanceState(savedInstanceState); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + SDKWrapper.getInstance().onSaveInstanceState(outState); + super.onSaveInstanceState(outState); + } + + @Override + protected void onStart() { + SDKWrapper.getInstance().onStart(); + super.onStart(); + } +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/build-cfg.json b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/build-cfg.json new file mode 100755 index 0000000000000000000000000000000000000000..b9e7078389c4c208f878c37f1ad1a12e1ecd4537 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/build-cfg.json @@ -0,0 +1,8 @@ +{ + "ndk_module_path" :[ + "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x", + "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos", + "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external" + ], + "copy_resources": [] +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle new file mode 100755 index 0000000000000000000000000000000000000000..a8d0fcfae8fe424ec3c82e946f5030cef35df665 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle @@ -0,0 +1,30 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.2.0' + + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + flatDir { + dirs 'libs' + } + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/.gitignore b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..796b96d1c402326528b4ba3c12ee9d92d0e212e9 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/.gitignore @@ -0,0 +1 @@ +/build diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/AndroidManifest.xml b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..cbd25538567ed958a1a4dc0cf3c04068a260ace5 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/AndroidManifest.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:dist="http://schemas.android.com/apk/distribution" + xmlns:tools="http://schemas.android.com/tools" + package="org.cocos2dx.javascript"> + <dist:module dist:instant="true" /> + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher" + android:usesCleartextTraffic="true" + android:supportsRtl="true"> + <meta-data + android:name="aia-compat-api-min-version" + android:value="1" /> + + <meta-data android:name="android.app.lib_name" + android:value="cocos2djs" /> + + <activity + android:name="org.cocos2dx.javascript.InstantAppActivity" + android:screenOrientation="sensorLandscape" + android:configChanges="orientation|keyboardHidden|screenSize|screenLayout" + android:label="@string/app_name" + android:launchMode="singleTask" + android:taskAffinity="" + android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > + + <intent-filter android:order="1"> + <action android:name="android.intent.action.VIEW" /> + + <category android:name="android.intent.category.BROWSABLE" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + + <uses-feature android:glEsVersion="0x00020000" /> + <uses-permission android:name="android.permission.INTERNET"/> + <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/> + <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> + <uses-permission android:name="android.permission.READ_PHONE_STATE"/> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> + <uses-permission android:name="android.permission.RESTART_PACKAGES" /> + <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" + tools:ignore="ProtectedPermissions" /> + <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> +</manifest> \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/build.gradle b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..5d0258f35d91b80ba289d1bc7865fb12f0e7c828 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/build.gradle @@ -0,0 +1,129 @@ +import org.apache.tools.ant.taskdefs.condition.Os +apply plugin: 'com.android.feature' +android { + baseFeature true + compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger() + buildToolsVersion PROP_BUILD_TOOLS_VERSION + + defaultConfig { + minSdkVersion PROP_MIN_SDK_VERSION + targetSdkVersion PROP_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + + externalNativeBuild { + ndkBuild { + if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) { + // skip the NDK Build step if PROP_NDK_MODE is none + targets 'cocos2djs' + arguments 'NDK_TOOLCHAIN_VERSION=clang' + + def module_paths = [project.file("/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x"), + project.file("/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos"), + project.file("/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external")] + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + arguments 'NDK_MODULE_PATH=' + module_paths.join(";") + } + else { + arguments 'NDK_MODULE_PATH=' + module_paths.join(':') + } + + arguments '-j' + Runtime.runtime.availableProcessors() + abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String}) + } + } + } + } + + sourceSets.main { + java.srcDirs "../src", "src" + res.srcDirs "../res", 'res' + jniLibs.srcDirs "../libs", 'libs' + manifest.srcFile "AndroidManifest.xml" + } + + externalNativeBuild { + ndkBuild { + if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) { + // skip the NDK Build step if PROP_NDK_MODE is none + path "jni/Android.mk" + } + } + } + + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + + buildTypes { + release { + debuggable false + jniDebuggable false + renderscriptDebuggable false + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } + + externalNativeBuild { + ndkBuild { + arguments 'NDK_DEBUG=0' + } + } + } + + debug { + debuggable true + jniDebuggable true + renderscriptDebuggable true + externalNativeBuild { + ndkBuild { + arguments 'NDK_DEBUG=1' + } + } + } + } + +} + +android.featureVariants.all { variant -> + // delete previous files first + delete "${buildDir}/intermediates/merged_assets/" + + variant.mergeAssets.doLast { + def sourceDir = "${buildDir}/../../../../.." + + copy { + from "${sourceDir}" + include "assets/**" + include "src/**" + include "jsb-adapter/**" + into outputDir + } + + copy { + from "${sourceDir}/main.js" + from "${sourceDir}/project.json" + into outputDir + } + } +} + +dependencies { + implementation fileTree(dir: '../libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: 'libs', include: ['*.jar','*.aar']) + implementation fileTree(dir: "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar']) + implementation 'com.google.android.instantapps:instantapps:1.1.0' + implementation 'com.google.android.gms:play-services-instantapps:16.0.0' + implementation project(':libcocos2dx') +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/jni/Android.mk b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/jni/Android.mk new file mode 100755 index 0000000000000000000000000000000000000000..4215af39efdc94a58badfcf4e646e674dff28da9 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/jni/Android.mk @@ -0,0 +1,2 @@ +LOCAL_PATH :=$(call my-dir) +include $(LOCAL_PATH)/../../jni/CocosAndroid.mk \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/jni/Application.mk b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/jni/Application.mk new file mode 100755 index 0000000000000000000000000000000000000000..0615833945586a5b81960834f0236259b6c55eb0 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/jni/Application.mk @@ -0,0 +1,5 @@ +LOCAL_PATH := $(call my-dir) +include $(LOCAL_PATH)/../../jni/CocosApplication.mk + +# Android instant apps flag +APP_CFLAGS += -DANDROID_INSTANT=1 diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/proguard-rules.pro b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/proguard-rules.pro new file mode 100755 index 0000000000000000000000000000000000000000..7426f9a2a8948b14e276701048234172f931de1b --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/proguard-rules.pro @@ -0,0 +1,45 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in E:\developSoftware\Android\SDK/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Proguard Cocos2d-x-lite for release +-keep public class org.cocos2dx.** { *; } +-dontwarn org.cocos2dx.** + +# Proguard Apache HTTP for release +-keep class org.apache.http.** { *; } +-dontwarn org.apache.http.** + +# Proguard okhttp for release +-keep class okhttp3.** { *; } +-dontwarn okhttp3.** + +-keep class okio.** { *; } +-dontwarn okio.** + + +# Proguard Android Webivew for release. you can comment if you are not using a webview +-keep public class android.net.http.SslError +-keep public class android.webkit.WebViewClient + +-dontwarn android.webkit.WebView +-dontwarn android.net.http.SslError +-dontwarn android.webkit.WebViewClient + +# keep anysdk for release. you can comment if you are not using anysdk +-keep public class com.anysdk.** { *; } +-dontwarn com.anysdk.** diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/org/cocos2dx/javascript/InstantAppActivity.java b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/org/cocos2dx/javascript/InstantAppActivity.java new file mode 100755 index 0000000000000000000000000000000000000000..52c69983c619782a6a735cf55c6f9a7589ff2e63 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/org/cocos2dx/javascript/InstantAppActivity.java @@ -0,0 +1,144 @@ +/**************************************************************************** +Copyright (c) 2015-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +http://www.cocos2d-x.org + +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 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package org.cocos2dx.javascript; + +import org.cocos2dx.lib.Cocos2dxActivity; +import org.cocos2dx.lib.Cocos2dxGLSurfaceView; + +import android.os.Bundle; + +import android.content.Intent; +import android.content.res.Configuration; + +public class InstantAppActivity extends Cocos2dxActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // Workaround in + // https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + // Android launched another instance of the root activity into an existing task + // so just quietly finish and go away, dropping the user back into the activity + // at the top of the stack (ie: the last state of this task) + // Don't need to finish it again since it's finished in super.onCreate . + return; + } + // DO OTHER INITIALIZATION BELOW + SDKWrapper.getInstance().init(this); + + } + + @Override + public Cocos2dxGLSurfaceView onCreateView() { + Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); + // TestCpp should create stencil buffer + glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8); + SDKWrapper.getInstance().setGLSurfaceView(glSurfaceView, this); + + return glSurfaceView; + } + + @Override + protected void onResume() { + super.onResume(); + SDKWrapper.getInstance().onResume(); + + } + + @Override + protected void onPause() { + super.onPause(); + SDKWrapper.getInstance().onPause(); + + } + + @Override + protected void onDestroy() { + super.onDestroy(); + + // Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + return; + } + + SDKWrapper.getInstance().onDestroy(); + + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + SDKWrapper.getInstance().onActivityResult(requestCode, resultCode, data); + } + + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + SDKWrapper.getInstance().onNewIntent(intent); + } + + @Override + protected void onRestart() { + super.onRestart(); + SDKWrapper.getInstance().onRestart(); + } + + @Override + protected void onStop() { + super.onStop(); + SDKWrapper.getInstance().onStop(); + } + + @Override + public void onBackPressed() { + SDKWrapper.getInstance().onBackPressed(); + super.onBackPressed(); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + SDKWrapper.getInstance().onConfigurationChanged(newConfig); + super.onConfigurationChanged(newConfig); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + SDKWrapper.getInstance().onRestoreInstanceState(savedInstanceState); + super.onRestoreInstanceState(savedInstanceState); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + SDKWrapper.getInstance().onSaveInstanceState(outState); + super.onSaveInstanceState(outState); + } + + @Override + protected void onStart() { + SDKWrapper.getInstance().onStart(); + super.onStart(); + } +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/org/cocos2dx/javascript/InstantHelper.java b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/org/cocos2dx/javascript/InstantHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..ac757f6890b30b812df0fe0f5a8aaa72ddd9f9ce --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/org/cocos2dx/javascript/InstantHelper.java @@ -0,0 +1,115 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +package org.cocos2dx.javascript; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.net.Uri; +import android.util.Log; + +import com.google.android.gms.instantapps.InstantApps; +import com.google.android.gms.instantapps.PackageManagerCompat; + +public class InstantHelper { + private static final String TAG = "InstantHelper"; + private Context mCtx = null; + private static InstantHelper mHelper = null; + + public static InstantHelper getInstance() { + if (null == mHelper) { + mHelper = new InstantHelper(); + mHelper.init(SDKWrapper.getInstance().getContext()); + } + return mHelper; + } + + public void init(Context ctx) { + this.mCtx = ctx; + } + + private void _showInstallPrompt() { + Activity act = ((Activity) mCtx); + Uri a = act.getIntent().getData(); + Intent postInstallIntent = new Intent(Intent.ACTION_VIEW, a); + postInstallIntent.addCategory(Intent.CATEGORY_BROWSABLE); + com.google.android.instantapps.InstantApps.showInstallPrompt(act, postInstallIntent, 0, "AppActivity"); + } + + private boolean _isInstantApp() { + PackageManagerCompat compact = InstantApps.getPackageManagerCompat(mCtx); + return compact.isInstantApp(); + } + + private boolean _setInstantAppCookie(String ck) { + PackageManagerCompat compact = InstantApps.getPackageManagerCompat(mCtx); + if (null == ck || "null".equals(ck)) { + return compact.setInstantAppCookie(null); + } + return compact.setInstantAppCookie(ck.getBytes()); + } + + private String _getInstantAppCookie() { + String result; + PackageManagerCompat compact = InstantApps.getPackageManagerCompat(mCtx); + byte[] bt = compact.getInstantAppCookie(); + if (bt != null) { + result = new String(bt); + } else { + result = "null"; + } + return result; + } + + private int _getInstantAppCookieMaxSize() { + PackageManagerCompat compact = InstantApps.getPackageManagerCompat(mCtx); + return compact.getInstantAppCookieMaxSize(); + } + + public static boolean isInstantApp() { + return InstantHelper.getInstance()._isInstantApp(); + } + + public static String getInstantAppCookie() { + return InstantHelper.getInstance()._getInstantAppCookie(); + } + + public static boolean setInstantAppCookie(final String ck) { + return InstantHelper.getInstance()._setInstantAppCookie(ck); + } + + public static boolean clearInstantAppCookie() { + return InstantHelper.getInstance()._setInstantAppCookie(null); + } + + public static int getInstantAppCookieMaxSize() { + return InstantHelper.getInstance()._getInstantAppCookieMaxSize(); + } + + public static void showInstallPrompt() { + InstantHelper.getInstance()._showInstallPrompt(); + } +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle.properties b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle.properties new file mode 100755 index 0000000000000000000000000000000000000000..05e4acf41340174b5f30fe9265eba751c1ae54a7 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle.properties @@ -0,0 +1,44 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# Android SDK version that will be used as the compile project +PROP_COMPILE_SDK_VERSION=27 + +# Android SDK version that will be used as the earliest version of android this application can run on +PROP_MIN_SDK_VERSION=16 + +# Android SDK version that will be used as the latest version of android this application has been tested on +PROP_TARGET_SDK_VERSION=27 + +# Android Build Tools version that will be used as the compile project +PROP_BUILD_TOOLS_VERSION=28.0.3 + +# List of CPU Archtexture to build that application with +# Available architextures (armeabi-v7a | arm64-v8a | x86) +# To build for multiple architexture, use the `:` between them +# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86 +PROP_APP_ABI=armeabi-v7a + +# fill in sign information for release mode +RELEASE_STORE_FILE= +RELEASE_STORE_PASSWORD= +RELEASE_KEY_ALIAS= +RELEASE_KEY_PASSWORD= + +android.injected.testOnly=false diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle/wrapper/gradle-wrapper.jar b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle/wrapper/gradle-wrapper.jar new file mode 100755 index 0000000000000000000000000000000000000000..8c0fb64a8698b08ecc4158d828ca593c4928e9dd Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle/wrapper/gradle-wrapper.jar differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle/wrapper/gradle-wrapper.properties b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle/wrapper/gradle-wrapper.properties new file mode 100755 index 0000000000000000000000000000000000000000..46f17a98ec4f402d8c0e65a2d6fc46a6a0ce203b --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Oct 27 10:18:28 CST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradlew b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..91a7e269e19dfc62e27137a0b57ef3e430cee4fd --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradlew.bat b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradlew.bat new file mode 100755 index 0000000000000000000000000000000000000000..8a0b282aa6885fb573c106b3551f7275c5f17e8e --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/.gitignore b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..796b96d1c402326528b4ba3c12ee9d92d0e212e9 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/.gitignore @@ -0,0 +1 @@ +/build diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build.gradle b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..a980b3cfa840c4f68ac62ab5c9b71c1446ca35bb --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build.gradle @@ -0,0 +1,5 @@ +apply plugin: 'com.android.instantapp' + +dependencies { + implementation project(':game') +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/CocosAndroid.mk b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/CocosAndroid.mk new file mode 100755 index 0000000000000000000000000000000000000000..3782f0a15403629153466750d9ed600781759fdf --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/CocosAndroid.mk @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos2djs + +LOCAL_MODULE_FILENAME := libcocos2djs + +ifeq ($(USE_ARM_MODE),1) +LOCAL_ARM_MODE := arm +endif + +LOCAL_SRC_FILES := hellojavascript/main.cpp \ + ../../Classes/AppDelegate.cpp \ + ../../Classes/jsb_module_register.cpp \ + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes + +LOCAL_STATIC_LIBRARIES := cocos2dx_static + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module, cocos) diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/CocosApplication.mk b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/CocosApplication.mk new file mode 100755 index 0000000000000000000000000000000000000000..7b1c631ee5a9e91d371ec41ad36ae206a7667f70 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/CocosApplication.mk @@ -0,0 +1,49 @@ +APP_STL := c++_static + +# Uncomment this line to compile to armeabi-v7a, your application will run faster but support less devices +APP_ABI := armeabi-v7a + +APP_CPPFLAGS := -frtti -std=c++11 -fsigned-char +APP_LDFLAGS := -latomic + +# To solve windows commands char length too long +APP_SHORT_COMMANDS := true + +USE_ARM_MODE := 1 + +# MUST be careful to modify this manually +# disable module will speed up compile time, and reduce package size +USE_GFX_RENDERER := 1 +USE_VIDEO := 1 +USE_WEB_VIEW := 1 +USE_AUDIO := 1 +USE_SOCKET := 1 +USE_SPINE := 1 +USE_DRAGONBONES := 1 +USE_TIFF := 1 +USE_MIDDLEWARE := 1 +USE_PARTICLE := 1 + +APP_CPPFLAGS += -DUSE_GFX_RENDERER=$(USE_GFX_RENDERER) +APP_CPPFLAGS += -DUSE_VIDEO=${USE_VIDEO} +APP_CPPFLAGS += -DUSE_WEB_VIEW=${USE_WEB_VIEW} +APP_CPPFLAGS += -DUSE_AUDIO=${USE_AUDIO} +APP_CPPFLAGS += -DUSE_SOCKET=${USE_SOCKET} +APP_CPPFLAGS += -DUSE_SPINE=${USE_SPINE} +APP_CPPFLAGS += -DUSE_DRAGONBONES=${USE_DRAGONBONES} +APP_CPPFLAGS += -DCC_USE_TIFF=${USE_TIFF} +APP_CPPFLAGS += -DUSE_MIDDLEWARE=${USE_MIDDLEWARE} +APP_CPPFLAGS += -DUSE_PARTICLE=${USE_PARTICLE} + +ifeq ($(NDK_DEBUG),1) + APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 + APP_CFLAGS += -DCOCOS2D_DEBUG=1 + APP_OPTIM := debug +else + APP_CPPFLAGS += -DNDEBUG + APP_CFLAGS += -DNDEBUG + APP_OPTIM := release +endif + +# Some Android Simulators don't support SSE instruction, so disable it for x86 arch. +APP_CPPFLAGS += -U__SSE__ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/hellojavascript/main.cpp b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/hellojavascript/main.cpp new file mode 100755 index 0000000000000000000000000000000000000000..df636ff603ac909cb349ac35ce92c505d02de44d --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/jni/hellojavascript/main.cpp @@ -0,0 +1,53 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "cocos2d.h" +#include "platform/android/jni/JniHelper.h" +#include <jni.h> +#include <android/log.h> + +#define LOG_TAG "main" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) +using namespace cocos2d; + +//called when JNI_OnLoad() +void cocos_jni_env_init(JNIEnv *env) +{ + LOGD("cocos_jni_env_init"); +} + +//called when onSurfaceCreated() +Application *cocos_android_app_init(JNIEnv *env, int width, int height) +{ + LOGD("cocos_android_app_init"); + auto app = new AppDelegate(width, height); + return app; +} + +extern "C" +{ + /*JNI_CALL_FUNCTION*/ +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-hdpi/ic_launcher.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-hdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..8aa4767c2fbfed5ac39e5f9e8f3e05ee520d9619 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-hdpi/ic_launcher.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-mdpi/ic_launcher.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-mdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..d53fbdd8cbc5a812199e0e9d534ec9ab7205547f Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-mdpi/ic_launcher.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xhdpi/ic_launcher.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xhdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..2f72eac17fd59aa7563705e8d82ef5d9a192cb32 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xxhdpi/ic_launcher.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xxhdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..1526615c02d1a801eb71bceb3e9442e085bcd6e8 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/values/strings.xml b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/values/strings.xml new file mode 100755 index 0000000000000000000000000000000000000000..ab84482fb7bb7756662ac9e08c6d55d1294403e9 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name" translatable="false">play</string> +</resources> diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/settings.gradle b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/settings.gradle new file mode 100755 index 0000000000000000000000000000000000000000..19a4647992ca2217bc5bbaf59dab47bedb74b7bf --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/settings.gradle @@ -0,0 +1,4 @@ +include ':libcocos2dx',':game', ':instantapp' +project(':libcocos2dx').projectDir = new File('/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/libcocos2dx') +include ':play' +project(':play').projectDir = new File(settingsDir, 'app') diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/SDKWrapper.java b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/SDKWrapper.java new file mode 100644 index 0000000000000000000000000000000000000000..4cc8cf3ad3846a43f3d5594aaa521a49619d5cfa --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/SDKWrapper.java @@ -0,0 +1,179 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +package org.cocos2dx.javascript; + +import android.content.Context; +import android.content.Intent; +import android.content.res.AssetManager; +import android.content.res.Configuration; +import android.opengl.GLSurfaceView; +import android.os.Bundle; +import org.cocos2dx.javascript.service.SDKClass; +import org.json.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + +public class SDKWrapper { + private Context mainActive = null; + private static SDKWrapper mInstace = null; + private List<SDKClass> sdkClasses; + + public static SDKWrapper getInstance() { + if (null == mInstace) { + mInstace = new SDKWrapper(); + } + return mInstace; + } + + public void init(Context context) { + this.mainActive = context; + for (SDKClass sdk : this.sdkClasses) { + sdk.init(context); + } + } + + public Context getContext() { + return this.mainActive; + } + + public void loadSDKClass() { + ArrayList<SDKClass> classes = new ArrayList<SDKClass>(); + try { + String json = this.getJson(this.mainActive, "project.json"); + JSONObject jsonObject = new JSONObject(json); + JSONArray serviceClassPath = jsonObject.getJSONArray("serviceClassPath"); + if (serviceClassPath == null) return; + int length = serviceClassPath.length(); + for (int i = 0; i < length; i++) { + String classPath = serviceClassPath.getString(i); + SDKClass sdk = (SDKClass) Class.forName(classPath).newInstance(); + classes.add(sdk); + } + } catch (Exception e) { + e.printStackTrace(); + } + this.sdkClasses = classes; + } + + private String getJson(Context mContext, String fileName) { + StringBuilder sb = new StringBuilder(); + AssetManager am = mContext.getAssets(); + try { + BufferedReader br = new BufferedReader(new InputStreamReader(am.open(fileName))); + String next = ""; + while (null != (next = br.readLine())) { + sb.append(next); + } + } catch (IOException e) { + e.printStackTrace(); + sb.delete(0, sb.length()); + } + return sb.toString().trim(); + } + + public void setGLSurfaceView(GLSurfaceView view, Context context) { + this.mainActive = context; + this.loadSDKClass(); + for (SDKClass sdk : this.sdkClasses) { + sdk.setGLSurfaceView(view); + } + } + + public void onResume() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onResume(); + } + } + + public void onPause() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onPause(); + } + } + + public void onDestroy() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onDestroy(); + } + } + + public void onActivityResult(int requestCode, int resultCode, Intent data) { + for (SDKClass sdk : this.sdkClasses) { + sdk.onActivityResult(requestCode, resultCode, data); + } + } + + public void onNewIntent(Intent intent) { + for (SDKClass sdk : this.sdkClasses) { + sdk.onNewIntent(intent); + } + } + + public void onRestart() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onRestart(); + } + } + + public void onStop() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onStop(); + } + } + + public void onBackPressed() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onBackPressed(); + } + } + + public void onConfigurationChanged(Configuration newConfig) { + for (SDKClass sdk : this.sdkClasses) { + sdk.onConfigurationChanged(newConfig); + } + } + + public void onRestoreInstanceState(Bundle savedInstanceState) { + for (SDKClass sdk : this.sdkClasses) { + sdk.onRestoreInstanceState(savedInstanceState); + } + } + + public void onSaveInstanceState(Bundle outState) { + for (SDKClass sdk : this.sdkClasses) { + sdk.onSaveInstanceState(outState); + } + } + + public void onStart() { + for (SDKClass sdk : this.sdkClasses) { + sdk.onStart(); + } + } +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/service/SDKClass.java b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/service/SDKClass.java new file mode 100644 index 0000000000000000000000000000000000000000..d296192d3648657f04d955e30bd4a0a8d7252244 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/service/SDKClass.java @@ -0,0 +1,40 @@ +package org.cocos2dx.javascript.service; + +import android.content.Context; +import android.content.Intent; +import android.content.res.Configuration; +import android.opengl.GLSurfaceView; +import android.os.Bundle; + +public abstract class SDKClass implements SDKInterface { + private Context mainActive = null; + public Context getContext(){ return mainActive;} + @Override + public void init(Context context){ this.mainActive = context; } + @Override + public void setGLSurfaceView(GLSurfaceView view){} + @Override + public void onResume(){} + @Override + public void onPause(){} + @Override + public void onDestroy(){} + @Override + public void onActivityResult(int requestCode, int resultCode, Intent data){} + @Override + public void onNewIntent(Intent intent){} + @Override + public void onRestart(){} + @Override + public void onStop(){} + @Override + public void onBackPressed(){} + @Override + public void onConfigurationChanged(Configuration newConfig){} + @Override + public void onRestoreInstanceState(Bundle savedInstanceState){} + @Override + public void onSaveInstanceState(Bundle outState){} + @Override + public void onStart(){} +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/service/SDKInterface.java b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/service/SDKInterface.java new file mode 100644 index 0000000000000000000000000000000000000000..a13a32913176b88008371c41495c3c57e7849fe3 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/service/SDKInterface.java @@ -0,0 +1,24 @@ +package org.cocos2dx.javascript.service; + +import android.content.Context; +import android.content.Intent; +import android.content.res.Configuration; +import android.opengl.GLSurfaceView; +import android.os.Bundle; + +public interface SDKInterface { + void init(Context context); + void setGLSurfaceView(GLSurfaceView view); + void onResume(); + void onPause(); + void onDestroy(); + void onActivityResult(int requestCode, int resultCode, Intent data); + void onNewIntent(Intent intent); + void onRestart(); + void onStop(); + void onBackPressed(); + void onConfigurationChanged(Configuration newConfig); + void onRestoreInstanceState(Bundle savedInstanceState); + void onSaveInstanceState(Bundle outState); + void onStart(); +} \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/AppController.h b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/AppController.h new file mode 100755 index 0000000000000000000000000000000000000000..10d55da7b97679da5c4bab2c36620e4c42a3d62f --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/AppController.h @@ -0,0 +1,37 @@ +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#import <UIKit/UIKit.h> + +@class RootViewController; + +@interface AppController : NSObject <UIApplicationDelegate> +{ +} + +@property(nonatomic, readonly) RootViewController* viewController; + +@end + diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm new file mode 100755 index 0000000000000000000000000000000000000000..18d9d325788559403a9184183b73130c44fe0a3a --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,137 @@ +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import "AppController.h" +#import "cocos2d.h" +#import "AppDelegate.h" +#import "RootViewController.h" +#import "SDKWrapper.h" +#import "platform/ios/CCEAGLView-ios.h" + + + +using namespace cocos2d; + +@implementation AppController + +Application* app = nullptr; +@synthesize window; + +#pragma mark - +#pragma mark Application lifecycle + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [[SDKWrapper getInstance] application:application didFinishLaunchingWithOptions:launchOptions]; + // Add the view controller's view to the window and display. + float scale = [[UIScreen mainScreen] scale]; + CGRect bounds = [[UIScreen mainScreen] bounds]; + window = [[UIWindow alloc] initWithFrame: bounds]; + + // cocos2d application instance + app = new AppDelegate(bounds.size.width * scale, bounds.size.height * scale); + app->setMultitouch(true); + + // Use RootViewController to manage CCEAGLView + _viewController = [[RootViewController alloc]init]; +#ifdef NSFoundationVersionNumber_iOS_7_0 + _viewController.automaticallyAdjustsScrollViewInsets = NO; + _viewController.extendedLayoutIncludesOpaqueBars = NO; + _viewController.edgesForExtendedLayout = UIRectEdgeAll; +#else + _viewController.wantsFullScreenLayout = YES; +#endif + // Set RootViewController to window + if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) + { + // warning: addSubView doesn't work on iOS6 + [window addSubview: _viewController.view]; + } + else + { + // use this method on ios6 + [window setRootViewController:_viewController]; + } + + [window makeKeyAndVisible]; + + [[UIApplication sharedApplication] setStatusBarHidden:YES]; + + //run the cocos2d-x game scene + app->start(); + + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ + app->onPause(); + [[SDKWrapper getInstance] applicationWillResignActive:application]; +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ + app->onResume(); + [[SDKWrapper getInstance] applicationDidBecomeActive:application]; +} + +- (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. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ + [[SDKWrapper getInstance] applicationDidEnterBackground:application]; +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ + [[SDKWrapper getInstance] applicationWillEnterForeground:application]; +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + [[SDKWrapper getInstance] applicationWillTerminate:application]; + delete app; + app = nil; +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ +} + +@end diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Base.lproj/LaunchScreen.storyboard b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000000000000000000000000000000000..068bbaa879049896a5cb02f74ddbb75547338990 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <device id="retina5_9" orientation="landscape"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment version="1792" identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="EHf-IW-A2E"> + <objects> + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="fm7-M6-edp"/> + <viewControllerLayoutGuide type="bottom" id="uRH-d6-mvd"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> + <rect key="frame" x="0.0" y="0.0" width="812" height="375"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFill" insetsLayoutMarginsFromSafeArea="NO" image="LaunchScreenBackground.png" translatesAutoresizingMaskIntoConstraints="NO" id="YCC-wj-Gww" userLabel="Background"> + <rect key="frame" x="0.0" y="0.0" width="812" height="375"/> + </imageView> + </subviews> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="YCC-wj-Gww" secondAttribute="bottom" id="Naz-ae-jWI"/> + <constraint firstAttribute="trailing" secondItem="YCC-wj-Gww" secondAttribute="trailing" id="myj-85-hk9"/> + <constraint firstItem="YCC-wj-Gww" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="qOq-Cg-doS"/> + <constraint firstItem="YCC-wj-Gww" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xL7-Fo-4bl"/> + </constraints> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="50.399999999999999" y="373.15270935960592"/> + </scene> + </scenes> + <resources> + <image name="LaunchScreenBackground.png" width="2208" height="1242"/> + </resources> +</document> diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Base.lproj/Localizable.strings b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Base.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..2a177ff4b9f36907ba00d987b2d3d9a44aa3dbfe --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Base.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + */ + +"done" = "Done"; +"next" = "Next"; +"search" = "Search"; +"go" = "Go"; +"send" = "Send"; diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100755 index 0000000000000000000000000000000000000000..51cbd32fe0c001e6203ca31b41a475ca1a07ec85 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,157 @@ +{ + "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/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png new file mode 100755 index 0000000000000000000000000000000000000000..8ead23e36507677386c7b73e23af7763fea31a90 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..775685daca94f00c7d83d961c92302c92f30cbe3 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..a5b49ccbb1993e3e5eb1a3d6e6a690b79ddbee73 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png new file mode 100755 index 0000000000000000000000000000000000000000..0500184c869c890cc100fdb75458d7d7cbd79a6f Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..f0f8b7fe9833b84329b8163b040d98d63ad612da Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..5287e50a7986d089feceffa187771221c828d74c Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png new file mode 100755 index 0000000000000000000000000000000000000000..775685daca94f00c7d83d961c92302c92f30cbe3 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..d9c7ab446bb7646de85061e8ddb7620880b18f79 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..a5b49ccbb1993e3e5eb1a3d6e6a690b79ddbee73 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png new file mode 100755 index 0000000000000000000000000000000000000000..ac381bc20e85c77f9c204e333bfc9d689243a562 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..ef38d4500a80f64742a5fb62220bdb93431cd449 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png new file mode 100755 index 0000000000000000000000000000000000000000..4fcc6fddffe10a0b6130d498d1857071b59b464d Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c3807861ad29dac52bb809b2a926265b5e17828b Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..a5b49ccbb1993e3e5eb1a3d6e6a690b79ddbee73 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..d4bc53132ce3f28582bbcf452838552a73349503 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png new file mode 100755 index 0000000000000000000000000000000000000000..2c573c8df4c35ff612dff9376edd90b85972d5b1 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..1526615c02d1a801eb71bceb3e9442e085bcd6e8 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100755 index 0000000000000000000000000000000000000000..8a1fa1850c039786458c0b1cb9f45206cba75964 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..8aa82506d0d19d11c2f2f1f14087b2c734371f5f Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..6bf801d175070b5447912d278378758952c36841 Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/Contents.json b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..da4a164c918651cdd1e11dca5cc62c333f097601 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Info.plist b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Info.plist new file mode 100755 index 0000000000000000000000000000000000000000..f98adf7f82681f1d61611a5b749af7a7f9bca236 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Info.plist @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIcons~ipad</key> + <dict/> + <key>CFBundleIdentifier</key> + <string>org.cocos2d.demo</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>NSAppTransportSecurity</key> + <dict> + <key>NSAllowsArbitraryLoads</key> + <true/> + </dict> + <key>UILaunchStoryboardName</key> + <string>LaunchScreen</string> + <key>UIPrerenderedIcon</key> + <true/> + <key>UIRequiredDeviceCapabilities</key> + <dict> + <key>accelerometer</key> + <true/> + <key>opengles-1</key> + <true/> + </dict> + <key>UIRequiresFullScreen</key> + <true/> + <key>UIStatusBarHidden</key> + <true/> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationLandscapeRight</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + </array> + </dict> +</plist> \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/LaunchScreenBackground.png b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/LaunchScreenBackground.png new file mode 100644 index 0000000000000000000000000000000000000000..dadccee68624b1c6aa9ebb7eecc150619b0e52bb Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/LaunchScreenBackground.png differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch new file mode 100755 index 0000000000000000000000000000000000000000..e3730561a183362f7798e77ec8f58b8e452c7e4b --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'play' target in the 'play' project +// + +#ifdef __OBJC__ + #import <Foundation/Foundation.h> + #import <UIKit/UIKit.h> +#endif diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h new file mode 100755 index 0000000000000000000000000000000000000000..47aa9ed416b38eb3521618d630cfffd6121b69a3 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h @@ -0,0 +1,34 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import <UIKit/UIKit.h> + + +@interface RootViewController : UIViewController { + +} +- (BOOL)prefersStatusBarHidden; +@end diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm new file mode 100755 index 0000000000000000000000000000000000000000..2fdda54d3e325f4109060470b032506873a2501e --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,98 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#import "RootViewController.h" +#import "cocos2d.h" + +#include "platform/CCApplication.h" +#include "platform/ios/CCEAGLView-ios.h" + +@implementation RootViewController + +/* +// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { +if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { +// Custom initialization +} +return self; +} +*/ + +// Implement loadView to create a view hierarchy programmatically, without using a nib. +- (void)loadView { + // Set EAGLView as view of RootViewController + self.view = (__bridge CCEAGLView *)cocos2d::Application::getInstance()->getView(); +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} + +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} + + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +#ifdef __IPHONE_6_0 +- (NSUInteger) supportedInterfaceOrientations{ + return UIInterfaceOrientationMaskAll; +} +#endif + +- (BOOL) shouldAutorotate { + return YES; +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; +} + +//fix not hide status on ios7 +- (BOOL)prefersStatusBarHidden { + return YES; +} + +// Controls the application's preferred home indicator auto-hiding when this view controller is shown. +- (BOOL)prefersHomeIndicatorAutoHidden { + return YES; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + + +@end diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/SDKWrapper.h b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/SDKWrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..03b0401c14a60e2973a93163b55937d3edf341bf --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/SDKWrapper.h @@ -0,0 +1,24 @@ +// +// SDKWrapper.h +// polish_project-mobile +// +// Created by æ¨æ¬£ on 2018/10/20. +// + +#import <Foundation/Foundation.h> + +NS_ASSUME_NONNULL_BEGIN + +@interface SDKWrapper : NSObject +@property(nonatomic,strong) NSString *name; ++ (instancetype)getInstance; +// iOS应用生命周期 +- (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; +- (void)applicationDidBecomeActive:(UIApplication *)application; +- (void)applicationWillResignActive:(UIApplication *)application; +- (void)applicationDidEnterBackground:(UIApplication *)application; +- (void)applicationWillEnterForeground:(UIApplication *)application; +- (void)applicationWillTerminate:(UIApplication *)application; +@end + +NS_ASSUME_NONNULL_END diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/SDKWrapper.m b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/SDKWrapper.m new file mode 100644 index 0000000000000000000000000000000000000000..2b8fd034c00b51989a90a60635ec1723a78c8c2a --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/SDKWrapper.m @@ -0,0 +1,133 @@ +// +// SDKWrapper.m +// polish_project-mobile +// +// Created by æ¨æ¬£ on 2018/10/20. +// + +#import "SDKWrapper.h" +#import "SDKDelegate.h" + +@interface SDKWrapper () + +@property (nonatomic, strong) NSArray *sdkClasses; + +@end + +@implementation SDKWrapper + +#pragma mark - +#pragma mark Singleton + +static SDKWrapper *mInstace = nil; + ++ (instancetype)getInstance { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + mInstace = [[super allocWithZone:NULL] init]; + [mInstace initSDKWrapper]; + }); + return mInstace; +} ++ (id)allocWithZone:(struct _NSZone *)zone { + return [SDKWrapper getInstance]; +} + ++ (id)copyWithZone:(struct _NSZone *)zone { + return [SDKWrapper getInstance]; +} + +#pragma mark - +#pragma mark Application lifecycle +- (void)initSDKWrapper { + [self loadSDKClass]; +} + +- (void)loadSDKClass { + NSString *path = [NSString stringWithFormat:@"%@/project.json", + [[NSBundle mainBundle] resourcePath]]; + NSData *data = [NSData dataWithContentsOfFile:path options:NSDataReadingMappedIfSafe error:nil]; + id obj = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; + id dic = obj[@"serviceClassPath"]; + NSLog(@"%@",dic); + NSMutableArray *sdks = [NSMutableArray array]; + for (NSString *str in dic) { + @try { + NSString *className = [[str componentsSeparatedByString:@"."] lastObject]; + NSLog(@"%@",className); + Class c = NSClassFromString(className); + id sdk = [[c alloc] init]; + [sdks addObject:sdk]; + NSLog(@"%@",sdk); + } @catch (NSException *e) { + NSLog(@"%@",@"NSException"); + NSLog(@"%@",e); + } + } + self.sdkClasses = [NSArray arrayWithArray:sdks]; +} + +/** + appæ˜¾ç¤ºç»™ç”¨æˆ·ä¹‹å‰æ‰§è¡Œæœ€åŽçš„åˆå§‹åŒ–æ“作 + */ +- (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + for (id <SDKDelegate> sdk in self.sdkClasses) { + if ([sdk respondsToSelector:@selector(application:didFinishLaunchingWithOptions:)]) { + [sdk application:application didFinishLaunchingWithOptions:launchOptions]; + } + } + +} + +/** + appå·²ç»åˆ‡æ¢åˆ°active状æ€åŽéœ€è¦æ‰§è¡Œçš„æ“ä½œ + */ +- (void)applicationDidBecomeActive:(UIApplication *)application { + for (id sdk in self.sdkClasses) { + if ([sdk respondsToSelector:@selector(applicationDidBecomeActive:)]) { + [sdk applicationDidBecomeActive:application]; + } + } +} +/** + appå°†è¦ä»Žå‰å°åˆ‡æ¢åˆ°åŽå°æ—¶éœ€è¦æ‰§è¡Œçš„æ“ä½œ + */ +- (void)applicationWillResignActive:(UIApplication *)application { + for (id sdk in self.sdkClasses) { + if ([sdk respondsToSelector:@selector(applicationWillResignActive:)]) { + [sdk applicationWillResignActive:application]; + } + } +} +/** + appå·²ç»è¿›å…¥åŽå°åŽéœ€è¦æ‰§è¡Œçš„æ“ä½œ + */ +- (void)applicationDidEnterBackground:(UIApplication *)application { + for (id sdk in self.sdkClasses) { + if ([sdk respondsToSelector:@selector(applicationDidEnterBackground:)]) { + [sdk applicationDidEnterBackground:application]; + } + } +} +/** + appå°†è¦ä»ŽåŽå°åˆ‡æ¢åˆ°å‰å°éœ€è¦æ‰§è¡Œçš„æ“ä½œï¼Œä½†appè¿˜ä¸æ˜¯activeçŠ¶æ€ + */ +- (void)applicationWillEnterForeground:(UIApplication *)application { + for (id sdk in self.sdkClasses) { + if ([sdk respondsToSelector:@selector(applicationWillEnterForeground:)]) { + [sdk applicationWillEnterForeground:application]; + } + } +} +/** + appå°†è¦ç»“æŸæ—¶éœ€è¦æ‰§è¡Œçš„æ“ä½œ + */ +- (void)applicationWillTerminate:(UIApplication *)application { + for (id sdk in self.sdkClasses) { + if ([sdk respondsToSelector:@selector(applicationWillTerminate:)]) { + [sdk applicationWillTerminate:application]; + } + } +} + +@end diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/UserConfigIOS.debug.xcconfig b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/UserConfigIOS.debug.xcconfig new file mode 100644 index 0000000000000000000000000000000000000000..1343e2e1d2f173bdf2526cc81d227da10ee13f18 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/UserConfigIOS.debug.xcconfig @@ -0,0 +1,4 @@ +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/ios/CCModuleConfigIOS.debug.xcconfig" diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/UserConfigIOS.release.xcconfig b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/UserConfigIOS.release.xcconfig new file mode 100644 index 0000000000000000000000000000000000000000..935796ceda2535a98f0d1723bb603bfdce6e2ccd --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/UserConfigIOS.release.xcconfig @@ -0,0 +1,4 @@ +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/ios/CCModuleConfigIOS.release.xcconfig" diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/main.m b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/main.m new file mode 100755 index 0000000000000000000000000000000000000000..b1286e31be1d12dc56e4161781d2344f9eb59dc2 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/main.m @@ -0,0 +1,11 @@ + + +#import <UIKit/UIKit.h> + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); + [pool release]; + return retVal; +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/service/SDKDelegate.h b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/service/SDKDelegate.h new file mode 100644 index 0000000000000000000000000000000000000000..7d88d153c375fd8fa56766bf49b5a9ac8c86ae11 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/service/SDKDelegate.h @@ -0,0 +1,25 @@ +// +// SDKWrapperDelegate.h +// polish_project-mobile +// +// Created by æ¨æ¬£ on 2018/10/22. +// + +#import <Foundation/Foundation.h> + +NS_ASSUME_NONNULL_BEGIN + +@protocol SDKDelegate <NSObject> + +@optional +- (void) optionalFunction; +- (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; +- (void)applicationDidBecomeActive:(UIApplication *)application; +- (void)applicationWillResignActive:(UIApplication *)application; +- (void)applicationDidEnterBackground:(UIApplication *)application; +- (void)applicationWillEnterForeground:(UIApplication *)application; +- (void)applicationWillTerminate:(UIApplication *)application; + +@end + +NS_ASSUME_NONNULL_END diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/zh-Hans.lproj/Localizable.strings b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/zh-Hans.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..5524fc711cd34ccc7908e52461831075984d1e6a --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/ios/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + */ + +"done" = "完æˆ"; +"next" = "下一个"; +"search" = "æœç´¢"; +"go" = "å‰å¾€"; +"send" = "å‘é€"; diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns new file mode 100755 index 0000000000000000000000000000000000000000..2040fc6fe624353ae1d3db50cd3d450f4fda5afc Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Info.plist b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Info.plist new file mode 100755 index 0000000000000000000000000000000000000000..68b11a476fccbad432f164bcba104e9008ec4c5c --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Info.plist @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string>Icon</string> + <key>CFBundleIdentifier</key> + <string>org.cocos2d.demo</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>LSApplicationCategoryType</key> + <string>public.app-category.games</string> + <key>LSMinimumSystemVersion</key> + <string>${MACOSX_DEPLOYMENT_TARGET}</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright © 2013. All rights reserved.</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> + <key>NSAppTransportSecurity</key> + <dict> + <key>NSAllowsArbitraryLoads</key> + <true/> + </dict> +</dict> +</plist> diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch new file mode 100755 index 0000000000000000000000000000000000000000..46c36a7e99f12d3c8d0ef6ee80d9fb7aec2961dd --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project +// + +#ifdef __OBJC__ + #import <Cocoa/Cocoa.h> +#endif diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/UserConfigMac.debug.xcconfig b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/UserConfigMac.debug.xcconfig new file mode 100644 index 0000000000000000000000000000000000000000..2da749d603eb5be7edfa5adffb708a11300ac721 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/UserConfigMac.debug.xcconfig @@ -0,0 +1,4 @@ +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/mac/CCModuleConfigMac.debug.xcconfig" diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/UserConfigMac.release.xcconfig b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/UserConfigMac.release.xcconfig new file mode 100644 index 0000000000000000000000000000000000000000..55bef62d1be3879358ebb5d00b9cdf19d4f1d860 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/UserConfigMac.release.xcconfig @@ -0,0 +1,4 @@ +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/mac/CCModuleConfigMac.release.xcconfig" diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/main.cpp b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/main.cpp new file mode 100755 index 0000000000000000000000000000000000000000..3bff7713dfa75423f52fafe402003df955795b4a --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/main.cpp @@ -0,0 +1,35 @@ +/**************************************************************************** + Copyright (c) 2010 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos2d-x.org + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "NativeConfig.h" + +int main(int argc, char *argv[]) +{ + AppDelegate app(MACOS_WIN_SIZE_WIDTH, MACOS_WIN_SIZE_HEIGHT); + app.start(); + return 0; +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/play.xcodeproj/project.pbxproj b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/play.xcodeproj/project.pbxproj new file mode 100755 index 0000000000000000000000000000000000000000..82b1b2177e49fc890dbc3ab4a6192ff80a9f8ce8 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.ios_mac/play.xcodeproj/project.pbxproj @@ -0,0 +1,775 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1A37E9DA200DEF120078AF72 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A37E9D9200DEF110078AF72 /* SystemConfiguration.framework */; }; + 1A37E9DC200DEF190078AF72 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A37E9DB200DEF190078AF72 /* SystemConfiguration.framework */; }; + 1A499EBB1F0CDDC3004E6AEC /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A499EBA1F0CDDC3004E6AEC /* CFNetwork.framework */; }; + 1A499EBD1F0CDDD9004E6AEC /* libicucore.A.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A499EBC1F0CDDD9004E6AEC /* libicucore.A.tbd */; }; + 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; + 1AC22EDE18CA0E11007112B9 /* project.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A1A081B18C9DF05005C6854 /* project.json */; }; + 1ACA99231F550A20002DE225 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ACA99221F550A20002DE225 /* JavaScriptCore.framework */; }; + 1ACA99251F550A28002DE225 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ACA99241F550A28002DE225 /* JavaScriptCore.framework */; }; + 1AD7E0A818C9DB93004817A6 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6BF21418C9DB5900FB0E1C /* main.js */; }; + 1AD7E0A918C9DBE3004817A6 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6BF21418C9DB5900FB0E1C /* main.js */; }; + 1AE159EC18C9DF3600FCA372 /* project.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A1A081B18C9DF05005C6854 /* project.json */; }; + 1AFFCD7E1F7A5D5400628F2C /* LaunchScreenBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AFFCD7B1F7A5D4F00628F2C /* LaunchScreenBackground.png */; }; + 1AFFCD7F1F7A5D5400628F2C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ABC56911F7A005D00826282 /* Images.xcassets */; }; + 22CC757121BA5B5C00FBF2F7 /* SDKWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 22CC756D21BA5B5C00FBF2F7 /* SDKWrapper.m */; }; + 286B0E9524075FE000095E1A /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 28A34C0F225B462E00926306 /* assets */; }; + 28A34C10225B462E00926306 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 28A34C0F225B462E00926306 /* assets */; }; + 294D7D801D0D668F002CE7B7 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 294D7D7F1D0D668F002CE7B7 /* CoreText.framework */; }; + 4011F9CF212BD6750091CC5B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4011F9D1212BD6750091CC5B /* LaunchScreen.storyboard */; }; + 4011F9D5212BD7050091CC5B /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4011F9D7212BD7050091CC5B /* Localizable.strings */; }; + 4033CDBC20E4935100DAA37B /* jsb-adapter in Resources */ = {isa = PBXBuildFile; fileRef = 4033CDBB20E4935000DAA37B /* jsb-adapter */; }; + 4033CDBD20E4935100DAA37B /* jsb-adapter in Resources */ = {isa = PBXBuildFile; fileRef = 4033CDBB20E4935000DAA37B /* jsb-adapter */; }; + 467AF6082321FBED00770112 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 467AF6072321FBED00770112 /* WebKit.framework */; }; + 467AF613232881E400770112 /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 467AF612232881E400770112 /* AVKit.framework */; }; + 467AF615232881EB00770112 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 467AF614232881EB00770112 /* CoreMedia.framework */; }; + 4DD5E6AB1CDAF6430046171E /* libcocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DD0DB561CDAF5F40099AD86 /* libcocos2d Mac.a */; }; + 4DD5E6B11CDAF65C0046171E /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DD0DB581CDAF5F40099AD86 /* libcocos2d iOS.a */; }; + 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 502380DB17EBB88200990C9B /* libcurl.dylib */; }; + 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; + 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; + 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; + 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; + 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; + 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; + 509D4A8E17EBB24E00697056 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; }; + 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; + 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; + 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AAC17EBB2AB00697056 /* AppController.mm */; }; + 509D4AC817EBB2AB00697056 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AB817EBB2AB00697056 /* main.m */; }; + 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4ABB17EBB2AB00697056 /* RootViewController.mm */; }; + 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 509D4ACB17EBB2BE00697056 /* Icon.icns */; }; + 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE617EBB81800697056 /* OpenGL.framework */; }; + 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE817EBB82000697056 /* AppKit.framework */; }; + 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AEA17EBB82600697056 /* IOKit.framework */; }; + A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; + A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275431517C094001B78AA /* OpenGLES.framework */; }; + A92275461517C094001B78AA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; + A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; + A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; }; + A922754C1517C094001B78AA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754B1517C094001B78AA /* UIKit.framework */; }; + A922754E1517C094001B78AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; + A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; + ABE456E31D34F87300F1F400 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE456E21D34F87300F1F400 /* CFNetwork.framework */; }; + ABE456E51D34F87A00F1F400 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE456E41D34F87A00F1F400 /* CoreFoundation.framework */; }; + ABE456E71D34F87F00F1F400 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE456E61D34F87F00F1F400 /* MobileCoreServices.framework */; }; + ABE456E91D34F88A00F1F400 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE456E81D34F88A00F1F400 /* SystemConfiguration.framework */; }; + ABE456EB1D34F89000F1F400 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE456EA1D34F89000F1F400 /* GameController.framework */; }; + BA3A85EC1A724AE900924D24 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA3A85EB1A724AE900924D24 /* Security.framework */; }; + BAEE4D841AC40C11003BEB0F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAEE4D831AC40C11003BEB0F /* Security.framework */; }; + C03780EB18BEE0E400FE4F13 /* src in Resources */ = {isa = PBXBuildFile; fileRef = C03780EA18BEE0E400FE4F13 /* src */; }; + C03780EC18BEE0E400FE4F13 /* src in Resources */ = {isa = PBXBuildFile; fileRef = C03780EA18BEE0E400FE4F13 /* src */; }; + C06E23CC18CEFE680093C81A /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C06E23CB18CEFE680093C81A /* main.cpp */; }; + D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; + D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; + D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B061231803AB9F0077942B /* CoreMotion.framework */; }; + FA676C761C71AFA200E091E3 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA676C751C71AFA200E091E3 /* libiconv.dylib */; }; + FA676C781C71AFAB00E091E3 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA676C771C71AFAB00E091E3 /* libiconv.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4DD0DB551CDAF5F40099AD86 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = "libcocos2d Mac"; + }; + 4DD0DB571CDAF5F40099AD86 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4D641783777C0073F6A7; + remoteInfo = "libcocos2d iOS"; + }; + 4DD5E6A91CDAF6330046171E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = "libcocos2d Mac"; + }; + 4DD5E6AF1CDAF6520046171E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4C241783777C0073F6A7; + remoteInfo = "libcocos2d iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 051C018121E32AE400D4A347 /* UserConfigIOS.release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UserConfigIOS.release.xcconfig; path = ios/UserConfigIOS.release.xcconfig; sourceTree = "<group>"; }; + 051C018221E32AE400D4A347 /* UserConfigIOS.debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UserConfigIOS.debug.xcconfig; path = ios/UserConfigIOS.debug.xcconfig; sourceTree = "<group>"; }; + 051C018521E32AF000D4A347 /* UserConfigMac.release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UserConfigMac.release.xcconfig; sourceTree = "<group>"; }; + 051C018621E32AF100D4A347 /* UserConfigMac.debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UserConfigMac.debug.xcconfig; sourceTree = "<group>"; }; + 05A8AD8A2449A9F900A65D12 /* NativeConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeConfig.h; sourceTree = "<group>"; }; + 1A1A081B18C9DF05005C6854 /* project.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = project.json; path = ../../../project.json; sourceTree = "<group>"; }; + 1A37E9D9200DEF110078AF72 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + 1A37E9DB200DEF190078AF72 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 1A499EBA1F0CDDC3004E6AEC /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 1A499EBC1F0CDDD9004E6AEC /* libicucore.A.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.A.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/lib/libicucore.A.tbd; sourceTree = DEVELOPER_DIR; }; + 1A6BF21418C9DB5900FB0E1C /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../../main.js; sourceTree = "<group>"; }; + 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + 1A96A4F2174A3432008653A9 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = "../../cocos2d-x/cocos2dx/platform/third_party/ios/libraries/libcurl.a"; sourceTree = "<group>"; }; + 1ABC56911F7A005D00826282 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ios/Images.xcassets; sourceTree = "<group>"; }; + 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/build/cocos2d_libs.xcodeproj"; sourceTree = "<absolute>"; }; + 1ACA99221F550A20002DE225 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + 1ACA99241F550A28002DE225 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; + 1AFFCD7B1F7A5D4F00628F2C /* LaunchScreenBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = LaunchScreenBackground.png; path = ios/LaunchScreenBackground.png; sourceTree = "<group>"; }; + 22CC756D21BA5B5C00FBF2F7 /* SDKWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKWrapper.m; path = ios/SDKWrapper.m; sourceTree = "<group>"; }; + 22CC756F21BA5B5C00FBF2F7 /* SDKDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDKDelegate.h; sourceTree = "<group>"; }; + 22CC757021BA5B5C00FBF2F7 /* SDKWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDKWrapper.h; path = ios/SDKWrapper.h; sourceTree = "<group>"; }; + 28A34C0F225B462E00926306 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../../../assets; sourceTree = "<group>"; }; + 294D7D7F1D0D668F002CE7B7 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; + 4011F9D2212BD6810091CC5B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; + 4011F9D8212BD7150091CC5B /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; }; + 4011F9D9212BD73A0091CC5B /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; }; + 4033CDBB20E4935000DAA37B /* jsb-adapter */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "jsb-adapter"; path = "../../../jsb-adapter"; sourceTree = "<group>"; }; + 467AF6072321FBED00770112 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; }; + 467AF612232881E400770112 /* AVKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/AVKit.framework; sourceTree = DEVELOPER_DIR; }; + 467AF614232881EB00770112 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/CoreMedia.framework; sourceTree = DEVELOPER_DIR; }; + 4D697BD91CBD301C00A5AF29 /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/libs/libjs_static.a"; sourceTree = "<absolute>"; }; + 4D697BDC1CBD303100A5AF29 /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/libs/libjs_static.a"; sourceTree = "<absolute>"; }; + 502380DB17EBB88200990C9B /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; + 509D4AAA17EBB24E00697056 /* play-desktop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "play-desktop.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 509D4AAB17EBB2AB00697056 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = "<group>"; }; + 509D4AAC17EBB2AB00697056 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = "<group>"; }; + 509D4AB717EBB2AB00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = "<group>"; }; + 509D4AB817EBB2AB00697056 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = "<group>"; }; + 509D4AB917EBB2AB00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = "<group>"; }; + 509D4ABA17EBB2AB00697056 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = "<group>"; }; + 509D4ABB17EBB2AB00697056 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = "<group>"; }; + 509D4ACB17EBB2BE00697056 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = "<group>"; }; + 509D4ACC17EBB2BE00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 509D4ACE17EBB2BE00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = "<group>"; }; + 509D4AE617EBB81800697056 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 509D4AE817EBB82000697056 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 509D4AEA17EBB82600697056 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + A922753D1517C094001B78AA /* play-mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "play-mobile.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + A92275451517C094001B78AA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + A92275471517C094001B78AA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + A92275491517C094001B78AA /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A922754B1517C094001B78AA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + A922754D1517C094001B78AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + A922754F1517C094001B78AA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + ABE456E21D34F87300F1F400 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; + ABE456E41D34F87A00F1F400 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; }; + ABE456E61D34F87F00F1F400 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; }; + ABE456E81D34F88A00F1F400 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + ABE456EA1D34F89000F1F400 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; }; + BA3A85EB1A724AE900924D24 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; + BA4E718019EB6E3E00932425 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/MediaPlayer.framework; sourceTree = DEVELOPER_DIR; }; + BA4E718219EB6E4600932425 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; }; + BAEE4D831AC40C11003BEB0F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + C03780EA18BEE0E400FE4F13 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../../src; sourceTree = "<group>"; }; + C06E23CB18CEFE680093C81A /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + C0799CB518BAE62000E9C828 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../../../res; sourceTree = "<group>"; }; + D454520B156E22BD00887EB5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + D4545215156E28EF00887EB5 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; }; + D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; + D6B061231803AB9F0077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; + FA676C751C71AFA200E091E3 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libiconv.dylib; sourceTree = DEVELOPER_DIR; }; + FA676C771C71AFAB00E091E3 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 509D4A8217EBB24E00697056 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A37E9DC200DEF190078AF72 /* SystemConfiguration.framework in Frameworks */, + 1ACA99231F550A20002DE225 /* JavaScriptCore.framework in Frameworks */, + 1A499EBB1F0CDDC3004E6AEC /* CFNetwork.framework in Frameworks */, + 4DD5E6AB1CDAF6430046171E /* libcocos2d Mac.a in Frameworks */, + FA676C781C71AFAB00E091E3 /* libiconv.dylib in Frameworks */, + BAEE4D841AC40C11003BEB0F /* Security.framework in Frameworks */, + 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */, + 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */, + 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */, + 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */, + 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */, + 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */, + 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */, + 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */, + 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */, + 509D4A8E17EBB24E00697056 /* AVFoundation.framework in Frameworks */, + 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */, + 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A922753A1517C094001B78AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 467AF615232881EB00770112 /* CoreMedia.framework in Frameworks */, + 467AF613232881E400770112 /* AVKit.framework in Frameworks */, + 467AF6082321FBED00770112 /* WebKit.framework in Frameworks */, + 1A37E9DA200DEF120078AF72 /* SystemConfiguration.framework in Frameworks */, + 1ACA99251F550A28002DE225 /* JavaScriptCore.framework in Frameworks */, + 1A499EBD1F0CDDD9004E6AEC /* libicucore.A.tbd in Frameworks */, + ABE456EB1D34F89000F1F400 /* GameController.framework in Frameworks */, + ABE456E91D34F88A00F1F400 /* SystemConfiguration.framework in Frameworks */, + ABE456E71D34F87F00F1F400 /* MobileCoreServices.framework in Frameworks */, + ABE456E51D34F87A00F1F400 /* CoreFoundation.framework in Frameworks */, + ABE456E31D34F87300F1F400 /* CFNetwork.framework in Frameworks */, + 294D7D801D0D668F002CE7B7 /* CoreText.framework in Frameworks */, + 4DD5E6B11CDAF65C0046171E /* libcocos2d iOS.a in Frameworks */, + FA676C761C71AFA200E091E3 /* libiconv.dylib in Frameworks */, + BA3A85EC1A724AE900924D24 /* Security.framework in Frameworks */, + D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */, + 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */, + D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */, + A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */, + A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */, + A92275461517C094001B78AA /* OpenAL.framework in Frameworks */, + A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */, + A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */, + A922754C1517C094001B78AA /* UIKit.framework in Frameworks */, + A922754E1517C094001B78AA /* Foundation.framework in Frameworks */, + A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 15628F5B15F0F5C2000CF24B /* Resources */ = { + isa = PBXGroup; + children = ( + 4033CDBB20E4935000DAA37B /* jsb-adapter */, + 1A1A081B18C9DF05005C6854 /* project.json */, + 1A6BF21418C9DB5900FB0E1C /* main.js */, + C0799CB518BAE62000E9C828 /* res */, + C03780EA18BEE0E400FE4F13 /* src */, + 4011F9D7212BD7050091CC5B /* Localizable.strings */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 22CC756E21BA5B5C00FBF2F7 /* service */ = { + isa = PBXGroup; + children = ( + 22CC756F21BA5B5C00FBF2F7 /* SDKDelegate.h */, + ); + name = service; + path = ios/service; + sourceTree = "<group>"; + }; + 4DD0DB511CDAF5F40099AD86 /* Products */ = { + isa = PBXGroup; + children = ( + 4DD0DB561CDAF5F40099AD86 /* libcocos2d Mac.a */, + 4DD0DB581CDAF5F40099AD86 /* libcocos2d iOS.a */, + ); + name = Products; + sourceTree = "<group>"; + }; + 509D4ACA17EBB2BE00697056 /* mac */ = { + isa = PBXGroup; + children = ( + 051C018621E32AF100D4A347 /* UserConfigMac.debug.xcconfig */, + 051C018521E32AF000D4A347 /* UserConfigMac.release.xcconfig */, + C06E23CB18CEFE680093C81A /* main.cpp */, + 509D4ACB17EBB2BE00697056 /* Icon.icns */, + 509D4ACC17EBB2BE00697056 /* Info.plist */, + 509D4ACE17EBB2BE00697056 /* Prefix.pch */, + ); + path = mac; + sourceTree = "<group>"; + }; + A92275321517C094001B78AA = { + isa = PBXGroup; + children = ( + 28A34C0F225B462E00926306 /* assets */, + 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */, + D4545214156E28EF00887EB5 /* Classes */, + A92275401517C094001B78AA /* Frameworks */, + D45446CC156DE73F00887EB5 /* ios */, + 509D4ACA17EBB2BE00697056 /* mac */, + A922753E1517C094001B78AA /* Products */, + 15628F5B15F0F5C2000CF24B /* Resources */, + ); + sourceTree = "<group>"; + }; + A922753E1517C094001B78AA /* Products */ = { + isa = PBXGroup; + children = ( + A922753D1517C094001B78AA /* play-mobile.app */, + 509D4AAA17EBB24E00697056 /* play-desktop.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + A92275401517C094001B78AA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 467AF614232881EB00770112 /* CoreMedia.framework */, + 467AF612232881E400770112 /* AVKit.framework */, + 467AF6072321FBED00770112 /* WebKit.framework */, + 1A37E9D9200DEF110078AF72 /* SystemConfiguration.framework */, + 1A37E9DB200DEF190078AF72 /* SystemConfiguration.framework */, + 1ACA99241F550A28002DE225 /* JavaScriptCore.framework */, + 1ACA99221F550A20002DE225 /* JavaScriptCore.framework */, + 1A499EBC1F0CDDD9004E6AEC /* libicucore.A.tbd */, + 1A499EBA1F0CDDC3004E6AEC /* CFNetwork.framework */, + ABE456EA1D34F89000F1F400 /* GameController.framework */, + ABE456E81D34F88A00F1F400 /* SystemConfiguration.framework */, + ABE456E61D34F87F00F1F400 /* MobileCoreServices.framework */, + ABE456E41D34F87A00F1F400 /* CoreFoundation.framework */, + ABE456E21D34F87300F1F400 /* CFNetwork.framework */, + 294D7D7F1D0D668F002CE7B7 /* CoreText.framework */, + 4D697BDC1CBD303100A5AF29 /* libjs_static.a */, + 4D697BD91CBD301C00A5AF29 /* libjs_static.a */, + FA676C771C71AFAB00E091E3 /* libiconv.dylib */, + FA676C751C71AFA200E091E3 /* libiconv.dylib */, + BAEE4D831AC40C11003BEB0F /* Security.framework */, + BA3A85EB1A724AE900924D24 /* Security.framework */, + BA4E718219EB6E4600932425 /* GameController.framework */, + BA4E718019EB6E3E00932425 /* MediaPlayer.framework */, + D6B061231803AB9F0077942B /* CoreMotion.framework */, + 502380DB17EBB88200990C9B /* libcurl.dylib */, + 509D4AEA17EBB82600697056 /* IOKit.framework */, + 509D4AE817EBB82000697056 /* AppKit.framework */, + 509D4AE617EBB81800697056 /* OpenGL.framework */, + 1A96A4F2174A3432008653A9 /* libcurl.a */, + 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */, + D454520B156E22BD00887EB5 /* libz.dylib */, + A92275411517C094001B78AA /* QuartzCore.framework */, + A92275431517C094001B78AA /* OpenGLES.framework */, + A92275451517C094001B78AA /* OpenAL.framework */, + A92275471517C094001B78AA /* AudioToolbox.framework */, + A92275491517C094001B78AA /* AVFoundation.framework */, + A922754B1517C094001B78AA /* UIKit.framework */, + A922754D1517C094001B78AA /* Foundation.framework */, + A922754F1517C094001B78AA /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; + D45446CC156DE73F00887EB5 /* ios */ = { + isa = PBXGroup; + children = ( + 051C018221E32AE400D4A347 /* UserConfigIOS.debug.xcconfig */, + 051C018121E32AE400D4A347 /* UserConfigIOS.release.xcconfig */, + 22CC756E21BA5B5C00FBF2F7 /* service */, + 4011F9D1212BD6750091CC5B /* LaunchScreen.storyboard */, + 1AFFCD7B1F7A5D4F00628F2C /* LaunchScreenBackground.png */, + 1ABC56911F7A005D00826282 /* Images.xcassets */, + 509D4AAB17EBB2AB00697056 /* AppController.h */, + 509D4AAC17EBB2AB00697056 /* AppController.mm */, + 509D4AB717EBB2AB00697056 /* Info.plist */, + 509D4AB817EBB2AB00697056 /* main.m */, + 509D4AB917EBB2AB00697056 /* Prefix.pch */, + 509D4ABA17EBB2AB00697056 /* RootViewController.h */, + 509D4ABB17EBB2AB00697056 /* RootViewController.mm */, + 22CC757021BA5B5C00FBF2F7 /* SDKWrapper.h */, + 22CC756D21BA5B5C00FBF2F7 /* SDKWrapper.m */, + ); + name = ios; + sourceTree = "<group>"; + }; + D4545214156E28EF00887EB5 /* Classes */ = { + isa = PBXGroup; + children = ( + 05A8AD8A2449A9F900A65D12 /* NativeConfig.h */, + D4545215156E28EF00887EB5 /* AppDelegate.cpp */, + D4545216156E28EF00887EB5 /* AppDelegate.h */, + ); + name = Classes; + path = ../Classes; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 509D4A7517EBB24E00697056 /* play-desktop */ = { + isa = PBXNativeTarget; + buildConfigurationList = 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "play-desktop" */; + buildPhases = ( + 509D4A8017EBB24E00697056 /* Sources */, + 509D4A9317EBB24E00697056 /* Resources */, + 509D4A8217EBB24E00697056 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 4DD5E6AA1CDAF6330046171E /* PBXTargetDependency */, + ); + name = "play-desktop"; + productName = play; + productReference = 509D4AAA17EBB24E00697056 /* play-desktop.app */; + productType = "com.apple.product-type.application"; + }; + A922753C1517C094001B78AA /* play-mobile */ = { + isa = PBXNativeTarget; + buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "play-mobile" */; + buildPhases = ( + A92275391517C094001B78AA /* Sources */, + A922753A1517C094001B78AA /* Frameworks */, + A922753B1517C094001B78AA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4DD5E6B01CDAF6520046171E /* PBXTargetDependency */, + ); + name = "play-mobile"; + productName = play; + productReference = A922753D1517C094001B78AA /* play-mobile.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A92275341517C094001B78AA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + }; + buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "play" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + "zh-Hans", + ); + mainGroup = A92275321517C094001B78AA; + productRefGroup = A922753E1517C094001B78AA /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 4DD0DB511CDAF5F40099AD86 /* Products */; + ProjectRef = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + A922753C1517C094001B78AA /* play-mobile */, + 509D4A7517EBB24E00697056 /* play-desktop */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 4DD0DB561CDAF5F40099AD86 /* libcocos2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2d Mac.a"; + remoteRef = 4DD0DB551CDAF5F40099AD86 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4DD0DB581CDAF5F40099AD86 /* libcocos2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2d iOS.a"; + remoteRef = 4DD0DB571CDAF5F40099AD86 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 509D4A9317EBB24E00697056 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 286B0E9524075FE000095E1A /* assets in Resources */, + 1AC22EDE18CA0E11007112B9 /* project.json in Resources */, + 1AD7E0A918C9DBE3004817A6 /* main.js in Resources */, + 4033CDBD20E4935100DAA37B /* jsb-adapter in Resources */, + 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */, + C03780EC18BEE0E400FE4F13 /* src in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A922753B1517C094001B78AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28A34C10225B462E00926306 /* assets in Resources */, + 4033CDBC20E4935100DAA37B /* jsb-adapter in Resources */, + 1AFFCD7F1F7A5D5400628F2C /* Images.xcassets in Resources */, + 1AFFCD7E1F7A5D5400628F2C /* LaunchScreenBackground.png in Resources */, + 1AE159EC18C9DF3600FCA372 /* project.json in Resources */, + 1AD7E0A818C9DB93004817A6 /* main.js in Resources */, + C03780EB18BEE0E400FE4F13 /* src in Resources */, + 4011F9CF212BD6750091CC5B /* LaunchScreen.storyboard in Resources */, + 4011F9D5212BD7050091CC5B /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 509D4A8017EBB24E00697056 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */, + C06E23CC18CEFE680093C81A /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A92275391517C094001B78AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */, + D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */, + 509D4AC817EBB2AB00697056 /* main.m in Sources */, + 22CC757121BA5B5C00FBF2F7 /* SDKWrapper.m in Sources */, + 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4DD5E6AA1CDAF6330046171E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libcocos2d Mac"; + targetProxy = 4DD5E6A91CDAF6330046171E /* PBXContainerItemProxy */; + }; + 4DD5E6B01CDAF6520046171E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libcocos2d iOS"; + targetProxy = 4DD5E6AF1CDAF6520046171E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 4011F9D1212BD6750091CC5B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 4011F9D2212BD6810091CC5B /* Base */, + ); + name = LaunchScreen.storyboard; + path = ios; + sourceTree = "<group>"; + }; + 4011F9D7212BD7050091CC5B /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 4011F9D8212BD7150091CC5B /* Base */, + 4011F9D9212BD73A0091CC5B /* zh-Hans */, + ); + name = Localizable.strings; + path = ios; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 509D4AA817EBB24E00697056 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 051C018621E32AF100D4A347 /* UserConfigMac.debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_MAC, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/libs"; + OTHER_LDFLAGS = ""; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(inherited) /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/mac /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/glfw3/include/mac /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/include/ /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/include/spidermonkey"; + }; + name = Debug; + }; + 509D4AA917EBB24E00697056 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 051C018521E32AF000D4A347 /* UserConfigMac.release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_MAC, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/libs"; + OTHER_LDFLAGS = ""; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(inherited) /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/mac /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/glfw3/include/mac /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/include/ /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/include/spidermonkey"; + }; + name = Release; + }; + A92276FE1517C097001B78AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "COCOS2D_DEBUG=1", + USE_FILE32API, + COCOS2D_JAVASCRIPT, + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/base /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/physics /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/math/kazmath /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/2d /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/gui /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/network /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/audio/include /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/editor-support /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/extensions /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/sources /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/chipmunk/include/chipmunk /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/include/v8 /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/scripting/js-bindings/auto /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/scripting/js-bindings/manual /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/renderer"; + }; + name = Debug; + }; + A92276FF1517C097001B78AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = ( + NDEBUG, + USE_FILE32API, + COCOS2D_JAVASCRIPT, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACOSX_DEPLOYMENT_TARGET = 10.9; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/base /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/physics /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/math/kazmath /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/2d /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/gui /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/network /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/audio/include /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/editor-support /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/extensions /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/sources /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/chipmunk/include/chipmunk /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/mac/include/v8 /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/scripting/js-bindings/auto /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/scripting/js-bindings/manual /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/renderer"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A92277011517C097001B78AA /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 051C018221E32AE400D4A347 /* UserConfigIOS.debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + ENABLE_BITCODE = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_IPHONE, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LIBRARY_SEARCH_PATHS = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/libs"; + OTHER_LDFLAGS = ( + "-ObjC", + "$(inherited)", + ); + SDKROOT = iphoneos; + STRIP_PNG_TEXT = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(inherited) /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/ios /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/plugin/jsbindings/auto /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/plugin/jsbindings/manual /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/include /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/include/spidermonkey"; + }; + name = Debug; + }; + A92277021517C097001B78AA /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 051C018121E32AE400D4A347 /* UserConfigIOS.release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + ENABLE_BITCODE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_IPHONE, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LIBRARY_SEARCH_PATHS = "/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/libs"; + OTHER_LDFLAGS = ( + "-ObjC", + "$(inherited)", + ); + SDKROOT = iphoneos; + STRIP_PNG_TEXT = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(inherited) /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/ios /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/plugin/jsbindings/auto /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/plugin/jsbindings/manual /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/include /Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/include/spidermonkey"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "play-desktop" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 509D4AA817EBB24E00697056 /* Debug */, + 509D4AA917EBB24E00697056 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A92275371517C094001B78AA /* Build configuration list for PBXProject "play" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92276FE1517C097001B78AA /* Debug */, + A92276FF1517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "play-mobile" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92277011517C097001B78AA /* Debug */, + A92277021517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A92275341517C094001B78AA /* Project object */; +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/build-cfg.json b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/build-cfg.json new file mode 100755 index 0000000000000000000000000000000000000000..23cefe98248ca96180bdd0b9ca39714456895118 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/build-cfg.json @@ -0,0 +1,24 @@ +{ + "copy_resources": [ + { + "from": "../../../src", + "to": "src" + }, + { + "from": "../../../assets", + "to": "assets" + }, + { + "from": "../../../main.js", + "to": "" + }, + { + "from": "../../../project.json", + "to": "" + }, + { + "from": "../../../jsb-adapter", + "to": "jsb-adapter" + } + ] +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/game.rc b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/game.rc new file mode 100755 index 0000000000000000000000000000000000000000..491e970a7d3116111efd7d89cafec489ef4862eb --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/game.rc @@ -0,0 +1,126 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winresrc.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Chinese (Simplified, PRC) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +#pragma code_page(936) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#include ""winresrc.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Chinese (Simplified, PRC) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +GLFW_ICON ICON "res\\game.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "FileDescription", "game Module" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "game" + VALUE "LegalCopyright", "Copyright " + VALUE "OriginalFilename", "game.exe" + VALUE "ProductName", "game Module" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/main.cpp b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/main.cpp new file mode 100755 index 0000000000000000000000000000000000000000..5ad1029e6d948a0ba96a4e8912dcebb6a0760c4b --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/main.cpp @@ -0,0 +1,59 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "main.h" +#include "AppDelegate.h" +#include "NativeConfig.h" + +USING_NS_CC; + +// uncomment below line, open debug console +// #define USE_WIN32_CONSOLE + +int APIENTRY _tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + +#ifdef USE_WIN32_CONSOLE + AllocConsole(); + freopen("CONIN$", "r", stdin); + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); +#endif + + // create the application instance + AppDelegate app(WINDOWS_WIN_SIZE_WIDTH, WINDOWS_WIN_SIZE_HEIGHT); + app.start(); + +#ifdef USE_WIN32_CONSOLE + FreeConsole(); +#endif + + return 0; +} diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/main.h b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/main.h new file mode 100755 index 0000000000000000000000000000000000000000..1f01f6369c14ca9506dd72df19663c53d402350d --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/main.h @@ -0,0 +1,37 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +// Windows Header Files: +#include <tchar.h> + +// C RunTime Header Files +#include "CCStdC.h" + +#endif // __WINMAIN_H__ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj new file mode 100755 index 0000000000000000000000000000000000000000..d6a1467a8818a89110f93c1aa4c1fc282717e438 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{3B0B58B1-2734-488E-A542-ECEC11EB2455}</ProjectGuid> + <RootNamespace>play</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v140_xp</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v140_xp</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v140_xp</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset> + <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v140_xp</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x\build\cocos2dx.props" /> + <Import Project="/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x\build\cocos2d_headers.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x\build\cocos2dx.props" /> + <Import Project="/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/Resources/cocos2d-x\build\cocos2d_headers.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration).win32\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration).win32\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LibraryPath>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LibraryPath>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>false</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + <GenerateStublessProxies>true</GenerateStublessProxies> + <TypeLibraryName>$(IntDir)game.tlb</TypeLibraryName> + <HeaderFileName>game.h</HeaderFileName> + <DllDataFileName> + </DllDataFileName> + <InterfaceIdentifierFileName>game_i.c</InterfaceIdentifierFileName> + <ProxyFileName>game_p.c</ProxyFileName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir)..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\win32\include\;$(EngineRoot)external\win32\include\v8;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USRLIBSIMSTATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4267;4251;4244;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ResourceCompile> + <PreLinkEvent> + <Command> + </Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>v8.dll.lib;v8_libbase.dll.lib;v8_libplatform.dll.lib;libuv.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup> + <CustomBuildStep> + <Command>xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\assets" "$(OutDir)\assets" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\jsb-adapter" "$(OutDir)\jsb-adapter" /D /E /I /F /Y +copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y +copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command> + <Outputs>$(TargetName).cab</Outputs> + <Inputs>$(TargetFileName)</Inputs> + </CustomBuildStep> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>false</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + <GenerateStublessProxies>true</GenerateStublessProxies> + <TypeLibraryName>$(IntDir)game.tlb</TypeLibraryName> + <HeaderFileName>game.h</HeaderFileName> + <DllDataFileName> + </DllDataFileName> + <InterfaceIdentifierFileName>game_i.c</InterfaceIdentifierFileName> + <ProxyFileName>game_p.c</ProxyFileName> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>$(ProjectDir)..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\win32\include\;$(EngineRoot)external\win32\include\v8;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USRLIBSIMSTATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <DisableSpecificWarnings>4267;4251;4244;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ResourceCompile> + <PreLinkEvent> + <Command> + </Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>v8.dll.lib;v8_libbase.dll.lib;v8_libplatform.dll.lib;libuv.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <SubSystem>Windows</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\Classes\jsb_module_register.cpp" /> + <ClCompile Include="main.cpp" /> + <ClCompile Include="..\Classes\AppDelegate.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Classes\NativeConfig.h" /> + <ClInclude Include="main.h" /> + <ClInclude Include="..\Classes\AppDelegate.h" /> + <ClInclude Include="resource.h" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="game.rc" /> + </ItemGroup> + <ItemGroup> + <Image Include="res\game.ico" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj.filters b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj.filters new file mode 100755 index 0000000000000000000000000000000000000000..4e37c3b32c9e4e8e6c8789d097ee035da932a0e3 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj.filters @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="resource"> + <UniqueIdentifier>{ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest</Extensions> + </Filter> + <Filter Include="win32"> + <UniqueIdentifier>{ccb2323b-1cfa-41ea-bcf4-ba5f07309396}</UniqueIdentifier> + </Filter> + <Filter Include="Classes"> + <UniqueIdentifier>{e93a77e1-af1e-4400-87d3-504b62ebdbb0}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="main.cpp"> + <Filter>win32</Filter> + </ClCompile> + <ClCompile Include="..\Classes\AppDelegate.cpp"> + <Filter>Classes</Filter> + </ClCompile> + <ClCompile Include="..\Classes\jsb_module_register.cpp"> + <Filter>Classes</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Classes\AppDelegate.h"> + <Filter>Classes</Filter> + </ClInclude> + <ClInclude Include="main.h"> + <Filter>win32</Filter> + </ClInclude> + <ClInclude Include="resource.h" /> + <ClInclude Include="..\Classes\NativeConfig.h"> + <Filter>Classes</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="game.rc"> + <Filter>resource</Filter> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <Image Include="res\game.ico"> + <Filter>resource</Filter> + </Image> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj.user b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj.user new file mode 100644 index 0000000000000000000000000000000000000000..8cf1d605e19b5e9d1869a938e4bcfac92b58914d --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/play.vcxproj.user @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory> + <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory> + <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> + </PropertyGroup> +</Project> \ No newline at end of file diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/res/game.ico b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/res/game.ico new file mode 100755 index 0000000000000000000000000000000000000000..feaf932a7465e435af6271bd8204c0145731a6eb Binary files /dev/null and b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/res/game.ico differ diff --git a/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/resource.h b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/resource.h new file mode 100755 index 0000000000000000000000000000000000000000..920119022afdbb3c08271de5539f0a605b183b53 --- /dev/null +++ b/play/build_ios/jsb-link/frameworks/runtime-src/proj.win32/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by game.rc +// +#define IDS_PROJNAME 100 +#define IDR_TESTJS 100 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 204 +#define _APS_NEXT_COMMAND_VALUE 32785 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/play/build_ios/jsb-link/main.js b/play/build_ios/jsb-link/main.js new file mode 100755 index 0000000000000000000000000000000000000000..12dd8b87706011f1d19e65cecd194d7eaed8afac --- /dev/null +++ b/play/build_ios/jsb-link/main.js @@ -0,0 +1,92 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated engine source code (the "Software"), a limited, + worldwide, royalty-free, non-assignable, revocable and non-exclusive license + to use Cocos Creator solely to develop games on your target platforms. You shall + not use Cocos Creator software for developing other software or tools that's + used for developing games. You are not granted to publish, distribute, + sublicense, and/or sell copies of Cocos Creator. + + The software or tools in this License Agreement are licensed, not sold. + Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you. + + 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 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +/** + * A brief explanation for "project.json": + * Here is the content of project.json file, this is the global configuration for your game, you can modify it to customize some behavior. + * The detail of each field is under it. + { + "project_type": "javascript", + // "project_type" indicate the program language of your project, you can ignore this field + + "debugMode" : 1, + // "debugMode" possible values : + // 0 - No message will be printed. + // 1 - cc.error, cc.assert, cc.warn, cc.log will print in console. + // 2 - cc.error, cc.assert, cc.warn will print in console. + // 3 - cc.error, cc.assert will print in console. + // 4 - cc.error, cc.assert, cc.warn, cc.log will print on canvas, available only on web. + // 5 - cc.error, cc.assert, cc.warn will print on canvas, available only on web. + // 6 - cc.error, cc.assert will print on canvas, available only on web. + + "showFPS" : true, + // Left bottom corner fps information will show when "showFPS" equals true, otherwise it will be hide. + + "frameRate" : 60, + // "frameRate" set the wanted frame rate for your game, but the real fps depends on your game implementation and the running environment. + + "id" : "gameCanvas", + // "gameCanvas" sets the id of your canvas element on the web page, it's useful only on web. + + "renderMode" : 0, + // "renderMode" sets the renderer type, only useful on web : + // 0 - Automatically chosen by engine + // 1 - Forced to use canvas renderer + // 2 - Forced to use WebGL renderer, but this will be ignored on mobile browsers + + "engineDir" : "frameworks/cocos2d-html5/", + // (Deprecated) In debug mode, if you use the whole engine to develop your game, you should specify its relative path with "engineDir", + // but if you are using a single engine file, you can ignore it. + + "modules" : ["cocos2d"], + // "modules" defines which modules you will need in your game, it's useful only on web, + // using this can greatly reduce your game's resource size, and the cocos console tool can package your game with only the modules you set. + // For details about modules definitions, you can refer to "../../frameworks/cocos2d-html5/modulesConfig.json". + + "jsList" : [ + ] + // "jsList" sets the list of js files in your game. + } + * + */ + +cc.game.onStart = function(){ + if(!cc.sys.isNative && document.getElementById("cocosLoading")) //If referenced loading.js, please remove it + document.body.removeChild(document.getElementById("cocosLoading")); + + // Pass true to enable retina display, disabled by default to improve performance + cc.view.enableRetina(false); + // Adjust viewport meta + cc.view.adjustViewPort(true); + // Setup the resolution policy and design resolution size + cc.view.setDesignResolutionSize(800, 450, cc.ResolutionPolicy.SHOW_ALL); + // The game will be resized when browser size change + cc.view.resizeWithBrowserSize(true); + //load resources + cc.LoaderScene.preload(g_resources, function () { + cc.director.runScene(new HelloWorldScene()); + }, this); +}; +cc.game.run(); \ No newline at end of file diff --git a/play/build_ios/jsb-link/project.json b/play/build_ios/jsb-link/project.json new file mode 100755 index 0000000000000000000000000000000000000000..e54f8706601e33b07cca8aa326b40603264bb795 --- /dev/null +++ b/play/build_ios/jsb-link/project.json @@ -0,0 +1,17 @@ +{ + "project_type": "javascript", + + "debugMode" : 1, + "showFPS" : true, + "frameRate" : 60, + "id" : "gameCanvas", + "renderMode" : 0, + "engineDir":"frameworks/cocos2d-html5", + + "modules" : ["cocos2d"], + + "jsList" : [ + "src/resource.js", + "src/app.js" + ] +} diff --git a/play/settings/builder.json b/play/settings/builder.json index 339f2f5d82574ea0611ce8f8be4b6ed99cb85161..7180ff38d2779886c706ab83af791e01a9fda2a3 100644 --- a/play/settings/builder.json +++ b/play/settings/builder.json @@ -1,7 +1,7 @@ { "title": "play", "packageName": "org.cocos2d.demo", - "startScene": "eb8aed66-30b6-4b6d-8111-a56301f794d4", + "startScene": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3", "excludeScenes": [], "includeSDKBox": false, "orientation": { diff --git a/play/tsconfig.json b/play/tsconfig.json index 93c0b229b2793c061a418d397736dae701ecc025..80809c6368d1da7feb2d07dcb857a7fd7e4ec5d8 100644 --- a/play/tsconfig.json +++ b/play/tsconfig.json @@ -6,6 +6,7 @@ "experimentalDecorators": true, "skipLibCheck": true, "outDir": "temp/vscode-dist", + "allowJs": true, "forceConsistentCasingInFileNames": true }, "exclude": [