Creating a new WDF file
Use the WDF editor to create a new WDF file for your weblication:
> sash-wdf-editor hello2.wdf
This guide contains additional information on creating WDF files.
General
Fill in the Title/Abstract/Author information.
Every weblication must have its own GUID, so generate a new one by clicking 'Generate'.
Make sure that "weblication" is selected.
Version
Here you can set your weblication's version. It is important to do this as you release new versions of your weblication, because the runtime will only attempt to update a weblication if it has a higher version number than the one currently installed. For now, set it to 1.0.0.0.
Actions
Remember, your Hello World program is simply an action that resides in a weblication. So w must add it to the WDF file as such.
Click 'New Action'. A new entry is added and highlighted. Click 'Choose' and pick the WinApp location. There is a registration area (with registration tags). Inside the tags, add the following so that the window reads as follows:
<registration>
<htmlfile>hello2.html</htmlfile>
<width>350</width>
<height>75</height>
</registration>
The registration contains information about the main source file and the size of the window to run the weblication in. Be sure not to include newlines between the tags. For example,
<htmlfile>
hello2.html
</htmlfile>
will not work because the newlines surrounding 'hello2.html' will be included in the filename.
Dependencies
Since your Hello World action is using WindowApp, you need to specify it as a dependency.
Click 'New Dependency'. A new entry is added and highlighted. Click 'Choose' and pick the WindowApp location.
Files
Click 'New File'. A new entry is added and highlighted. Click 'Choose' and pick 'hello2.html'. The installer needs to know to copy your HTML file.
Install
Ignore this for now.
Platforms
Select 'Linux'.
Click 'Save'.
Your first weblication is complete!
Now run sash-install on the wdf file ('sash-install hello2.wdf'). You can optionally use the '-f' flag with sash-install, which forces the install in text mode, overwriting previous installations of a weblication. (This makes testing a lot easier.)
Call the runtime on the wdf file ('sash-runtime hello2.wdf') to run the weblication. Once you've verified that your weblication works, feel free to tinker around with the design to get a feel for the WindowApp location.
Back | Next>
Wing Yung
Last modified: Thu Apr 4 15:15:43 EST 2002