Difference between revisions of "X-Cart:Generating module distribution packs for X-Cart 4"

From X-Cart 4 Classic
Jump to: navigation, search
 
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:
  
 
Here it is:<br />
 
Here it is:<br />
: <b>[[Media:cn_module.tgz | cn_module.tgz]]</b>
+
: <b>[[Media:Cn_module.4.7.x.tgz | Cn_module.4.7.x.tgz]]</b>
 +
: <b>[[Media:Cn_module.4.6.x.tgz | Cn_module.4.6.x.tgz]]</b>
  
 
This archive contains:
 
This archive contains:
:* files of the demo module '''Chuck Norris''' for X-Cart version 4.6.3;
+
:* files of the demo module '''Chuck Norris''' for X-Cart version 4.6.3 or 4.7.8;
 
:* config files for the generation of the module distribution pack;
 
:* 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.
 
:* the module's installer that creates entry points for the module, copies the module's files and applies sql files.
Line 13: Line 14:
 
To generate a distribution pack for the module:
 
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/'''
+
: 1. Copy the archives '''x-cart-4.7.8gold.tgz''' and '''x-cart-4.7.8platinum.tgz''' to the folder '''/www/releases/4.7.x/4.7.8/'''
 
:: The result should be:
 
:: The result should be:
::: /www/releases/4.6.x/4.6.3/x-cart-4.6.3gold.tgz<br />/www/releases/4.6.x/4.6.3/x-cart-4.6.3platinum.tgz
+
::: /www/releases/4.7.x/4.7.8/x-cart-4.7.8gold.tgz<br />/www/releases/4.7.x/4.7.8/x-cart-4.7.8platinum.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.
+
:: If you prefer to use a folder other than '''/www/releases/''', you should change the paths in the files '''build_4.7.xgold.xml'''/'''build_4.7.xplatinum.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''':
+
:: For example, if you choose to place your archives in the folder '''/tmp/4.7.x/4.7.8/''', you should locate the following code piece in '''build_4.7.xgold.xml'''/'''build_4.7.xplatinum.xml''':
 
<pre>
 
<pre>
 
<target name="checkout_orig_ver">
 
<target name="checkout_orig_ver">
Line 35: Line 36:
 
: 3. In the command line, run the following sequence of commands:
 
: 3. In the command line, run the following sequence of commands:
 
<pre>
 
<pre>
ant -Dmversion="3" -f build_4.6.xpro.xml;
+
ant -Dmversion="3" -f build_4.7.xplatinum.xml;
ant -Dmversion="3" -f build_4.6.xgold.xml short;
+
ant -Dmversion="3" -f build_4.7.xgold.xml short;
 
</pre>
 
</pre>
 
: The module distribution packs will be generated to the folder '''./releases/''' in your current folder.
 
: 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
+
: Once the distribution pack has been generated, make sure that the folder '''releases/4.7.8/chuck-norris.patches''' contains only the changes pertaining to your module
  
  
 
== See also ==
 
== See also ==
[[Using_Dynamic_.tpl_Patcher]]
+
* [[X-Cart:Dynamic .tpl Patcher | Dynamic .tpl Patcher]]
  
 
[[Category:X-Cart developer guide]]
 
[[Category:X-Cart developer guide]]

Latest revision as of 13:11, 22 August 2017

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.4.7.x.tgz
Cn_module.4.6.x.tgz

This archive contains:

  • files of the demo module Chuck Norris for X-Cart version 4.6.3 or 4.7.8;
  • 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.7.8gold.tgz and x-cart-4.7.8platinum.tgz to the folder /www/releases/4.7.x/4.7.8/
The result should be:
/www/releases/4.7.x/4.7.8/x-cart-4.7.8gold.tgz
/www/releases/4.7.x/4.7.8/x-cart-4.7.8platinum.tgz
If you prefer to use a folder other than /www/releases/, you should change the paths in the files build_4.7.xgold.xml/build_4.7.xplatinum.xml accordingly.
For example, if you choose to place your archives in the folder /tmp/4.7.x/4.7.8/, you should locate the following code piece in build_4.7.xgold.xml/build_4.7.xplatinum.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.7.xplatinum.xml;
ant -Dmversion="3" -f build_4.7.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.7.8/chuck-norris.patches contains only the changes pertaining to your module


See also