Giter VIP home page Giter VIP logo

qxpomelo's Introduction

QXPomelo--
quick-cocos2d-x的pomelo客户端

pomelo client for quick-cocos2d-x lua client for pomelo 基于libpomelo暴露接口给lua调用<h1>

1.基于xdxttt同学的CCPomelo库二次封装而来CCPomelo 再绑定给lua调用
ps:因为我用的是很早之前的版本 所以可能存在他修正过的问题我这边还没发现。基本上的处理是装connect放入线程,避免阻塞子主线程。

编译方式

1:执行doit.sh 2:MAC IOS ###/lib/luabinding/extensions/cocos-ext.tolua 添加 一行 $pfile "extensions/QXPomelo-luabinding.tolua" ###执行/lib/luabinding/build.sh ###在cocos-ext.h 里添加 #include "QXPomelo/QXPomelo.h" #include "QXPomelo/CCPomelo.h"

在xcode HEADER_SEARCH_PATH 里添加 "$(QUICK_COCOS2DX_ROOT)/lib/cocos2d-x/extensions/QXPomelo" 在XCODE LIBARY_SEARCH_PATH 里添加 "$(QUICK_COCOS2DX_ROOT)/lib/cocos2d-x/cocos2dx/platform/third_party/对应平台目录的pomelo-ios

###在工程中引入如上对应的两个目录

mac

此处基本上只是为了让player可以使用pomelo

引入pomelolib-mac中的3个.a文件 ps:这三个文件是根据libpomelo的说明生成出来的 可能不同机器不一样 如果不能用需要自行编译Libpomelo工程

windows

此处基本上只是为了让player可以使用pomelo
1:在工程右键->c/c++->常规->附加包含目录 里添加 QXPomelo的所在目录
2:在工程右键->属性->配置属性->链接器->常规->附加库目录中添加 pomelolib-windows 的路径
2:在工程右键->属性->配置属性->链接器->输入->附加依赖项中添加如下lib
jansson.lib
libpomelo.lib
libuv.lib
IPHLPAPI.lib
Psapi.lib
ps:此处后面的IPHLPAPI Psapi是libuv的必须依赖项,必须要引入,不然不能通过编译.libpomelo的官方文档上没有提及 我折腾了非常久

lua中调用

参考 LibPomelo.lua

libpomelo.zip先解压 直接同步不知道为毛git把android.mk搞没了

qxpomelo's People

Contributors

yangzhu6263736 avatar

Stargazers

wenqingliu avatar mirwangsir avatar Skyblue avatar Jiangzhuo  avatar Jason Xu avatar keqinzhao avatar  avatar yezehui2002 avatar justbilt avatar

Watchers

James Cloos avatar  avatar keqinzhao avatar  avatar Jiangzhuo  avatar

qxpomelo's Issues

异步连接回调函数没有执行

你好,我在使用的过程中碰见这个问题,在CCPomelo.cpp的418行,
int ret = pc_client_connect2(client, conn_req, cc_pomelo_on_connect_cb);
这一句连接的时候,回调函数没有执行。是只有我一个人碰见这个问题么?
看起来这像个bug。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.