About couple years ago, I've faced neccessity to add Auto-update functionality to my software. There were several restrictions, to which this tool should comply.
- Freeware, open source.
- Intuitive programming interface.
- Final binary should be independent of any external libraries.
- Easy to integrate with a product
"ess-console command-line usage:\n" "ess-console.exe [options] [switches]\nOptions:\n" "-f - input script file <filename>.<ess|cess|cesse>\n" "-o - script compiled output directory or file <filename>.<cess|cesse>\n" "-i - optional script include path(s), semicolon-separated\n" "-l - optional script binary link path(s), semicolon-separated\n" "-e - script execution entry point, optionally followed by parameter values, semicolon-separated\n" " example: -e <someFunction>[;\"param 0\";\"param 1\";\"param 2\"]\n" "Switches:\n" "-m - start console application window minimized\n" "-d - preserve debug information in compiled script\n" "-c - encrypt the compiled binary file\n" "-r - run loaded script file\n" "-x - exit console upon successfull operation completion\n" "-n - export translatable strings to the *.pot file alongside compiled script binary when saving the latter\n" "-? - show this information\n" "-h - alias of -?\n"
Below is an example of simple ESS script which loads any file as binary, an converts any byte, which has most signficant bit set, into C hex-escaped character. Other bytes get copied to output stream without changes.
It means, that if we feed non-BOM utf-8 file to this script, an output will be fully single-byte-compatible.
An ESS code snippet demonstrating changes introduced in esscript engine included in upcoming release of esframework version 1.23
The following example shows scripting FTDI MPSSE usage to interface OPT3001 lighting sensor on I2C bus. As usual, paste the script into console, compile, and run, providing you have proper HW config ready, and have proper OPT3001 I2C address in script code.
Following a release of updated ES Scripting console, which is built upon updated ES Framework ver. 1.21, an expample script is available, to demonstrate how easy stepper motor is controlled directly from scripting console. Demo uses FT232H breakout board and 28BYJ-48 + interface board. Though I2C MPSSE interface object is used, the same GPIO functionality is included in SPI interface as well.