Save icon for the legacy launcher
This commit is contained in:
parent
5573ed52e8
commit
81259ce05e
@ -2,6 +2,7 @@
|
|||||||
#include "LegacyInstance_p.h"
|
#include "LegacyInstance_p.h"
|
||||||
#include "MinecraftProcess.h"
|
#include "MinecraftProcess.h"
|
||||||
#include "LegacyUpdate.h"
|
#include "LegacyUpdate.h"
|
||||||
|
#include "IconListModel.h"
|
||||||
#include <setting.h>
|
#include <setting.h>
|
||||||
#include <pathutils.h>
|
#include <pathutils.h>
|
||||||
#include <cmdutils.h>
|
#include <cmdutils.h>
|
||||||
@ -31,8 +32,10 @@ MinecraftProcess* LegacyInstance::prepareForLaunch(QString user, QString session
|
|||||||
{
|
{
|
||||||
MinecraftProcess * proc = new MinecraftProcess(this);
|
MinecraftProcess * proc = new MinecraftProcess(this);
|
||||||
|
|
||||||
// FIXME: extract the icon
|
IconList * list = IconList::instance();
|
||||||
// QImage(":/icons/instances/" + iconKey()).save(PathCombine(minecraftRoot(), "icon.png"));
|
QIcon icon = list->getIcon(iconKey());
|
||||||
|
auto pixmap = icon.pixmap(128,128);
|
||||||
|
pixmap.save(PathCombine(minecraftRoot(), "icon.png"),"PNG");
|
||||||
|
|
||||||
// extract the legacy launcher
|
// extract the legacy launcher
|
||||||
QFile(":/launcher/launcher.jar").copy(PathCombine(minecraftRoot(), LAUNCHER_FILE));
|
QFile(":/launcher/launcher.jar").copy(PathCombine(minecraftRoot(), LAUNCHER_FILE));
|
||||||
|
Loading…
Reference in New Issue
Block a user