mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-23 16:32:22 +00:00
Upload patches
This commit is contained in:
parent
45c0880145
commit
46d1c31bda
7 changed files with 32 additions and 11 deletions
14
README.md
14
README.md
|
|
@ -1,3 +1,17 @@
|
||||||
|
> [!WARNING]
|
||||||
|
> This repository is a fork of the Unleashed Recompiled project, specifically designed to support binary Arch Linux packaging through the AUR and the PKGBUILD system. For Windows builds, please refer to the upstream repository.
|
||||||
|
> **Do not attempt to compile the content of this repository with Windows targets**.
|
||||||
|
> Please be also aware this package, unlike the Flatpak version provided upstream, may not be compatible with the Hedgemod Manager differently from the Flatpak version provided upstream.
|
||||||
|
|
||||||
|
Binaries from this repository are built using:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cmake -DCMAKE_AR=/usr/bin/llvm-ar -DCMAKE_RANLIB=/usr/bin/llvm-ranlib . --preset linux-release
|
||||||
|
$ cmake --build ./out/build/linux-release --target UnleashedRecomp
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://raw.githubusercontent.com/hedge-dev/UnleashedRecompResources/refs/heads/main/images/logo/Logo.png" width="512"/>
|
<img src="https://raw.githubusercontent.com/hedge-dev/UnleashedRecompResources/refs/heads/main/images/logo/Logo.png" width="512"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ PPC_FUNC_IMPL(__imp__sub_824EB490);
|
||||||
PPC_FUNC(sub_824EB490)
|
PPC_FUNC(sub_824EB490)
|
||||||
{
|
{
|
||||||
App::s_isInit = true;
|
App::s_isInit = true;
|
||||||
App::s_isMissingDLC = !Installer::checkAllDLC(GetGamePath());
|
App::s_isMissingDLC = !Installer::checkAllDLC(g_gamepath);
|
||||||
App::s_language = Config::Language;
|
App::s_language = Config::Language;
|
||||||
|
|
||||||
SWA::SGlobals::Init();
|
SWA::SGlobals::Init();
|
||||||
|
|
|
||||||
|
|
@ -315,11 +315,11 @@ uint32_t XamContentCreateEx(uint32_t dwUserIndex, const char* szRootName, const
|
||||||
}
|
}
|
||||||
else if (pContentData->dwContentType == XCONTENTTYPE_DLC)
|
else if (pContentData->dwContentType == XCONTENTTYPE_DLC)
|
||||||
{
|
{
|
||||||
root = GAME_INSTALL_DIRECTORY "/dlc";
|
root = g_gamepath + "/dlc";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
root = GAME_INSTALL_DIRECTORY;
|
root = g_gamepath;
|
||||||
}
|
}
|
||||||
|
|
||||||
XamRegisterContent(*pContentData, root);
|
XamRegisterContent(*pContentData, root);
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ void KiSystemStartup()
|
||||||
{
|
{
|
||||||
const auto gameContent = XamMakeContent(XCONTENTTYPE_RESERVED, "Game");
|
const auto gameContent = XamMakeContent(XCONTENTTYPE_RESERVED, "Game");
|
||||||
const auto updateContent = XamMakeContent(XCONTENTTYPE_RESERVED, "Update");
|
const auto updateContent = XamMakeContent(XCONTENTTYPE_RESERVED, "Update");
|
||||||
XamRegisterContent(gameContent, GAME_INSTALL_DIRECTORY "/game");
|
XamRegisterContent(gameContent, g_gamepath + "/game");
|
||||||
XamRegisterContent(updateContent, GAME_INSTALL_DIRECTORY "/update");
|
XamRegisterContent(updateContent, g_gamepath + "/update");
|
||||||
|
|
||||||
const auto saveFilePath = GetSaveFilePath(true);
|
const auto saveFilePath = GetSaveFilePath(true);
|
||||||
bool saveFileExists = std::filesystem::exists(saveFilePath);
|
bool saveFileExists = std::filesystem::exists(saveFilePath);
|
||||||
|
|
@ -94,7 +94,7 @@ void KiSystemStartup()
|
||||||
XamContentCreateEx(0, "D", &gameContent, OPEN_EXISTING, nullptr, nullptr, 0, 0, nullptr);
|
XamContentCreateEx(0, "D", &gameContent, OPEN_EXISTING, nullptr, nullptr, 0, 0, nullptr);
|
||||||
|
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
for (auto& file : std::filesystem::directory_iterator(GAME_INSTALL_DIRECTORY "/dlc", ec))
|
for (auto& file : std::filesystem::directory_iterator(g_gamepath + "/dlc", ec))
|
||||||
{
|
{
|
||||||
if (file.is_directory())
|
if (file.is_directory())
|
||||||
{
|
{
|
||||||
|
|
@ -244,7 +244,7 @@ int main(int argc, char *argv[])
|
||||||
HostStartup();
|
HostStartup();
|
||||||
|
|
||||||
std::filesystem::path modulePath;
|
std::filesystem::path modulePath;
|
||||||
bool isGameInstalled = Installer::checkGameInstall(GAME_INSTALL_DIRECTORY, modulePath);
|
bool isGameInstalled = Installer::checkGameInstall(g_gamepath, modulePath);
|
||||||
bool runInstallerWizard = forceInstaller || forceDLCInstaller || !isGameInstalled;
|
bool runInstallerWizard = forceInstaller || forceDLCInstaller || !isGameInstalled;
|
||||||
if (runInstallerWizard)
|
if (runInstallerWizard)
|
||||||
{
|
{
|
||||||
|
|
@ -254,7 +254,7 @@ int main(int argc, char *argv[])
|
||||||
std::_Exit(1);
|
std::_Exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!InstallerWizard::Run(GAME_INSTALL_DIRECTORY, isGameInstalled && forceDLCInstaller))
|
if (!InstallerWizard::Run(g_gamepath, isGameInstalled && forceDLCInstaller))
|
||||||
{
|
{
|
||||||
std::_Exit(0);
|
std::_Exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ void ModLoader::Init()
|
||||||
{
|
{
|
||||||
configIni = {};
|
configIni = {};
|
||||||
|
|
||||||
if (!configIni.read(GAME_INSTALL_DIRECTORY "/cpkredir.ini"))
|
if (!configIni.read(g_gamepath + "/cpkredir.ini"))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
std::filesystem::path g_executableRoot = os::process::GetExecutablePath().remove_filename();
|
std::filesystem::path g_executableRoot = os::process::GetExecutablePath().remove_filename();
|
||||||
std::filesystem::path g_userPath = BuildUserPath();
|
std::filesystem::path g_userPath = BuildUserPath();
|
||||||
|
extern const std::string g_gamepath = GetGamePath();
|
||||||
|
|
||||||
bool CheckPortable()
|
bool CheckPortable()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,20 @@
|
||||||
|
|
||||||
extern std::filesystem::path g_executableRoot;
|
extern std::filesystem::path g_executableRoot;
|
||||||
|
|
||||||
inline std::filesystem::path GetGamePath()
|
inline std::string GetGamePath()
|
||||||
{
|
{
|
||||||
return GAME_INSTALL_DIRECTORY;
|
const char* homeDir = getenv("HOME");
|
||||||
|
if (homeDir == nullptr)
|
||||||
|
return g_executableRoot.string();
|
||||||
|
std::filesystem::path homePath = homeDir;
|
||||||
|
std::filesystem::path gamePath = homePath / ".local/share" / USER_DIRECTORY;
|
||||||
|
return gamePath.string();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckPortable();
|
bool CheckPortable();
|
||||||
std::filesystem::path BuildUserPath();
|
std::filesystem::path BuildUserPath();
|
||||||
const std::filesystem::path& GetUserPath();
|
const std::filesystem::path& GetUserPath();
|
||||||
|
extern const std::string g_gamepath;
|
||||||
|
|
||||||
inline std::filesystem::path GetSavePath(bool checkForMods)
|
inline std::filesystem::path GetSavePath(bool checkForMods)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue