Installing LXW
The new version of ITrack LX, colloquially known as LXW, is the faster and sexier version of ITrack designed to run in the browser, primarily on handheld scanner devices.
Dependencies
Besides the regular version of MySQL used by ITrack Enterprise, LXW requires:
Installing the client-side code
This is the code that is accessible via HTTP! Check it out to your Apache htdocs folder, or whatever other folder will get it served up to the tubes.
The directory to check out is https://svn.isoftdata.com/Web/javascript-trunk/lxw.
To configure the connection to the server-side code: edit line 15 of server/index.php to point it at the path where you checked out the server-side code.
To configure client application settings (which should all have reasonable defaults), you can edit the config.js file in the client path.
Installing the server-side code
This is the PHP code that talks to the database! It should be checked out somewhere that is not accessible via HTTP.
Put all three directories in a single directory "lxwserver" for example somewhere that is not accessible via HTTP.
The directory to check out is https://svn.isoftdata.com/Web/tinymvc-trunk/lxw.
I believe you need more than just the lxw directory listed above. you also need the https://svn.isoftdata.com/Web/tinymvc-trunk/sysfiles directory.
And possibly https://svn.isoftdata.com/Web/tinymvc-trunk/myfiles/ as well.
To configure the database connection, edit /lxw/configs/database.php.
Setting Up the Auto-Updater
Use with care: The AU process for LXW is not well-explored!
This is the process that will download updates for LXW and then install them.
https://svn.isoftdata.com/Web/javascript-trunk/isoft-updater-example/
- Transfer contents of this directory to the server hosting LXW. The standard directory for Linux based servers is /var/www/lxw/updater (This directory will not exist yet.)
- Configure config.json
- Run the .sh files
- install.sh
- run.sh
- Add updater to crontab
Configure config.json
An example of a config.json
{
"update_url": "autoupdate URL here",
"product_code": "valid product code here",
"download_directory": "/var/www/lxw-release/updater/downloaded-all",
"destination_directories": {
"default": "/var/www/lxw-release/updater/downloaded-latest",
},
"extraction_directories": {
"LXW-client.zip": "/var/www/html/lxw",
"LXW-server.zip": "/var/www/lxw-release"
}
}
After the updater is run properly then a new section will appear below this section and it will look like this.
"versions": {
"LXW-client.zip": "#####",
"LXW-server.zip": "#####"
}
Run .sh Files
Unfortunately as of February 25th 2013 you are unable to run the .sh files as they will be unable to find the config file. Instead you can run the contents of the files without any problem. Here is an example of each file as you would use it for LKQ.
install.sh
sudo npm install isoft-updater -g
run.sh
node /lib/node_modules/isoft-updater /var/www/lxw-release/updater/config.json
Add Updater to Crontab
The last bit to setting up the auto updater is the "auto" part. Here is how to access and edit the crontab.
crontab -e
This is what LKQ's crontab looks like for the autoupdater.
12 21 * * * node /lib/node_modules/isoft-updater /var/www/lxw-release/updater/config.json
This is the format that crontab uses.
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
Note
Removing the version section in config.json will cause it to redownload the latest update during the next scheduled update cycle or forced update. Can be used to test the process.
Testing
Browsing to the [the URL you would expect to correspond to the client-side files you installed]/server/index.php should show you a snide remark embedded in JSON.
Browsing to the regular URL should show you a screen asking you to identify your store number (assuming that your web server is configured to serve up index.html files when you browse to a directory).