summaryrefslogtreecommitdiff
path: root/indra/mac_updater
diff options
context:
space:
mode:
Diffstat (limited to 'indra/mac_updater')
-rw-r--r--indra/mac_updater/CMakeLists.txt35
-rw-r--r--indra/mac_updater/Info.plist26
-rw-r--r--indra/mac_updater/mac_updater.cpp12
3 files changed, 72 insertions, 1 deletions
diff --git a/indra/mac_updater/CMakeLists.txt b/indra/mac_updater/CMakeLists.txt
index 39aa4d2b15..3ac5aeebd5 100644
--- a/indra/mac_updater/CMakeLists.txt
+++ b/indra/mac_updater/CMakeLists.txt
@@ -40,10 +40,43 @@ set_source_files_properties(${mac_updater_HEADER_FILES}
list(APPEND mac_updater_SOURCE_FILES ${mac_updater_HEADER_FILES})
-add_executable(mac-updater ${mac_updater_SOURCE_FILES})
+
+set(mac_updater_RESOURCE_FILES
+ Info.plist
+ AutoUpdater.nib/
+ )
+set_source_files_properties(
+ ${mac_updater_RESOURCE_FILES}
+ PROPERTIES
+ HEADER_FILE_ONLY TRUE
+ )
+set_source_files_properties(
+ Info.plist
+ PROPERTIES
+ MACOSX_PACKAGE_LOCATION . # will it blend? + poppy
+ )
+SOURCE_GROUP("Resources" FILES ${mac_updater_RESOURCE_FILES})
+list(APPEND mac_updater_SOURCE_FILES ${mac_updater_RESOURCE_FILES})
+
+
+add_executable(mac-updater
+ MACOSX_BUNDLE
+ ${mac_updater_SOURCE_FILES})
target_link_libraries(mac-updater
${LLVFS_LIBRARIES}
${CURL_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
+
+add_custom_command(
+ TARGET mac-updater POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS
+ -E
+ copy_directory
+ ${CMAKE_CURRENT_SOURCE_DIR}/AutoUpdater.nib
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-updater.app/Contents/Resources/AutoUpdater.nib
+ )
+
+
diff --git a/indra/mac_updater/Info.plist b/indra/mac_updater/Info.plist
new file mode 100644
index 0000000000..bb27fddb03
--- /dev/null
+++ b/indra/mac_updater/Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>mac-updater</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.secondlife.indra.autoupdater</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string></string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0.0</string>
+</dict>
+</plist>
diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp
index 800521e572..4531e5ac18 100644
--- a/indra/mac_updater/mac_updater.cpp
+++ b/indra/mac_updater/mac_updater.cpp
@@ -50,6 +50,8 @@
#include "MoreFilesX.h"
#include "FSCopyObject.h"
+#include "llerrorcontrol.h"
+
enum
{
kEventClassCustom = 'Cust',
@@ -345,6 +347,16 @@ int main(int argc, char **argv)
// We assume that all the logs we're looking for reside on the current drive
gDirUtilp->initAppDirs("SecondLife");
+ LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
+
+ // Rename current log file to ".old"
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log.old");
+ std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log");
+ LLFile::rename(log_file.c_str(), old_log_file.c_str());
+
+ // Set the log file to updater.log
+ LLError::logToFile(log_file);
+
/////////////////////////////////////////
//
// Process command line arguments