mirror of
https://github.com/absoluteSpacehead/MercuryLauncher.git
synced 2026-01-13 03:02:21 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
099478360f | ||
|
|
20492f45b8 | ||
|
|
ab6cccfd84 |
@@ -10,20 +10,22 @@
|
||||
#define LAWIN_URL "https://github.com/Lawin0129/LawinServer/zipball/master"
|
||||
|
||||
#define BINARY_PATH_OT L".\\FortniteGame\\Binaries\\Win32\\FortniteClient-Win32-Shipping.exe"
|
||||
#define BINARY_PATH_OT_FUCKBLK L".\\FortniteGame\\Binaries\\Win32\\FortniteClient-Win64-Shipping.exe" // what the actual fuck is wrong with this guy
|
||||
#define CONTENT_PATH_OT L".\\FortniteGame\\Content\\"
|
||||
#define CONFIG_PATH_OT L".\\FortniteGame\\Config\\"
|
||||
#define DEFAULTENGINE_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/DefaultEngine.ini"
|
||||
#define DEFAULTGAME_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/DefaultGame.ini"
|
||||
#define ABILITIES_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/GE_AllAbilities.uasset"
|
||||
#define ACTOR_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/InGame_Actor.uasset"
|
||||
#define GAMEMODE_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/InGame_Gamemode.uasset"
|
||||
#define DEFAULTENGINE_URL "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/DefaultEngine.ini"
|
||||
#define DEFAULTGAME_URL "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/DefaultGame.ini"
|
||||
#define ABILITIES_URL "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/GE_AllAbilities.uasset"
|
||||
#define ACTOR_URL "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/InGame_Actor.uasset"
|
||||
#define GAMEMODE_URL "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/InGame_Gamemode.uasset"
|
||||
#define PAK_URL_OT "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/FortniteGame-WindowsClient_p.pak"
|
||||
|
||||
#define BINARY_PATH_1_8 L".\\FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping.exe"
|
||||
#define PAKS_PATH_1_8 L".\\FortniteGame\\Content\\Paks\\"
|
||||
#define PRODUCT_VERSION_1_8 L"3724489"
|
||||
#define DLL_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/Mercury-1.8.dll"
|
||||
#define PAK_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/zzz_LawinServer.pak"
|
||||
#define SIG_URL "https://github.com/absoluteSpacehead/testtesttest/raw/refs/heads/main/zzz_LawinServer.sig"
|
||||
#define DLL_URL "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/Mercury-1.8.dll"
|
||||
#define PAK_URL_18 "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/zzz_LawinServer.pak"
|
||||
#define SIG_URL_18 "https://github.com/absoluteSpacehead/MercuryLauncher-Assets/raw/refs/heads/main/zzz_LawinServer.sig"
|
||||
|
||||
HANDLE job;
|
||||
|
||||
@@ -257,19 +259,31 @@ int RunLawin()
|
||||
|
||||
// The setup for OT / 1.8 are *completely* different, to the point where theres no code shared between them
|
||||
|
||||
int SetupOT()
|
||||
int SetupOTPak()
|
||||
{
|
||||
int lawinStatus = RunLawin();
|
||||
if (lawinStatus != 0)
|
||||
return 1;
|
||||
std::wstring pathAsWstring(CONTENT_PATH_OT);
|
||||
pathAsWstring += L"Paks\\";
|
||||
|
||||
// are we pakless?
|
||||
if (!std::filesystem::exists(CONFIG_PATH_OT))
|
||||
// https://forums.unrealengine.com/t/overriding-or-swapping-out-asset-in-a-pak-file/472404
|
||||
// despite arbitrary filenames working in 1.8, OT6.5 seemingly doesnt accept that?
|
||||
if (!std::filesystem::exists(pathAsWstring + L"FortniteGame-WindowsClient_p.pak"))
|
||||
{
|
||||
std::cerr << "Build may not be pakless (Config folder not found). Ensure you downloaded the build from the Mercury server.\n";
|
||||
return 2;
|
||||
std::cout << "Required Mercury file is missing. Downloading...\n";
|
||||
|
||||
if (DownloadFile(PAK_URL_OT, (pathAsWstring + L"FortniteGame-WindowsClient_p.pak").c_str()) != 0)
|
||||
{
|
||||
std::cerr << "Failed to download FortniteGame-WindowsClient_p.pak.\n";
|
||||
return 3;
|
||||
}
|
||||
|
||||
std::cout << "File downloaded.\n";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SetupOTPakless()
|
||||
{
|
||||
std::wstring pathAsWstring(CONTENT_PATH_OT);
|
||||
|
||||
// check if we have InGame_Gamemode.uasset. we download this last so if we're missing this we can download everything just to be safe
|
||||
@@ -289,7 +303,7 @@ int SetupOT()
|
||||
std::cerr << "Failed to download DefaultGame.ini.\n";
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
pathAsWstring = CONTENT_PATH_OT;
|
||||
if (DownloadFile(ABILITIES_URL, (pathAsWstring + L"GE_AllAbilities.uasset").c_str()) != 0)
|
||||
{
|
||||
@@ -312,7 +326,43 @@ int SetupOT()
|
||||
std::cout << "All files downloaded.\n";
|
||||
}
|
||||
|
||||
std::cout << "Starting Fortnite...\nLoading may take a while. Enter anything on the login screen.\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SetupOT()
|
||||
{
|
||||
int lawinStatus = RunLawin();
|
||||
if (lawinStatus != 0)
|
||||
return 1;
|
||||
|
||||
// i just cant fucking believe it
|
||||
if (std::filesystem::exists(BINARY_PATH_OT_FUCKBLK))
|
||||
{
|
||||
std::cout << "Looks like this build was downloaded from blk. Fixing your build files...\n";
|
||||
std::filesystem::rename(BINARY_PATH_OT_FUCKBLK, BINARY_PATH_OT);
|
||||
std::filesystem::remove(L".\\FortniteGame\\Binaries\\Win32\\FortniteLauncher.exe");
|
||||
std::filesystem::remove(L".\\FortniteGame\\Binaries\\Win32\\Launcher.bat");
|
||||
}
|
||||
|
||||
// are we pakless?
|
||||
if (!std::filesystem::exists(CONFIG_PATH_OT))
|
||||
{
|
||||
if (SetupOTPak() != 0)
|
||||
{
|
||||
std::cerr << "Failed to set up Mercury. (OT6.5 pakked)\n";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SetupOTPakless() != 0)
|
||||
{
|
||||
std::cerr << "Failed to set up Mercury. (OT6.5 pakless)\n";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Starting Fortnite...\nLoading may take a while.\n";
|
||||
|
||||
STARTUPINFOW startupInfo = { 0 };
|
||||
startupInfo.cb = sizeof(STARTUPINFO);
|
||||
@@ -348,9 +398,9 @@ int Setup18()
|
||||
return 4;
|
||||
}
|
||||
|
||||
// check that we have the mercury dll AND the pak. someone could be using the same build folder but have wiped their appdata, etc
|
||||
// check that we have the mercury dll AND the sig. someone could be using the same build folder but have wiped their appdata, etc
|
||||
std::wstring pathAsWstring(PAKS_PATH_1_8);
|
||||
if (!std::filesystem::exists(localAppData + L"\\Mercury-1.8.dll") || !std::filesystem::exists(pathAsWstring + L"zzz_LawinServer.pak"))
|
||||
if (!std::filesystem::exists(localAppData + L"\\Mercury-1.8.dll") || !std::filesystem::exists(pathAsWstring + L"zzz_LawinServer.sig"))
|
||||
{
|
||||
std::cout << "Required Mercury files are missing. Downloading...\n";
|
||||
|
||||
@@ -360,13 +410,13 @@ int Setup18()
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (DownloadFile(PAK_URL, (pathAsWstring + L"zzz_LawinServer.pak").c_str()) != 0)
|
||||
if (DownloadFile(PAK_URL_18, (pathAsWstring + L"zzz_LawinServer.pak").c_str()) != 0)
|
||||
{
|
||||
std::cerr << "Failed to download zzz_LawinServer.pak.\n";
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (DownloadFile(SIG_URL, (pathAsWstring + L"zzz_LawinServer.sig").c_str()) != 0)
|
||||
if (DownloadFile(SIG_URL_18, (pathAsWstring + L"zzz_LawinServer.sig").c_str()) != 0)
|
||||
{
|
||||
std::cerr << "Failed to download zzz_LawinServer.sig.\n";
|
||||
return 2;
|
||||
@@ -456,7 +506,7 @@ int main()
|
||||
CloseHandle(processInformation.hProcess);
|
||||
CloseHandle(processInformation.hThread);
|
||||
|
||||
if (std::filesystem::exists(BINARY_PATH_OT))
|
||||
if (std::filesystem::exists(BINARY_PATH_OT) || std::filesystem::exists(BINARY_PATH_OT_FUCKBLK))
|
||||
{
|
||||
// we only have 1 32bit build lol
|
||||
int status = SetupOT();
|
||||
@@ -497,7 +547,7 @@ int main()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "No binaries could be found. Ensure the launcher is placed alongside the FortniteGame and Content folders.\n";
|
||||
std::cerr << "No binaries could be found. Ensure the launcher is placed alongside the FortniteGame and Engine folders.\n";
|
||||
Exit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user