Moonshine Source Setup Instructions

Before proceeding you are expected to have:

1. Following setup instructions demonstrated with Moonshine IDE ™, users may use other IDE to setup also

2. To setup Moonshine IDE ™ please download and install latest IDE release

3. Clone or download Moonshine source code from GitHub: Moonshine-IDE

4. You can able to download necessary Apache Flex® SDKs in intermediate steps (i.e. through in-built SDK downloader in Windows and through App Store Helper in MacOS)

Moonshine development requisites

Setup Moonshine IDE ™ with Apache Flex SDK

  • Start Moonshine
  • Setup Apache Flex® SDK in Settings
  • In Moonshine choose File -> Settings -> Default SDK

Default SDK

  • If you are using Moonshine that bundled with different SDKs, then you can use any of them to set default Flex SDK to Moonshine, or even you can downloaded Apache Flex® SDK with Adobe AIR SDK at
  • If you are using OSX El Capitan or higher, make sure your any downloaded SDK’s location is ~/Downloads folder. By many restrictions applied to El Capitan, a sandbox app can execute/use SDK stuff only if it’s in user’s Downloads folder
  • (OSX) If you have setup Flex SDKs downloaded by Moonshine’s helper application App Store Helper then you should probably see Moonshine’s default SDK.
  • You can also set your own SDK as default, click on Change link inside Default Apache Flex® Apache Royale® or Feathers SDK section, this will open a popup named “Select Flex SDK” consisting of available/added SDK entries
  • To use any SDK from the above entry, simply double-click on it, and it’ll updated to Default Apache Flex® Apache Royale® or Feathers SDK section, or you can add your own by clicking on plus button in “Select Flex SDK” popup and complete the “Define a SDK Path” form to add your new SDK to Moonshine
  • When done, click on Save button in Default SDK section

Setup Moonshine Sources

  • Checkout Moonshine sources from our GitHub repository.
  • Moonshine sources will have three different Flex project folders:

    — MoonshineSharedCore
    (library project shared in desktop and web IDE)
    — MoonshineDESKTOPevolved(desktop IDE’s gateway project)
    — MoonshineWEB(web IDE’s gateway project)

    (Note: this setup instructions demonstrated with desktop version’s IDE source)
  • Import Moonshine’s desktop version source in running Moonshine IDE ™, you can do so by any of the following ways:

    Choose by Project -> Open/Import Flex Project
    Click on Open Apache Flex/Royale Project link in IDE’s splash screen. In opening folder browser dialogue navigate to the checkout sources, and select MoonshineDESKTOPevolved folder to open
  • Moonshine should import you now desktop version’s source in the IDE

Moonshine IDE sources

  • Now we now need to setup it’s library project (MoonshineSharedCore), and configure it’s settings. to do this right-click on project root node in workspace (right-hand tree panel) and choose Settings
  • You should now open with MoonshineDESKTOPevolved project’s settings window

Moonshine Sources settings

  • Make sure the project’s Build Options -> Additional Compiler Options read this:

    -locale en_US -allow-source-path-overlap=true -swf-version 39 -define+=CONFIG::OSX,false +configname=air

    (Note: -swf-version 39 is the compiler argument for Adobe AIR 28.0. This may needs to vary per your SDK version usage. Please read your Adobe AIR SDK version’s release notes online to know more)
  • To setup library projects, SWC, other sources etc. go to Paths section in project’s settings window

Moonshine Sources settings

Moonshine Sources settings
— Class Paths: Used to connect linked projects’ source paths. Make sure Class Paths are correct per your directory structure
— Resource Folders: Link up this path: MoonshineSharedCore/src/elements
— Libraries: Link up the .SWC file from this path: MoonshineDESKTOPevolved/libs/ApacheFlexSDKInstallerLib.swc
You can add entry to the sections by Click to Add button or modify paths by Browse Dir button. Make sure Class Paths sections points to the MoonshineSharedCore sources per your local file system correctly. Save settings.

  • Moonshine uses one Adobe Native Extension for OSX version only (and specifically for it’s PKG installer). This need not to be added/included during an IDE run. Having the reference in it’s application descriptor file may also creates problem during a run from an IDE. Thus, you wants to remove the reference of the Native Extension from Moonshine application descriptor file. To do this, open MoonshineDESKTOPevolved/src/MoonshineDESKTOP-app.xml, and remove the following line if exists:

  • To test a Flex project choose Project -> Build & Run, to test a Royale project you either can choose Project -> Build & Run (produce .SWF) or Project -> Build & Run as JavaScript (produce HTML/JavaScript); if all things are works you should see compilation output in bottom Console view in Moonshine IDE ™ and an AIR window starts running Moonshine IDE’s instance, eventually. (Note: To run a Flex project you needs your running/default-sdk to be a Flex SDK, to run a Royale project you needs to set your running/default-sdk to a FlexJS SDK. You can toggle between SDKs by the steps as discussed in Setup Moonshine IDE  with Apache Flex SDK section)

ANT Build

  • Starting an ANT build requires Apache Ant® installed in your system and setup as environment variable (ensure ANT version meets minimum requirement of 1.9.2)
  • Moonshine sources supplies with it’s Ant build scripts and configured. Upon completion, the process will output desktop installer files for Windows and MacOS. You can immediately start an Ant build process if you already setup Ant in your system; to start an Ant build process we need to locate the Ant build script file (build.xml) prior to run the process. Moonshine supplies Ant build script file in it’s project’s build folder.
  • If you have already ANT_HOME setup then you can immediately build your script file by choosing Ant -> Configure from top menu, in opening file browser dialogue navigate to your Flex project’s folder and select build/build.xml file; click Open in browser dialogue; lastly Ant -> Build. Ant build should produce .SWF and it’s HTML wrapper file set
  • If you did not have ANT_HOME setup already, choose Ant -> Build. This will open following window where you can set your Ant binary location and optionally set path to your build.xml file
  • Upon successful completion of the process, installer files can be located at DEPLOY folder inside build folder
  • You can edit build/ApplicationProperties.xml to build optional Flex SDK path, build certificate paths etc. If no certificate supplies, ANT script will create a self-signed certificate for the build process automatically