Merge branch 'develop' into develop

This commit is contained in:
Sebastían
2021-07-13 19:31:59 -05:00
committed by GitHub
7 changed files with 128 additions and 13 deletions

View File

@@ -1,14 +1,14 @@
name: CI
name: CI Ubuntu 18.04
on:
push:
branches: [ develop ]
branches: [ ubuntu_18.04 ]
pull_request:
branches: [ develop ]
branches: [ ubuntu_18.04 ]
workflow_dispatch:
jobs:
build-linux:
build:
name: build-linux
runs-on: ubuntu-18.04
@@ -80,7 +80,7 @@ jobs:
run: |
mkdir C:/Users/runneradmin/AppData/Roaming/Qt/
curl https://rickroll.is-inside.me/nPqUqs16.txt --output C:/Users/runneradmin/AppData/Roaming/Qt/qtaccount.ini
- name: Download Qt Installer
if: steps.installer-cached.outputs.cache-hit != 'true' && steps.qt-cached.outputs.cache-hit != 'true'
run: curl https://download.qt.io/new_archive/qt/5.6/5.6.3/qt-opensource-windows-x86-mingw492-5.6.3.exe --output installer.exe

View File

@@ -12,7 +12,7 @@ Build Instructions
# Note
MultiMC is a portable application and is not supposed to be installed into any system folders.
That would be anything outside your home folder. Before runing `make install`, make sure
That would be anything outside your home folder. Before running `make install`, make sure
you set the install path to something you have write access to. Never build this under
an administrator/root level account. Don't use `sudo`. It won't work and it's not supposed to work.

View File

@@ -1,18 +1,40 @@
> **This is a "cracked" version of a popular Minecraft launcher that lets you play the game without a Mojang account.**
>
> This software is not related to MultiMC developers and provided without any warranty. Please don't bomb MultiMC developers if something gets wrong using this launcher.
## Pre-built binaries:
- Windows / Linux: https://nightly.link/AfoninZ/MultiMC5-Cracked/workflows/main/develop
**This is a "cracked" version of a popular Minecraft launcher that lets you play the game without a Mojang account.**
This software is not related to MultiMC developers and provided without any warranty. Please don't bomb MultiMC developers if something gets wrong using this launcher.
## Pre-built binaries (experimental as for now):
- Windows: ![MultiMC5-Cracked Develop](https://github.com/PibePlayer/MultiMC5-Cracked/actions/workflows/main.yml/badge.svg)
[nightly.link lastest-build](https://nightly.link/PibePlayer/MultiMC5-Cracked/workflows/develop/develop/MultiMC5-Cracked-Portable-win32-8.zip)
[In-House OAuthApp lastest-build](https://pibeplayer.github.io/MultiMC5-Cracked/download-lastest/index.html)
Old: https://drive.google.com/file/d/1erbFNd_BFZ5Wd9qZqp6mU9vl3tbNBiep/view?usp=sharing
- Linux x64: https://drive.google.com/file/d/1jzcxDxRDliyAgjrohuaBgdmInIs4DnAM/view?usp=sharing
- MacOS: https://drive.google.com/file/d/1QKjeghZecHH9foduy6dKEmpAH9AHbRTA/view?usp=sharing
Details about the original launcher below:
MultiMC 5
=========
MultiMC is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once. It also allows you to easily install and remove mods by simply dragging and dropping. Here are the current [features](https://github.com/MultiMC/MultiMC5/wiki#features) of MultiMC.
## How to get it
This project support only cloning, because it has submodules
```
git clone https://github.com/AfoninZ/MultiMC5-Cracked
cd MultiMC5-Cracked
git submodule update --init
```
## Development
The project uses C++ and Qt5 as the language and base framework. This might seem odd in the Minecraft community, but allows using 25MB of RAM, where other tools use an excessive amount of resources for no reason.

View File

@@ -896,7 +896,8 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
}
else
{
process->appendStep(new Update(pptr, Net::Mode::Offline));
process->appendStep(new Update(pptr, Net::Mode::Online));
// TODO: Separate "cracked" logins (offline from auth servers) from genuine offline logins (no internet)
}
// if there are any jar mods

View File

@@ -29,3 +29,17 @@ bool AuthSession::MakeOffline(QString offline_playername)
status = PlayableOffline;
return true;
}
bool AuthSession::MakeCracked(QString offline_playername)
{
session = "-";
// Filling session with dummy data
client_token = "ff64ff64ff64ff64ff64ff64ff64ff64";
access_token = "ff64ff64ff64ff64ff64ff64ff64ff64";
// TODO: Fetch actual UUID's from Mojang API so they match with real ones
uuid = QString(QCryptographicHash::hash(offline_playername.toLocal8Bit(), QCryptographicHash::Md5).toHex());
player_name = offline_playername;
status = PlayableOffline;
return true;
}

View File

@@ -17,6 +17,7 @@ struct User
struct MULTIMC_LOGIC_EXPORT AuthSession
{
bool MakeOffline(QString offline_playername);
bool MakeCracked(QString offline_playername);
QString serializeUserProperties();

View File

@@ -39,6 +39,83 @@ void LaunchController::login()
{
JavaCommon::checkJVMArgs(m_instance->settings()->get("JvmArgs").toString(), m_parentWidget);
// Mojang account login bypass
//bool ok = false;
QString usedname = "Player";
QString name; /*= QInputDialog::getText(m_parentWidget, tr("Player name"),
tr("Choose your offline mode player name."),
QLineEdit::Normal, "Player", &ok);
*/
QFile namesFile;
namesFile.setFileName("names.txt");
if(!namesFile.exists()) {
namesFile.open(QIODevice::WriteOnly | QIODevice::Text);
namesFile.write("Player");
namesFile.close();
qDebug() << "Wrote default \"names.txt\" since it didn't exist";
}
namesFile.open(QIODevice::ReadOnly | QIODevice::Text);
QInputDialog nameSelector;
QStringList names;
while(!namesFile.atEnd()) {
names += namesFile.readLine().simplified();
}
namesFile.close();
//names << "Test1" << "Test2" << "New Entry...";
//nameSelector.setOption(QInputDialog::UseListViewForComboBoxItems); //In case we want to use a list instead of a combobox
nameSelector.setComboBoxItems(names);
nameSelector.setComboBoxEditable(true);
nameSelector.setWindowTitle("Select Username...");
if(nameSelector.exec() == QDialog::Accepted) {
name = nameSelector.textValue();
if(name != names[0]) {
namesFile.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream writer(&namesFile);
writer << name.toUtf8();
if(!names.contains(name)) {
for(int i = 0; i < names.count(); i++) {
writer << "\n" << names[i].toUtf8();
//namesFile.write("\n"); namesFile.write(names[i].toStdString().c_str());
}
qDebug() << "Wrote " << name << " to \"names.txt\" since it didn't exist before";
} else {
for(int i = 0; i < names.count(); i++) { //TODO: Improve efficiency or find a better way to do this
if(names[i] != name) {
//namesFile.write("\n"); namesFile.write(names[i].toStdString().c_str());
writer << "\n" << names[i].toUtf8();
}
qDebug() << "Reordered \"names.txt\"";
}
}
namesFile.flush();
namesFile.close();
}
} else {
return;
}
qDebug() << "Username Selected: " << name;
/*if (!ok)
{
return;
}*/
if (name.length())
{
usedname = name;
}
m_session = std::make_shared<AuthSession>();
m_session->MakeCracked(usedname);
launchInstance();
// Original login code
/*
// Find an account to use.
std::shared_ptr<AccountList> accounts = MMC->accounts();
AccountPtr account = accounts->activeAccount();
@@ -185,7 +262,7 @@ void LaunchController::login()
}
}
}
emitFailed(tr("Failed to launch."));
emitFailed(tr("Failed to launch."));*/
}
void LaunchController::launchInstance()