Download
How to use:
Prerequisites
- Install MoaiNao-debug.apk
- Make an adb connection either through wifi or usb
- Make sure that usb mass storage is off or the device is in MTP mode
The slow way:
- Zip your project files such that main.lua is at the root of the archive (refer to sample-project/sample.moai)
- Change the extension to .moai
- Copy the file to somewhere you can reach in your sdcard
- Use a file manager to locate and open the file
- Choose Moai Nao (portrait) or Moai Nao (landscape)
The quick way:(it is faster in the long run, just a bit of initial setup)
- Make sure 7z.exe (http://www.7-zip.org/) is in your PATH
- Give your project a structure similar to sample-project
- Edit settings.bat to change the bundle name
- Adjust the path in include.txt
- Edit launch-on-device.bat to match your desired orientation (instructions provided in the file)
- Run deploy-to-device.bat everytime you want to test on device
- Cheeze burgerzzz ... errr, I mean profit!!
What the scripts do:
- settings.bat edit this to change your bundle name
- launch-on-device.bat simply launchs MoaiNao on the device and makes it open your bundle. Use this script whenever you want to relaunch your app and do not want to repackage resources (nothing is changed since the last run)
- deploy-to-device.bat packages your resources using include.txt and exclude.txt as input, pushes it to your device using adb push and then calls launch-on-device.bat
Other notes:
- deploy-to-device pushes your .moai file to /data/local/tmp so there's no guarantee that it will stays there
- All your bundles are run under the same app (MoaiNao) so they share the document and cache directory, remember to clean it if you use MoaiNao for multiple bundles. "Moai Nao Settings" inside the app drawer redirects you to the setting page to do this.
- deploy-to-device.bat use update mode (the u parameter) for fast updating of the archive. It does not take into account deleted files. Delete your local .moai file for a full repackage.
- Please pardon my lol-cat-lish
Future work:
- Investigate adb sync for even faster update.
A github project will be set up soon.
Haz fun nao, bai.


