automate keeping the About SL -> Licenses tab correct

master
Oz Linden 2014-11-21 18:09:12 -05:00
parent 6df6aef621
commit 680194deaf
7 changed files with 126 additions and 122 deletions

View File

@ -1084,7 +1084,7 @@
<key>havok-source</key>
<map>
<key>copyright</key>
<string>The Havok software (the "Software") and the accompanying documentation (the "Documentation") supplied (collectively, the "Product") are protected by United States, Irish and international copyright laws, and the copyrights and other intellectual property rights are owned by Telekinesys Research Limited (trading as Havok) Third Floor, 6 Suffolk Street, Dublin 2, Ireland.</string>
<string>Uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.</string>
<key>description</key>
<string>Havok source code for libs and demos</string>
<key>license</key>
@ -1100,9 +1100,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>04e7b4982cdd3b89c856978f81a8fdbf</string>
<string>5b7753a810a86f25df54ece3190b7d6e</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/havok-source_3p-update-havok-source/rev/295468/arch/Darwin/installer/havok_source-2012.1-darwin-295468.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/havok-source_3p-update-havok-source/rev/296959/arch/Darwin/installer/havok_source-2012.1-darwin-296959.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1112,9 +1112,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>0c0d2058ba48446e274d6595d1d8063e</string>
<string>6b0f41ddddfa60d8424d8a2e0bc2077d</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Linux/installer/havok_source-2012.1-linux-20121219.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/havok-source_3p-update-havok-source/rev/296959/arch/Linux/installer/havok_source-2012.1-linux-296959.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -2078,7 +2078,7 @@
<key>slvoice</key>
<map>
<key>copyright</key>
<string>2010 Vivox</string>
<string>2010 Vivox, including audio coding using Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)</string>
<key>description</key>
<string>Vivox SDK components</string>
<key>license</key>
@ -2094,9 +2094,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>9fd91e50ef6848ef5fe74455cc0042c9</string>
<string>ae89da43466a510fbb0a67eb27bb251f</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/slvoice_3p-update-slvoice/rev/294996/arch/Darwin/installer/slvoice-4.6.0009.20030.294996-darwin-294996.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/slvoice_3p-update-slvoice/rev/296971/arch/Darwin/installer/slvoice-4.6.0009.20030.296971-darwin-296971.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -2106,9 +2106,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>957773fff7148ffaca42b1ea4a18d192</string>
<string>c66d434b7df05351662c068d3a8d2183</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-slvoice/rev/270512/arch/Linux/installer/slvoice-4.5.0009.17865-linux-20130216.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/slvoice_3p-update-slvoice/rev/296971/arch/Linux/installer/slvoice-4.5.0006.17020.296971-linux-296971.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -2118,16 +2118,16 @@
<key>archive</key>
<map>
<key>hash</key>
<string>ce89b881ee24977641d1ecbf8aff6dc7</string>
<string>d0ad191e40b5c98748bdd973d6762ade</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-slvoice/rev/287264/arch/CYGWIN/installer/slvoice-4.6.0009.20030-windows-20140227.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/slvoice_3p-update-slvoice/rev/296971/arch/CYGWIN/installer/slvoice-4.6.0009.20030.296971-windows-296971.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
<string>4.6.0009.20030.294996</string>
<string>4.5.0006.17020.296971</string>
</map>
<key>tut</key>
<map>

View File

@ -0,0 +1,10 @@
# -*- cmake -*-
# Construct the version and copyright information based on package data.
include(Python)
add_custom_command(OUTPUT packages-info.txt
COMMENT Generating packages-info.txt for the about box
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt
)

View File

@ -5,6 +5,7 @@ project(viewer)
include(00-Common)
include(Boost)
include(BuildVersion)
include(BuildPackagesInfo)
include(DBusGlib)
include(DirectX)
include(OpenSSL)
@ -1583,6 +1584,7 @@ set(viewer_APPSETTINGS_FILES
app_settings/viewerart.xml
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
packages-info.txt
)
source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})

View File

@ -123,18 +123,17 @@ BOOL LLFloaterAbout::postBuild()
LLViewerTextEditor *support_widget =
getChild<LLViewerTextEditor>("support_editor", true);
LLViewerTextEditor *linden_names_widget =
getChild<LLViewerTextEditor>("linden_names", true);
LLViewerTextEditor *contrib_names_widget =
getChild<LLViewerTextEditor>("contrib_names", true);
LLViewerTextEditor *trans_names_widget =
getChild<LLViewerTextEditor>("trans_names", true);
LLViewerTextEditor *licenses_widget =
getChild<LLViewerTextEditor>("licenses_editor", true);
getChild<LLUICtrl>("copy_btn")->setCommitCallback(
boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this));
static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor");
if (gAgent.getRegion())
{
// start fetching server release notes URL
@ -153,24 +152,6 @@ BOOL LLFloaterAbout::postBuild()
support_widget->setEnabled(FALSE);
support_widget->startOfDoc();
// Get the names of Lindens, added by viewer_manifest.py at build time
std::string lindens_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"lindens.txt");
llifstream linden_file;
std::string lindens;
linden_file.open(lindens_path); /* Flawfinder: ignore */
if (linden_file.is_open())
{
std::getline(linden_file, lindens); // all names are on a single line
linden_file.close();
linden_names_widget->setText(lindens);
}
else
{
LL_INFOS("AboutInit") << "Could not read lindens file at " << lindens_path << LL_ENDL;
}
linden_names_widget->setEnabled(FALSE);
linden_names_widget->startOfDoc();
// Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time
std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt");
llifstream contrib_file;
@ -189,23 +170,28 @@ BOOL LLFloaterAbout::postBuild()
contrib_names_widget->setEnabled(FALSE);
contrib_names_widget->startOfDoc();
// Get the names of translators, extracted from .../doc/tranlations.txt by viewer_manifest.py at build time
std::string translators_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"translators.txt");
llifstream trans_file;
std::string translators;
trans_file.open(translators_path); /* Flawfinder: ignore */
if (trans_file.is_open())
// Get the Versions and Copyrights, created at build time
std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt");
llifstream licenses_file;
licenses_file.open(licenses_path); /* Flawfinder: ignore */
if (licenses_file.is_open())
{
std::getline(trans_file, translators); // all names are on a single line
trans_file.close();
std::string license_line;
licenses_widget->clear();
while ( std::getline(licenses_file, license_line) )
{
licenses_widget->appendText(license_line+"\n", FALSE,
LLStyle::Params() .color(about_color));
}
licenses_file.close();
}
else
{
LL_WARNS("AboutInit") << "Could not read translators file at " << translators_path << LL_ENDL;
// this case will use the (out of date) hard coded value from the XUI
LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL;
}
trans_names_widget->setText(translators);
trans_names_widget->setEnabled(FALSE);
trans_names_widget->startOfDoc();
licenses_widget->setEnabled(FALSE);
licenses_widget->startOfDoc();
return TRUE;
}

View File

@ -51,44 +51,20 @@
name="credits_panel">
<text
follows="top|left|right"
height="10"
height="20"
layout="topleft"
left="5"
name="linden_intro"
top="10"
width="435"
wrap="true">
Second Life is brought to you by the Lindens:
</text>
<text_editor
enabled="false"
follows="top|left"
height="98"
bg_readonly_color="Transparent"
left="5"
text_color="LtGray"
max_length="65536"
name="linden_names"
top_pad="10"
width="435"
word_wrap="true">
Philip, Andrew, Doug, Richard, Phoenix, Ian, Mark, Robin, Dan, Char, Ryan, Eric, Jim, Lee, Jeff, Michael, Kelly, Steve, Catherine, Bub, Ramzi, Jill, Jeska, Don, Kona, Callum, Charity, Jack, Shawn, babbage, James, Lauren, Blue, Brent, Reuben, Pathfinder, Jesse, Patsy, Torley, Bo, Cyn, Jonathan, Gia, Annette, Ginsu, Harry, Lex, Runitai, Guy, Cornelius, Beth, Swiss, Thumper, Wendy, Teeple, Seth, Dee, Mia, Sally, Liana, Aura, Beez, Milo, Red, Gulliver, Marius, Joe, Jose, Dore, Justin, Nora, Morpheus, Lexie, Amber, Chris, Xan, Leyla, Walker, Sabin, Joshua, Hiromi, Tofu, Fritz, June, Jean, Ivy, Dez, Ken, Betsy, Which, Spike, Rob, Zee, Dustin, George, Claudia, del, Matthew, jane, jay, Adrian, Yool, Rika, Yoz, siobhan, Qarl, Benjamin, Beast, Everett, madhavi, Christopher, Izzy, stephany, Jeremy, sean, adreanne, Pramod, Tobin, sejong, Iridium, maurice, kj, Meta, kari, JP, bert, kyle, Jon, Socrates, Bridie, Ivan, maria, Aric, Coco, Periapse, sandy, Storrs, Lotte, Colossus, Brad, Pastrami, Zen, BigPapi, Banzai, Sardonyx, Mani, Garry, Jaime, Neuro, Samuel, Niko, CeeLo, Austin, Soft, Poppy, emma, tessa, angelo, kurz, alexa, Sue, CG, Blake, Erica, Brett, Bevis, kristen, Q, simon, Enus, MJ, laurap, Kip, Scouse, Ron, Ram, kend, Marty, Prospero, melissa, kraft, Nat, Seraph, Hamilton, Lordan, Green, miz, Ashlei, Trinity, Ekim, Echo, Charlie, Rowan, Rome, Jt, Doris, benoc, Christy, Bao, Kate, Tj, Patch, Cheah, Johan, Brandy, Angela, Oreh, Cogsworth, Lan, Mitchell, Space, Bambers, Einstein, Bender, Malbers, Matias, Maggie, Rothman, Milton, Niall, Marin, Allison, Mango, Andrea, Katt, Yi, Ambroff, Rico, Raymond, Gail, Christa, William, Dawn, Usi, Dynamike, M, Corr, Dante, Molly, kaylee, Danica, Kelv, Lil, jacob, Nya, Rodney, elsie, Blondin, Grant, Nyx, Devin, Monty, Minerva, Keira, Katie, Jenn, Makai, Clare, Joy, Cody, Gayathri, FJ, spider, Oskar, Landon, Jarv, Noelle, Al, Doc, Gray, Vir, t, Maestro, Simone, Shannon, yang, Courtney, Scott, charlene, Quixote, Susan, Zed, Amanda, Katelin, Esbee, JoRoan, Enkidu, roxie, Scarlet, Merov, Kevin, Judy, Rand, Newell, Les, Dessie, Galen, Michon, Geo, Siz, Calyle, Pete, Praveen, Callen, Sheldon, Pink, Nelson, jenelle, Terrence, Nathan, Juan, Sascha, Huseby, Karina, Kaye, Kotler, Lis, Darv, Charrell, Dakota, Kimmora, Theeba, Taka, Mae, Perry, Ducot, dana, Esther, Dough, gisele, Doten, Viale, Fisher, jessieann, ashley, Torres, delby, rountree, kurt, Slaton, Madison, Rue, Gino, Wen, Casssandra, Brodesky, Squid, Gez, Rakesh, Gecko, Ladan, Tony, Tatem, Squire, Falcon, BK, Crimp, Tiggs, Bacon, Coyot, Carmilla, Webb, Sea, Arch, Jillian, Jason, Bernard, Vogt, Peggy, dragon, Pup, xandix, Wallace, Bewest, Inoshiro, Rhett, AG, Aimee, Ghengis, Itiaes, Eli, Steffan, Epic, Grapes, Stone, Prep, Scobu, Robert, Alain, Carla, Vicky, Tia, Alec, Taras, Lisa, Oz, Ariane, Log, House, Kazu, Kim, Drofnas, Tyler, Campbell, Michele, Madeline, Nelly, Baron, Thor, Lori, Hele, Fredrik, Teddy, Pixie, Berry, Gabrielle, Alfonso, Brooke, Wolf, Ringo, Cru, Charlar, Rodvik, Gibson, Elise, Bagman, Greger, Leonidas, Jerm, Leslie, CB, Brenda, Durian, Carlo, mm, Zeeshan, Caleb, Max, Elikak, Mercille, Steph, Chase, Baker
</text_editor>
<text
follows="top|left"
height="10"
layout="topleft"
left="5"
name="contrib_intro"
top_pad="10"
width="435"
wrap="true">
Second Life is brought to you by the Lindens,
with open source contributions from:
</text>
<text_editor
enabled="false"
follows="top|left"
height="98"
height="340"
bg_readonly_color="Transparent"
left="5"
text_color="LtGray"
@ -97,31 +73,6 @@ with open source contributions from:
top_pad="10"
width="435"
word_wrap="true">
Dummy Name replaced at run time
</text_editor>
<text
follows="top|left"
height="10"
layout="topleft"
left="5"
name="trans_intro"
top_pad="10"
width="435"
wrap="true">
and translations from:
</text>
<text_editor
enabled="false"
follows="top|left"
height="98"
bg_readonly_color="Transparent"
left="5"
text_color="LtGray"
max_length="65536"
name="trans_names"
top_pad="10"
width="435"
word_wrap="true">
Dummy Name replaced at run time
</text_editor>
</panel>
@ -138,7 +89,7 @@ Dummy Name replaced at run time
left="5"
text_color="LtGray"
max_length="65536"
name="credits_editor"
name="licenses_editor"
top="5"
width="435"
word_wrap="true">

View File

@ -55,7 +55,6 @@ class ViewerManifest(LLManifest):
def construct(self):
super(ViewerManifest, self).construct()
self.exclude("*.svn*")
self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
@ -74,26 +73,6 @@ class ViewerManifest(LLManifest):
contributions_path = "../../doc/contributions.txt"
contributor_names = self.extract_names(contributions_path)
self.put_in_file(contributor_names, "contributors.txt", src=contributions_path)
# include the extracted list of translators
translations_path = "../../doc/translations.txt"
translator_names = self.extract_names(translations_path)
self.put_in_file(translator_names, "translators.txt", src=translations_path)
# include the list of Lindens (if any)
# see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
linden_names_path = os.getenv("LINDEN_CREDITS")
if not linden_names_path :
print "No 'LINDEN_CREDITS' specified in environment, using built-in list"
else:
try:
linden_file = open(linden_names_path,'r')
except IOError:
print "No Linden names found at '%s', using built-in list" % linden_names_path
else:
# all names should be one line, but the join below also converts to a string
linden_names = ', '.join(linden_file.readlines())
self.put_in_file(linden_names, "lindens.txt", src=linden_names_path)
linden_file.close()
print "Linden names extracted from '%s'" % linden_names_path
# ... and the entire windlight directory
self.path("windlight")
@ -107,6 +86,9 @@ class ViewerManifest(LLManifest):
self.path("dictionaries")
self.end_prefix(pkgdir)
# include the extracted packages information (see BuildPackagesInfo.cmake)
self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt")
# CHOP-955: If we have "sourceid" or "viewer_channel" in the
# build process environment, generate it into
# settings_install.xml.

73
scripts/packages-formatter.py Executable file
View File

@ -0,0 +1,73 @@
#!/usr/bin/env python
"""\
This module formats the package version and copyright information for the
viewer and its dependent packages.
$LicenseInfo:firstyear=2014&license=viewerlgpl$
Second Life Viewer Source Code
Copyright (C) 2014, 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 os
import sys
import re
import subprocess
autobuild=os.getenv('AUTOBUILD',
'autobuild' if not ( sys.platform == 'win32' or sys.platform == 'cygwin')
else 'autobuild.cmd')
pkg_line=re.compile('^([\w-]+):\s+(.*)$')
version={}
versions=subprocess.Popen([autobuild, 'install', '--versions'],
stdin=None, stdout=subprocess.PIPE, universal_newlines=True).stdout
for line in versions:
pkg_info = pkg_line.match(line)
if pkg_info:
pkg = pkg_info.group(1)
if pkg not in version:
version[pkg] = pkg_info.group(2).strip()
else:
sys.exit("Duplicate version for %s" % pkg)
else:
sys.exit("Unrecognized --versions output: %s" % line)
copyright={}
copyrights=subprocess.Popen([autobuild, 'install', '--copyrights'],
stdin=None, stdout=subprocess.PIPE, universal_newlines=True).stdout
viewer_copyright = copyrights.readline() # first line is the copyright for the viewer itself
for line in copyrights:
pkg_info = pkg_line.match(line)
if pkg_info:
pkg = pkg_info.group(1)
if pkg not in copyright:
copyright[pkg] = pkg_info.group(2).strip()
else:
sys.exit("Duplicate copyright for %s" % pkg)
else:
sys.exit("Unrecognized --copyrights output: %s" % line)
print viewer_copyright
for pkg in sorted(version):
print ': '.join([pkg, version[pkg]])
if pkg in copyright:
print copyright[pkg]
else:
sys.exit("No copyright for %s" % pkg)