Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/F2"

(F2 FAQ)
(How do I disable that the client checks the zip hashon updates?: typos)
(11 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
F2 has no dependencies to eclipse scout or any other library. However the installation of f2 is supported by the technology checkbox in Scout SDK (since 3.10).
 
F2 has no dependencies to eclipse scout or any other library. However the installation of f2 is supported by the technology checkbox in Scout SDK (since 3.10).
  
If you are new to f2. Check out the [[Scout/Tutorial/3.10/UpdateWithF2 | tutorial ]] first.
+
If you are new to f2, check out the [[Scout/Tutorial/3.10/UpdateWithF2 | tutorial ]] first.
  
 
==Where do I find F2==
 
==Where do I find F2==
Line 12: Line 12:
  
 
It can also be installed with the Scout SDK (since 3.10)
 
It can also be installed with the Scout SDK (since 3.10)
 +
 +
 +
==Design Goals==
 +
* Minimal network load for live updates.
 +
* Move CPU/memory load to "Create" of the updatesite and away from the client "Update"
 +
* Transactional safety for updates, e.g. commit or rollback
 +
* No lenience: The update is either done with byte by byte equality or not
 +
* Support for Windows 7 UAC security
 +
* Support for multiple platforms such as win32, macosx, etc.
 +
* Complete automation of updatesite creation and update handling
 +
* Very easy zip file handling and command line processing
  
 
==Parameter Overview==
 
==Parameter Overview==
Line 21: Line 32:
 
! width="300"|Description  
 
! width="300"|Description  
 
! width="300"|Default  
 
! width="300"|Default  
 +
|- 
 +
| -url
 +
| f2.url
 +
| URL of the updatesite; if you can download f2.txt from
 +
| http://example.local:8080/yourwebapp/updatesite/f2/win32/f2.txt, then the correct URL is http://example.local:8080/yourwebapp/updatesite/f2?
 +
|
 +
|- 
 +
| -name
 +
| f2.name
 +
| Name of the updatesite; this should match the name of your client (zip file!)
 +
|
 
|-   
 
|-   
 
| -http.user
 
| -http.user
Line 34: Line 56:
 
| -uac
 
| -uac
 
| f2.uac
 
| f2.uac
| Option for Windows 7 UAC (user access control)  
+
| Option for Windows 7 UAC (user access control); you should only use this if users have local administrator permissions; if so, users will be asked whether they want to install the update; usually it's easier to ensure that users have write permissions for the installation directory; if so, users can always install updates
 
| true if the client zip contains the f2 plug-in, false otherwise
 
| true if the client zip contains the f2 plug-in, false otherwise
 
|-
 
|-
 
| -checkhash
 
| -checkhash
 
| f2.checkhash
 
| f2.checkhash
| Option to enable/disable content hash check on delta updates
+
| Option to enable/disable content hash check on delta updates; disabling this check may make the update process a bit faster
| true
+
| false
 +
|-
 +
| -checksize
 +
| f2.checksize
 +
| Option to enable/disable file size check additionally to crc
 +
| false
 +
|-
 +
| -version
 +
| f2.version
 +
| Only update up to a limited version (e.g. -version example_1.2.0)
 +
|  
 
|-
 
|-
 
| -temp
 
| -temp
 
| f2.temp
 
| f2.temp
 
| Option to use specific temp directory
 
| Option to use specific temp directory
| ?
+
|  
 
|-
 
|-
 
| -verbose
 
| -verbose
 
|  
 
|  
 
| for detailed logging
 
| for detailed logging
| ?
+
|  
 
|-
 
|-
 
| -silent
 
| -silent
 
|  
 
|  
 
| for sparse logging
 
| for sparse logging
| ?
+
|  
 
|-
 
|-
 
| -versionsToKeep
 
| -versionsToKeep
Line 63: Line 95:
 
|-
 
|-
 
|}
 
|}
 
==Design Goals==
 
* Minimal network load for live updates.
 
* Move cpu/memory load to "Create" of the updatesite and away from the client "Update"
 
* Transactional safety for updates, e.g. commit or rollback
 
* No lenience: The update is either done with byte by byte equality or not
 
* Support for Windows 7 UAC security
 
* Support for multiple platforms such as win32, macosx, etc.
 
* Complete automation of updatesite creation and update handling
 
* Very easy zip file handling and command line processing
 
  
 
==FAQ==
 
==FAQ==
 +
=== How do I build an updates site? ===
 +
 +
You should keep all the various client zip files in your updatesite and rebuild the f2.txt file from the command line as described in the [[Scout/Tutorial/3.10/UpdateWithF2 | tutorial ]].
 +
 
=== How do I enable/disable Windows 7 UAC? ===
 
=== How do I enable/disable Windows 7 UAC? ===
 
UAC is automatically enabled if the platform is win32 and the client zip contains the f2 plug-in jar. Not that uac mode is only possible when the client zip contains the f2 plug-in jar.
 
UAC is automatically enabled if the platform is win32 and the client zip contains the f2 plug-in jar. Not that uac mode is only possible when the client zip contains the f2 plug-in jar.
  
 
From java code: If the call is
 
From java code: If the call is
<pre>
+
<source lang="java">
 
F2Updater.update()
 
F2Updater.update()
</pre>
+
</source>
 
change it to  
 
change it to  
<pre>
+
<source lang="java">
 
HashMap<F2Parameter, String> optionMap=new HashMap<F2Parameter, String>();
 
HashMap<F2Parameter, String> optionMap=new HashMap<F2Parameter, String>();
 
optionMap.put(F2Parameter.WindowsUAC ,false);//or true
 
optionMap.put(F2Parameter.WindowsUAC ,false);//or true
 
F2Updater.update(null/*default strategy*/, options, null/*default user agent*/)
 
F2Updater.update(null/*default strategy*/, options, null/*default user agent*/)
</pre>
+
</source>
  
 
From command line: add the -uac true or -uac false option
 
From command line: add the -uac true or -uac false option
Line 94: Line 120:
 
Use -verbose or -silent
 
Use -verbose or -silent
  
=== How do I disable that the client checks the zip hashon updates? ===
+
=== How do I disable that the client checks the zip hash on updates? ===
The zip hash check on the client may tike some long time depending on client hardware.
+
The zip hash check on the client may take some long time depending on client hardware.
If the crc check of the delta/full zip is sufficient for your client (customer) you might disable the additional content hash check. The probability that the zip is corrupt after a delta update is relatively small. However disabling the content hash check (at least theoretically) eliminates the transactional acid condition.
+
If the CRC check of the delta/full zip is sufficient for your client (customer) you might disable the additional content hash check. The probability that the zip is corrupt after a delta update is relatively small. However disabling the content hash check (at least theoretically) eliminates the transactional acid condition.
  
In java:
+
In Java:
<pre>
+
 
 +
<source lang="java">
 
HashMap<F2Parameter, String> optionMap=new HashMap<F2Parameter, String>();
 
HashMap<F2Parameter, String> optionMap=new HashMap<F2Parameter, String>();
 
optionMap.put(F2Parameter.WindowsUAC ,false);
 
optionMap.put(F2Parameter.WindowsUAC ,false);
 
F2Updater.update(null/*default strategy*/, options, null/*default user agent*/)
 
F2Updater.update(null/*default strategy*/, options, null/*default user agent*/)
</pre>
+
</source>
  
 
=== How do I use my own progress monitor when updating? ===
 
=== How do I use my own progress monitor when updating? ===
<pre>
+
<source lang="java">
 
UpdateResult result=F2Updater.update(null,null,null,monitor);
 
UpdateResult result=F2Updater.update(null,null,null,monitor);
 
if(result!=UpdateResult.NothingToDo){
 
if(result!=UpdateResult.NothingToDo){
   ...
+
   //...
 
}
 
}
</pre>
+
</source>
  
 
=== How do I prevent my CI server from running out of space? ===
 
=== How do I prevent my CI server from running out of space? ===
 
Use the parameter -versionsToKeep to limit the number of version to keep on the build server (i.e. CI deployment).
 
Use the parameter -versionsToKeep to limit the number of version to keep on the build server (i.e. CI deployment).
 +
 +
== See also ==
 +
* Tutorial: [[Scout/Tutorial/3.10/UpdateWithF2|Update your Scout application with F2]]
 +
* [http://marketplace.eclipse.org/content/f2-updater F2 on the Marketplace]

Revision as of 04:30, 7 January 2014

F2 Updater

F2 is a simple update manager for Eclipse or Java based applications. The F2 update manager has been designed to minimize the network load for consecutive application updates and updates are executed with transactional safety.

F2 has no dependencies to eclipse scout or any other library. However the installation of f2 is supported by the technology checkbox in Scout SDK (since 3.10).

If you are new to f2, check out the tutorial first.

Where do I find F2

F2 is available on the eclipse marketplace.

It can also be installed with the Scout SDK (since 3.10)


Design Goals

  • Minimal network load for live updates.
  • Move CPU/memory load to "Create" of the updatesite and away from the client "Update"
  • Transactional safety for updates, e.g. commit or rollback
  • No lenience: The update is either done with byte by byte equality or not
  • Support for Windows 7 UAC security
  • Support for multiple platforms such as win32, macosx, etc.
  • Complete automation of updatesite creation and update handling
  • Very easy zip file handling and command line processing

Parameter Overview

command line config.ini Description Default
-url f2.url URL of the updatesite; if you can download f2.txt from http://example.local:8080/yourwebapp/updatesite/f2/win32/f2.txt, then the correct URL is http://example.local:8080/yourwebapp/updatesite/f2?
-name f2.name Name of the updatesite; this should match the name of your client (zip file!)
-http.user f2.http.user Username for HTTP Basic Authentication
-http.pass f2.http.pass Password for HTTP Basic Authentication
-uac f2.uac Option for Windows 7 UAC (user access control); you should only use this if users have local administrator permissions; if so, users will be asked whether they want to install the update; usually it's easier to ensure that users have write permissions for the installation directory; if so, users can always install updates true if the client zip contains the f2 plug-in, false otherwise
-checkhash f2.checkhash Option to enable/disable content hash check on delta updates; disabling this check may make the update process a bit faster false
-checksize f2.checksize Option to enable/disable file size check additionally to crc false
-version f2.version Only update up to a limited version (e.g. -version example_1.2.0)
-temp f2.temp Option to use specific temp directory
-verbose for detailed logging
-silent for sparse logging
-versionsToKeep f2.versionsToKeep Keep only a specific number of application versions when creating the updatesite All

FAQ

How do I build an updates site?

You should keep all the various client zip files in your updatesite and rebuild the f2.txt file from the command line as described in the tutorial .

How do I enable/disable Windows 7 UAC?

UAC is automatically enabled if the platform is win32 and the client zip contains the f2 plug-in jar. Not that uac mode is only possible when the client zip contains the f2 plug-in jar.

From java code: If the call is

F2Updater.update()

change it to

HashMap<F2Parameter, String> optionMap=new HashMap<F2Parameter, String>();
optionMap.put(F2Parameter.WindowsUAC ,false);//or true
F2Updater.update(null/*default strategy*/, options, null/*default user agent*/)

From command line: add the -uac true or -uac false option

How do I disable verbose mode on command line?

Use -verbose or -silent

How do I disable that the client checks the zip hash on updates?

The zip hash check on the client may take some long time depending on client hardware. If the CRC check of the delta/full zip is sufficient for your client (customer) you might disable the additional content hash check. The probability that the zip is corrupt after a delta update is relatively small. However disabling the content hash check (at least theoretically) eliminates the transactional acid condition.

In Java:

HashMap<F2Parameter, String> optionMap=new HashMap<F2Parameter, String>();
optionMap.put(F2Parameter.WindowsUAC ,false);
F2Updater.update(null/*default strategy*/, options, null/*default user agent*/)

How do I use my own progress monitor when updating?

UpdateResult result=F2Updater.update(null,null,null,monitor);
if(result!=UpdateResult.NothingToDo){
  //...
}

How do I prevent my CI server from running out of space?

Use the parameter -versionsToKeep to limit the number of version to keep on the build server (i.e. CI deployment).

See also

Back to the top