Move credits to a HTML resource (#4255)
This commit is contained in:
41
launcher/resources/documents/credits.html
Normal file
41
launcher/resources/documents/credits.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<center>
|
||||
<h3>%1</h3> <!-- Prism Launcher Developers -->
|
||||
<p>Sefa Eyeoglu (Scrumplex) <<a href="https://scrumplex.net">Website</a>></p>
|
||||
<p>d-513 <<a href="https://github.com/d-513">GitHub</a>></p>
|
||||
<p>txtsd <<a href="https://ihavea.quest">Website</a>></p>
|
||||
<p>timoreo <<a href="https://github.com/timoreo22">GitHub</a>></p>
|
||||
<p>ZekeZ <<a href="https://github.com/ZekeZDev">GitHub</a>></p>
|
||||
<p>cozyGalvinism <<a href="https://github.com/cozyGalvinism">GitHub</a>></p>
|
||||
<p>DioEgizio <<a href="https://github.com/DioEgizio">GitHub</a>></p>
|
||||
<p>flowln <<a href="https://github.com/flowln">GitHub</a>></p>
|
||||
<p>ViRb3 <<a href="https://github.com/ViRb3">GitHub</a>></p>
|
||||
<p>Rachel Powers (Ryex) <<a href="https://github.com/Ryex">GitHub</a>></p>
|
||||
<p>TayouVR <<a href="https://github.com/TayouVR">GitHub</a>></p>
|
||||
<p>TheKodeToad <<a href="https://github.com/TheKodeToad">GitHub</a>></p>
|
||||
<p>getchoo <<a href="https://github.com/getchoo">GitHub</a>></p>
|
||||
<p>Alexandru Tripon (Trial97) <<a href="https://github.com/Trial97">GitHub</a>></p>
|
||||
<br />
|
||||
<h3>%2</h3> <!-- MultiMC Developers-->
|
||||
<p>Andrew Okin <<a href="mailto:forkk@forkk.net">forkk@forkk.net</a>></p>
|
||||
<p>Petr Mrázek <<a href="mailto:peterix@gmail.com">peterix@gmail.com</a>></p>
|
||||
<p>Sky Welch <<a href="mailto:multimc@bunnies.io">multimc@bunnies.io</a>></p>
|
||||
<p>Jan (02JanDal) <<a href="mailto:02jandal@gmail.com">02jandal@gmail.com</a>></p>
|
||||
<p>RoboSky <<a href="https://twitter.com/RoboSky_">@RoboSky_</a>></p>
|
||||
<br />
|
||||
<h3>%3</h3> <!-- With special thanks to -->
|
||||
<p>Boba <<a href="https://bobaonline.neocities.org/">Website</a>></p>
|
||||
<p>AutiOne <<a href="https://auti.one/">Website</a>></p>
|
||||
<p>Fulmine <<a href="https://fulmine.xyz/">Website</a>></p>
|
||||
<p>ely <<a href="https://github.com/elyrodso">GitHub</a>></p>
|
||||
<p>gon sawa <<a href="https://github.com/gonsawa">GitHub</a>></p>
|
||||
<p>Pankakes</p>
|
||||
<p>tobimori <<a href="https://github.com/tobimori">GitHub</a>></p>
|
||||
<p>Orochimarufan <<a href="mailto:orochimarufan.x3@gmail.com">orochimarufan.x3@gmail.com</a>></p>
|
||||
<p>TakSuyu <<a href="mailto:taksuyu@gmail.com">taksuyu@gmail.com</a>></p>
|
||||
<p>Kilobyte <<a href="mailto:stiepen22@gmx.de">stiepen22@gmx.de</a>></p>
|
||||
<p>Rootbear75 <<a href="https://twitter.com/rootbear75">@rootbear75</a>></p>
|
||||
<p>Zeker Zhayard <<a href="https://twitter.com/zeker_zhayard">@Zeker_Zhayard</a>></p>
|
||||
<p>Everyone who helped establish our branding!</p>
|
||||
<p>And everyone else who <a href="https://github.com/PrismLauncher/PrismLauncher/graphs/contributors">contributed</a>!</p>
|
||||
<br />
|
||||
</center>
|
||||
@@ -2,6 +2,7 @@
|
||||
<RCC version="1.0">
|
||||
<qresource prefix="/documents">
|
||||
<file>../../../COPYING.md</file>
|
||||
<file>credits.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
||||
@@ -45,80 +45,15 @@
|
||||
#include <qobject.h>
|
||||
|
||||
namespace {
|
||||
QString getLink(QString link, QString name)
|
||||
{
|
||||
return QString("<<a href='%1'>%2</a>>").arg(link).arg(name);
|
||||
}
|
||||
|
||||
QString getWebsite(QString link)
|
||||
{
|
||||
return getLink(link, QObject::tr("Website"));
|
||||
}
|
||||
|
||||
QString getGitHub(QString username)
|
||||
{
|
||||
return getLink("https://github.com/" + username, "GitHub");
|
||||
}
|
||||
|
||||
// Credits
|
||||
// This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument...
|
||||
QString getCreditsHtml()
|
||||
{
|
||||
QString output;
|
||||
QTextStream stream(&output);
|
||||
#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
|
||||
stream.setCodec(QTextCodec::codecForName("UTF-8"));
|
||||
#endif
|
||||
stream << "<center>\n";
|
||||
QFile dataFile(":/documents/credits.html");
|
||||
dataFile.open(QIODevice::ReadOnly);
|
||||
|
||||
//: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Developers"
|
||||
stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n";
|
||||
stream << QString("<p>Sefa Eyeoglu (Scrumplex) %1</p>\n").arg(getWebsite("https://scrumplex.net"));
|
||||
stream << QString("<p>d-513 %1</p>\n").arg(getGitHub("d-513"));
|
||||
stream << QString("<p>txtsd %1</p>\n").arg(getWebsite("https://ihavea.quest"));
|
||||
stream << QString("<p>timoreo %1</p>\n").arg(getGitHub("timoreo22"));
|
||||
stream << QString("<p>ZekeZ %1</p>\n").arg(getGitHub("ZekeZDev"));
|
||||
stream << QString("<p>cozyGalvinism %1</p>\n").arg(getGitHub("cozyGalvinism"));
|
||||
stream << QString("<p>DioEgizio %1</p>\n").arg(getGitHub("DioEgizio"));
|
||||
stream << QString("<p>flowln %1</p>\n").arg(getGitHub("flowln"));
|
||||
stream << QString("<p>ViRb3 %1</p>\n").arg(getGitHub("ViRb3"));
|
||||
stream << QString("<p>Rachel Powers (Ryex) %1</p>\n").arg(getGitHub("Ryex"));
|
||||
stream << QString("<p>TayouVR %1</p>\n").arg(getGitHub("TayouVR"));
|
||||
stream << QString("<p>TheKodeToad %1</p>\n").arg(getGitHub("TheKodeToad"));
|
||||
stream << QString("<p>getchoo %1</p>\n").arg(getGitHub("getchoo"));
|
||||
stream << QString("<p>Alexandru Tripon (Trial97) %1</p>\n").arg(getGitHub("Trial97"));
|
||||
stream << "<br />\n";
|
||||
QString fileContent = QString::fromUtf8(dataFile.readAll());
|
||||
|
||||
// TODO: possibly retrieve from git history at build time?
|
||||
//: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Developers"
|
||||
stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg("MultiMC") << "</h3>\n";
|
||||
stream << "<p>Andrew Okin <<a href='mailto:forkk@forkk.net'>forkk@forkk.net</a>></p>\n";
|
||||
stream << QString("<p>Petr Mrázek <<a href='mailto:peterix@gmail.com'>peterix@gmail.com</a>></p>\n");
|
||||
stream << "<p>Sky Welch <<a href='mailto:multimc@bunnies.io'>multimc@bunnies.io</a>></p>\n";
|
||||
stream << "<p>Jan (02JanDal) <<a href='mailto:02jandal@gmail.com'>02jandal@gmail.com</a>></p>\n";
|
||||
stream << "<p>RoboSky <<a href='https://twitter.com/RoboSky_'>@RoboSky_</a>></p>\n";
|
||||
stream << "<br />\n";
|
||||
|
||||
stream << "<h3>" << QObject::tr("With thanks to", "About Credits") << "</h3>\n";
|
||||
stream << QString("<p>Boba %1</p>\n").arg(getWebsite("https://bobaonline.neocities.org/"));
|
||||
stream << QString("<p>AutiOne %1</p>\n").arg(getWebsite("https://auti.one/"));
|
||||
stream << QString("<p>Fulmine %1</p>\n").arg(getWebsite("https://fulmine.xyz/"));
|
||||
stream << QString("<p>ely %1</p>\n").arg(getGitHub("elyrodso"));
|
||||
stream << QString("<p>gon sawa %1</p>\n").arg(getGitHub("gonsawa"));
|
||||
stream << QString("<p>Pankakes</p>\n");
|
||||
stream << QString("<p>tobimori %1</p>\n").arg(getGitHub("tobimori"));
|
||||
stream << "<p>Orochimarufan <<a href='mailto:orochimarufan.x3@gmail.com'>orochimarufan.x3@gmail.com</a>></p>\n";
|
||||
stream << "<p>TakSuyu <<a href='mailto:taksuyu@gmail.com'>taksuyu@gmail.com</a>></p>\n";
|
||||
stream << "<p>Kilobyte <<a href='mailto:stiepen22@gmx.de'>stiepen22@gmx.de</a>></p>\n";
|
||||
stream << "<p>Rootbear75 <<a href='https://twitter.com/rootbear75'>@rootbear75</a>></p>\n";
|
||||
stream << "<p>Zeker Zhayard <<a href='https://twitter.com/zeker_zhayard'>@Zeker_Zhayard</a>></p>\n";
|
||||
stream << "<p>Everyone who helped establish our branding!</p>\n";
|
||||
stream
|
||||
<< "<p>And everyone else who <a href='https://github.com/PrismLauncher/PrismLauncher/graphs/contributors'>contributed</a>!</p>\n";
|
||||
stream << "<br />\n";
|
||||
|
||||
stream << "</center>\n";
|
||||
return output;
|
||||
return fileContent.arg(QObject::tr("%1 Developers").arg(BuildConfig.LAUNCHER_DISPLAYNAME), QObject::tr("MultiMC Developers"),
|
||||
QObject::tr("With special thanks to"));
|
||||
}
|
||||
|
||||
QString getLicenseHtml()
|
||||
|
||||
Reference in New Issue
Block a user