-
Notifications
You must be signed in to change notification settings - Fork 8
Update System
The eAdventure Desktop editor includes a system that checks if there is a new version of the application available for download, helping the user have always the latest cutting-egde eAdventure technology. This is the Updater. Updater has no effect in eAdventure Mockup (Android editor) since Android provides its own system for keeping applications always up-to-date.
The update system takes into account the user's current platform and eAdventure distribution (e.g. MacOSX - 64 bit installer). To know more about the different eAdventure distribution flavours available, visit this wiki page.
The system does not actually make any installation on the user's system, nor gets anything downloaded. It just notifies the user when a new version that is suitable for his/her platform and release type is available, and redirects the user to the web page where the new version can be downloaded from. There's no further support provided to the user, who must download the application and install it by himself (straightforward process). In this sense, the update process is more a re-installation process.
The whole update process starts by invoking startUpdateProcess(). This method checks if update is enabled (the system can be disabled through a user preference), and if so, triggers an update process that is composed of 4 phases:
-
[downloadUpdateInfo()](https://github.com/e-ucm/ead/blob/master/editor/desktop/src/main/java/es/eucm/ead/editor/control/updatesystem/Updater.java#L186). Tries to retrieve the **update.json** file with info about the latest release remotely. The location of update.json is specified in the **appdata/release.json** file that comes with every release, and is currently being stored in sourceforge.net. For example, the update.json file for the nightly "flavour" is located at http://sourceforge.net/projects/e-adventure/files/nightly/update.json/download.
This actually generates a network request, encapsulated as a BackgroundTask. The update process stops until response to the request is obtained from RequestHelper, a tool that of the network-tools project.
-
[checkUpdateNeeded(UpdateInfo)](https://github.com/e-ucm/ead/blob/master/editor/desktop/src/main/java/es/eucm/ead/editor/control/updatesystem/Updater.java#L284).
If (1) succeeds, it invokes this method, passing the [UpdateInfo](https://github.com/e-ucm/ead/blob/master/editor/core/src/main/java/es/eucm/ead/editor/control/appdata/UpdateInfo.java) object retrieved by the RequestHelper. This method compares the remote app version read with the one stored in this application.
If local version < remote version, the process continues
- [askUserConfirmation(String)](https://github.com/e-ucm/ead/blob/master/editor/desktop/src/main/java/es/eucm/ead/editor/control/updatesystem/Updater.java#L326).If update is needed, asks the user for a confirmation through a dialog. The process stops until the user confirms or denies the update. If the user confirms the update, this method invokes the last phase:
- [update(String)](https://github.com/e-ucm/ead/blob/master/editor/core/src/main/java/es/eucm/ead/editor/control/updatesystem/Updater.java#L374). The update system requests the [Controller](https://github.com/e-ucm/ead/blob/master/editor/core/src/main/java/es/eucm/ead/editor/control/Controller.java) to open a browser with the page for downloading the new application bundle, which was specified in the [UpdateInfo](https://github.com/e-ucm/ead/blob/master/editor/core/src/main/java/es/eucm/ead/editor/control/appdata/UpdateInfo.java) object.
The CheckUpdates action allows starting the whole process easily. It is now being used just once each time the application is initialized. See EditorDesktop.
eAdventure - eUCM research group
- Setting up a Development Environment
- Contributing Guidelines
- Build Process
- Project structure
- Schema
-
Engine
- Files paths and FileResolver
- Binding Schema elements with Engine elements
- Managing the game view through Layers
- Game loop and scene management
- IO
- File Resolver
- Assets: Converting schema objects to engine objects
- Engine Objects
- Actors
- Effects
- Testing the engine
- Editor
- Remote communication
- Release Process
- Other documentation