Merge branch 'DRTVWR-520-apple-notarization' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2021-05-02 01:06:17 +02:00
commit 76b932e008
18 changed files with 102 additions and 4506 deletions

View File

@ -322,9 +322,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>f3f49349055a525369a73139046a55a1</string>
<string>b6357ef3a0ec37877a5831820f25094e</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76345/727286/apr_suite-1.4.5.555520-darwin64-555520.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80557/759704/apr_suite-1.4.5.558565-darwin64-558565.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -358,9 +358,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>0628a381c80cae621106e41a0b592bcd</string>
<string>cb48ac069440f6dcd564cfa9fd02a4c2</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76347/727295/apr_suite-1.4.5.555520-windows-555520.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80556/759710/apr_suite-1.4.5.558565-windows-558565.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -370,16 +370,16 @@
<key>archive</key>
<map>
<key>hash</key>
<string>79fdb06371d6aeb29b52d593b2865f57</string>
<string>646dc3828d9c39fb1e77c4eec44ed739</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76346/727296/apr_suite-1.4.5.555520-windows64-555520.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80555/759709/apr_suite-1.4.5.558565-windows64-558565.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>1.4.5.555520</string>
<string>1.4.5.558565</string>
</map>
<key>boost</key>
<map>
@ -632,9 +632,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>7295ca3234ab21a98c39604f3b0985cb</string>
<string>52fc837a5840f5e6991842cf2f73a9d7</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/78596/744055/curl-7.54.1.557049-darwin64-557049.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80409/758717/curl-7.54.1.558452-darwin64-558452.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -668,11 +668,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>0c31fa12a33ecc946c0c69259b6367a9</string>
<string>8de0af7c8168406bf18bdcd5bc44e40e</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/78598/744050/curl-7.54.1.557049-windows-557049.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80411/758714/curl-7.54.1.558452-windows-558452.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -682,16 +682,16 @@
<key>archive</key>
<map>
<key>hash</key>
<string>4c4d5971a59ae2e1f4467667df2a9aa4</string>
<string>dc633acdbd3595db4f904e68e48b4744</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/78597/744044/curl-7.54.1.557049-windows64-557049.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80410/758715/curl-7.54.1.558452-windows64-558452.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>7.54.1.557049</string>
<string>7.54.1.558452</string>
</map>
<key>db</key>
<map>
@ -814,9 +814,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>46124156a4148d61c849d328c8659f78</string>
<string>77d2bc0c26c5047ac9f8126f8fa5aa0f</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/76900/730915/dullahan-1.7.0.202102101914_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-555904.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80680/760744/dullahan-1.7.0.202104220619_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-558653.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -859,7 +859,7 @@
</map>
</map>
<key>version</key>
<string>1.7.0.202102101918_81.3.10_gb223419_chromium-81.0.4044.138</string>
<string>1.7.0.202104220629_81.3.10_gb223419_chromium-81.0.4044.138</string>
</map>
<key>elfio</key>
<map>
@ -3124,9 +3124,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>321a8542e7b693fbe8e44ebface06087</string>
<string>6ce3cbaed968a69fb7a2cca80220874d</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55966/524403/slvoice-4.10.0000.32327.5fc3fe7c.539691-darwin64-539691.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80380/758537/slvoice-4.10.0000.32327.5fc3fe7c.558436-darwin64-558436.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -3160,9 +3160,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>fb1a57a1cf5e38a3d51b32307b93ffba</string>
<string>2eb38c5eff4d0f18fbb89d0c30c4f0a4</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55968/524423/slvoice-4.10.0000.32327.5fc3fe7c.539691-windows-539691.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80382/758550/slvoice-4.10.0000.32327.5fc3fe7c.558436-windows-558436.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -3172,16 +3172,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>81df970eb0c97d415d7bd12049c82042</string>
<string>9ee8f3cbc5369c598a998c61961ed16d</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55967/524409/slvoice-4.10.0000.32327.5fc3fe7c.539691-windows64-539691.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80381/758551/slvoice-4.10.0000.32327.5fc3fe7c.558436-windows64-558436.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>4.10.0000.32327.5fc3fe7c.539691</string>
<string>4.10.0000.32327.5fc3fe7c.558436</string>
</map>
<key>tut</key>
<map>
@ -3244,9 +3244,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>60f008c5fd31641ad4e61ac751ce15d1</string>
<string>c42575ac8997de979eadb082c33a578e</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/75748/723495/uriparser-0.9.4-darwin64-555117.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/81322/765512/uriparser-0.9.4-darwin64-559132.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -3280,9 +3280,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>00aff37a6f5e1fe08456702d28706cf6</string>
<string>901b1063556fc6b2575e745eef2bf744</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/75751/723507/uriparser-0.9.4-windows-555117.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/81323/765528/uriparser-0.9.4-windows-559132.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -3292,9 +3292,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>ff27a91f3941c7bef5e1613a064cb048</string>
<string>962c01d553f286c430102998129fb0d6</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/75750/723506/uriparser-0.9.4-windows64-555117.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/81324/765527/uriparser-0.9.4-windows64-559132.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>

View File

@ -132,9 +132,6 @@ if (LINUX)
#<FS:TS> Huh? Where'd that target come from?
#add_dependencies(viewer linux-crash-logger-strip-target)
add_dependencies(viewer linux-crash-logger)
elseif (DARWIN)
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
add_dependencies(viewer mac-crash-logger)
elseif (WINDOWS)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
if (EXISTS ${VIEWER_DIR}win_setup)

View File

@ -24,7 +24,7 @@ elseif (DARWIN)
message(FATAL_ERROR "AppKit not found")
endif()
FIND_LIBRARY(CEF_LIBRARY "Chromium Embedded Framework" ${ARCH_PREBUILT_DIRS_RELEASE})
set(CEF_LIBRARY "'${ARCH_PREBUILT_DIRS_RELEASE}/Chromium\ Embedded\ Framework.framework'")
if (NOT CEF_LIBRARY)
message(FATAL_ERROR "CEF not found")
endif()
@ -33,7 +33,7 @@ elseif (DARWIN)
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
${APPKIT_LIBRARY}
${CEF_LIBRARY}
"-F ${CEF_LIBRARY}"
)
elseif (LINUX)

View File

@ -382,60 +382,16 @@ void LLApp::setupErrorHandling(bool second_instance)
#else // ! LL_WINDOWS
#if defined(LL_BUGSPLAT)
// Don't install our own signal handlers -- BugSplat needs to hook them,
// or it's completely ineffectual.
bool installHandler = false;
#else // ! LL_BUGSPLAT
//
// Start up signal handling.
//
// There are two different classes of signals. Synchronous signals are delivered to a specific
// thread, asynchronous signals can be delivered to any thread (in theory)
//
setup_signals();
// Add google breakpad exception handler configured for Darwin/Linux.
bool installHandler = true;
#if ! defined(LL_BUGSPLAT)
//
// Start up signal handling.
//
// There are two different classes of signals. Synchronous signals are delivered to a specific
// thread, asynchronous signals can be delivered to any thread (in theory)
//
setup_signals();
#endif // ! LL_BUGSPLAT
#if LL_DARWIN
// For the special case of Darwin, we do not want to install the handler if
// the process is being debugged as the app will exit with value ABRT (6) if
// we do. Unfortunately, the code below which performs that test relies on
// the structure kinfo_proc which has been tagged by apple as an unstable
// API. We disable this test for shipping versions to avoid conflicts with
// future releases of Darwin. This test is really only needed for developers
// starting the app from a debugger anyway.
#ifndef LL_RELEASE_FOR_DOWNLOAD
int mib[4];
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PID;
mib[3] = getpid();
struct kinfo_proc info;
memset(&info, 0, sizeof(info));
size_t size = sizeof(info);
int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
if((result == 0) || (errno == ENOMEM))
{
// P_TRACED flag is set, so this process is being debugged; do not install
// the handler
if(info.kp_proc.p_flag & P_TRACED) installHandler = false;
}
else
{
// Failed to discover if the process is being debugged; default to
// installing the handler.
installHandler = true;
}
#endif // ! LL_RELEASE_FOR_DOWNLOAD
#endif // LL_DARWIN
#endif // ! LL_WINDOWS
startErrorThread();
}

View File

@ -1,94 +0,0 @@
# -*- cmake -*-
project(mac_crash_logger)
include(00-Common)
include(LLCommon)
include(LLCoreHttp)
include(LLCrashLogger)
include(LLMath)
include(LLMessage)
include(LLFilesystem)
include(LLXML)
include(Linking)
include(LLSharedLibs)
include(Boost)
include_directories(
${LLCOREHTTP_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${LLCRASHLOGGER_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLFILESYSTEM_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
)
include_directories(SYSTEM
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
${LLXML_SYSTEM_INCLUDE_DIRS}
)
set(mac_crash_logger_SOURCE_FILES
mac_crash_logger.cpp
llcrashloggermac.cpp
llcrashloggermacdelegate.mm
)
set(mac_crash_logger_HEADER_FILES
CMakeLists.txt
llcrashloggermac.h
llcrashloggermacdelegate.h
)
set_source_files_properties(${mac_crash_logger_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND mac_crash_logger_SOURCE_FILES ${mac_crash_logger_HEADER_FILES})
set(mac_crash_logger_RESOURCE_FILES
CrashReporter.nib/
)
set_source_files_properties(
${mac_crash_logger_RESOURCE_FILES}
PROPERTIES
HEADER_FILE_ONLY TRUE
)
SOURCE_GROUP("Resources" FILES ${mac_crash_logger_RESOURCE_FILES})
list(APPEND mac_crash_logger_SOURCE_FILES ${mac_crash_logger_RESOURCE_FILES})
add_executable(mac-crash-logger
MACOSX_BUNDLE
${mac_crash_logger_SOURCE_FILES})
set_target_properties(mac-crash-logger
PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
find_library(COCOA_LIBRARY Cocoa)
target_link_libraries(mac-crash-logger
${LLCRASHLOGGER_LIBRARIES}
${LLFILESYSTEM_LIBRARIES}
${COCOA_LIBRARIES}
${LLXML_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLMATH_LIBRARIES}
${LLCOREHTTP_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BOOST_CONTEXT_LIBRARY}
${BOOST_FIBER_LIBRARY}
)
add_custom_command(
TARGET mac-crash-logger POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
-E
copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/CrashReporter.nib
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-crash-logger.app/Contents/Resources/CrashReporter.nib
)
ll_deploy_sharedlibs_command(mac-crash-logger)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//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-crash-logger</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string></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>
<key>NSMainNibFile</key>
<string>CrashReporter</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@ -1,99 +0,0 @@
/**
* @file llcrashloggermac.cpp
* @brief Mac OSX crash logger implementation
*
* $LicenseInfo:firstyear=2003&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 "llcrashloggermac.h"
#include <iostream>
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
#include "llerror.h"
#include "llfile.h"
#include "lltimer.h"
#include "llstring.h"
#include "lldir.h"
#include "llsdserialize.h"
// Windows Message Handlers
BOOL gFirstDialog = TRUE;
LLFILE *gDebugFile = NULL;
std::string gUserNotes = "";
bool gSendReport = false;
bool gRememberChoice = false;
LLCrashLoggerMac::LLCrashLoggerMac(void)
{
}
LLCrashLoggerMac::~LLCrashLoggerMac(void)
{
}
bool LLCrashLoggerMac::init(void)
{
bool ok = LLCrashLogger::init();
return ok;
}
void LLCrashLoggerMac::gatherPlatformSpecificFiles()
{
}
bool LLCrashLoggerMac::frame()
{
if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
{
gSendReport = true;
}
// <FS:Ansariel> Restore crash report user settings
if(gRememberChoice)
{
if(gSendReport) saveCrashBehaviorSetting(CRASH_BEHAVIOR_ALWAYS_SEND);
else saveCrashBehaviorSetting(CRASH_BEHAVIOR_NEVER_SEND);
}
// </FS:Ansariel>
if(gSendReport)
{
setUserText(gUserNotes);
sendCrashLogs();
}
LL_INFOS() << "Sending of logs complete" << LL_ENDL;
return true;
}
bool LLCrashLoggerMac::cleanup()
{
commonCleanup();
mKeyMaster.releaseMaster();
return true;
}

View File

@ -1,45 +0,0 @@
/**
* @file llcrashloggermac.h
* @brief Mac OSX crash logger definition
*
* $LicenseInfo:firstyear=2003&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 LLCRASHLOGGERMAC_H
#define LLCRASHLOGGERMAC_H
#include "linden_common.h"
#include "llcrashlogger.h"
#include "llstring.h"
class LLCrashLoggerMac : public LLCrashLogger
{
public:
LLCrashLoggerMac(void);
~LLCrashLoggerMac(void);
virtual bool init();
virtual bool frame();
virtual bool cleanup();
virtual void gatherPlatformSpecificFiles();
};
#endif

View File

@ -1,52 +0,0 @@
/**
* @file llcrashloggermacdelegate.h
* @brief Mac OSX crash logger implementation
*
* $LicenseInfo:firstyear=2003&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$
*/
/*
#import <Cocoa/Cocoa.h>
@interface LLCrashLoggerMacDelegate : NSObject <NSApplicationDelegate>
{
IBOutlet NSTextField *crashText;
IBOutlet NSButton *rememberCheck;
NSWindow *_window;
bool mRemember;
}
- (void)setWindow:(NSWindow *)newWindow;
- (NSWindow *)window;
- (IBAction)remember:(id)sender;
- (IBAction)send:(id)sender;
- (IBAction)cancel:(id)sender;
@property (assign) IBOutlet NSWindow *window;
@end
*/

View File

@ -1,75 +0,0 @@
/**
* @file llcrashloggermacdelegate.mm
* @brief Mac OSX crash logger implementation
*
* $LicenseInfo:firstyear=2003&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$
*/
/*
#import "llcrashloggermacdelegate.h"
#include <iostream>
extern std::string gUserNotes;
extern bool gSendReport;
extern bool gRememberChoice;
@implementation LLCrashLoggerMacDelegate
- (void)setWindow:(NSWindow *)window
{
_window = window;
}
- (NSWindow *)window
{
return _window;
}
- (void)dealloc
{
[super dealloc];
}
std::string* NSToString( NSString *ns_str )
{
return ( new std::string([ns_str UTF8String]) );
}
- (IBAction)remember:(id)sender
{
gRememberChoice = [rememberCheck state];
}
- (IBAction)send:(id)sender
{
std::string* user_input = NSToString([crashText stringValue]);
gUserNotes = *user_input;
gSendReport = true;
}
- (IBAction)cancel:(id)sender
{
[ _window close];
}
@end
*/

View File

@ -1,57 +0,0 @@
/**
* @file mac_crash_logger.cpp
* @brief Mac OSX crash logger implementation
*
* $LicenseInfo:firstyear=2003&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 "llcrashloggermac.h"
#include "indra_constants.h"
#include <iostream>
int main(int argc, char **argv)
{
LLCrashLoggerMac app;
app.parseCommandOptions(argc, argv);
LLSD options = LLApp::instance()->getOptionData(
LLApp::PRIORITY_COMMAND_LINE);
if (! app.init())
{
LL_WARNS() << "Unable to initialize application." << LL_ENDL;
return 1;
}
if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND)
{
// return NSApplicationMain(argc, (const char **)argv);
}
app.frame();
app.cleanup();
LL_INFOS() << "Crash reporter finished normally." << LL_ENDL;
return 0;
}

View File

@ -2708,8 +2708,7 @@ if (DARWIN)
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef mac-crash-logger)
add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
if (ENABLE_SIGNING)
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")

View File

@ -0,0 +1,44 @@
#!/bin/sh
CONFIG_FILE="$build_secrets_checkout/code-signing-osx/notarize_creds.sh"
if [ -f "$CONFIG_FILE" ]; then
source $CONFIG_FILE
app_file="$1"
zip_file=${app_file/app/zip}
ditto -c -k --keepParent "$app_file" "$zip_file"
if [ -f "$zip_file" ]; then
requestUUID=$(xcrun altool --notarize-app --primary-bundle-id "com.secondlife.viewer" \
--username $USERNAME \
--password $PASSWORD \
--asc-provider $ASC_PROVIDER \
--file "$zip_file" 2>&1 \
| awk '/RequestUUID/ { print $NF; }')
echo "Apple Notarization RequestUUID: $requestUUID"
if [[ -n $requestUUID ]]; then
status="in progress"
while [[ "$status" == "in progress" ]]; do
sleep 30
status=$(xcrun altool --notarization-info "$requestUUID" \
--username $USERNAME \
--password $PASSWORD 2>&1 \
| awk -F ': ' '/Status:/ { print $2; }' )
echo "$status"
done
# log results
xcrun altool --notarization-info "$requestUUID" \
--username $USERNAME \
--password $PASSWORD
#remove temporary file
rm "$zip_file"
if [["$status" == "success"]]; then
xcrun stapler staple "$app_file"
elif [["$status" == "invalid"]]; then
exit 1
fi
fi
fi
fi

View File

@ -240,17 +240,7 @@ LLAppViewerMacOSX::~LLAppViewerMacOSX()
bool LLAppViewerMacOSX::init()
{
bool success = LLAppViewer::init();
#if LL_SEND_CRASH_REPORTS
if (success)
{
LLAppViewer* pApp = LLAppViewer::instance();
pApp->initCrashReporting();
}
#endif
return success;
return LLAppViewer::init();
}
// MacOSX may add and addition command line arguement for the process serial number.
@ -367,21 +357,6 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
return reset_count == 0;
}
void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
{
std::string command_str = "mac-crash-logger.app";
std::stringstream pid_str;
pid_str << LLApp::getPid();
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
std::string appname = gDirUtilp->getExecutableFilename();
std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() };
std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) );
LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str()
<< " " << logdir << " " << appname << LL_ENDL;
launchApplication(&command_str, &args);
}
std::string LLAppViewerMacOSX::generateSerialNumber()
{
char serial_md5[MD5HEX_STR_SIZE]; // Flawfinder: ignore

View File

@ -44,7 +44,6 @@ public:
protected:
virtual bool restoreErrorTrap();
virtual void initCrashReporting(bool reportFreeze);
std::string generateSerialNumber();
virtual bool initParseCommandLine(LLCommandLineParser& clp);

View File

@ -1467,20 +1467,14 @@ class DarwinManifest(ViewerManifest):
# our apps
executable_path = {}
for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
# plugin launcher
(os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
):
self.path2basename(os.path.join(os.pardir,
app_bld_dir, self.args['configuration']),
app)
executable_path[app] = \
self.dst_path_of(os.path.join(app, "Contents", "MacOS"))
self.path2basename(os.path.join(os.pardir, os.path.join("llplugin", "slplugin"), self.args['configuration']), "SLPlugin.app")
executable_path["SLPlugin.app"] = \
self.dst_path_of(os.path.join("SLPlugin.app", "Contents", "MacOS"))
# our apps dependencies on shared libs
# for each app, for each dylib we collected in dylibs,
# create a symlink to the real copy of the dylib.
resource_path = self.dst_path_of(os.path.join(app, "Contents", "Resources"))
resource_path = self.dst_path_of(os.path.join("SLPlugin.app", "Contents", "Resources"))
for libfile in dylibs:
src = os.path.join(os.pardir, os.pardir, os.pardir, libfile)
dst = os.path.join(resource_path, libfile)
@ -1736,43 +1730,19 @@ class DarwinManifest(ViewerManifest):
signed=False
sign_attempts=3
sign_retry_wait=15
#<FS:TS> The order of these is critical. When two things need signing and one is contained within the
# other, they must be signed from the innermost out.
things_to_sign = ['Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework',
'Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app',
'Resources/SLPlugin.app',
'Resources/SLVoice',
'Resources/mac-crash-logger.app']
libvlc_path = app_in_dmg + "/Contents/Resources/llplugin/media_plugin_libvlc.dylib"
cef_path = app_in_dmg + "/Contents/Resources/llplugin/media_plugin_cef.dylib"
slplugin_path = app_in_dmg + "/Contents/Resources/SLPlugin.app/Contents/MacOS/SLPlugin"
greenlet_path = app_in_dmg + "/Contents/Resources/updater/greenlet/_greenlet.so"
while (not signed) and (sign_attempts > 0):
try:
sign_attempts-=1
#<FS:TS> This is ugly as hell, but it's the only way to make sure that every dylib in the
# entire package gets signed, as required for notarization. Apparently the --deep option
# isn't sufficient any more. Don't ask me why.
contents_dir = os.path.join(app_in_dmg, 'Contents')
try:
all_dylibs = subprocess.check_output(['find', contents_dir, '-name', '*.dylib', '-print'])
except subprocess.CalledProcessError as err:
sys.exit("failed to get list of dylib files")
for dylib in all_dylibs.split('\n'):
if dylib: # ignore any empty lines
self.run_command(
['codesign', '--verbose', '--deep', '--force', '--option=runtime',
'--keychain', viewer_keychain, '--sign', identity,
dylib])
for item in things_to_sign:
# Note: See blurb above about names of keychains
sign_path = os.path.join(contents_dir, item)
print ("Signing %s" % sign_path)
self.run_command(
['codesign', '--verbose', '--deep', '--force', '--option=runtime',
'--keychain', viewer_keychain, '--sign', identity,
sign_path])
print ("Signing main app bundle %s" % app_in_dmg)
self.run_command(
['codesign', '--verbose', '--deep', '--force', '--option=runtime',
'--keychain', viewer_keychain, '--sign', identity,
app_in_dmg])
# Note: See blurb above about names of keychains
self.run_command(['codesign', '--force', '--timestamp','--keychain', viewer_keychain, '--sign', identity, libvlc_path])
self.run_command(['codesign', '--force', '--timestamp', '--keychain', viewer_keychain, '--sign', identity, cef_path])
self.run_command(['codesign', '--force', '--timestamp', '--keychain', viewer_keychain, '--sign', identity, greenlet_path])
self.run_command(['codesign', '--verbose', '--deep', '--force', '--options', 'runtime', '--keychain', viewer_keychain, '--sign', identity, slplugin_path])
self.run_command(['codesign', '--verbose', '--deep', '--force', '--options', 'runtime', '--keychain', viewer_keychain, '--sign', identity, app_in_dmg])
signed=True # if no exception was raised, the codesign worked
except ManifestError as err:
if sign_attempts:
@ -1783,6 +1753,7 @@ class DarwinManifest(ViewerManifest):
print ("Maximum codesign attempts exceeded; giving up", file=sys.stderr)
raise
self.run_command(['spctl', '-a', '-texec', '-vvvv', app_in_dmg])
self.run_command([self.src_path_of("installers/darwin/apple-notarize.sh"), app_in_dmg])
finally:
# Unmount the image even if exceptions from any of the above
@ -1838,7 +1809,7 @@ class LinuxManifest(ViewerManifest):
with self.prefix(dst="bin"):
self.path("firestorm-bin","do-not-directly-run-firestorm-bin")
self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")
self.path2basename("../llplugin/slplugin", "SLPlugin")
self.path2basename("../llplugin/slplugin", "SLPlugin")
#this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322 and SL-323
# <FS:Ansariel> Remove VMP
# with self.prefix(src="../viewer_components/manager", dst=""):