Cegui for OgreIPhone Target’s error

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

yaxinhoo
Just popping in
Just popping in
Posts: 5
Joined: Wed Jun 23, 2010 13:39

Cegui for OgreIPhone Target’s error

Postby yaxinhoo » Sun Jun 27, 2010 07:02

I want to use cegui for ogre IPhone, I got the cegui source and build it in the mac 。then i setup three iphone static lib target in the project,it is CEGUIbase_I,CEGUIOgreRenderer_I,CEGUITinyXMLParser_I ,replace the dependence pcre and freetype2 with iphone dependencies. it work, i build and got the static lib for iphone.

but when i use it in i phone project ,the project can't bootstartupsystem

Code: Select all

mOgreRenderer = &CEGUI::OgreRenderer::bootstrapSystem(*m_pRenderWnd);

it is error in runtime when cegui load the tinyXmlparser, the exception code process createBundle in the function of mac_loadexebundle(const char*name)
it log a message "Couldn't get bundle from main app bundle reference; trying CEGUIbase instead"

Code: Select all

    if (pluginName)
    {
        bundle = createBundle(CFBundleGetMainBundle(), pluginName);

        if (!bundle)
        {
            if(logger)
                logger->logEvent(
                    "-- Couldn't get bundle from main app bundle reference; "
                    "trying CEGUIbase instead.");

            bundle =
                createBundle(CFBundleGetBundleWithIdentifier(
                                CFSTR("net.sourceforge.crayzedsgui.CEGUIBase")),
                             pluginName);
        }


i want to know the diffrence of macexebundle and iphonebundle to let the cegui work for iphone .
anyone can tell me ,or tell me the way to let cegui work for iphone .

yaxinhoo
Just popping in
Just popping in
Posts: 5
Joined: Wed Jun 23, 2010 13:39

Re: Cegui for OgreIPhone Target’s error

Postby yaxinhoo » Sun Jun 27, 2010 13:43

the errer is CFBundleCreate unsuccess, it return zero.

the crash code is

Code: Select all

bundle =
                createBundle(CFBundleGetBundleWithIdentifier(
                                CFSTR("net.sourceforge.crayzedsgui.CEGUIBase")),
                             pluginName);



Code: Select all

//----------------------------------------------------------------------------//
CFBundleRef createBundle(CFBundleRef sourceBundle, CFStringRef bundleName)
{
    CFBundleRef bundle = 0;

    CFURLRef pluginsURL = createFullPluginsURL(sourceBundle);

    if (pluginsURL)
    {
        CFURLRef bundleURL =
            CFURLCreateCopyAppendingPathComponent(0, pluginsURL,
                                                  bundleName, false);
        if (bundleURL)
        {
            bundle = CFBundleCreate(0, bundleURL);
            CFRelease(bundleURL);
        }

        CFRelease(pluginsURL);
    }

    return bundle;
}

//----------------------------------------------------------------------------//
CFBundleRef mac_loadExeBundle(const char* name)
{
    Logger* logger = Logger::getSingletonPtr();

    if (logger)
    {
       logger->logEvent("---- Beginning exe bundle loading ----");
       logger->logEvent("-- Input bundle name: " + String(name));
    }

    CFBundleRef bundle = 0;

    CFStringRef pluginName = createBundleNameString(name);
   
    if (pluginName)
    {
        bundle = createBundle(CFBundleGetMainBundle(), pluginName);

        if (!bundle)
        {
            if(logger)
                logger->logEvent(
                    "-- Couldn't get bundle from main app bundle reference; "
                    "trying CEGUIbase instead.");

            bundle =
                createBundle(CFBundleGetBundleWithIdentifier(
                                CFSTR("net.sourceforge.crayzedsgui.CEGUIBase")),
                             pluginName);
        }

        if (bundle)
        {
            if (!CFBundleLoadExecutable(bundle))
            {
                CFRelease(bundle);
                bundle = 0;
            }
        }
       
        CFRelease(pluginName);
    }

    if (logger)
    {
        if (bundle)
            logger->logEvent("-- Bundle loaded successfully.");
        else
            logger->logEvent("-- Bundle loading failed!");

        logger->logEvent("---- Finished exe bundle loading ----");
    }
 
    return bundle;
}


Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests