// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 #include "stdafx.h" #include "attributions.hpp" #include "FrostStaticInterface.hpp" #include #include #include #include #include #include std::wstring get_attributions() { const boost::filesystem::path homePath = frantic::strings::to_wstring( GetFrostInterface()->GetFrostHome() ); const boost::filesystem::path attributionPath = homePath / L"Legal/third_party_licenses.txt"; std::wifstream wideIn( attributionPath.wstring() ); if( wideIn.fail() ) { return L"Could not load attributions."; } wideIn.imbue( std::locale( std::locale::empty(), new std::codecvt_utf8 ) ); std::wstringstream wideStream; wideStream << wideIn.rdbuf(); return wideStream.str(); }