X-Cart:Generating module distribution packs for X-Cart 4

From Qualiteam Help

Jump to: navigation, search

This article is intended for X-Cart 4 module developers; it explains how to prepare an installable module distribution pack.

For the purpose of explanation, we prepared a sample module archive. Please feel free to download it and use it as a template for your own work.

Here it is:

cn_module.tgz

This archive contains:

  • files of the demo module Chuck Norris for X-Cart version 4.6.3;
  • config files for the generation of the module distribution pack;
  • the module's installer that creates entry points for the module, copies the module's files and applies sql files.

To generate a distribution pack for the module:

1. Copy the archives x-cart-4.6.3gold.tgz and x-cart-4.6.3platinum.tgz to the folder /www/releases/4.6.x/4.6.3/
The result should be:
/www/releases/4.6.x/4.6.3/x-cart-4.6.3gold.tgz
/www/releases/4.6.x/4.6.3/x-cart-4.6.3platinum.tgz
If you prefer to use a folder other than /www/releases/, you should change the paths in the files build_4.6.xgold.xml/build_4.6.xpro.xml accordingly.
For example, if you choose to place your archives in the folder /tmp/4.6.x/4.6.3/, you should locate the following code piece in build_4.6.xgold.xml/build_4.6.xpro.xml:
<target name="checkout_orig_ver">
<exec executable="tar" failonerror="true" dir="orig"><arg line="-xzf /www/releases/${branch}/${ver}/x-cart-${ver}gold.tgz" /></exec><move file="orig/xcart" tofile="orig/${ver}" />
</target>
and change the path to the following:
<target name="checkout_orig_ver">
<exec executable="tar" failonerror="true" dir="orig"><arg line="-xzf /tmp/${branch}/${ver}/x-cart-${ver}gold.tgz" /></exec><move file="orig/xcart" tofile="orig/${ver}" />
</target>
2. Install ant http://ant.apache.org/
3. In the command line, run the following sequence of commands:
ant -Dmversion="3" -f build_4.6.xpro.xml;
ant -Dmversion="3" -f build_4.6.xgold.xml short;
The module distribution packs will be generated to the folder ./releases/ in your current folder.
Once the distribution pack has been generated, make sure that the folder releases/4.6.3/chuck-norris.patches contains only the changes pertaining to your module
Personal tools
entry points
x-cart on social