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 the IDE by following link(s):

Windows: http://moonshine-ide.com/downloads/Moonshine.exe
MacOS: Download on the Mac App Store

3. Download Moonshine sources by following link:

Desktop & Web: http://moonshine-ide.com/downloads/source/Moonshine-source-1.2.1.zip

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

Moonshine development requisites

  • AIR SDK 20+ (present development usage – Apache 4.15.0 with AIR 22.0). Note: edit MoonshineDESKTOP-app.xml (MoonshineDESKTOPevolved/src/MoonshineDESKTOP-app.xml) application version per your AIR SDK version:
    <application xmlns=”http://ns.adobe.com/air/application/22.0“>

Setup Moonshine IDE with Apache Flex SDK

  • Start Moonshine
  • Setup Apache Flex SDK in Settings
  • In Moonshine choose File -> Settings -> MXMLC Compiler Plugin
    settingssdk
  • 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 AIR SDK at http://flex.apache.org/installer.html
  • 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 already set by a bundled SDK:
    defaultautoset
  • You can also set your own SDK as default, click on Change link inside Default Flex 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 Flex SDK section, or you can add your own by clicking on plus (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 MXMLC Compiler Plugin section

Setup Moonshine Sources

  • Download and unzip Moonshine source bundle from the link mentioned above (in this article), to your local file system
  • Moonshine unzipped sources will have three different Flex project folders:

    — MoonshineSharedCore
    (library project shared in desktop and web IDE)
    — MoonshineDESKTOP(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 Flex Project link in IDE’s splash screenIn opening folder browser dialogue navigate to the unzipped source location, and select MoonshineDESKTOP folder to open
  • Moonshine should import you now desktop version’s source in the IDE
    projectimportmoonshine
  • 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 MoonshineDESKTOP project’s settings windowsettings1
  • Make sure the project’s Build Options -> Additional Compiler Options read this:

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


    (Note: -swf-version 33 is the compiler argument for AIR 22.0. This may needs to vary per your SDK version usage. Please read your 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:
    settings3— 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:

    <extensions><extensionID>karar.santanu.SecurityScopeBookmark</extensionID></extensions>
  • To test a Flex project choose Project -> Build & Run, to test a FlexJS 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 FlexJS 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 ANT installed in your system and setup as environment variable (http://ant.apache.org  – 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 buildfolder.
  • 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
    antconfig
  • 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