守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1324|回复: 0
打印 上一主题 下一主题

[AIR技术] AIR各种Makefile (Mobile AIR builds, ANEs, etc.)

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    52903
    钢镚
    1422

    开源英雄守望者

    跳转到指定楼层
    楼主
    发表于 2015-2-2 16:31:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式


    AIR Makefiles

    This is a set of Makefile includes that simplify the creation of AIR projects (incl. ANE's) from the command line. Most goodies are there, including:

    • ANE creation from source (make ane)
    • IPA/APK creation (make ipa or make apk)
    • Mobile installation (ipa/apk) via USB (make install)
    • Mobile launch (apk) via USB (make run-apk)
    • Test mobile apps on the desktop (make test)
    • Native code compilation (Objective-C, Objective-C++, Java)
    • Full dependency tracking including header files
    • Automatic code signing key selection
    • Automatic app descriptor version generation from git
    Requirements

    I have only tested this on OS X. Given the Xcode dependency, it's unlikely this could run elsewhere, but I guess given the toolchain it might work...

    You'll need:

    Add both SDKs to your path and you're ready to go.

    Usage
    • Create a folder under your existing project where your build files will reside, say dist
      cd my-project mkdir dist
    • Add the AIR Makefile project as a submodule under this folder as mk:
      git submodule init git submodule add git@github.com:jlopez/air-mk.git dist/mk git submodule update
    • Create a Makefile defining configuration information about your AIR application (see Variablesbelow)
    • Include one of mk/air.mk' ormk/ane.mk` depending if you plan to build a straight AIR application or an ANE with a test app.
    • Invoke make. See Targets for a list of possible make targets.

    Variables

    You should define all these variables in your Makefile:

    Basic
    • APP_ID: Your AIR application ID
    • NAME: Will be used to name your build products (NAME.ipa, NAME.apk, NAME.ane)
    Signing
    • KEYDIR: A directory containing a list of companies. Each company should contain your keys (e.g. development.p12, distribution.p12, android.pfx, etc.) If not defined, will default to ../..
    • COMPANY: The name of the directory under KEYDIR containing your keys.
    • VERSION: Version in MAJOR.MINOR form, will be added to app descriptor
    Testflight
    • TESTFLIGHT_API_TOKEN: For make upload target
    • TESTFLIGHT_TEAM_TOKEN: For make upload target
    • TESTFLIGHT_DLS: Distribution lists for make upload target
    Source
    • SRCDIR: The root of your source files for your AIR project
    • SRC_MAIN: The path to the main source file of your AIR project (.mxml or .as)
    • APP_XML_IN: The path to your app descriptor template file
    • ANES: Space separated list of paths to ANEs that your app should link to
    • OTHER_RESOURCES: Other files that should be included in your ipa/apk
    ANE Source (relevant only when including mk/ane.mk)
    • EXT_ID: Extension ID
    • ANE_IOS_LIB_SOURCES: A list of your iOS native source files
    • ANE_IOS_LIB_CFLAGS: Additional CFLAGS, usually -I, etc.
    • ANE_IOS_RESOURCE_DIRS: Additional resource directories to include in the ANE
    • ANE_ANDROID_JAR_SOURCES: List of android projects / jar files to compile
    • ANE_ANDROID_JAR_CLASSPATH: Additional android jars to compile against
    • ANE_ANDROID_JAR_SUPPORT_VERSION: Optional, android support jar version (e.g. 4)
    • ANDROID_SRC_SEARCH_PATHS: List of source roots, default "src"
    Application Descriptor Template

    The APP_XML_IN file may contain macros of the form @MACRO@, where MACRO is one of the variables above, as well as any of the generated variables such as:

    • REVISION: Current revision number, defined as the number of commits on the current branch since the initial commit
    • COMMIT: Abbreviated hash of the current HEAD, with a '*' appended if the working directory is dirty.
    • EXT_ID: Extension ID of ANE being built
    Targets
    • make swf: Build AIR swf
    • make test: Run AIR swf on desktop. May specify SCREEN variable to change iPhoneRetina default.
    • make ipa: Build iOS .ipa file
    • make upload: Uploads .ipa to TestFlight
    • make install: Installs .ipa to plugged iDevice
    • make apk: Build Android .apk file
    • make install-apk: Installs .apk file to plugged Android device
    • make run-apk: Launches app on plugged Android device
    • make ane: Builds ANE file (available only when including mk/ane.mk)
    Future Enhancements

    This is a laundry list of things that may or may not be done in the future:

    • Better error detection
    • Better documentation
    • Ensure operability under a single environment (just Android, or just iOS)



    相关链接:

    https://github.com/jlopez/air-mk


    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
    收藏收藏 分享分享 支持支持 反对反对 微信

    相关帖子

    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2026-1-23 22:19 , Processed in 0.049303 second(s), 35 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表