Templates, Tools and Utilities for Clarion Developers
|
|
|
|
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Installations - Setupbuilder: Creating a web updated install
2005-02-08 -- Friedrich Linder
Newsgroups: softvelocity.clarion.addons.setupbuilder
> Ok, I'm building my dream install I need my program to go check if
> there are updates on the web. How do I do that with SB5? I need to
> be able to call that from my program based on certain conditions.
> Doable? If so, how? And where is my help!?
Okay, here we go ;-)
The first step is to configure the iDeploy WebUpdate client. This gives
your software the ability to check a specified location on the Internet
for updates.
A. Install the WebUpdate Client
-------------------------------
1. Create your script and develop your installation (files, registries,
etc.).
2. Go to the Web Deployment screen.
3. Check the "Enable iDeploy WebUpdate" checkbox.
4. Configure the Web Update page (right pane).
Host Address - This specifies the domain name or IP address of the Web host
that will hold the installation files. For example, www.mysite.com
Host Port - Enter the port that should be used on your web server. The
default is 80.
Host Directory - Enter the directory name on the host that stores the
WebUpdate configuration file. If your files are located on the root, please
leave the field blank. For example, mydir.
Host User Name - Enter the user name required to log on to the server. If
this field is left blank, an anonymous logon will be performed.
Host Password - Enter the password required to log on to the server.
Update Filename - Enter a name for the configuration file for WebUpdate.
You must use the same file name when you use WebUpdate in the future. For
example, myapp.ini.
Product Version - Enter the version of the current installation. This
version is stored in the configuration file specified in the Update Filename
field. For example, 5.0.1040.0
5. Go to the Script Editor and add the "Include WebUpdate Client..." script
item to, say, the [ Modify System ] section. Enter [SB5_LIB]\wupdate.exe
in the Web Client File field. This will link-in the standard WebUpdate
client. You can compile and include your own wupdate.exe versions. The
wupdate Client executable is compiled from a SetupScript. In the
Redist\1033 directory within the SetupBuilder Installation System
application directory, you'll find the installation script that compiles
it (wupdate.sb5).
6. Compile your script. This will install the web client along with your
software.
7. Upload your installation file (e.g. setup.exe) and the configuration file
(e.g. myapp.ini) to your web server.
A few hours later you have to ship an update.
B. Create a Web Update
----------------------
I would suggest to develop a "dynamic" webupdate. The WebUpdate Client
downloads a "dynamic" WebUpdate image (does not include any files). This
dynamic WebUpdate image can retrieve just the pieces needed for the user's
specific requirements.
1. Create a new script.
2. Open the General Information dialog
a. I would suggest to use the same Product GUID here.
b. Set the Executable File Name, e.g. update_1041.exe
c. Set [UNINSTALL] to %_SB_INSTALLDIR%\Uninst_tmp.exe
d. I would suggest to disable the Add/Remove Programs support
e. Enable "Remove Installer after Successful Installation
f. Enable "Remove UnInstaller after Successful Installation
3. Add updated files, etc. It's a good idea to add "Start Delayed File
Install" and "Stop Delayed File Install" around your files (see
screenshot).
4. Go to the Web Deployment screen.
5. Check the "Enable iDeploy WebUpdate" checkbox and configure the Web
Update page (right pane). See above A.
But now enter a higher Product Version, e.g. 5.0.1041.0
6. To develop a "dynamic" webupdate, check the "Enable iDeploy WebInstall
and configure the Web Install page (right pane). Same as 5.
7. Go to the Script Editor and double-click the "Create Installation Log"
script item. Enter %_SB_INSTALLDIR%\uninst_tmp.log in the Create
installation log field.
8. How to detect the installation folder?
You can use the following code. Add it after the following line:
Set Variable %_SB_BACKUPDIR% to %_SB_INSTALLDIR%\BACKUP
Set Variable %_SB_INSTALLDIR% to Detect Previous Version
("{4D910660-BBBC-11D8-6784-02015E7D18BE}")
If %_SB_ERRORCODE% Equals "0" Then
Message Box "The WebUpdate application failed to detect a previ..." --
"Previous Version Detection Failed"
Exit Installation
End
Please replace "{4D910660-BBBC-11D8-6784-02015E7D18BE}" with your Product
GUID
I would suggest to ask the user to close an active application. You can
also kill it from within your script.
Set Variable %SB5ACTIVE% to Detect Active Application(sbuilder.exe)
If %SB5ACTIVE% Equals "1" Then
Message Box "sbuilder.exe is currently running. Please close th..." --
"Application currently running"
End
Please replace sbuilder.exe with your application file name.
9. Compile your script.
All your files are now located in the \Web subfolder. Upload your
installation file (e.g. update_1041.exe), the cluster files
(update_1041.0001, etc.) and the configuration file (e.g. myapp.ini) to
your web server.
Your application can now start wupdate.exe (located in the root of your app)
to check for updates.
This is what we use check for updates from within the SB5 IDE:
LOC:WebUpdateClient = GLO:GetModuleFilePath & '\wupdate.exe'
RUN('"' & LOC:WebUpdateClient & '"')
Documentation and example scripts will be available soon. There will also
be a simple to use installation and WebUpdate wizard to handle all the
dirty work.
Of course, you can also handle interval checking.
I hope the above is not too confusing. Please let me know if there are
questions!
Thanks,
Friedrich
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910
Today is November 21, 2024, 3:51 am This article has been viewed 35401 times.
Google search
has resulted in 46 hits on this article since January 25, 2004.
Back to article list
Search Articles
Add Comment
Printer friendly
|
|
|