XCOM: Enemy Unknown
0 of 0

File information

Last updated

Original upload

Created by

Dubiousintent

Uploaded by

dubiousintent

Virus scan

Safe to use

About this mod

This is a Windows CMD file script that utilizes the open source package \\\"bsdiff\\\" to create a patch file (to be applied with the companion program \\\"bspatch\\\") to the XComGame.EXE file. It assumes the orginal game file is now a backup (i.e. \\\"XComGame.exe.bak\\\"), and the modified version is now the executable. It generates a \\\"patc

Requirements
Permissions and credits
This is a Windows CMD file script that utilizes the open source package "bsdiff" to create a patch file (to be applied with the companion program "bspatch") to the XComGame.EXE file. It assumes the orginal game file is now a backup (i.e. "XComGame.exe.bak"), and the modified version is now the executable. It generates a "patch file" consisting of the differences between the old and the new version. The script can be installed anywhere, but the game the patch file will be placed in the same location as the game executable. The created patch files will use the base filename of the executable, and append the current date and time to that name.

Note that with this you can create patches that depend upon other patches having been previously applied, assuming you designate your different versions properly as 'old' and 'new' files to the script. Name your patch files appropriately. This package was used to create the patch file in my companion script "EXEPatcher" [http://xcom.nexusmods.com/mods/384//?].

Requires:
"bsdiff" package, available [http://sites.inka.de/tesla/f_others.html#bsdiff]. This is free/open source. It is not included here.

The "bsdiff" package may be installed anywhere, but if the "bsdiff.exe" file is not found in either the "Steam\steamapps\common\XCom-Enemy-Unknown" or the ".\Binaries\Win32" subfolder, the script should be modified to point to it's location. There is a variable defined near the top of the script (diffpath) just for this purpose. As the "bsdiff package" does not make any registry entries when it is installed, it is not possible to determine where you have installed it otherwise.

Please note that you can manually do everything this script does yourself, if all the components are present in the same location. The primary advantage of the script is that it can be used with components in various locations, and will alert you if you are missing the required Patch_File parameter, and saves including all the paths on the commandline.

The script utilizes WMIC (if available; it's part of the WMI toolset included in Windows versions from XP Professional onwards) to retrieve the XCOM install folder. If WMIC is not available, it relies upon the value of a variable defined near the top of the script (exepath) just for this purpose. This might also need modifying by you. All the defined variables are checked for validity first.

A script file was chosen to implement this patch mechanism because it is an easily modified tool for anyone's Windows environment and any game, and permits the components (except the patch file itself) to be installed anywhere. Only variables defined at the beginning of the script should require altering. It is called without any command line parameters. With simple adjustments to the variables it can be used in a similar manner to create patches for any executable.

Installation:
Obtain and install bsdiff package to any location.
Unpack the archive to any location. Look for the resulting patch file in the same folder as the game executable (i.e. "Steam\steamapps\common\XCom-Enemy-Unknown\Binaries\Win32").

Uninstallation:
Move/delete any created patch files from the executable folder.
Remove the "EXEDiff.cmd" file from the installation folder.

Known incompatibilities:
None known.

History:
v1.0 Initial release