-
Notifications
You must be signed in to change notification settings - Fork 14
Readme
Webapp XUL Wrapper is a collection of build scripts for packaging a webapp into distributable bundles for Mac, Windows, and Linux.
The end result is a standalone offline version of your web application.
Included in the distribution package:
- A minimal XUL application with a main browser window and an about dialog
- A bundled HTTP server
- XULRunner 17 (Gecko 17)
- Latest HTML5 support (Same as Firefox 17, and easy to use new Gecko versions as they are released)
- Browser plugin support (Firefox plug-ins and extensions may be bundled with the application)
- Application Updates
- Bundled HTTP server (No local content restrictions like when using file:// protocol etc)
- Not only acting as a native desktop application, it is a native desktop application
- Working on the most widely used desktop operating systems, as well as 32- and 64-bit Linux (Wherever Firefox 17 runs, this runs)
- Installable from USB Stick / CD, Offline
- Offline usage
- Proven and well tested (indirectly through projects like Zotero and Firefox)
- Not dependent on third party services for packaging and/or distribution
For a more in-depth overview of current Standalone Web App Cross-Platform Desktop Distribution Solutions, check this out.
Instructions for building and packaging are mostly the same as for Zotero Standalone and are available on the Zotero wiki. It is recommended that you follow those in order to build a standalone version of the sample webapp that is bundled with the project.
When that is working for you, you can package your own webapp:
- Fork this project
- Add your webapp as a git submodule in the modules directory
- Change the WEBAPPMODULE variable in config.sh to point to your webapp directory
- If necessary, update the url for the browser tag in modules/app/chrome/content/app/ui/main.xul
- Customize branding and metadata to your liking
Check out the official docs, stackoverflow etc. On OSX, parameters to xulrunner (such as -jsconsole -P etc) can be put in the mac/app script, as such:
"$CALLDIR/app-bin" "$CALLDIR/../Resources/application.ini" -P -jsconsole
This is best done in some other browser, since the browser-view included in the app doesn't offer much development aid. While the standalone app is running, you can access the bundled webapp on (http://localhost:57187)[http://localhost:57187].
Add set -x
near the top of config.sh before building to see everything that the build process does.
Use http://iconverticons.com/ to generate app icons for all platforms. Put your source image in icons/default/source folder and the generated images in the icons/default folder.
Example where versions 0.0.1, 0.0.2, 0.0.3 and 0.0.4 have been released previously, and version 0.0.5 is to be packaged:
On OSX or Linux in the project directory, run:
./build-mac-and-linux-packages.sh 0.0.5
In Windows (Cygwin) in the project directory, run:
./build-windows-installer-package.sh 0.0.5
This will produce the relevant download packages for Mac, Linux and Windows in the "dist" directory. These should be offered to end users on a product download page or similar.
Now on to the application update packages. These can be generated fully from within any single development environment (OSX, Linux or Windows). Read the official docs for general information. Enhanced versions of the utility scripts are included in this project, but you need to make sure mar and mbsdiff are available in your PATH. Then, run:
cd update-packaging/
# Reset from earlier update packagings
rm -rf "$DISTDIR" # Clears dist directory
if [ -h "staging/0.0.4" ]; then rm staging/0.0.4; fi # Clears previous symbolic link in staging directory
# Build update packages
./build_autoupdate.sh 0.0.1 0.0.5
./build_autoupdate.sh 0.0.2 0.0.5
./build_autoupdate.sh 0.0.3 0.0.5
./build_autoupdate.sh 0.0.4 0.0.5
This will produce the relevant application update packages for Mac, Linux and Windows in the "update-packaging/dist" directory. These packages are served by an application update server in accordance to official XULRunner documentation.
The project is based on Zotero Standalone build utility.
The XUL Wrapper application and build scripts are licensed under the GNU Affero General Public License, version 3. See COPYING for more details.
"Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate"
Read more: http://stackoverflow.com/questions/9779643/calling-software-under-agpl-and-gpl