<commit_before>KA-Lite OSX App
===============
This folder contains the script and sources to build the installer for KA-Lite.

The application icon sits on the status menu of OS X and uses [PyRun](http://www.egenix.com/products/python/PyRun/) instead of the OS X built-in Python.


## System Requirements

* Mac OSX 10.10 Yosemite
* git
* Xcode 6.1.x


## Steps to build the installer
There are two ways to build the installer, automated or manually.

1. To build automatically, run `setup.sh` which will:
    1.1. Create a `temp` directory (this is ignored in the .gitignore) and puts everything else inside it.
    1.2. Download PyRun to the `temp/pyrun-2.7` directory.
    1.3. Download the KA-Lite source to the `temp/ka-lite` directory.
    1.4. Copy the `pyrun-2.7` directory to the `<xcode_source>/Resources/` folder.
    1.5. Build the `KA-Lite Monitor.app` using `xcodebuild`.
    1.6. Build the `KA-Lite Monitor.dmg` package.  The output can be found at the `temp/output/KA-Lite Monitor.dmg`.
2. To build the .dmg manually - refer to the README-FOR-DMG.md document.


### To manually build and test the application

1. Run `setup.sh` so it will download the `ka-lite` repository and `pyrun`.
2. Launch Xcode
3. At the Project Navigator (left-pane), right-click on the Supporting Files folder and select Add Files to "KA Lite Monitor".
4. Select the `pyrun-2.7` directory that was copied at the Resources folder by `setup.sh` above.  Make sure to select "Create folder references."!
5. Build the project to produce the .app.


## Notes

1. Please note that this has been tested on Mac OSX 10.10 Yosemite.  It may run on older versions down to Mac OSX Mountain Lion 10.8 but we haven't tested it.
1. The `setup-files` folder contains the files to be included on the dmg file.
1. The `ka-lite-pencil.ep` is the [Pencil](https://code.google.com/p/evoluspencil/) file to generate the background image of the dmg file.
1. `setup.sh` downloads the following

    * KA-Lite repo on `develop` branch, or the specified repo
    * PyRun version 2.7
1. You can optionally pass a ka-lite archive repo url as an argument in this format:

    > ./setup.sh "https://github.com/learningequality/ka-lite/archive/0.14.x.zip"

    This is useful if you want to try a different fork or branch on your build.
    It defaults to the `develop` branch at "https://github.com/learningequality/ka-lite/archive/develop.zip".


## References

1. [??? Installing Tomcat on Mac OS X](http://www.joel.lopes-da-silva.com/2008/05/13/installing-tomcat-on-mac-os-x/)
1. [??? Using launchd](http://trac.buildbot.net/wiki/UsingLaunchd)
1. [??? HowTo: Set an Environment Variable in Mac OS X](http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x/)<commit_msg>Update steps to build the installer<commit_after>KA-Lite OSX App
===============
This folder contains the script and sources to build the installer for KA-Lite.

The application icon sits on the status menu of OS X and uses [PyRun](http://www.egenix.com/products/python/PyRun/) instead of the OS X built-in Python.


## System Requirements

* Mac OSX 10.10 Yosemite
* git
* Xcode 6.1.x


## Steps to build the installer
There are two ways to build the installer, automated or manually.

1. To build automatically, run `setup.sh` which will:  
    1.1. Create a `temp` directory (this is ignored in the .gitignore) and puts everything else inside it.  
    1.2. Download PyRun to the `temp/pyrun-2.7` directory.  
    1.3. Download the KA-Lite source to the `temp/ka-lite` directory.  
    1.4. Copy the `pyrun-2.7` directory to the `<xcode_source>/Resources/` folder.  
    1.5. Build the `KA-Lite Monitor.app` using `xcodebuild`.  
    1.6. Build the `KA-Lite Monitor.dmg` package.  The output can be found at the `temp/output/KA-Lite Monitor.dmg`.  
2. To build the .dmg manually - refer to the README-FOR-DMG.md document.  


### To manually build and test the application

1. Run `setup.sh` so it will download the `ka-lite` repository and `pyrun`.
2. Launch Xcode
3. Navigate to `Project Navigator` and click the `Project Name`
4. Navigate to `Build Settings` tab and change the `Code Signing Identity` to `Don't Code Sign`.
4. Build the project to produce the .app.


## Notes

1. Please note that this has been tested on Mac OSX 10.10 Yosemite.  It may run on older versions down to Mac OSX Mountain Lion 10.8 but we haven't tested it.
1. The `setup-files` folder contains the files to be included on the dmg file.
1. The `ka-lite-pencil.ep` is the [Pencil](https://code.google.com/p/evoluspencil/) file to generate the background image of the dmg file.
1. `setup.sh` downloads the following

    * KA-Lite repo on `develop` branch, or the specified repo
    * PyRun version 2.7
1. You can optionally pass a ka-lite archive repo url as an argument in this format:

    > ./setup.sh "https://github.com/learningequality/ka-lite/archive/0.14.x.zip"

    This is useful if you want to try a different fork or branch on your build.
    It defaults to the `develop` branch at "https://github.com/learningequality/ka-lite/archive/develop.zip".


## References

1. [??? Installing Tomcat on Mac OS X](http://www.joel.lopes-da-silva.com/2008/05/13/installing-tomcat-on-mac-os-x/)
1. [??? Using launchd](http://trac.buildbot.net/wiki/UsingLaunchd)
1. [??? HowTo: Set an Environment Variable in Mac OS X](http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x/)
{'fraction_non_alphanumeric': 0.11161939615736505, 'fraction_numerical': 0.0212259835315645, 'mean_word_length': 3.45114006514658, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3983636', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1729, 'n_words': 706}