Skip to content

Instantly share code, notes, and snippets.

@Hoikas
Last active March 3, 2020 10:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hoikas/f1e492a239532474196df30ff2e6d01d to your computer and use it in GitHub Desktop.
Save Hoikas/f1e492a239532474196df30ff2e6d01d to your computer and use it in GitHub Desktop.
OU->H'uru Launcher

Introduction

As proprosed at the Minkata meeting and detailed on the OU forum, this is a demonstration of "minimum of fuss" way to update OU/Cyan Uru clients to a H'uru build. To begin, you will need a clean, up-to-date installation of MOULa. I recommend making a new copy of URU for testing purposes.

Unfortunately, due to the server encryption found on MOULa, you will need to download a new copy of UruLauncher.exe that has been built to connect to the testing server. This launcher build tracks what I believe to be the current copy of Minkata's UruLauncher.exe (HG changeset [748170b85220]). The only change is to the the gatekeepersrv keys. I have included a copy of the server keys in this gist if you want to build your own. The server IP is 155.254.30.62.

Download New Launcher Here

Once you have downloaded and replaced UruLauncher.exe, you may begin by running UruLauncher.exe.

You should see:

  1. UruLauncher.exe downloads a new copy of itself.
  2. UruLauncher.exe downloads some new files and installs them.
  • If you are on Windows Vista or above, several UAC prompts will appear if you are not running the launcher as an administrator.
  • On Windows XP or lower, the launcher should proceed without fuss.
  1. UruLauncher.exe launches UruExplorer.exe

If you would like to login, the Need an Account? button will take you to a page for account creation.

UruExplorer.exe represents an external release client that was build from the current working copy on my development machine. Presently, it is tracking H-uru/Plasma#596 -- so let me know if you have any audio issues!

Additional changes include:

  • KI asset fixes
    • Fixed the imager blackplane animation
    • Fixed text xraying
    • Fixed visible black geometry on ultrawide resolutions (eg 3840x1600)
  • Converted intro videos to WebM (vp9+opus)
  • The entire H'uru delta
  • Fixed a potential deadlock in the UruLauncher GUI

Known Issues

Feel free to fork this document to add your own!

  • Attempting to launch the game from a mapped network drive will not work if an installer has to be executed.
    • This is due to the drive mappings being a session hint and not available to the low level system.
    • A similar problem can be observed in Windows 7 by trying to "Run as Admin" any EXE file on a mapped network drive.
    • Workaround: Open the network share via its full UNC path.
    • I consider this a wontfix.
  • Sometimes, UAC dialogs appear in the background but flashing on the taskbar.
    • This is due to bugs in the installers that we are using.
    • Specifically, in Microsoft's msiexec. Good luck getting them to fix that.
  • On Windows XP, UruExplorer.exe will not start with the error "Failed to launch URU."
    • The UruExplorer clients I build on my machine are not compatible with Windows XP.
    • I cannot easily build Windows XP clients on my development machine. Someone else will need to do that.
    • This is not the fault of the new launcher as none of the game launching code was changed.
    • Still value tests of UruLauncher.exe on Windows XP.
static const unsigned kDhGValue = 4;
static const byte kDhNData[] = {
0x5b, 0xdf, 0x9f, 0x94, 0x6e, 0x0a, 0x2d, 0x54,
0x95, 0xf8, 0x45, 0xb0, 0x3d, 0x8b, 0x44, 0x5e,
0x1d, 0x41, 0x36, 0xe9, 0x3c, 0xd3, 0xdd, 0xbc,
0x98, 0x55, 0xb3, 0xd3, 0xa0, 0x07, 0xbd, 0x66,
0x0e, 0x22, 0x16, 0xca, 0x82, 0x8f, 0x56, 0x10,
0xba, 0xc5, 0x61, 0xc9, 0x7d, 0x26, 0x71, 0xbd,
0x8c, 0x5c, 0x10, 0x52, 0x2a, 0x6b, 0xd5, 0x3e,
0xd2, 0xe2, 0x0e, 0x8a, 0x87, 0x3a, 0x94, 0xe7,
};
COMPILER_ASSERT(sizeof(kDhNData) == kNetDiffieHellmanKeyBits / 8);
static const byte kDhXData[] = {
0xc1, 0x18, 0x9c, 0x82, 0x81, 0x86, 0xdb, 0x50,
0xe0, 0x01, 0xa1, 0x16, 0x1d, 0x11, 0x5c, 0x5f,
0xcc, 0xb2, 0x34, 0x98, 0x9b, 0x88, 0x55, 0x61,
0xd5, 0x2e, 0xce, 0xac, 0x5e, 0x23, 0xcb, 0x39,
0xdf, 0xce, 0xf9, 0xc2, 0x02, 0x93, 0x24, 0xa3,
0x52, 0xdf, 0x0e, 0xb2, 0xac, 0x54, 0x3c, 0x89,
0x57, 0x83, 0x8e, 0x7d, 0xbe, 0x33, 0xf3, 0xf8,
0x51, 0xec, 0xf7, 0xa8, 0xf7, 0x98, 0x58, 0x53,
};
COMPILER_ASSERT(sizeof(kDhXData) == kNetDiffieHellmanKeyBits / 8);

Technical

Code

The current code has been pushed to my fork on BitBucket.

Methodology

Unfortunately, no plan survives the encounter with the enemy. Even after reworking the original plan of porting the H'uru patcher, there still had to be changes. Some small, some large.

There are currently three ways to trigger an install in the patcher:

  1. List any '.exe' or '.msi' file you want to install in the DependencyPatcher manifest. If this manifest is missing, the patcher should continue without error.
  2. List any '.exe' or '.msi' file you want in the ExternalPatcher manifest. THIS IS NOT RECOMMENDED! The original UruLauncher.exe expects for only UruLauncher.exe to be present in this manifest. Best to avoid that can'o'worms.
  3. Set the manifest entry flag to 0x10.

Currently the following installers are included:

  • dxwebsetup.exe
  • oalinst.exe
  • PhysX-9.12.1031-SystemSoftware-Legacy.msi
  • vcredist_x86.exe

The dataset on the server currently lists all installers in the DependencyPatcher manifest. All files are flagged 0x10 with the exception of PhysX-9.12.1031-SystemSoftware-Legacy.msi, which is being installed by virtue of its extension. The final strategy can be easily adjusted within these parameters.

Concerns

  • The dxwebsetup.exe file actually downloads roughly 90mb of data from Microsoft's servers. During this process, there is no visible progress in UruLauncher.exe
    • This only happens the first time someone ever uses dxwebsetup.exe because it only tracks DX9.0c.
    • There is a full-monty installer, dxsetup.exe, but it includes lots of loose cabinet files.
    • Pick your poison.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment