Master recourse files (.tr2)

Master recourse files (.tr2) contain the list of all the static resources available (like images, css styles, and JavaScript files) which can be used by the Lycia-based application at runtime.

This functionality is implemented for security reasons: 4gl programs have only limited access to the files stored on the AppServer. If the static file is not included in the .tr2 file, it will not be accessed at runtime.

Master recourse files are created when the program is deployed with IDE, get the name of the program, and are saved to the AppServer working directory specified in listener.xml:

If the program is built without IDE, a master recourse file (.tr2) file can be created manually by a 4gl developer and saved to the AppServer working directory with the name of the program.

Paths specified in the .tr2 file must lead the current directory of the application.

The files which must be added to the .tr2 file include:

Below you can find some examples of different master recourse files.

The content of a .tr2 file for a program

 

without any static files

<?xml version="1.0" encoding="UTF-8"?>

<Resources>

</Resources>

only with a .qxtheme file

(which is added to the program by default)

<?xml version="1.0" encoding="UTF-8"?>

<Resources>

  <Resource path="tocase.qxtheme"/>

</Resources>

with several different static files

<?xml version="1.0" encoding="UTF-8"?>

<Resources>

  <Resource path="extensions/cms-demo-redesign/fontawesome-webfont.woff"/>

  <Resource path="extensions/cms-demo-redesign/fontawesome-webfont.ttf"/>

  <Resource path="extensions/cms-demo-redesign/fontawesome-webfont.svg"/>

  <Resource path="extensions/cms-demo-redesign/ic-magnifier.png"/>

  <Resource path="cms_mdi_blue.css"/>

  <Resource path="extensions/cms-demo-redesign/transformers.js"/>

  <Resource path="extensions/cms-demo-redesign/FontAwesome.otf"/>

  <Resource path="extensions/cms-demo-redesign/fontawesome-webfont.eot"/>

  <Resource path="icon32/refresh_w2_02_032.ico"/>

  <Resource path="image/qxt_toolbar_manager_grey.jpg"/>

  <Resource path="help_html/de/help_example_01.html"/>

  <Resource path="document/dde_excel_doc.xls"/>

  <Resource path="icon32/hardware/screen-import.png"/>

</Resources>

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.