summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-11-09 11:23:44 -0800
committerAndrew A. de Laix <alain@lindenlab.com>2010-11-09 11:23:44 -0800
commit8c9b707d586150c7562a8bc74934e09894900a27 (patch)
treed9d9d4cd5d1e5e470099e445c6f8397c019389b6
parent5da253fdde8737361333161517c1173358bd17ff (diff)
parentfdf616c59d87219e2d5ad6e12687cf2793cfba1e (diff)
Automated merge with https://bitbucket.org/mani_linden/viewer-development/
-rw-r--r--indra/newview/viewer_manifest.py4
-rw-r--r--indra/viewer_components/updater/CMakeLists.txt23
-rw-r--r--indra/viewer_components/updater/llupdateinstaller.cpp38
-rw-r--r--indra/viewer_components/updater/llupdateinstaller.h42
-rwxr-xr-xindra/viewer_components/updater/scripts/darwin/update_install6
5 files changed, 107 insertions, 6 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 4596938775..f95697adb6 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -575,6 +575,10 @@ class DarwinManifest(ViewerManifest):
# most everything goes in the Resources directory
if self.prefix(src="", dst="Resources"):
super(DarwinManifest, self).construct()
+
+ if self.prefix(src="../viewer_components/updater", dst=""):
+ self.path("update_install")
+ self.end_prefix()
if self.prefix("cursors_mac"):
self.path("*.tif")
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt
index 563b64655d..c3607dff39 100644
--- a/indra/viewer_components/updater/CMakeLists.txt
+++ b/indra/viewer_components/updater/CMakeLists.txt
@@ -6,6 +6,7 @@ include(00-Common)
if(LL_TESTS)
include(LLAddBuildTest)
endif(LL_TESTS)
+include(CMakeCopyIfDifferent)
include(CURL)
include(LLCommon)
include(LLMessage)
@@ -24,12 +25,14 @@ set(updater_service_SOURCE_FILES
llupdaterservice.cpp
llupdatechecker.cpp
llupdatedownloader.cpp
+ llupdateinstaller.cpp
)
set(updater_service_HEADER_FILES
llupdaterservice.h
llupdatechecker.h
llupdatedownloader.h
+ llupdateinstaller.h
)
set_source_files_properties(${updater_service_HEADER_FILES}
@@ -56,12 +59,6 @@ if(LL_TESTS)
llupdaterservice.cpp
)
-# set_source_files_properties(
-# llupdaterservice.cpp
-# PROPERTIES
-# LL_TEST_ADDITIONAL_LIBRARIES "${PTH_LIBRARIES}"
-# )
-
LL_ADD_PROJECT_UNIT_TESTS(llupdaterservice "${llupdater_service_TEST_SOURCE_FILES}")
endif(LL_TESTS)
@@ -74,3 +71,17 @@ set(UPDATER_LIBRARIES
llupdaterservice
CACHE INTERNAL ""
)
+
+# Copy install script.
+if(DARWIN)
+ copy_if_different(
+ "${CMAKE_CURRENT_SOURCE_DIR}/scripts/darwin"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ update_installer_targets
+ "update_install"
+ )
+endif()
+add_custom_target(copy_update_install ALL DEPENDS ${update_installer_targets})
+
+
+ \ No newline at end of file
diff --git a/indra/viewer_components/updater/llupdateinstaller.cpp b/indra/viewer_components/updater/llupdateinstaller.cpp
new file mode 100644
index 0000000000..4d7c78d36c
--- /dev/null
+++ b/indra/viewer_components/updater/llupdateinstaller.cpp
@@ -0,0 +1,38 @@
+/**
+ * @file llupdateinstaller.cpp
+ *
+ * $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$
+ */
+
+#include "linden_common.h"
+#include "llprocesslauncher.h"
+#include "llupdateinstaller.h"
+
+
+void ll_install_update(std::string const & script, std::string const & updatePath)
+{
+ LLProcessLauncher launcher;
+ launcher.setExecutable(script);
+ launcher.addArgument(updatePath);
+ launcher.launch();
+ launcher.orphan();
+} \ No newline at end of file
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 <string>
+
+
+//
+// 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
diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install
new file mode 100755
index 0000000000..24d344ca52
--- /dev/null
+++ b/indra/viewer_components/updater/scripts/darwin/update_install
@@ -0,0 +1,6 @@
+#! /bin/bash
+
+hdiutil attach -nobrowse $1
+cp -R /Volumes/Second\ Life\ Installer/Second\ Life\ Viewer\ 2.app /Applications
+hdiutil detach /Volumes/Second\ Life\ Installer
+open /Applications/Second\ Life\ Viewer\ 2.app \ No newline at end of file