11 Commits

Author SHA1 Message Date
Alexander
099478360f works for pakked builds 2025-01-06 07:20:16 +00:00
Alexander
20492f45b8 update urls 2025-01-06 07:19:12 +00:00
Alexander
ab6cccfd84 i fucked up 2025-01-05 23:25:21 +00:00
Alexander
cd561c6721 auto login for ot6.5 2025-01-04 03:34:54 +00:00
Alexander
9237818eb9 Kill job on failure 2024-12-31 23:11:38 +00:00
Alexander
d274be0842 Merge branch 'main' of https://github.com/absoluteSpacehead/MercuryLauncher 2024-12-31 23:08:19 +00:00
Alexander
2687eaddf3 OOPS I WAS SEARCHING FOR THE WRONG FOLDER!!!!! 2024-12-31 23:08:18 +00:00
Alexander
b138c34b8c i hate this fuckin website 2024-12-31 22:49:02 +00:00
Alexander
68650aab7d actual description 2024-12-31 22:48:47 +00:00
Alexander
3eab3b0e2c Create README.md 2024-12-31 22:45:40 +00:00
Alexander
650f169232 what the hell am i doing here man 2024-12-31 21:41:37 +00:00
2 changed files with 85 additions and 26 deletions

View File

@@ -10,26 +10,29 @@
#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;
void Exit()
{
std::cout << "Press any key to exit.\n";
TerminateJobObject(job, 0);
_getch();
}
@@ -256,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(CONTENT_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 (Content 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
@@ -311,12 +326,50 @@ 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);
PROCESS_INFORMATION processInformation = { 0 };
CreateProcessW((LPWSTR)BINARY_PATH_OT, nullptr, nullptr, nullptr, FALSE, 0x0, nullptr, nullptr, &startupInfo, &processInformation);
std::wstring cmd(BINARY_PATH_OT);
cmd += L" -log -AUTH_LOGIN=unknown -AUTH_PASSWORD=5001 -AUTH_TYPE=exchangecode";
CreateProcessW(BINARY_PATH_OT, &cmd[0], nullptr, nullptr, FALSE, 0x0, nullptr, nullptr, &startupInfo, &processInformation);
AssignProcessToJobObject(job, processInformation.hProcess);
@@ -345,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";
@@ -357,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;
@@ -383,7 +436,7 @@ int Setup18()
std::wstring cmdl(BINARY_PATH_1_8);
cmdl += L" -skippatchcheck -epicportal -HTTP=WinInet -log";
CreateProcessW((LPWSTR)BINARY_PATH_1_8, &cmdl[0], nullptr, nullptr, FALSE, 0x0, nullptr, nullptr, &startupInfo, &processInformation);
CreateProcessW(BINARY_PATH_1_8, &cmdl[0], nullptr, nullptr, FALSE, 0x0, nullptr, nullptr, &startupInfo, &processInformation);
AssignProcessToJobObject(job, processInformation.hProcess);
@@ -453,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();
@@ -494,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;
}

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
Temporary, sloppily written Mercury launcher designed to keep things simple until the next update (eventually) releases.
Uses a bunch of libraries that I'm too lazy to write here, notably MinHook, libcurl & libzip
# Usage
![image](https://github.com/user-attachments/assets/ee3285e7-213e-4c05-82f6-2fd320ee0244)