Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Is GiderosiOSPlayer.xcodeproj current for compiling Gideros on the Mac? — Gideros Forum

Is GiderosiOSPlayer.xcodeproj current for compiling Gideros on the Mac?

I need to modify the core to do tasks that are far too slow in LUA. I don't want to take the plugin route either because I want to make use of the core features.

I've downloaded github.com/gideros/gideros

Opened ios/GiderosiOSPlayer/GiderosiOSPlayer.xcodeproj in xcode and it failed to compile. It gave suggestions of 3 x function names and I changed those and then it fails due to missing file.

See attached image.

Comments

  • hgy29hgy29 Maintainer
    Accepted Answer
    Yes, it is current, but it is not what you think. It is only used for the bundled pre-built ios player, and is bound to disappear in the future in favor of a player exported from gideros studio the usual way.

    You'd want to modify main gideros ios library (ios/iosplayer) and/or the Xcode template (ui/Templates/Xcode4/iOS Template) instead.

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • JohnJohn Member
    Thanks for quick response.

    Neither of those project compiles for me and so I've not got a handle as to what each Xcode project does yet so I'm just guessing as to which project I actually need.

    Case example:

    I get UIDevice undefined when I try to compile ios/iosplayer

    If you go to gideros/gideros/blob/master/libgid/src/ios/platform-ios.mm

    Line 185-196

    static std::string g_propResult;
    const char* g_getProperty(const char* what, const char* arg){
    g_propResult="";
    if (what&&(!strcmp(what,"batteryLevel"))) {
    UIDevice *myDevice = [UIDevice currentDevice];
    [myDevice setBatteryMonitoringEnabled:YES];
    double batLeft = (float)[myDevice batteryLevel] * 100;
    NSString * levelLabel = [NSString stringWithFormat:@%.f%, batLeft];
    g_propResult=[levelLabel UTF8String];
    }
    return g_propResult.c_str();
    }

    The batteryLevel doesn't apply to the Mac build so it need the

    #if TARGET_OS_OSX
    #else
    #endif

    block in there.

    I realise this file had a recent change to the code and you haven't had the need to compile the mac build as to why this has happened.

    That is just 1 example.

    I'll go through those 2 projects and fix the issues I am having when I have more time.
  • hgy29hgy29 Maintainer
    edited April 2020
    Yes, I didn't bother making it mac aware since native mac export isn't supported yet. Switch your build target to build for ios, not macos.

    EDIT: I usually build it from a terminal window, typing 'make -f scripts/Makefile.gid ios.install', see https://wiki.giderosmobile.com/index.php/Compiling_Gideros_Source#2.2.2_iOS_:

    Likes: John

    +1 -1 (+1 / -0 )Share on Facebook
  • Should it be possible to *just* build the GiderosiOSPlayer app? I used the source tarball (not git clone...yet) and used the xcode project for ios/GiderosiOSPlayer and manually copied all the missing references (maybe these are created when you build the entire suite) and build the libgvfs and liblua. These had xcode projects. And now it is failing during linking when trying to find the libgideros.a. But libgideros doesn't have an xcode project. So, Im close, but that opens the question of whether the GiderosiOSPlayer app could be built by itself.
  • hgy29hgy29 Maintainer
    Well you figured out the answer: no it can't be built by itself since it requires libgideros.a, which is built using iosplayer xcode project, as well as base libraries in their respective folders. GiderosiOSPlayer project directory is bound to disappear actually, it is a customized duplicate of the Xcode template in ui folder, and it is difficult to maintain.
  • Thanks for that. I have cloned Gideros and then ran the make statement that you mentioned in your previous reply. Interesting that it is failing not being able to find lua.h in a couple of the plugins builds. I would think I can get around that with a bit more effort. Thanks.
  • hgy29hgy29 Maintainer
    You may need to run a qt build before, as it sets up a header folder. You may also need to run make prep.repo to set up some git submodules.
  • Ok, will do. That must be what I missed/skipped.
Sign In or Register to comment.