Collapse AllExpand All

5. Installing Other Extensions

The information above explains how to use xTuple Admin Utility to install the core code for all xTuple Editions (PostBooks, Distribution, Manufacturing), but it does not cover the installation of certain extensions (e.g., private-extensions, xdruple, registration management, etc.). To install extensions, you will need to use the command line. The following section explains the process of installing an extension via the command line.

    # Change to root
    $ sudo su

    # Change to 'xtuple'
    $ su xtuple

    # Go to where your mobile web client code is
    $ cd /opt/xtuple/4.10.0/yourinstall

    # Clone the extension repo.  The owner/group should be 'xtuple'.
    $ git clone -b v4.10.0 http://github.com/xtuple/someExtension.git

    $ cd someExtension

    $ git submodule update --init

    # Install npm module dependencies
    $ npm install

    # Build and Apply your Extension
    $ /opt/xtuple/4.10.0/yourinstall/xtuple/scripts/build_app.js -c /etc/xtuple/4.10.0/yourinstall/config.js -d DatabaseName -e /opt/xtuple/4.10.0/yourinstall/xtuple/someExtension

    # Or after alreadying applying the extension, rebuild/upgrade and Apply everything again
    $ /opt/xtuple/4.10.0/yourinstall/xtuple/scripts/build_app.js -c /etc/xtuple/4.10.0/yourinstall/config.js -d DatabaseName

    # Exit from the 'xtuple' user.
    $ exit

    # Reload or restart your node.js service (as sudo or root)
    $ systemctl restart xtuple-yourinstall.service (ubuntu 16)
    $ service xtuple-yourinstall restart (ubuntu 14)

In general, when build_app.js runs, it looks in the xt.ext table for paths to source code to build and apply. This means that on databases that have existing mobile web client code if the installation path/location of an extension changes on the disk you need to update the xt.ext.ext_location field for that extension in the database. For example - In version 4.10.0, the xDruple package moved from private-extensions/ to xdruple-extension/. Therefore, the location of the xdruple-extension needs to be updated in the xt.ext table. In this case, you would run: `UPDATE xt.ext SET ext_location='/xdruple-extension' WHERE ext_name='xdruple' AND ext_location='/private-extensions';` Then build_app will find the source tree for that extension.