General
wodAppUpdate expects to retrieve configuration file from
your server as textual file. You should take few minutes to
create that file. It's really easy - just follow these
steps, but you can also copy/paste sections from below
directly to your new file to get started quickly! Use
UpdSqueze to quickly get [File] section created from
files!
1. Make sure your configuration file starts with the
signature!
If it doesn't, wodAppUpdate will ignore the file
completely
2. Add [File] section for each file you want to be able
to be updated
Typically, it will look like this:
#Update file signature
[Global]
CmdLine=%APP% --service
[File]
Name=yourapp.exe
URL=http://your.server.com/downloads/yourapp.exe
Version=1.2.2.8
[File]
Name=addin.dll
Date=20061001183600
URL=http://your.server.com/downloads/addin.dll
Version=2.4.4.57
Size=12899 |
There can be as many [File] or [Message] sections as you
wish, but only one [Global] section. Just make sure there
are no empty lines inside the section!
[Global] section can have these lines:
-
| |
AutoRestart |
Determines if
application is auto-started (default value) after
update is made. |
| |
CmdAfter |
Determines if some
command is executed after all files are replaced. For
example, you can start some service here. |
| |
CmdBefore |
Determines if some
command is executed before any of files are replaced. For
example, you can stop some service here. |
| |
CmdLine |
Holds full command
line, with any arguments, of file to start after
files are replaced. Besides typical %VARIABLES% as
described below for Path entry, you can also
specify %APP% value which holds full path to EXE
filename that is currently running. |
| |
RequireAdmin |
Overrides RequireAdmin
property - if you want to force admin privileges
remotely. You can also force nonadmin privileges,
property value is overridden if this line
exists. |
Following lines are supported in [File]
section:
-
| |
CmdAfter |
Determines if some
command is executed after file is replaced. For
example, register the COM service manually. |
| |
CmdBefore |
Determines if some
command is executed before file is replaced. For
example, you can unregister the COM service manually. |
| |
Compressed |
Determines if file
kept online is compressed or not. It will be
decompressed on the fly during download. Should be
used with UpdSqueze. |
| |
Date
(or CreationDate) |
This is creation date
of the file, in a format YYYYMMDDhhmmss. You should
set it if you plan to use ReplaceRule
property set to ReplaceIfDate value |
| |
DateFormat |
When set to
"utc" then wodAppUpdate expects that all
dates for this file is expressed in UTC timezone.
Any other setting is ignored. |
| |
Name |
Defines name of the
file, as will be seen in UpdFile.Name
property |
| |
MD5 |
Holds base64 encoded
MD5 hash of the file in uncompressed form. |
| |
ModificationDate |
This is modification
date of the file, in a format YYYYMMDDhhmmss. You
should set it if you plan to use ReplaceRule
property set to ReplaceIfModificationDate
value |
| |
Path |
Defines full destination path where file is
installed. You can use also environment constants
such as
%USERPROFILE%, %APPDIR%,
%WINDOWS%, %SYSTEM%, etc.., but also shell
folders such as
%FILE% (for the file being updated), %APPDATA%,%DESKTOP%,
etc...
(just make sure you put them inside % %).
This cannot be relative path - you must use
absolute full path, with the help of above
constants if neccessary!
You should not specify filename here. Only the path;
Please note that if you change path
of the OCX/DLL that is already on the system, it
is possible that wodAppUpdate will not restart
the app - since it doesn't have to.. It
didn't replace locked files, it copied same
file (but with new version) to new place and
system didn't complain.
|
| |
Register |
Determines if file
should be registered as COM server or not. If set
to True, wodAppUpdate will call DllRegisterServer
exported function from the file. |
| |
Size |
Defines size of the
file. If not specified, wodAppUpdate will try to
retrieve information from the server. If it fails,
it will still work but wodAppUpdate will not be
able to show correct progress information during
the download. |
| |
UncompressedSize |
Holds original uncompressed
file size. wodAppUpdate does not use this
information. However, you can provide it and your
application can obtain it through File.UncompressedSize
property. |
| |
URL |
This is full path of
the file so that wodAppUpdate can download it. If
name ends with '.gz' then
wodAppUpdate assumes it is compressed using
UpdSqueze file and will decompress it after
download |
| |
Version |
Holds version info. If
wodAppUpdate has same file with lower version, if
will perform the replacement. |
3. You can also add one or more [Message]
sections. wodAppUpdate will put each such section into
separate UpdMessage object
[Message]
ID=17
Caption=This is your subject
Text=<font face="Verdana">Hello
world!</font> |
wodAppUpdate will ignore your messages, so it's up to
you to present them in the application somehow. Typically,
you should remember last ID that you have shown so you
don't show same message twice. When you setup
configuration file, you can always increase this ID for new
messages.4. If your configuration file gets to big you can use
UpdSqueze on it, and upload in such compressed form. wodAppUpdate
recognize such files too. Just do
UpdSqueze update.cfg update_compressed.cfg
and upload new file on the server
Making configuration file in PHP
Just to give you example, if you make this file in PHP it
may be wise to make clients know they should not cache the
information.. New wodAppUpdate will ignore local cache, but
older ones may still use it.. Put code like this in your
'update.php' file:
<?php
header("Content-type: text/plain");
header("Pragma: no-cache");
?>#Update file signature
[File]
Name=YourApp.exe
etc etc etc... |
Using UpdSqueze
You will find UpdSqueze binary in the installation. This
application is used to compress your files so wodAppUpdate
downloads are faster, and it will create [File] section for
the file which you can almost paste to configuration script
directly - just change URL line so it contains full path to
the file.
UpdSqueze uses ZLIB library to quickly compress the file. You
should use it like this:
UpdSqueze [-mod] [-utc] [-url=...] orgfile
destfile
-mod includes ModificationDate too in the
configuration
-utc converts all dates to UTC timezone
-url=http://some.url.com/something causes UpdSqueze to put
that value exactly as is in [URL] line
for example, try
UpdSqueze c:\Windows\Notepad.exe
c:\Notepad.exe.gz
as a result, UpdSqueze will create c:\Notepad.exe.gz,
but will also dump this information:
[File]
Name=Notepad.exe
Size=34783
UncompressedSize=193536
Version=5.1.2600.2180
Compressed=1
URL=Notepad.exe.gz
Do not forget to upload Notepad.exe.gz to your server
together with configuration script!