This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: The Full WoW Patching Process  (Read 4262 times)

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
The Full WoW Patching Process
« on: April 01, 2013, 07:27:06 pm »
I will keep this updated as I progress. This is very rough documentation and will be written up neatly once perfected.

The WoW patching process centres around a single text file document stored on a webserver: PatchSequenceFile.txt.

This files contents looks something like this:
Code: [Select]
[special]
expansion-speech-{LANG}=WoW-2.0.0.6080-expansion-speech-{CPU}-{OS}-{LANG}

[GAME]
CurrentBuild=10482
6546=WoW-installer-2.x.x.x-to-3.0.1.8874-{PLATFORM}-{OS}-{LANG}
6692=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
6729=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
6739=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
6803=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
6898=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
7272=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
7318=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
7359=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
7561=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
7741=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
7799=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
8089=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
8125=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
8278=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}
8606=WoW-installer-2.x.x.x-to-3.0.1.8874-{CPU}-{OS}-{LANG}

[WoWT]
CurrentBuild=12644
10522=WoW-0.3.0.10522-0.3.0.10958-{CPU}-{OS}-{LANG}-ptr
10554=WoW-0.3.0.10554-0.3.0.10571-{CPU}-{OS}-{LANG}-ptr
10571=WoW-0.3.0.10571-0.3.0.10596-{CPU}-{OS}-{LANG}-ptr
10596=WoW-0.3.0.10596-0.3.0.10623-{CPU}-{OS}-{LANG}-ptr
10623=WoW-0.3.0.10623-0.3.0.10676-{CPU}-{OS}-{LANG}-ptr
10676=WoW-0.3.0.10676-0.3.0.10712-{CPU}-{OS}-{LANG}-ptr
10712=WoW-0.3.0.10712-0.3.0.10747-{CPU}-{OS}-{LANG}-ptr
10747=WoW-0.3.0.10747-0.3.0.10772-{CPU}-{OS}-{LANG}-ptr
10772=WoW-0.3.0.10772-0.3.0.10805-{CPU}-{OS}-{LANG}-ptr
10805=WoW-0.3.0.10805-0.3.0.10835-{CPU}-{OS}-{LANG}-ptr
10835=WoW-0.3.0.10835-0.3.0.10894-{CPU}-{OS}-{LANG}-ptr
10894=WoW-0.3.0.10894-0.3.0.10952-{CPU}-{OS}-{LANG}-ptr
10952=WoW-0.3.0.10952-0.3.0.10958-{CPU}-{OS}-{LANG}-ptr
10958=WoW-0.3.0.10958-0.3.3.11573-{CPU}-{OS}-{LANG}-ptr
11573=WoW-0.3.3.11573-0.3.3.11599-{CPU}-{OS}-{LANG}-ptr
11599=WoW-0.3.3.11599-0.3.3.11623-{CPU}-{OS}-{LANG}-ptr
11623=WoW-0.3.3.11623-0.3.3.11643-{CPU}-{OS}-{LANG}-ptr
11643=WoW-0.3.3.11643-0.3.3.11655-{CPU}-{OS}-{LANG}-ptr
11655=WoW-0.3.3.11655-0.3.3.11685-{CPU}-{OS}-{LANG}-ptr
11685=WoW-0.3.3.11685-0.3.5.11993-{CPU}-{OS}-{LANG}-ptr
11993=WoW-0.3.5.11993-0.3.5.12045-{CPU}-{OS}-{LANG}-ptr
12045=WoW-0.3.5.12045-0.3.5.12124-{CPU}-{OS}-{LANG}-ptr
12124=WoW-0.3.5.12124-0.3.5.12148-{CPU}-{OS}-{LANG}-ptr
12148=WoW-0.3.5.12148-0.3.5.12166-{CPU}-{OS}-{LANG}-ptr
12166=WoW-0.3.5.12166-0.3.5.12196-{CPU}-{OS}-{LANG}-ptr
12196=WoW-0.3.5.12196-0.3.5.12213-{CPU}-{OS}-{LANG}-ptr

[WoW]
CurrentBuild=12340
8874=WoW-3.x.x.x-3.2.0.10192-{CPU}-{OS}-{LANG}
9056=WoW-3.x.x.x-3.2.0.10192-{CPU}-{OS}-{LANG}
9183=WoW-3.x.x.x-3.2.0.10192-{CPU}-{OS}-{LANG}
9464=WoW-3.x.x.x-3.2.0.10192-{CPU}-{OS}-{LANG}
9506=WoW-3.x.x.x-3.2.0.10192-{CPU}-{OS}-{LANG}
9551=WoW-3.x.x.x-3.2.0.10192-{CPU}-{OS}-{LANG}
9767=WoW-3.1.0.9767-3.1.1.9806-{CPU}-{OS}-{LANG}
9806=WoW-3.1.1.9806-3.1.1.9835-{CPU}-{OS}-{LANG}
9835=WoW-3.1.1.9835-3.1.2.9901-{CPU}-{OS}-{LANG}
9901=WoW-3.1.2.9901-3.1.3.9947-{CPU}-{OS}-{LANG}
9947=WoW-3.1.3.9947-3.2.0.10192-{CPU}-{OS}-{LANG}
10192=WoW-3.2.0.10192-3.3.0.10958-{CPU}-{OS}-{LANG}
10314=WoW-3.2.0.10314-3.2.2.10482-{CPU}-{OS}-{LANG}
10482=WoW-3.2.2.10482-3.2.2.10505-{CPU}-{OS}-{LANG}
10505=WoW-3.2.2.10505-3.3.0.10958-{CPU}-{OS}-{LANG}
10958=WoW-3.3.0.10958-3.3.0.11159-{CPU}-{OS}-{LANG}
11159=WoW-3.3.0.11159-3.3.2.11403-{CPU}-{OS}-{LANG}
11403=WoW-3.3.2.11403-3.3.3.11685-{CPU}-{OS}-{LANG}
11685=WoW-3.3.3.11685-3.3.3.11723-{CPU}-{OS}-{LANG}
11723=WoW-3.3.3.11723-3.3.5.12213-{CPU}-{OS}-{LANG}
12213=WoW-3.3.5.12213-3.3.5.12340-{CPU}-{OS}-{LANG}

[WOW-STREAMING]
CurrentBuild=12213
10482=WoW-3.2.2.10482-3.3.0.10958-{CPU}-{OS}-{LANG}-Trial
10958=WoW-3.3.0.10958-3.3.0.11159-{CPU}-{OS}-{LANG}-Trial
11159=WoW-3.3.0.11159-3.3.2.11403-{CPU}-{OS}-{LANG}-Trial
11403=WoW-3.3.2.11403-3.3.3.11685-{CPU}-{OS}-{LANG}-Trial
11685=WoW-3.3.3.11685-3.3.5.12213-{CPU}-{OS}-{LANG}-Trial

[LAUNCHER]
CurrentBuild=1898
338=Tools-2.1.1.1897-{CPU}-{OS}-UPDATE
347=Tools-2.1.1.1897-{CPU}-{OS}-UPDATE
374=Tools-1.7.0.476-{CPU}-{OS}-{LANG}-UPDATE
380=Tools-2.0.0.482-{CPU}-{OS}-{LANG}-UPDATE
387=Tools-2.1.1.1897-{CPU}-{OS}-UPDATE
394=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
420=Tools-2.0.0.482-{CPU}-{OS}-{LANG}-UPDATE
444=Tools-2.0.0.482-{CPU}-{OS}-{LANG}-UPDATE
446=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
476=Tools-1.7.0.476-to-2.1.1.1368-{CPU}-{OS}-{LANG}-UPDATE
481=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
483=Tools-2.1.1.1897-{CPU}-{OS}-UPDATE
491=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
525=Tools-2.1.1.1362-{CPU}-{OS}-{LANG}-UPDATE-ptr
1361=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
1374=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
1462=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
1528=Tools-2.1.2.1717-{CPU}-{OS}-{LANG}-UPDATE
1542=Tools-2.1.2.1717-{CPU}-{OS}-{LANG}-UPDATE
1555=Tools-2.1.2.1717-{CPU}-{OS}-{LANG}-UPDATE
1569=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE
1897=Tools-4.0.0.1807-{CPU}-{OS}-{LANG}-UPDATE

[BACKGROUND]

Mine looks like this:
Code: [Select]
[special]

[GAME]
CurrentBuild=10482

[WoWT]
CurrentBuild=12644

[WoW]
CurrentBuild=12341
12340=WoW-3.3.5.12340-3.3.5.12341-x86-Win-enGB.mpq
12341=WoW-3.3.5.12340-3.3.5.12341-x86-Win-enGB.mpq

[WOW-STREAMING]

[LAUNCHER]
CurrentBuild=1897

[BACKGROUND]

To begin the patching process, the client logs into WoW and a patch is sent to them (see here: viewtopic.php?f=61&t=1771) or the user launchers the launcher.

The launcher is a executable file with an attached MPQ. The MPQ contains all the images of the launcher - overwriting these images with your own will allow you to change them.

If you open up the launcher with a hex editor, there are various strings to modify. At C8830h I found the window title (something like '%s - V%s - Title', representing 'World of Warcraft - V3.0 - 12340').

At D5B80h I found the URL's for the window display (originally: http://launcher.worldofwarcraft.com/2.0/index.xml). Note any file extension will work - I found XML did not load correctly so I used a php file.

Note that you need to keep the number of characters the same to maintain file integrity. Use full stops for empty space where required to fill up, and do not exceed the number of characters you have deleted to add your content.

The results are shown below:



Note that throughout this you can find logs of what is happening in the WoW folder. This is useful for identifying what is happening.

When the launcher starts up, it is going to look at the patch list file as described earlier. Upon finding a valid update, it will download it:

Code: [Select]
16:30:51.8109 Launcher version 2.1.1.1897
16:30:51.9211 Reverting to old PSF patching system.
16:30:52.3149 Fetch version information from 127.0.0.1 (http://127.0.0.1/update/PatchSequenceFile.txt).
16:30:52.3463 Received version information from http://127.0.0.1/update/PatchSequenceFile.txt.
16:30:52.3514 A game update is required.
...

This will download the contents of the file you have targeted in the patch list file, and save it into wow-update.mpq inside your WoW folder. Note, this is the same result as receiving a patch through the WoW.exe as linked to earlier, and follows the same format.

Subsequently, for the patch to be installed correctly, the WoW.exe must be patched to allow unsigned patches (viewtopic.php?f=59&t=1829) and for the contents to contain a list file detailing what instructions to carry out.

My patch that is downloaded consists of two files, as does Blizzard's:
Code: [Select]
prepatch.lst
BackgroundDownloader.exe
The contents of prepatch.lst is:
Code: [Select]
extract BackgroundDownloader.exe
execute BackgroundDownloader.exe

For the BackgroundDownloader, I took Blizzard's from 3.3.5 to 3.3.5a and modified the URL's it points to. Images are again stored as an attached MPQ.

At D1D40h you can find the two URL's that need  to be modified.

At this point the WoW client will download the patch:



However, when trying to execute the patch:
Code: [Select]
16:57:30.3841 IPC Monitor Cancel Patch: Timeout, State = ready_downloader
I am not sure why this is happening. Need to investigate it further. However, the WoW client will install it upon logging in as wow-patch.mpq exists:



Now we need to add to the patch list for the downloader:
Code: [Select]
[special]

[GAME]
CurrentBuild=10482

[WoWT]
CurrentBuild=12644

[WoW]
CurrentBuild=12341
12340=WoW-3.3.5.12340-3.3.5.12341-{CPU}-{OS}-{LANG}.torrent
12341=WoW-3.3.5.12340-3.3.5.12341-{CPU}-{OS}-{LANG}.torrent

[WOW-STREAMING]

[LAUNCHER]
CurrentBuild=1897

[BACKGROUND]
12340=WoW-3.3.5.12340-3.3.5.12341-{CPU}-{OS}-{LANG}.torrent
12341=WoW-3.3.5.12340-3.3.5.12341-{CPU}-{OS}-{LANG}.torrent
The downloader targets this torrent file and... torrents it. At the downloader start up it sends a message to the global tracker to announce it is online (these are urls:3724 in the downloader if you wish to modify). Trackers must be http to work I found from testing.

The torrent file goes in the ..background directory:
Code: [Select]
backgroundWoW-3.3.5.12340-x86-Win-enGB-BKGND.torrent
updateDownloader.ini
updatePatchSequenceFile.txt
updateWoW-3.3.5.12340-3.3.5.12341-x86-Win-enGB.mpq
Note these file locations are important (and their names).

The Downloader.ini's contents should look like this:
Code: [Select]
[Downloader]
directDownloadThreshold=3500000
[DownloaderFast]
directDownloadThreshold=7000000
[BackgroundDownloader]
directDownloadThreshold=10000
[PortDefaultValues]
minPort=6881
maxPort=6999


Code: [Select]
20:19:03.4414 Downloader v2.2.0.1329
20:19:03.4415 Checking for server side config http://127.0.0.1/update/Downloader.ini
20:19:03.7671 Server-side background download settings applied
20:19:03.7965 Checking for background download http://127.0.0.1/background/WoW-3.3.5.12340-x86-Win-enGB-BKGND.torrent
20:19:03.7984 Starting download of http://127.0.0.1/background/WoW-3.3.5.12340-x86-Win-enGB-BKGND.torrent
20:19:03.8857 Downloader initializing...
20:19:04.1020 Creating Firewall interface
20:19:04.1278 Success!
20:19:04.1299 Enabling Microsoft Firewall UPnP Framework
20:19:04.1532 Error - Microsoft firewall(service) put_Enabled failed: -2147024891
20:19:04.1553 Enabling Blizzard Downloader on Windows Firewall
20:19:04.2002 Error - Microsoft firewall(EnableFirewallProgram) Add: failed: -2147024891
20:19:04.2030 Creating Firewall interface
20:19:04.2379 Success!
20:19:04.2400 Creating Microsoft Firewall Rule: Blizzard Downloader: 3724
20:19:04.2648 Error - Microsoft firewall(EnableFirewallPort) Add: failed: -2147024891
20:19:04.2677 Creating UPnP interface
20:19:04.2698 Getting UPnPDevice Information
20:19:04.2716 Found Bonjour service and registering a local peer.
20:19:09.4547 UPnP device Found:
20:19:09.4585 Manufacturer: D-Link
20:19:09.4617 Model: DIR-615
20:19:09.4652 Model Number: 1
20:19:09.4683 Device URL: http://www.dlink.com.tw
20:19:09.5508 Could not find port mappings on UPnP Device.
20:19:09.5548 Add UPnP Device port forward: 3724
20:19:09.6378 Unable to successfully forward port.
20:19:09.6415 Creating Windows UPnPEngine interface
20:19:09.6447 Getting UPnPDevice Information
20:19:14.3498 Connecting to: http://127.0.0.1:80/announce with 1
20:19:14.4935 Connected in 7+134 ms
20:19:14.4970 Received an error code from tracker: 404
20:19:14.6008 Connecting to: http://127.0.0.1:80/announce with 3
20:19:14.6965 Connected in 5+87 ms
20:19:14.7002 Received an error code from tracker: 404
20:19:14.8105 Restoring UPnP value to false under Windows Firewall
20:19:14.8979 Error -- Microsoft firewall(service) put_Enabled failed: -2147024891
20:19:14.9015 Removing port 0 from Windows Firewall
20:19:14.9234 Success!
20:19:14.9256 Disabling Blizzard Downloader for Windows Firewall
20:19:14.9474 Error -- Microsoft firewall(EnableFirewallProgram) Remove: failed: -2147024891
20:19:18.6588 UPnP Device Found:
20:19:18.6628 Manufacturer: D-Link
20:19:18.6663 Model: DIR-615
20:19:18.6696 Model Number: 1
20:19:18.6729 Device URL: http://192.168.9.6/
20:19:24.0460 Could not find port mappings on UPnP Device.
20:19:24.0499 Add UPnP Device port forward: 3724
20:19:24.0574 Unable to successfully forward port.
20:26:13.1085 Saving meta data file...
In the above log, I tried to use localhost as the tracker which failed (I have no idea what I am doing with torrents half the time).

Once the downloader has finished (it will download to WoW DirectoryUpdate) it will attempt to execute what it downloaded - this is being worked on here: viewtopic.php?f=12&t=4309 But you can attach any executable file if you wish.

The installer will display patch notes and move/delete/add all the necessary files. Once installation is complete, then WoW.exe will launch and the installer will close.

Now the updated WoW version with your new patches should be running. Congratulations on completely automating the patching process using Blizzard's methods and tools.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »