简体   繁体   English

使用适用于iOS5的XCode编译现有的Lua应用程序

[英]Compile existing Lua app using XCode for iOS5

We had a freelance developer that went rogue and now I'm left with a Lua-based app with no build files. 我们有一个流氓自由开发者,现在我离开了一个没有构建文件的基于Lua的应用程序。

I have a degree in computer science, but have no experience with Lua, so I'm wondering how I can compile this (or any Lua app) with XCode for iOS. 我有计算机科学学位,但没有Lua的经验,所以我想知道如何使用XCode for iOS编译这个(或任何Lua应用程序)。

It's a fairly simple app. 这是一个相当简单的应用程序。 It appears as though it loads in images for navigation and displays other images as content. 看起来它似乎加载到导航图像中并将其他图像显示为内容。

How do I tell XCode to compile Lua for iOS though? 我怎么告诉XCode为iOS编译Lua? I have all the files in XCode and it's compiling, but clearly its ignoring the .lua files and compiling the application shell. 我拥有XCode中的所有文件并且正在编译,但显然它忽略了.lua文件并编译了应用程序shell。

I have Lua downloaded by source and also installed it via MacPorts. 我通过源代码下载了Lua,并通过MacPorts安装了它。 I read that I need to link lua.h and luac.h but I don't see how to add it as a build target. 我读到我需要链接lua.h和luac.h但我不知道如何将它添加为构建目标。

Any advise or direction would be much appreciated. 任何建议或方向将不胜感激。

These are the files I have: 这些是我的文件:

Source Code/
    build.settings
    Clinical_Data/
        page4a_2_Anim.lua
        page4a_3_Anim.lua
        page4a_4_Anim.lua
        page4a_5_Anim.lua
        page4b_2_Anim.lua
        page4b_3_Anim.lua
        page4b_4_Anim.lua
        page4d_2_Anim.lua
        page4d_3_Anim.lua
        page4d_4_Anim.lua
    config.lua
    home.lua
    Icon-72.png
    images/
        <*.png files>
    main.lua
    manifests/
        CaseStudy.manifest.txt
        ClinicalData.manifest.txt
        Experience.manifest.txt
        Home.manifest.txt
        NavElements.manifest.txt
        Pathology.manifest.txt
        References.manifest.txt
        Restasis.manifest.txt
    menu.lua
    page4a_2_Anim.lua
    page4a_3_Anim.lua
    page4a_4_Anim.lua
    page4a_5_Anim.lua
    page4b_2_Anim.lua
    page4b_3_Anim.lua
    page4b_4_Anim.lua
    page4d_2_Anim.lua
    page4d_3_Anim.lua
    page4d_4_Anim.lua
    parser.lua
    pdfs/
        <*.pdf files>
    section.lua
    slide.lua
    slideView.lua
    ui.lua

It looks like it may be corona from anscamobile.com. 从anscamobile.com看起来它可能是日冕。 You can download a trial version from their site to see if it compiles. 您可以从他们的网站下载试用版以查看它是否可以编译。

It's probably linking lua from your installed lua code. 它可能链接了你安装的lua代码中的lua。 There'll be a -llua in your link code. 您的链接代码中会有一个-llua。 Somewhere in your source files there'll be a 在你的源文件中的某个地方会有一个

luaL_loadfile(L, file);

command. 命令。 This loads the lua file. 这会加载lua文件。

If it's corona it might have a different way to load - haven't used it. 如果它是日冕,它可能有不同的加载方式 - 没有使用它。

If you need an IDE http://www.eclipse.org/koneki/ldt/ is superb. 如果你需要一个IDE http://www.eclipse.org/koneki/ldt/是一流的。 You can remote debug your app very easily. 您可以非常轻松地远程调试您的应用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM