Find file
Fetching contributors…
Cannot retrieve contributors at this time
165 lines (111 sloc) 5.62 KB

Spaz Enyo

Spaz HD: The Next Generation.

If you want on the commits email list, sign up for


Here's how to contribute:

  1. Fork the repo on Github
  2. Make your changes
  3. submit a pull request from your github repo to the main repo
  4. Extra credit for using a topic branch

Spaz Enyo Team

  • Daniel Cousineau
  • Ed Finkler
  • Paddy Foran
  • Ryan Gahl
  • Nicholas Guarracino
  • Clay Hinson
  • Will Honey
  • Lee Roberson
  • Josh Roesslein
  • Daniel Weigh

Targeted Platforms

While the primary intial target is the HP TouchPad, Enyo is capable of running in any Webkit browser. If HP licenses Enyo liberally, the potential is there for Spaz Enyo to run on the following platforms:

  • webOS
  • Desktop Browsers (we may be limited by same-origin issues, though)
  • Desktop web runtimes (AIR/Titanium)
  • iOS
  • Android

In other words, this could be one codebase to do all versions of Spaz. That's pretty exciting.

This means that as much as possible, we should avoid webOS-specific functionality. Certain webOS functionality like cross-app launching will definitely happen, but we should strive to degrade gracefully, and/or architect solutions that allow swapping of platform-specific code.

Getting it running

HP's Enyo framework is not included, as it is not (yet) open source. You will need to obtain Enyo via the HP/Palm developer program and include it yourself. You should be able to drop Enyo 0.10's framework/ directory into enyo/0.10/ without issue.

You should be able to run Spaz Enyo within Chrome or Safari – Enyo is designed to work in any WebKit browser. We want to do as much development as possible within a desktop browser, and hopefully avoid webOS-specific functionality whenever possible.

Safari on OS X should run perfectly out of the box. Just open the index.html file in Safari, and it should load.

Chrome enforces more restrictions on local files and cross-domain requests, so you need to disable those on the command line. I wrote a short shell script called chrometest to do this on OS X:

CHROME_EXE="/Applications/Google Chrome"

"${CHROME_EXE}" --disable-web-security \
    --allow-file-access-from-files \
    --allow-file-access \
    "${APP_PATH}" $@ &

With this, I can type ./chrometest and open Spaz Enyo in Chrome. This won't work if Chrome is already open, though.

This should work for OS X, and Linux if you modify the path to the binary. You should be able to do something similar on Windows without too much effort.

Packaging for install on webOS

I made a short PHP script to do my packaging for me. You could certainly rewrite it in some other language if you like. It strips out the .git data and the included Enyo libraries, as they are provided on device/emulator. You'll need to adjust for the paths on your own machine.

#!/usr/bin/env php

function docmd($cmd) {
    echo $cmd."\n";

docmd("cp spazcore-standard.js spazcore.js");
docmd("git checkout master");
docmd("rm -rf ~/Desktop/spaz-enyo");
docmd("cp -r ~/Sites/spaz-enyo ~/Desktop/");
docmd("rm -rf ~/Desktop/spaz-enyo/.git");
docmd("rm -rf ~/Desktop/spaz-enyo/enyo");
docmd("rm -rf ~/Desktop/spaz-enyo/0.10");
docmd("palm-package ./spaz-enyo/");

$appinfo = json_decode(file_get_contents('./spaz-enyo/appinfo.json'));

$filename = "{$appinfo->id}_{$appinfo->version}"."_all.ipk";

docmd("palm-install {$filename}");
docmd("palm-launch {$appinfo->id}");

Packaging for Titanium Desktop

Building for Titanium Desktop is a bit more involved, as it requires a standard Titanium project folder with the following files and folder

LICENSE.txt (symlink to Resources/

The interesting file is, which juggles files around and builds the .app and .dmg files. This may have some OS X-specific stuff in it.


SRCPATH='~/Applications/Projects/Spaz HD'
TIPATH='/Users/coj/Library/Application Support/Titanium'
SDKPATH='/Library/Application Support/Titanium/sdk/osx/1.2.0.RC1'

BLDDATE=`date +%Y%m%d-%H%M%S%Z`

# let user know where we'll be working
echo "Source Path: ${SRCPATH}"
echo "Temp Path: ${TMPPATH}"
echo "Build Path:  ${BLDPATH}"
echo "--------------------------------------"

rm -rf $BLDPATH
mkdir -p $BLDPATH

echo "Copying source code..."
rm -rf /Users/coj/Applications/Projects/Spaz\ HD/Resources/*
cp -r /Users/coj/Sites/spaz-enyo/* /Users/coj/Applications/Projects/Spaz\ HD/Resources
rm -rf /Users/coj/Applications/Projects/Spaz\ HD/Resources/.git

echo "Swapping in spazcore-titanium.js"
cp "/Users/coj/Applications/Projects/Spaz HD/Resources/vendors/spazcore-titanium.js" \
        "/Users/coj/Applications/Projects/Spaz HD/Resources/vendors/spazcore.js"

ls -al "/Users/coj/Applications/Projects/Spaz HD/Resources/vendors/spazcore.js" 

echo "Building..."
echo "${SDKPATH}/" -r -v -p PACKAGE --type=bundle -d "${BLDPATH}" "${SRCPATH}"
"${SDKPATH}/" -r -v -p PACKAGE --type=bundle -d "${BLDPATH}" "${SRCPATH}"


echo "Restoring spazcore-standard.js"
cp "/Users/coj/Applications/Projects/Spaz HD/Resources/vendors/spazcore-standard.js" \
        "/Users/coj/Applications/Projects/Spaz HD/Resources/vendors/spazcore.js"

ls -al "/Users/coj/Applications/Projects/Spaz HD/Resources/vendors/spazcore*.js"