summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2010-11-16 18:34:58 -0800
committerMark Palange (Mani) <palange@lindenlab.com>2010-11-16 18:34:58 -0800
commitdd6213abf4f70cfb9d221572f9dc4d597d8fa0dc (patch)
treed08c11745cef2cbd593511c209e03810e4ddd013
parent049154de1cfc79f02a686987161c6b7746195c73 (diff)
CHOP-209 Added marker creation, fixed updater crash bug
-rw-r--r--indra/linux_updater/linux_updater.cpp17
-rwxr-xr-xindra/viewer_components/updater/scripts/linux/update_install3
2 files changed, 13 insertions, 7 deletions
diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp
index 16660de6bb..a7f886b389 100644
--- a/indra/linux_updater/linux_updater.cpp
+++ b/indra/linux_updater/linux_updater.cpp
@@ -114,7 +114,7 @@ BOOL install_package(std::string package_file, std::string destination);
BOOL spawn_viewer(UpdaterAppState *app_state);
extern "C" {
- void on_window_closed(GtkWidget *sender, gpointer state);
+ void on_window_closed(GtkWidget *sender, GdkEvent *event, gpointer state);
gpointer worker_thread_cb(gpointer *data);
int download_progress_cb(gpointer data, double t, double d, double utotal, double ulnow);
gboolean rotate_image_cb(gpointer data);
@@ -221,7 +221,7 @@ std::string next_image_filename(std::string& image_path)
return image_path + "/" + image_filename;
}
-void on_window_closed(GtkWidget *sender, gpointer data)
+void on_window_closed(GtkWidget *sender, GdkEvent* event, gpointer data)
{
UpdaterAppState *app_state;
@@ -786,10 +786,10 @@ void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state)
int main(int argc, char **argv)
{
- UpdaterAppState app_state;
+ UpdaterAppState* app_state = new UpdaterAppState;
GThread *worker_thread;
- parse_args_and_init(argc, argv, &app_state);
+ parse_args_and_init(argc, argv, app_state);
// Initialize logger, and rename old log file
gDirUtilp->initAppDirs("SecondLife");
@@ -812,17 +812,20 @@ int main(int argc, char **argv)
gtk_init(&argc, &argv);
// create UI
- updater_app_ui_init(&app_state);
+ updater_app_ui_init(app_state);
//llinfos << "SAMPLE TRANSLATION IS: " << LLTrans::getString("LoginInProgress") << llendl;
// create download thread
worker_thread = g_thread_create
- (GThreadFunc(worker_thread_cb), &app_state, FALSE, NULL);
+ (GThreadFunc(worker_thread_cb), app_state, FALSE, NULL);
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
- return (app_state.failure == FALSE) ? 0 : 1;
+ bool success = app_state->failure != FALSE;
+ delete app_state;
+ return success ? 0 : 1;
}
+
diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index acedaad25c..7d8a27607c 100755
--- a/indra/viewer_components/updater/scripts/linux/update_install
+++ b/indra/viewer_components/updater/scripts/linux/update_install
@@ -3,3 +3,6 @@ INSTALL_DIR=$(cd "$(dirname $0)/.." ; pwd)
export LD_LIBRARY_PATH=$INSTALL_DIR/lib
bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer 2" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml"
+if [ $? -ne 0 ]
+ then touch $2
+fi \ No newline at end of file