From fdf616c59d87219e2d5ad6e12687cf2793cfba1e Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 9 Nov 2010 11:23:32 -0800 Subject: beginnings of the update installer (with simple install script for darwin). --- .../viewer_components/updater/llupdateinstaller.h | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 indra/viewer_components/updater/llupdateinstaller.h (limited to 'indra/viewer_components/updater/llupdateinstaller.h') diff --git a/indra/viewer_components/updater/llupdateinstaller.h b/indra/viewer_components/updater/llupdateinstaller.h new file mode 100644 index 0000000000..a6068e9025 --- /dev/null +++ b/indra/viewer_components/updater/llupdateinstaller.h @@ -0,0 +1,42 @@ +/** + * @file llupdateinstaller.h + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_UPDATE_INSTALLER_H +#define LL_UPDATE_INSTALLER_H + + +#include + + +// +// Launch the installation script. +// +// The updater will overwrite the current installation, so it is highly recommended +// that the current application terminate once this function is called. +// +void ll_install_update(std::string const & script, std::string const & updatePath); + + +#endif \ No newline at end of file -- cgit v1.2.3 From 3493da8c41a157f2cd52632c2ac69b67e4091644 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 9 Nov 2010 17:42:05 -0800 Subject: Fix for linux eol failures. --- indra/viewer_components/updater/llupdateinstaller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdateinstaller.h') diff --git a/indra/viewer_components/updater/llupdateinstaller.h b/indra/viewer_components/updater/llupdateinstaller.h index a6068e9025..991fe2afe1 100644 --- a/indra/viewer_components/updater/llupdateinstaller.h +++ b/indra/viewer_components/updater/llupdateinstaller.h @@ -39,4 +39,4 @@ void ll_install_update(std::string const & script, std::string const & updatePath); -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From 41ec2e01ddf12c7d9fc57a115b1e6047560c7e5e Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Wed, 10 Nov 2010 14:30:11 -0800 Subject: copy script to temp if needed before installing. --- indra/viewer_components/updater/llupdateinstaller.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/llupdateinstaller.h') diff --git a/indra/viewer_components/updater/llupdateinstaller.h b/indra/viewer_components/updater/llupdateinstaller.h index 991fe2afe1..310bfe4348 100644 --- a/indra/viewer_components/updater/llupdateinstaller.h +++ b/indra/viewer_components/updater/llupdateinstaller.h @@ -30,13 +30,21 @@ #include +enum LLInstallScriptMode { + LL_RUN_INSTALL_SCRIPT_IN_PLACE, + LL_COPY_INSTALL_SCRIPT_TO_TEMP +}; + // // Launch the installation script. // // The updater will overwrite the current installation, so it is highly recommended // that the current application terminate once this function is called. // -void ll_install_update(std::string const & script, std::string const & updatePath); +int ll_install_update( + std::string const & script, // Script to execute. + std::string const & updatePath, // Path to update file. + LLInstallScriptMode mode=LL_COPY_INSTALL_SCRIPT_TO_TEMP); // Run in place or copy to temp? #endif -- cgit v1.2.3 From ec7d36f6cfbed53a30d918415dfa3e429a645ce1 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Mon, 15 Nov 2010 09:38:20 -0800 Subject: added mechanism for install scripts to indicate a failed install and for update service to note the failure; modified mac installer to write marker on error. --- indra/viewer_components/updater/llupdateinstaller.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/viewer_components/updater/llupdateinstaller.h') diff --git a/indra/viewer_components/updater/llupdateinstaller.h b/indra/viewer_components/updater/llupdateinstaller.h index 310bfe4348..6ce08ce6fa 100644 --- a/indra/viewer_components/updater/llupdateinstaller.h +++ b/indra/viewer_components/updater/llupdateinstaller.h @@ -47,4 +47,11 @@ int ll_install_update( LLInstallScriptMode mode=LL_COPY_INSTALL_SCRIPT_TO_TEMP); // Run in place or copy to temp? +// +// Returns the path which points to the failed install marker file, should it +// exist. +// +std::string const & ll_install_failed_marker_path(void); + + #endif -- cgit v1.2.3 From 1774489ef8c224359e39d6281497e5128b043d24 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 16 Dec 2010 09:34:19 -0800 Subject: Vary install failed message depending on whether it was required or not. --- indra/viewer_components/updater/llupdateinstaller.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/viewer_components/updater/llupdateinstaller.h') diff --git a/indra/viewer_components/updater/llupdateinstaller.h b/indra/viewer_components/updater/llupdateinstaller.h index 6ce08ce6fa..fe5b1d19b5 100644 --- a/indra/viewer_components/updater/llupdateinstaller.h +++ b/indra/viewer_components/updater/llupdateinstaller.h @@ -42,9 +42,10 @@ enum LLInstallScriptMode { // that the current application terminate once this function is called. // int ll_install_update( - std::string const & script, // Script to execute. - std::string const & updatePath, // Path to update file. - LLInstallScriptMode mode=LL_COPY_INSTALL_SCRIPT_TO_TEMP); // Run in place or copy to temp? + std::string const & script, // Script to execute. + std::string const & updatePath, // Path to update file. + bool required, // Is the update required. + LLInstallScriptMode mode=LL_COPY_INSTALL_SCRIPT_TO_TEMP); // Run in place or copy to temp? // -- cgit v1.2.3