Merge viewer-quickgraphics

master
Ansariel 2016-03-05 00:37:52 +01:00
commit 5d325f4007
24 changed files with 175 additions and 79 deletions

View File

@ -70,15 +70,12 @@ additional_packages = ""
# the viewer_channel_suffix is prefixed by a blank and then appended to the viewer_channel
# for the package in a setting that overrides the compiled-in value
################################################################
## Removed 2015-07-02 (MAINT-5360) until we fix packaging step in Team City
## additional_packages = "EDU"
additional_packages = "EDU"
# The EDU package allows us to create a separate release channel whose expirations
# are synchronized as much as possible with the academic year
## Removed 2015-07-02 (MAINT-5360) until we fix packaging step in Team City
## EDU_sourceid = ""
## Removed 2015-07-02 (MAINT-5360) until we fix packaging step in Team City
## EDU_viewer_channel_suffix = "edu"
EDU_sourceid = ""
EDU_viewer_channel_suffix = "edu"
# Notifications - to configure email notices, add a setting like this:
# <username>_<reponame>.email = <email-address>

View File

@ -145,6 +145,43 @@ if (LL_TESTS)
"${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llcorehttp_peer.py"
)
if (DARWIN)
# Path inside the app bundle where we'll need to copy libraries
set(LL_TEST_DESTINATION_DIR
${CMAKE_SOURCE_DIR}/../build-darwin-i386/sharedlibs/Resources
)
# Create the Contents/Resources directory
add_custom_command(
TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
-E
make_directory
${LL_TEST_DESTINATION_DIR}
COMMENT "Creating Resources directory in app bundle."
)
# Copy the required libraries to the package app
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libapr-1.0.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libapr-1.0.dylib
)
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libaprutil-1.0.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libaprutil-1.0.dylib
)
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexception_handler.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexception_handler.dylib
)
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexpat.1.5.2.dylib ${LL_TEST_DESTINATION_DIR}
DEPENDS ${CMAKE_SOURCE_DIR}/../build-darwin-i386/packages/lib/release/libexpat.1.5.2.dylib
)
endif (DARWIN)
#
# Example Programs
#

View File

@ -127,4 +127,12 @@ if (DARWIN)
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
add_custom_command(TARGET media_plugin_cef
POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework"
"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
"$<TARGET_FILE:media_plugin_cef>"
VERBATIM
COMMENT "Fixing path to CEF Framework"
)
endif (DARWIN)

View File

@ -29,7 +29,7 @@
<!--Avater Impostors and Visual Muting Limits-->
<RenderAvatarMaxNonImpostors value="20"/>
<RenderAvatarMaxComplexity value="350000"/>
<RenderAutoMuteSurfaceAreaLimit value="10.0E6"/>
<RenderAutoMuteSurfaceAreaLimit value="1250.0"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->

View File

@ -29,7 +29,7 @@
<!--Avater Impostors and Visual Muting Limits-->
<RenderAvatarMaxNonImpostors value="12"/>
<RenderAvatarMaxComplexity value="75000"/>
<RenderAutoMuteSurfaceAreaLimit value="10.0E6"/>
<RenderAutoMuteSurfaceAreaLimit value="750.0"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->

View File

@ -29,7 +29,7 @@
<!--Avater Impostors and Visual Muting Limits-->
<RenderAvatarMaxNonImpostors value="18"/>
<RenderAvatarMaxComplexity value="100000"/>
<RenderAutoMuteSurfaceAreaLimit value="10.0E6"/>
<RenderAutoMuteSurfaceAreaLimit value="1000.0"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->

View File

@ -12566,13 +12566,13 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>RenderAutoMuteByteLimit</key>
<map>
<key>Comment</key>
<string>Maximum bytes of attachments before an avatar is rendered as a simple impostor (0 for no limit).</string>
<string>OBSOLETE and UNUSED.</string>
<key>Persist</key>
<integer>1</integer>
<integer>0</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>10000000</integer>
<integer>0</integer>
</map>
<key>RenderAvatarMaxNonImpostors</key>
<map>
@ -12628,13 +12628,15 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>RenderAutoMuteSurfaceAreaLimit</key>
<map>
<key>Comment</key>
<string>Maximum surface area of attachments before an avatar is rendered as a simple impostor (0 to not use this limit).</string>
<string>Maximum surface area of attachments before an avatar is
rendered as a simple impostor (to not use this limit, set to zero
or set RenderAvatarMaxComplexity to zero).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>10.0E6</real>
<real>1000.0</real>
</map>
<key>RenderAutoMuteLogging</key>
<map>

View File

@ -30,7 +30,7 @@
based on default graphics setting -->
<RenderAvatarMaxNonImpostors value="0"/>
<RenderAvatarMaxComplexity value="0"/>
<RenderAutoMuteSurfaceAreaLimit value="10.0E6"/>
<RenderAutoMuteSurfaceAreaLimit value="1500.0"/>
<!--Default for now-->
<RenderVolumeLODFactor value="2.0"/>
<!--NO SHADERS-->

View File

@ -34,8 +34,7 @@ RenderAvatarPhysicsLODFactor 1 1.0
RenderAvatarMaxNonImpostors 1 16
RenderAvatarMaxComplexity 1 80000
RenderAvatarVP 1 1
RenderAutoMuteByteLimit 1 10000000
RenderAutoMuteSurfaceAreaLimit 1 1.0E6
RenderAutoMuteSurfaceAreaLimit 1 1000.0
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
RenderFarClip 1 256

View File

@ -34,8 +34,7 @@ RenderAvatarPhysicsLODFactor 1 1.0
RenderAvatarMaxNonImpostors 1 12
RenderAvatarMaxComplexity 1 60000
RenderAvatarVP 1 1
RenderAutoMuteByteLimit 1 10000000
RenderAutoMuteSurfaceAreaLimit 1 1.0E6
RenderAutoMuteSurfaceAreaLimit 1 1000.0
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
RenderFarClip 1 256

View File

@ -486,7 +486,9 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
}
BOOL impostor = avatarp->isImpostor();
if (impostor)
if (impostor
&& LLVOAvatar::AV_DO_NOT_RENDER != avatarp->getVisualMuteSettings()
&& LLVOAvatar::AV_ALWAYS_RENDER != avatarp->getVisualMuteSettings())
{
return;
}
@ -1365,7 +1367,9 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
BOOL impostor = avatarp->isImpostor() && !single_avatar;
if (impostor && pass != 0)
if (( avatarp->isInMuteList()
|| impostor
|| (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()) ) && pass != 0)
{ //don't draw anything but the impostor for impostored avatars
return;
}
@ -1382,7 +1386,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
LLVOAvatar::sNumVisibleAvatars++;
}
if (impostor)
if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()))
{
if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
{

View File

@ -1013,6 +1013,12 @@ void LLFloaterPreference::cancel()
LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get();
pPathfindingConsole->onRegionBoundaryCross();
}
if (!mSavedGraphicsPreset.empty())
{
gSavedSettings.setString("PresetGraphicActive", mSavedGraphicsPreset);
LLPresetsManager::getInstance()->triggerChangeSignal();
}
}
void LLFloaterPreference::onOpen(const LLSD& key)
@ -3156,6 +3162,18 @@ void LLFloaterPreference::onClickSpellChecker()
void LLFloaterPreference::onClickAdvanced()
{
LLFloaterReg::showInstance("prefs_graphics_advanced");
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
iter != tabcontainer->getChildList()->end(); ++iter)
{
LLView* view = *iter;
LLPanelPreferenceGraphics* panel = dynamic_cast<LLPanelPreferenceGraphics*>(view);
if (panel)
{
panel->resetDirtyChilds();
}
}
}
void LLFloaterPreference::onClickActionChange()
@ -3299,6 +3317,11 @@ void LLFloaterPreference::changed()
}
void LLFloaterPreference::saveGraphicsPreset(std::string& preset)
{
mSavedGraphicsPreset = preset;
}
//------------------------------Updater---------------------------------------
//<FS:HG> FIRE-6340, FIRE-6567 - Setting Bandwidth issues
@ -3944,6 +3967,11 @@ void LLPanelPreferenceGraphics::setPresetText()
if (hasDirtyChilds() && !preset_graphic_active.empty())
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (instance)
{
instance->saveGraphicsPreset(preset_graphic_active);
}
gSavedSettings.setString("PresetGraphicActive", "");
preset_graphic_active.clear();
// This doesn't seem to cause an infinite recursion. This trigger is needed to cause the pulldown
@ -4081,6 +4109,15 @@ void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key)
refresh();
}
void LLFloaterPreferenceGraphicsAdvanced::onClickCloseBtn(bool app_quitting)
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (instance)
{
instance->cancel();
}
}
LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy()
{
}

View File

@ -253,6 +253,7 @@ public:
void buildPopupLists();
static void refreshSkin(void* data);
void selectPanel(const LLSD& name);
void saveGraphicsPreset(std::string& preset);
private:
@ -273,6 +274,7 @@ private:
std::string mDirectoryVisibility;
LLAvatarData mAvatarProperties;
std::string mSavedGraphicsPreset;
LOG_CLASS(LLFloaterPreference);
LLSearchEditor *mFilterEdit;
@ -373,6 +375,7 @@ public:
LLFloaterPreferenceGraphicsAdvanced(const LLSD& key);
~LLFloaterPreferenceGraphicsAdvanced();
void onOpen(const LLSD& key);
void onClickCloseBtn(bool app_quitting);
void disableUnavailableSettings();
void refreshEnabledGraphics();
void refreshEnabledState();

View File

@ -862,7 +862,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
{
if (bridge->mAvatar.notNull())
{
bridge->mAvatar->subtractAttachmentSizes( mGeometryBytes, mSurfaceArea );
bridge->mAvatar->subtractAttachmentArea(mSurfaceArea );
}
}

View File

@ -3754,6 +3754,9 @@ class LLObjectMute : public view_listener_t
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return true;
// [/RLVa:KB]
avatar->mNeedsImpostorUpdate = TRUE;
id = avatar->getID();
LLNameValue *firstname = avatar->getNVPair("FirstName");

View File

@ -708,7 +708,13 @@ void LLViewerPartSim::updateSimulation()
{
BOOL upd = TRUE;
LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp;
if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
if (vobj && vobj->isAvatar() && ((LLVOAvatar*)vobj)->isInMuteList())
{
upd = FALSE;
}
if (upd && vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
{
if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex())
{

View File

@ -711,11 +711,10 @@ public:
avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date
trunc_name = utf8str_truncate(avatar->getFullname(), 16);
addText(xpos, ypos, llformat("%s : %s, complexity %d, bytes %d area %.2f",
addText(xpos, ypos, llformat("%s : %s, complexity %d, area %.2f",
trunc_name.c_str(),
LLVOAvatar::rezStatusToString(avatar->getRezzedStatus()).c_str(),
avatar->getVisualComplexity(),
avatar->getAttachmentGeometryBytes(),
avatar->getAttachmentSurfaceArea()));
ypos += y_inc;
av_iter++;

View File

@ -1,4 +1,4 @@
/**
/**
* @File llvoavatar.cpp
* @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject
*
@ -682,7 +682,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
LLAvatarAppearance(&gAgentWearables),
LLViewerObject(id, pcode, regionp),
mSpecialRenderMode(0),
mAttachmentGeometryBytes(0),
mAttachmentSurfaceArea(0.f),
mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mTurning(FALSE),
@ -7215,12 +7214,14 @@ bool LLVOAvatar::isTooComplex() const
{
// Determine if visually muted or not
static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U);
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0U);
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f);
too_complex = ((max_render_cost > 0 && mVisualComplexity > max_render_cost)
|| (max_attachment_bytes > 0 && mAttachmentGeometryBytes > max_attachment_bytes)
|| (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area)
);
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f);
// If the user has chosen unlimited max complexity, we also disregard max attachment area
// so that unlimited will completely disable the overly complex impostor rendering
// yes, this leaves them vulnerable to griefing objects... their choice
too_complex = ( max_render_cost > 0
&& ( mVisualComplexity > max_render_cost
|| (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area)
));
}
return too_complex;
@ -8949,7 +8950,7 @@ void LLVOAvatar::updateImpostors()
{
LLVOAvatar* avatar = (LLVOAvatar*) *iter;
if (!avatar->isDead() && avatar->isVisible()
&& (avatar->isImpostor() && avatar->needsImpostorUpdate())
&& ((avatar->isImpostor() || LLVOAvatar::AV_DO_NOT_RENDER == avatar->getVisualMuteSettings()) && avatar->needsImpostorUpdate())
)
{
avatar->calcMutedAVColor();
@ -9093,10 +9094,10 @@ void LLVOAvatar::idleUpdateRenderComplexity()
mText->addLine(info_line, info_color, info_style);
// Attachment Surface Area
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f);
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f);
info_line = llformat("%.2f m^2", mAttachmentSurfaceArea);
if (max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this
if (max_render_cost != 0 && max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this
{
green_level = 1.f-llclamp((mAttachmentSurfaceArea-max_attachment_area)/max_attachment_area, 0.f, 1.f);
red_level = llmin(mAttachmentSurfaceArea/max_attachment_area, 1.f);
@ -9112,37 +9113,17 @@ void LLVOAvatar::idleUpdateRenderComplexity()
}
mText->addLine(info_line, info_color, info_style);
// Attachment byte limit
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
info_line = llformat("%.1f KB", mAttachmentGeometryBytes/1024.f);
if (max_attachment_bytes != 0) // zero means don't care, so don't bother coloring based on this
{
green_level = 1.f-llclamp(((F32) mAttachmentGeometryBytes-(F32)max_attachment_bytes)/(F32)max_attachment_bytes, 0.f, 1.f);
red_level = llmin((F32) mAttachmentGeometryBytes/(F32)max_attachment_bytes, 1.f);
info_color.set(red_level, green_level, 0.0, 1.0);
info_style = ( mAttachmentGeometryBytes > max_attachment_bytes
? LLFontGL::BOLD : LLFontGL::NORMAL );
}
else
{
info_color.set(LLColor4::grey);
info_style = LLFontGL::NORMAL;
}
mText->addLine(info_line, info_color, info_style);
updateText(); // corrects position
}
}
void LLVOAvatar::addAttachmentSizes(U32 delta_bytes, F32 delta_area)
void LLVOAvatar::addAttachmentArea(F32 delta_area)
{
mAttachmentGeometryBytes += delta_bytes;
mAttachmentSurfaceArea += delta_area;
}
void LLVOAvatar::subtractAttachmentSizes(U32 delta_bytes, F32 delta_area)
void LLVOAvatar::subtractAttachmentArea(F32 delta_area)
{
mAttachmentGeometryBytes = delta_bytes > mAttachmentGeometryBytes ? 0 : mAttachmentGeometryBytes - delta_bytes;
mAttachmentSurfaceArea = delta_area > mAttachmentSurfaceArea ? 0.0 : mAttachmentSurfaceArea - delta_area;
}
@ -9326,7 +9307,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set)
{
mVisuallyMuteSetting = set;
mNeedsImpostorUpdate = true;
mNeedsImpostorUpdate = TRUE;
}

View File

@ -269,10 +269,9 @@ public:
void updateVisualComplexity();
U32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry
F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; // estimated surface area of attachments
void addAttachmentSizes(U32 delta_bytes, F32 delta_area);
void subtractAttachmentSizes(U32 delta_bytes, F32 delta_area);
void addAttachmentArea(F32 delta_area);
void subtractAttachmentArea(F32 delta_area);
U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; };
@ -424,7 +423,6 @@ public:
S32 mSpecialRenderMode; // special lighting
private:
S32 mAttachmentGeometryBytes; //number of bytes in attached geometry
F32 mAttachmentSurfaceArea; //estimated surface area of attachments
bool shouldAlphaMask();

View File

@ -4866,7 +4866,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
pAvatarVO->subtractAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea );
pAvatarVO->subtractAttachmentArea( group->mSurfaceArea );
}
group->mGeometryBytes = 0;
@ -5464,7 +5464,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
pAvatarVO->addAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea );
pAvatarVO->addAttachmentArea( group->mSurfaceArea );
}
}

View File

@ -3184,7 +3184,9 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
if (vobj) // this test may not be needed, see above
{
LLVOAvatar* av = vobj->asAvatar();
if (av && av->isImpostor())
if (av && (av->isImpostor()
|| av->isInMuteList()
|| (LLVOAvatar::AV_DO_NOT_RENDER == av->getVisualMuteSettings() && !av->needsImpostorUpdate()) ))
{
return;
}

View File

@ -172,7 +172,7 @@
</menu_item_check>
<menu_item_check
name="AlwaysRenderFully"
label="Always Render Fully">
label="Render Fully">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="2" />

View File

@ -197,7 +197,7 @@
</menu_item_check>
<menu_item_check
name="AlwaysRenderFully"
label="Always Render Fully">
label="Render Fully">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="2" />

View File

@ -28,6 +28,7 @@ $/LicenseInfo$
"""
import sys
import os.path
import shutil
import errno
import re
import tarfile
@ -1031,14 +1032,17 @@ class DarwinManifest(ViewerManifest):
# This code constructs a relative path from the
# target framework folder back to the location of the symlink.
# It needs to be relative so that the symlink still works when
# (as is normal) the user moves the app bunlde out of the DMG
# (as is normal) the user moves the app bundle out of the DMG
# and into the /Applications folder. Note we also call 'raise'
# to terminate the process if we get an error since without
# this symlink, Second Life web media can't possibly work.
# Real Framework folder:
# Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/
# Location of symlink and why it'ds relavie
# Location of symlink and why it'ds relative
# Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/
# Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative)
# <top level>.app/Contents/Frameworks/Chromium Embedded Framework.framework/
# <top level>.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework ->
frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework")
try:
symlinkf(frameworkpath, pluginframeworkpath)
@ -1048,10 +1052,6 @@ class DarwinManifest(ViewerManifest):
self.end_prefix("Contents")
# fix up media_plugin.dylib so it knows where to look for CEF files it needs
self.run_command('install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%(config)s/Firestorm.app/Contents/Resources/llplugin/media_plugin_cef.dylib"' %
{ 'config' : self.args['configuration'] })
# NOTE: the -S argument to strip causes it to keep enough info for
# annotated backtraces (i.e. function names in the crash log). 'strip' with no
# arguments yields a slightly smaller binary but makes crash logs mostly useless.
@ -1710,12 +1710,33 @@ def symlinkf(src, dst):
# file, but that strategy doesn't work so well if we don't have
# permissions to remove it. Check to see if it's already the
# symlink we want, which is the usual reason for EEXIST.
if not (os.path.islink(dst) and os.readlink(dst) == src):
# Here either dst isn't a symlink or it's the wrong symlink.
# Remove and recreate. Caller will just have to deal with any
# exceptions at this stage.
elif os.path.islink(dst):
if os.readlink(dst) == src:
# the requested link already exists
pass
else:
# dst is the wrong symlink; attempt to remove and recreate it
os.remove(dst)
os.symlink(src, dst)
elif os.path.isdir(dst):
print "Requested symlink (%s) exists but is a directory; replacing" % dst
shutil.rmtree(dst)
os.symlink(src, dst)
elif os.path.exists(dst):
print "Requested symlink (%s) exists but is a file; replacing" % dst
os.remove(dst)
os.symlink(src, dst)
else:
# see if the problem is that the parent directory does not exist
# and try to explain what is missing
(parent, tail) = os.path.split(dst)
while not os.path.exists(parent):
(parent, tail) = os.path.split(parent)
if tail:
raise Exception("Requested symlink (%s) cannot be created because %s does not exist"
% os.path.join(parent, tail))
else:
raise
if __name__ == "__main__":
main()