Advanced Installer

Navigation:  Development > Universal Installer >

Advanced Installer

Previous pageReturn to chapter overviewNext page

Advanced installer used for Component, Theme or any system update.

 

1.Each advanced installer has a definition file called installer.xml with resource mapping.

2.In installer definition file we define the file mapping with source path to copy. See below example
 
<copy>
  <src>/component/appstore</src>
  <des>/component/appstore</des>
</copy>

 

Note: The installer always overwrite existing file with new one.
 
Step by Step example
See below example to create an installer for "rainbow" theme
 

1.First create a new folder "myfirstinstaller"

2.Arrange webroot data:

a.Create new folder "webroot" inside "myfirstinstaller"

b.Again create new folder "themeroot" inside "webroot"

c.Copy "rainbow" from "/webroot/themeroot" and in new "themeroot"

3.Arrange Template folder

a.Create a new folder "development" in "myfirstinstaller"

b.Again create "view" inside "development"

c.Copy "rainbow" from "/development/view" in new "view" folder

4.Now our folder structure will be like below
myfirstinstaller
  |_ /webroot/themeroot/rainbow
  |_ /development/view/rainbow

5.Crate Definition file

a.Create new XML file installer.xml in "myfirstinstaller" folder

b.Add copy instruction for each directory
 
<?xml version="1.0" encoding="utf-8"?>
<installer>
    <command>
        <copy>
            <src>/development/view/rainbow</src>
            <des>/development/view/rainbow</des>
        </copy>
        <copy>
            <src>/webroot/themeroot/rainbow</src>
            <des>/webroot/themeroot/rainbow</des>
        </copy>
    </command>
</installer> 
 

6.After after these steps zip  "myfirstinstaller" directory 

7.To installer this package you can use Component or Theme area in admin pane. 
 

Note: Admin installer can update resource in any path of the project. For your further reference you can download any appication form appRain store and see the format.

 

See also Install Extension, Install Theme, Version Update