Migration Support 0.6.3 and below
In order to simplify the migration of existing applications based on previous qooxdoo releases to a newer release, qooxdoo comes with convenient migration scripts. Of course, the dynamic nature of JavaScript and your personal coding style will not allow for a completely automatic process for any release change. But even a semi-automatic process that requires your manual action significantly reduces the total amount of work and is less error-prone. The script output contains detailed information in form of a checklist, including line numbers in the original files.
In the following command you need to replace some placeholders with your indiviual values:
JS_SCRIPT_DIRECTORYis the relative or absolute path to the directory that contains the JavaScript files you would like to migrateTARGETVERSIONis the qooxdoo release number you would like to migrate to$qxdenotes the the folder of your new qooxdoo version (SVN checkout or SDK) that you would like to migrate to
$qx/frontend/framework/tool/generator.py --script-input JS_SCRIPT_DIRECTORY \ --migrate-source --migration-target TARGETVERSION
You can only jump from one release version to the immediately following release version. For migrations that involve multiple qooxdoo releases, the step above has to be repeated for any intermediate version.
As an example the following command migrates all your JavaScript files in the source/class folder to qooxdoo 0.6.3 (implicitely from version 0.6.2 as mentioned above):
$qx/frontend/framework/tool/generator.py --script-input source/class \ --migrate-source --migration-target 0.6.3
For more options please consult the article for generator.py.
The migration support is much more powerful in the versions 0.6.2 and above than the older scripts that only supported simple replacements based on regular expressions. The new migration is based on the actual parse tree of the JavaScript input files and allows for very sophisticated changes.
As a drawback, the migration support does not fully support other input files than pure JavaScript files (.js file extension) any longer. To be fair, it has never been a good idea to mix different languages (e.g. html markup and JavaScript).
But it is possible to use the regexp based migration data to also update HTML, PHP or other files. In this case you can define additional migration inputs. This could look like this:
$qx/frontend/framework/tool/generator.py --script-input source/class \ --migration-input source/html --migrate-source --migration-target 0.6.3
You can use multiple script and migration inputs.
Usually it is helpful to permanently save the output to a file on your harddisk in addition to reading the infos on the screen. You can easily use tee for this:
cd frontend framework/tool/generator.py --script-input JS_SCRIPT_DIRECTORY \ --migrate-source --migration-target TARGETVERSION | tee FILENAME
This will output all info to the console, as before, but also logs it to FILENAME.
