qxcompat aids in converting application forms and program resources related to the presentation layer from other 4GL vendor tools like FourGen® and Genero® into Lycia formats. It can convert the whole project at a time or separate files from a specific project into the corresponding Lycia format.
To use qxcompat in Lycia VS Code Extension, open the Terminal (File → Terminal → New Terminal in VS Code's menu), and then specify the path to qxcompat ($LYCIA_DIR/bin) prior to specifying its options. Alternatively, add the aforementioned path as a PATH variable, and use qxcompat without a path indication.
qxcompat --input-file <file_name> [--output <output_folder_name>]
|
--input-file <file_name> or -i <file_name> |
A file with one of the following extensions: .4ad, .4fd, .4fm, .4pw, .4sm, .4st, .4tb, .4tm |
|
--output <output_folder_name> or -o <output_folder_name> |
A directory to place the converted files in. This argument is optional, and if not used, the output files are placed in the current directory. Note: The qxcompat creates a folder called source within the output directory, and places the resulting files in that folder.
|
| Source File Format | Purpose | Conversion Result |
| .4pw | Project file | The .fglproject (Lycia project) file and .fgltarget files for each program |
| .4ad | Action Defaults file | .ad2 file |
| .4fd | Graphical form | .fm2 file |
| .4fm | Graphical form | .fm2 file |
| .4sm | Start Menu | .sm2 file |
| .4st | Styles | Does not get converted |
| .4tb | Toolbar | .tb2 file |
| .4tm | Top Menu | .tm2 file |
Files that are copied to the output folder as is:
Example 1: Project Converison
qxcompat --input-file project_a.4pw --output converted_project_a
where:
|
project_a.4pw |
a project file with the following content: <?xml version="1.0" encoding="UTF-8" ?> <Workspace defaultApplication="000000001" version="1.0"> <Group label="Source"> <Application id="000000001" label="test_conversion"> <File filePath="input_toolbar.4tb"/> <File filePath="input_topmenu.4tm"/> <File filePath="input_sourcefile.4gl"/> <File filePath="input_formfile.per"/> </Application> </Group> </Workspace> |
|
converted_project_a |
a folder where output should be located |
The project_a.4pw file conversion results:
a new Lycia project will be created in the directory specified as output;
apart from the default Lycia project content, the project folder converted_project_a will contain all the files listed in project_a.4pw, converted where a file format requires:
input_toolbar.4tb → input_toolbar.tb2
input_topmenu.4tm → input_topmenu.tm2
input_formfile.per → is copied without changes
input_sourcefile.4gl → is copied without changes
Example 2: File Conversion
qxcompat project_b_top_menu.4tm
If the qxcompat command is followed by only one argument (a file name and extension), it is regarded as the input-file. The tool will convert the project_b_top_menu.4tm into the project_b_top_menu.tm2 file, and place it in the current directory.