diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/mac_updater | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/mac_updater')
-rw-r--r-- | linden/indra/mac_updater/CMakeLists.txt | 82 | ||||
-rw-r--r-- | linden/indra/mac_updater/MoreFilesX.c | 2 | ||||
-rw-r--r-- | linden/indra/mac_updater/MoreFilesX.h | 2 | ||||
-rw-r--r-- | linden/indra/mac_updater/mac_updater.cpp | 14 |
4 files changed, 99 insertions, 1 deletions
diff --git a/linden/indra/mac_updater/CMakeLists.txt b/linden/indra/mac_updater/CMakeLists.txt new file mode 100644 index 0000000..3ac5aee --- /dev/null +++ b/linden/indra/mac_updater/CMakeLists.txt | |||
@@ -0,0 +1,82 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | project(mac_updater) | ||
4 | |||
5 | include(00-Common) | ||
6 | include(CURL) | ||
7 | include(LLCommon) | ||
8 | include(LLVFS) | ||
9 | include(Linking) | ||
10 | |||
11 | include_directories( | ||
12 | ${LLCOMMON_INCLUDE_DIRS} | ||
13 | ${LLVFS_INCLUDE_DIRS} | ||
14 | ) | ||
15 | |||
16 | set(mac_updater_SOURCE_FILES | ||
17 | mac_updater.cpp | ||
18 | FSCopyObject.c | ||
19 | GenLinkedList.c | ||
20 | MoreFilesX.c | ||
21 | ) | ||
22 | |||
23 | set(mac_updater_HEADER_FILES | ||
24 | CMakeLists.txt | ||
25 | |||
26 | FSCopyObject.h | ||
27 | GenLinkedList.h | ||
28 | MoreFilesX.h | ||
29 | ) | ||
30 | |||
31 | set_source_files_properties( | ||
32 | FSCopyObject.c | ||
33 | MoreFilesX.c | ||
34 | PROPERTIES | ||
35 | COMPILE_FLAGS -Wno-deprecated-declarations | ||
36 | ) | ||
37 | |||
38 | set_source_files_properties(${mac_updater_HEADER_FILES} | ||
39 | PROPERTIES HEADER_FILE_ONLY TRUE) | ||
40 | |||
41 | list(APPEND mac_updater_SOURCE_FILES ${mac_updater_HEADER_FILES}) | ||
42 | |||
43 | |||
44 | set(mac_updater_RESOURCE_FILES | ||
45 | Info.plist | ||
46 | AutoUpdater.nib/ | ||
47 | ) | ||
48 | set_source_files_properties( | ||
49 | ${mac_updater_RESOURCE_FILES} | ||
50 | PROPERTIES | ||
51 | HEADER_FILE_ONLY TRUE | ||
52 | ) | ||
53 | set_source_files_properties( | ||
54 | Info.plist | ||
55 | PROPERTIES | ||
56 | MACOSX_PACKAGE_LOCATION . # will it blend? + poppy | ||
57 | ) | ||
58 | SOURCE_GROUP("Resources" FILES ${mac_updater_RESOURCE_FILES}) | ||
59 | list(APPEND mac_updater_SOURCE_FILES ${mac_updater_RESOURCE_FILES}) | ||
60 | |||
61 | |||
62 | add_executable(mac-updater | ||
63 | MACOSX_BUNDLE | ||
64 | ${mac_updater_SOURCE_FILES}) | ||
65 | |||
66 | target_link_libraries(mac-updater | ||
67 | ${LLVFS_LIBRARIES} | ||
68 | ${CURL_LIBRARIES} | ||
69 | ${LLCOMMON_LIBRARIES} | ||
70 | ) | ||
71 | |||
72 | add_custom_command( | ||
73 | TARGET mac-updater POST_BUILD | ||
74 | COMMAND ${CMAKE_COMMAND} | ||
75 | ARGS | ||
76 | -E | ||
77 | copy_directory | ||
78 | ${CMAKE_CURRENT_SOURCE_DIR}/AutoUpdater.nib | ||
79 | ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-updater.app/Contents/Resources/AutoUpdater.nib | ||
80 | ) | ||
81 | |||
82 | |||
diff --git a/linden/indra/mac_updater/MoreFilesX.c b/linden/indra/mac_updater/MoreFilesX.c index 283628d..a157b6a 100644 --- a/linden/indra/mac_updater/MoreFilesX.c +++ b/linden/indra/mac_updater/MoreFilesX.c | |||
@@ -2298,6 +2298,7 @@ BadParameter: | |||
2298 | 2298 | ||
2299 | /*****************************************************************************/ | 2299 | /*****************************************************************************/ |
2300 | 2300 | ||
2301 | #ifndef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
2301 | OSErr | 2302 | OSErr |
2302 | FSVolumeMount( | 2303 | FSVolumeMount( |
2303 | const void *volMountInfo, | 2304 | const void *volMountInfo, |
@@ -2321,6 +2322,7 @@ BadParameter: | |||
2321 | 2322 | ||
2322 | return ( result ); | 2323 | return ( result ); |
2323 | } | 2324 | } |
2325 | #endif | ||
2324 | 2326 | ||
2325 | /*****************************************************************************/ | 2327 | /*****************************************************************************/ |
2326 | 2328 | ||
diff --git a/linden/indra/mac_updater/MoreFilesX.h b/linden/indra/mac_updater/MoreFilesX.h index 2502905..b6793db 100644 --- a/linden/indra/mac_updater/MoreFilesX.h +++ b/linden/indra/mac_updater/MoreFilesX.h | |||
@@ -1509,10 +1509,12 @@ FSGetVolMountInfo( | |||
1509 | 1509 | ||
1510 | #pragma mark FSVolumeMount | 1510 | #pragma mark FSVolumeMount |
1511 | 1511 | ||
1512 | #ifndef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
1512 | OSErr | 1513 | OSErr |
1513 | FSVolumeMount( | 1514 | FSVolumeMount( |
1514 | const void *volMountInfo, | 1515 | const void *volMountInfo, |
1515 | FSVolumeRefNum *volRefNum); | 1516 | FSVolumeRefNum *volRefNum); |
1517 | #endif | ||
1516 | 1518 | ||
1517 | /* | 1519 | /* |
1518 | The VolumeMount function mounts a volume using a volume mounting | 1520 | The VolumeMount function mounts a volume using a volume mounting |
diff --git a/linden/indra/mac_updater/mac_updater.cpp b/linden/indra/mac_updater/mac_updater.cpp index 15e28ac..c2f9f4d 100644 --- a/linden/indra/mac_updater/mac_updater.cpp +++ b/linden/indra/mac_updater/mac_updater.cpp | |||
@@ -50,6 +50,8 @@ | |||
50 | #include "MoreFilesX.h" | 50 | #include "MoreFilesX.h" |
51 | #include "FSCopyObject.h" | 51 | #include "FSCopyObject.h" |
52 | 52 | ||
53 | #include "llerrorcontrol.h" | ||
54 | |||
53 | enum | 55 | enum |
54 | { | 56 | { |
55 | kEventClassCustom = 'Cust', | 57 | kEventClassCustom = 'Cust', |
@@ -345,6 +347,16 @@ int main(int argc, char **argv) | |||
345 | // We assume that all the logs we're looking for reside on the current drive | 347 | // We assume that all the logs we're looking for reside on the current drive |
346 | gDirUtilp->initAppDirs("SecondLife"); | 348 | gDirUtilp->initAppDirs("SecondLife"); |
347 | 349 | ||
350 | LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); | ||
351 | |||
352 | // Rename current log file to ".old" | ||
353 | std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log.old"); | ||
354 | std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log"); | ||
355 | LLFile::rename(log_file.c_str(), old_log_file.c_str()); | ||
356 | |||
357 | // Set the log file to updater.log | ||
358 | LLError::logToFile(log_file); | ||
359 | |||
348 | ///////////////////////////////////////// | 360 | ///////////////////////////////////////// |
349 | // | 361 | // |
350 | // Process command line arguments | 362 | // Process command line arguments |
@@ -986,7 +998,7 @@ void *updatethreadproc(void*) | |||
986 | 998 | ||
987 | // NOTE: we could add -private at the end of this command line to keep the image from showing up in the Finder, | 999 | // NOTE: we could add -private at the end of this command line to keep the image from showing up in the Finder, |
988 | // but if our cleanup fails, this makes it much harder for the user to unmount the image. | 1000 | // but if our cleanup fails, this makes it much harder for the user to unmount the image. |
989 | LLString mountOutput; | 1001 | std::string mountOutput; |
990 | FILE* mounter = popen("hdiutil attach SecondLife.dmg -mountpoint mnt", "r"); /* Flawfinder: ignore */ | 1002 | FILE* mounter = popen("hdiutil attach SecondLife.dmg -mountpoint mnt", "r"); /* Flawfinder: ignore */ |
991 | 1003 | ||
992 | if(mounter == NULL) | 1004 | if(mounter == NULL) |