Skip to content
Trevor DeVore edited this page Jun 30, 2017 · 23 revisions

The levure/packager folder contains the packager.livecodescript stack. This script uses the standalone settings of your the standalone.livecode stack and your application's app.yml configuration file to bring together all the necessary resources to package and build the final application ready for distribution.

  • 📂 your_project_folder
    • 📂 app
      • app.yml
    • 📁 builds
    • 📂 levure
      • 📂 packager
        • packager.livecodescript

Packaging an Application

Important! The Files & Memory > If destroyStack is false, when closing the last stack in file: preference in the LiveCode IDE is set to ask you may experience issues when packaging an application. You will need to change the preference to be Close the file or Don’t close the file.

Levure will package up an application for distribution. You need to do two things before packaging your application:

  1. Configure the standalone settings for the standalone.livecode stack file using the File > Standalone Application Settings... menu option in the LiveCode IDE. Configure the settings for each of the platforms your application supports and select any inclusions you want the LiveCode standalone builder to include with your standalone.
  2. Configure the copy files section of the app.yml file.

Once you have done those two things you can package your application. To package your application for a specific build profile call the following handler:

levurePackageApplication pBuildProfile
  • Creates a folder named after the build profile in the builds folder.
  • Within that folder a folder is created using the version and build number.
  • The packaged applications will be placed in folders for each platform you build your application for.
  • Any files in your copy files settings will be copied over. Variable replacement will be performed on any files.
  • If you are building on OS X and have configured a certificate name then the app will be signed.
  • If you are building for a profile named "mas" or "Mac App Store" then the app will be signed, zipped up, and prepared for upload to the Mac App Store.

The build profiles section in app.yml

# app.yml

...

build profiles:
  all profiles:
    post build script: [relative path to LiveCode file that will be run post build]
    certificates:
      macos:
        name: [name of certificate to sign OS X applications with]
    copy files:
      all platforms:
        - filename: [relative path to file or folder that should be copied to build folder]
          destination: [relative destination folder without build folder]
        ...
      macos:
        ...
      windows:
        ...
      linux:
        ...
      ios:
        ...
      android:
        ...
  development:
  beta:
  release:

...

copy files

Building executables for testing

The framework supports building stub executables that can be used to launch your app in a standalone environment for testing. By using the stub executables for testing, you can be working on your application in the IDE and instantly test your work running in a standalone.

Version information

There are two properties you will deal with for versioning: version and build. version is in the [major].[minor].[revision] format. This is what you would display to users. build is an integer that you should increment each time you build your application. You can start the build number at 1 and then increment by one each time you package your application and send it to someone.

The build number is used to uniquely identify each update to your app using an integer. For Android it is assigned to the versionCode property. If you submit your application to the Mac App Store the value is used to identify each package in a 'release train'. It can also be used with the Sparkle framework to uniquely identify your application.

Clone this wiki locally