Command line build documentation (macOS)

Hi,

Does anyone know if there exists some documentation on how to do command line builds? We’d love to set up some scripts to automate our build processes a bit…

I found the following two threads, but I’m sure there must be some more information on this topic!?

Best,

Bjørnar

There’s no formal documentation. Tool is called CoronaBuilder, you can use it to make builds, passing build parameters in a lua file. 

builder=~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder
${builder} build --lua build.lua 

See https://forums.coronalabs.com/topic/54309-automated-builds-using-the-coronabuilderapp/ for example

I’ve a script that builds my apps using the CoronaBuilder. It only works using a config file. I run my script on Mac and have used it to build for Android (both GP and Amazon) so far. I expect it to work for Apple as well. 

The config file:

{ "androidAppPackage": "com.xxx", "appName": "name", "androidVersionCode": 1, "appVersion": "1.1.1", "certificatePath": "/path/to/keystore", "keystorePassword": "password", "keystoreAlias": "alias", "keystoreAliasPassword": "aliasPassword", "dstPath": "/destination/path", "projectPath": "/path/to/source", "platform": "Android", "androidStore": "google" }

I run it like 

/Applications/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder /path/to/config.json

for iOS it will look like this:

{     platform='ios',     appName='name',     appVersion='1.1.1',     certificatePath = '/path/to/provisioning/profile',     dstPath='/destination/path',     projectPath='/path/to/source' }

Thanks, guys, for support both here and on email.

Below some params.lua examples I suppose can be of interest to people. Build using following command (on Mac, at least):

~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder build /path/to/params.lua

Thanks to Bektur for providing the information and the params files in the first place!

Android:

local params = { platform='android', appName='appName', appVersion='1.1.2', certificatePath = 'path\_to\_keystore', keystorePassword = '\*\*\*\*\*', keystoreAlias = 'alias', keystoreAliasPassword = '\*\*\*\*\*\*', androidVersionCode = '3', dstPath='/path/to/destination/folder', projectPath='/path/to/project/folder', androidAppPackage='com.example.myapp', androidStore = 'none' } return params

HTML:

local params = { platform='html5', appName='My app', appVersion='3.2.1', dstPath='/path/to/destination/folder', projectPath='/path/to/project/folder', includeStandardResources = 'true', } return params

iOS:

local params = { platform='ios', appName='My App', appVersion='1.1.1', certificatePath = '/path/to/certificate/myapp.mobileprovision', dstPath='/path/to/destination/folder', projectPath='/path/to/project/folder', } return params

Mac:

local params = { platform='macos', appName='My App', appVersion='3.2.1', certificatePath = '/path/to/certificate/myapp.mobileprovision', dstPath='/path/to/destination/folder', projectPath='path/to/project/folder', } return params

HTML5 not working!

>> ERROR: Unsupported platform: HTML5

I’m not sure we’ve added HTML5 builds to CoronaBuilder yet.

Rob

There’s no formal documentation. Tool is called CoronaBuilder, you can use it to make builds, passing build parameters in a lua file. 

builder=~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder
${builder} build --lua build.lua 

See https://forums.coronalabs.com/topic/54309-automated-builds-using-the-coronabuilderapp/ for example

I’ve a script that builds my apps using the CoronaBuilder. It only works using a config file. I run my script on Mac and have used it to build for Android (both GP and Amazon) so far. I expect it to work for Apple as well. 

The config file:

{ "androidAppPackage": "com.xxx", "appName": "name", "androidVersionCode": 1, "appVersion": "1.1.1", "certificatePath": "/path/to/keystore", "keystorePassword": "password", "keystoreAlias": "alias", "keystoreAliasPassword": "aliasPassword", "dstPath": "/destination/path", "projectPath": "/path/to/source", "platform": "Android", "androidStore": "google" }

I run it like 

/Applications/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder /path/to/config.json

for iOS it will look like this:

{     platform='ios',     appName='name',     appVersion='1.1.1',     certificatePath = '/path/to/provisioning/profile',     dstPath='/destination/path',     projectPath='/path/to/source' }

Thanks, guys, for support both here and on email.

Below some params.lua examples I suppose can be of interest to people. Build using following command (on Mac, at least):

~/Library/Application\ Support/Corona/Native/Corona/mac/bin/CoronaBuilder.app/Contents/MacOS/CoronaBuilder build /path/to/params.lua

Thanks to Bektur for providing the information and the params files in the first place!

Android:

local params = { platform='android', appName='appName', appVersion='1.1.2', certificatePath = 'path\_to\_keystore', keystorePassword = '\*\*\*\*\*', keystoreAlias = 'alias', keystoreAliasPassword = '\*\*\*\*\*\*', androidVersionCode = '3', dstPath='/path/to/destination/folder', projectPath='/path/to/project/folder', androidAppPackage='com.example.myapp', androidStore = 'none' } return params

HTML:

local params = { platform='html5', appName='My app', appVersion='3.2.1', dstPath='/path/to/destination/folder', projectPath='/path/to/project/folder', includeStandardResources = 'true', } return params

iOS:

local params = { platform='ios', appName='My App', appVersion='1.1.1', certificatePath = '/path/to/certificate/myapp.mobileprovision', dstPath='/path/to/destination/folder', projectPath='/path/to/project/folder', } return params

Mac:

local params = { platform='macos', appName='My App', appVersion='3.2.1', certificatePath = '/path/to/certificate/myapp.mobileprovision', dstPath='/path/to/destination/folder', projectPath='path/to/project/folder', } return params

HTML5 not working!

>> ERROR: Unsupported platform: HTML5

I’m not sure we’ve added HTML5 builds to CoronaBuilder yet.

Rob