Creating and Deploying Patches with Patch Gen
This page describes the manual procedure for reference only. It is automated by the build pipeline scripts.
Generate New Product
First generate a new product by running:
patch_gen createNewProduct patch_game/game.xml
This creates default directory layout and xml files.
Directory Layout
- patch_game
- bnp - folder where your put your BNP files.
- patch - folder containing the generated patch files, to be copied to your patch web server.
- ref - patch_gen work files.
- patch_game/game.hist
- patch_game/game.xml
Generate patch
Copy updated .bnp files to patch_game/bnp and run
patch_gen updateProduct patch_game/game.xml
XML File
<xml> <_Categories> <_Category> <_Name type="STRING" value="main"/> <_IsOptional type="SINT32" value="0"/> <_IsIncremental type="SINT32" value="0"/> <_Files type="STRING" value="main.bnp"/> <_Files type="STRING" value="sound.bnp"/> <_Files type="STRING" value="textures.bnp"/> </_Category> <_Category> <_Name type="STRING" value="unpacked"/> <_IsOptional type="SINT32" value="0"/> <_UnpackTo type="STRING" value="./"/> <_IsIncremental type="SINT32" value="1"/> <_Files type="STRING" value="exedll.bnp"/> </_Category> <_Category> <_Name type="STRING" value="optional"/> </_Category> </_Categories> <_IndexFileName type="STRING" value="game.hist"/> <_PatchDirectory type="STRING" value="patch_game/patch/"/> <_BnpDirectory type="STRING" value="patch_game/bnp/"/> <_RefDirectory type="STRING" value="patch_game/ref/"/> <_NextVersionFile type="STRING" value="patch_game/ryzom_open.version"/> </xml>
<_Files> node in each category will tell which .bnp files are being tracked.
Directory entries or IndexFileName can also be absolute like bnp's in 'r:/game/ryzom/data', patch will be put to 'w:/webroot/patch_game' and history is kept in 'c:/game.hist'
External Tools
lzma.exe can be found from http://www.7-zip.org/sdk.html
xdelta.exe from http://evanjones.ca/software/xdelta-win32.html
On Windows 7 environments you may need to enable compatibility. To do this:
- Right click on xdelta.exe and choose Properties
- Navigate to the Compatibility tab.
- Check "Run this program in compatility mode for" in the "Compatibility Mode" section.
- Choose "Windows XP (Service Pack 3)"
- Click OK.
- Run xdelta.exe and confirm that you wish to allow the program to make changes to your system.
Patch Generated
- Create a folder inside the client directory and name it "unpack".
- Place the ryzom_00000.idx inside the "unpack" folder created in step number one.
The 5 digits is the server version, if your server version is 1 you will have to replace 000000 to 00001 - Open your favorite database editor and click on "nel" then click the table "domain".
- There's a domain with the id of 12, click to edit the fields patch_version.
- Replace "patch_version" with the version of your server version, in this case it would be 0, click save.
- Make sure to change your client cfg file to "PatchWanted = 1;"
- Open the client and watch it patch your client files!
Build Client for Patching
Your client must be build in FINAL_VER
Edit the code to allow you to specift the patch server
C:\ryzom\code\ryzom\client\src\client_cfg.cpp
and add
READ_STRING_FV(RingReleaseNotePath) READ_STRING_FV(ReleaseNotePath)
Add values such as below to your client_default.cfg
PatchServer = "http://patch.tempestintheaether.org/"; RingReleaseNotePath = "http://patch.tempestintheaether.org/index.php";
PatchServer is the patch_game directory
RingReleaseNotePath is the url to your release notes file, the client does pass a $ver value so you can use that ot have different notes per version ie in a php file
example file:
<html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body> <h1>Saturday, Febuary 25 2012</h1> <h2>RELEASE</h2> <p>After much work and a few years we are proud to present the first official release of Tempest in the Aether.</p> <br> </body></html>
Patch Using Web Services
- By default the patch server uses port 43435. The complete footer specified by the fronted_service_default.cfg is :43435/patch.
Add new virtual host to httpd-vhosts.conf
Listen 43435 <VirtualHost *:43435> <Directory "C:\ryzom_core_build\client_patch\patch"> AllowOverride All Order allow,deny Allow from all </Directory> DocumentRoot "C:\ryzom_core_build\client_patch\patch" ServerName localhost </VirtualHost>
- Copy generated patches to the DocumentRoot you specified.
- Add or update the ryzom_open.version
- Create a new file in patch dir called "ryzom_open.version"
- Inside the new file put current version # space current version # line return
1
make sure all patch files (.idx & _debug.xml) start with ryzom_5 digit patch #
ryzom_00001.idx ryzom_00001_debug.xml
- Update server:
- Open your favorite database editor and click on "nel" then click the table "domain".
- There's a domain with the id of 12, click to edit the fields patch_version.
- Replace "patch_version" with the version of your server version, in this case it would be 1.
- Replace "patch_urls" with the url of the PatchServer, in this case http://127.0.0.1:43435/patch , click save
Add IP/URL of web server to Client_default.cfg in the client directory.
PatchServer = "http://127.0.0.1:43435/patch"; PatchWanted = 1;
- Start client and login. Patching should commence.