diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llcurrencyuimanager.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 13 | ||||
-rw-r--r-- | indra/newview/lltranslate.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llversioninfo.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llversioninfo.h | 2 | ||||
-rw-r--r-- | indra/newview/llxmlrpctransaction.cpp | 15 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 50 |
8 files changed, 68 insertions, 58 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dec849afa1..5763ebe721 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3209,8 +3209,10 @@ LLSD LLAppViewer::getViewerInfo() const // LLFloaterAbout. LLSD info; auto& versionInfo(LLVersionInfo::instance()); + // With GitHub builds, the build number is too big to fit in a 32-bit int, + // and LLSD doesn't deal with integers wider than int. Use string. info["VIEWER_VERSION"] = llsd::array(versionInfo.getMajor(), versionInfo.getMinor(), - versionInfo.getPatch(), versionInfo.getBuild()); + versionInfo.getPatch(), stringize(versionInfo.getBuild())); info["VIEWER_VERSION_STR"] = versionInfo.getVersion(); info["CHANNEL"] = versionInfo.getChannel(); info["ADDRESS_SIZE"] = ADDRESS_SIZE; diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index 232e461fd0..4c0a5cf183 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -45,6 +45,7 @@ #include "llxmlrpctransaction.h" #include "llviewernetwork.h" #include "llpanel.h" +#include "stringize.h" const F64 CURRENCY_ESTIMATE_FREQUENCY = 2.0; @@ -158,7 +159,7 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo() mLocalCurrencyEstimated = true; return; } - + LLXMLRPCValue keywordArgs = LLXMLRPCValue::createStruct(); keywordArgs.appendString("agentId", gAgent.getID().asString()); keywordArgs.appendString( @@ -170,8 +171,10 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo() keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::instance().getMajor()); keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::instance().getMinor()); keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::instance().getPatch()); - keywordArgs.appendInt("viewerBuildVersion", LLVersionInfo::instance().getBuild()); - + // With GitHub builds, the build number is too big to fit in a 32-bit int, + // and XMLRPC_VALUE doesn't deal with integers wider than int. Use string. + keywordArgs.appendString("viewerBuildVersion", stringize(LLVersionInfo::instance().getBuild())); + LLXMLRPCValue params = LLXMLRPCValue::createArray(); params.append(keywordArgs); @@ -245,7 +248,9 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password) keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::instance().getMajor()); keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::instance().getMinor()); keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::instance().getPatch()); - keywordArgs.appendInt("viewerBuildVersion", LLVersionInfo::instance().getBuild()); + // With GitHub builds, the build number is too big to fit in a 32-bit int, + // and XMLRPC_VALUE doesn't deal with integers wider than int. Use string. + keywordArgs.appendString("viewerBuildVersion", stringize(LLVersionInfo::instance().getBuild())); LLXMLRPCValue params = LLXMLRPCValue::createArray(); params.append(keywordArgs); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ea936ab024..025a653c47 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -65,6 +65,7 @@ #include "lltrans.h" #include "llglheaders.h" #include "llpanelloginlistener.h" +#include "stringize.h" #if LL_WINDOWS #pragma warning(disable: 4355) // 'this' used in initializer list @@ -300,10 +301,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, setDefaultBtn(def_btn); std::string channel = LLVersionInfo::instance().getChannel(); - std::string version = llformat("%s (%ld)", - LLVersionInfo::instance().getShortVersion().c_str(), - LLVersionInfo::instance().getBuild()); - + std::string version = stringize(LLVersionInfo::instance().getShortVersion(), " (", + LLVersionInfo::instance().getBuild(), ')'); + LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); @@ -894,9 +894,8 @@ void LLPanelLogin::loadLoginPage() } // Channel and Version - params["version"] = llformat("%s (%ld)", - LLVersionInfo::instance().getShortVersion().c_str(), - LLVersionInfo::instance().getBuild()); + params["version"] = stringize(LLVersionInfo::instance().getShortVersion(), " (", + LLVersionInfo::instance().getBuild(), ')'); params["channel"] = LLVersionInfo::instance().getChannel(); // Grid diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 1e21c3fa05..6526e1df92 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -39,6 +39,7 @@ #include "json/reader.h" #include "llcorehttputil.h" #include "llurlregistry.h" +#include "stringize.h" static const std::string AZURE_NOTRANSLATE_OPENING_TAG("<div translate=\"no\">"); @@ -160,12 +161,12 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - std::string user_agent = llformat("%s %d.%d.%d (%ld)", - LLVersionInfo::instance().getChannel().c_str(), - LLVersionInfo::instance().getMajor(), - LLVersionInfo::instance().getMinor(), - LLVersionInfo::instance().getPatch(), - LLVersionInfo::instance().getBuild()); + std::string user_agent = stringize( + LLVersionInfo::instance().getChannel(), ' ', + LLVersionInfo::instance().getMajor(), '.', + LLVersionInfo::instance().getMinor(), '.', + LLVersionInfo::instance().getPatch(), " (", + LLVersionInfo::instance().getBuild(), ')'); initHttpHeader(httpHeaders, user_agent, key); @@ -215,12 +216,12 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - std::string user_agent = llformat("%s %d.%d.%d (%ld)", - LLVersionInfo::instance().getChannel().c_str(), - LLVersionInfo::instance().getMajor(), - LLVersionInfo::instance().getMinor(), - LLVersionInfo::instance().getPatch(), - LLVersionInfo::instance().getBuild()); + std::string user_agent = stringize( + LLVersionInfo::instance().getChannel(), ' ', + LLVersionInfo::instance().getMajor(), '.', + LLVersionInfo::instance().getMinor(), '.', + LLVersionInfo::instance().getPatch(), " (", + LLVersionInfo::instance().getBuild(), ')'); initHttpHeader(httpHeaders, user_agent); httpOpts->setSSLVerifyPeer(false); diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 62bfa24e29..9551df7bee 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -69,7 +69,7 @@ void LLVersionInfo::initSingleton() // fully constructed; such calls don't really belong in the constructor. // cache the version string - version = STRINGIZE(getShortVersion() << "." << getBuild()); + version = stringize(getShortVersion(), ".", getBuild()); } LLVersionInfo::~LLVersionInfo() @@ -91,7 +91,7 @@ S32 LLVersionInfo::getPatch() return LL_VIEWER_VERSION_PATCH; } -S64 LLVersionInfo::getBuild() +U64 LLVersionInfo::getBuild() { return LL_VIEWER_VERSION_BUILD; } diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index 122bd5c47a..a40042380a 100644 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -61,7 +61,7 @@ public: S32 getPatch(); /// return the build number as an integer - S64 getBuild(); + U64 getBuild(); /// return the full viewer version as a string like "2.0.0.200030" std::string getVersion(); diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index b851b7ad5c..8ea07fcee0 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -42,6 +42,7 @@ #include "bufferarray.h" #include "llversioninfo.h" #include "llviewercontrol.h" +#include "stringize.h" // Have to include these last to avoid queue redefinition! @@ -384,14 +385,14 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); - std::string user_agent = llformat("%s %d.%d.%d (%ld)", - LLVersionInfo::instance().getChannel().c_str(), - LLVersionInfo::instance().getMajor(), - LLVersionInfo::instance().getMinor(), - LLVersionInfo::instance().getPatch(), - LLVersionInfo::instance().getBuild()); + std::string user_agent = stringize( + LLVersionInfo::instance().getChannel(), ' ', + LLVersionInfo::instance().getMajor(), '.', + LLVersionInfo::instance().getMinor(), '.', + LLVersionInfo::instance().getPatch(), " (", + LLVersionInfo::instance().getBuild(), ')'); - httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); + httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); ///* Setting the DNS cache timeout to -1 disables it completely. //This might help with bug #503 */ diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 33b2e4affc..1fa4df1682 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -837,30 +837,7 @@ class Darwin_x86_64_Manifest(ViewerManifest): def construct(self): # copy over the build result (this is a no-op if run within the xcode # script) - appname = self.channel() + ".app" - self.path(os.path.join(self.args['configuration'], appname), dst="") - RUNNER_TEMP = os.getenv('RUNNER_TEMP') - # When running as a GitHub Action job, RUNNER_TEMP is the recommended - # temp directory. If we're not running on GitHub, don't create this - # temp directory or this tarball: we don't clean them up, trusting - # that the runner is itself transient. On a dev machine, that would - # result in temp-directory clutter. - if RUNNER_TEMP: - # Per GitHub's actions/upload-artifact documentation - # https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files - # we must package the app bundle with tar before posting as an - # artifact. Posting individual files follows symlinks, which - # causes problems, especially with frameworks: a framework's top - # level must contain symlinks into its Versions/Current, which - # must itself be a symlink to some specific Versions subdir. - tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.bz2") - print(f'Creating {tarpath} from {self.get_dst_prefix()}') - with tarfile.open(tarpath, mode="w:bz2") as tarball: - # store in the tarball as just 'Second Life Mumble.app' - # instead of 'Users/someone/.../newview/Release/Second...' - tarball.add(self.get_dst_prefix(), - arcname=os.path.basename(self.get_dst_prefix())) - self.set_github_output_path('viewer_app', tarpath) + self.path(os.path.join(self.args['configuration'], self.channel() + ".app"), dst="") pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") @@ -1188,6 +1165,31 @@ class Darwin_x86_64_Manifest(ViewerManifest): finalname = imagename + ".dmg" self.package_file = finalname + RUNNER_TEMP = os.getenv('RUNNER_TEMP') + # When running as a GitHub Action job, RUNNER_TEMP is the recommended + # temp directory. If we're not running on GitHub, don't create this + # temp directory or this tarball: we don't clean them up, trusting + # that the runner is itself transient. On a dev machine, that would + # result in temp-directory clutter. + if RUNNER_TEMP: + # Per GitHub's actions/upload-artifact documentation + # https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files + # we must package the app bundle with tar before posting as an + # artifact. Posting individual files follows symlinks, which + # causes problems, especially with frameworks: a framework's top + # level must contain symlinks into its Versions/Current, which + # must itself be a symlink to some specific Versions subdir. + tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.bz2") + print(f'Creating {tarpath} from {self.get_dst_prefix()}') + with tarfile.open(tarpath, mode="w:bz2") as tarball: + # Store in the tarball as just 'Second Life Mumble.app' + # instead of 'Users/someone/.../newview/Release/Second...' + # It's at this point that we rename 'Second Life Release.app' + # to 'Second Life Viewer.app'. + tarball.add(self.get_dst_prefix(), + arcname=self.app_name() + ".app") + self.set_github_output_path('viewer_app', tarpath) + class LinuxManifest(ViewerManifest): build_data_json_platform = 'lnx' |