appjs/appjs — pull request #237 by sihorton (2012-11-06 23:58:58+00:00)
Title: application packaging

This patch adds application package handling to appjs. Also included are minor changes to the launch project for windows so that I could successfully build app.exe

The helloWorld application has had its app.js file updated to use the appjs-package npm module for handling package files. The aim has been to place the majority of changes and code into this module so that this change impacts the current functionality as little as possible, just adding in the additional ability to handle .appjs files that are passed to it.

http://appjs.delightfulsoftware.com/win.htm gives a screenshot tour of how it works on windows.

The application package contains a list of dependencies, these are scanned and any missing dependencies are downloaded from a url found in the package file. Once installed the application is then launched.

Please note that while this works with 0.0.19 running the same code in 0.0.20 does not open the application window. I am reading in the app.js file from the package and evaluating it, but for some reason in 20 on windows this does not work (it still works fine with a normal unpackaged application). Swapping the appjs and appjs-win32 folders (i.e. the node_modules) to 0.0.19 works so my guess is there is some small problem affecting the latest release.

This can be considered a work in progress and I am very open to suggestions and changes. This should work cross platform -- it is all javascript code, but I have not yet tested on linux or mac.