protected void install(final ModModel modModel) throws Exception {
		final IMod mod = modModel.getMod();
		final IUpdate u = modModel.getSelectedUpdate();
		final FullVersion v = u.getVersion();
		out(Localization.translate("UpdaterDialogBase.install.installing",
				mod.getName(), v));
		if (modModel.isInstalled()) {
			// A version is already installed.
			if (modModel.getVersion().compareTo(u) == 0) {
				// The version is already installed.
				out(Localization
						.translate("UpdaterDialogBase.install.alreadyInstalled"));
				return;
			} else {
				// Must uninstall current version.
				uninstall(modModel);
			}
		}
		// Get the previous checkpoint.
		IUpdate cp = null;
		int cpIndex = -1;
		final IUpdate[] l = mod.getUpdates();
		final int index = Arrays.binarySearch(l, u);
		for (int i = index; i >= 0; --i) {
			final IUpdate t = l[i];
			if (t.isCheckpoint()) {
				cp = t;
				cpIndex = i;
				i = -1;
			}
		}
		// Install the checkpoint.
		mod.install(cp, panel);
		if (cpIndex != index) {
			// Install not optional versions.
			for (int i = cpIndex + 1, s = index - 1; i < s; ++i) {
				final IUpdate t = l[i];
				if (!t.isOptional()) {
					mod.install(t, panel);
				}
			}
			// Install selected version.
			mod.install(u, panel);
		}
		out(Localization.translate("UpdaterDialogBase.install.installed"));
	}