Adjusting Paths

<< Click to Display Table of Contents >>

Navigation:  Developer's Guide > Web Deployment >

Adjusting Paths

If you don't plan to deploy your app using the uniGUI Runtime Package because you want to deploy the runtime files yourself, then the path settings must be adjusted accordingly. There are some essential paths for a uniGUI application which must be adjusted before you can run it on the server.


First of all, you must be sure that your Web Application knows where Ext JS files are located. For this, in your Application ServerModule your must assign the correct path to ExtRoot. The default value of ExtRoot is "[ext]\" which means that Ext JS files are located where uniGUI Runtime Package is installed: <InstallFolder>\FMSoft\Framework\uniGUI\





If you do not install uniGUI Runtime Package on the target PC, you must assign a full or relative path to ExtRoot. If you assign a relative path it will be relative to ServerRoot and you can use the "..\..\..\myfolder" partial path notation.


The easiest method is to set the ExtRoot to ".\[ext]\" and copy the "" folder to the root folder of your web application (where application executable or DLL module resides).  However, for security reasons, it is better to put the "" folder in another folder and deploy all "" files as read-only. Under IIS, you must be sure that your application has enough credentials for a read-only access to the "" folder and its files.


Some examples.


ExtJS Files are in:


ExtRoot = "[ext]\"                <Runtime Package InstallFolder>\FMSoft\Framework\uniGUI/\  (*Recommended )

ExtRoot = ".\[ext]\"                <server root>\\

ExtRoot = "C:\ExtJS\[ext]\"        C:\ExtJS\\

ExtRoot = ".\ExtJS\[ext]\"        <server root>\ExtJS\\

ExtRoot = ".\ExtJS\ext\"        <server root>\ExtJS\ext\


In all cases, is translated into a string which represents the correct folder for your Ext JS version. For example, if your uniGUI version is based on Ext JS version then it will be translated to folder name: .\<path>\ext-\


The same principle applies to uniRoot, uniMobileRoot and TouchRoot properties.


More examples.


uniGUI JS Files are in:


UniRoot = "[uni]\"                <Runtime Package InstallFolder>\FMSoft\Framework\uniGUI/\  (*Recommended )

UniMobileRoot = "[unim]\"        <Runtime Package InstallFolder>\FMSoft\Framework\uniGUI/\  (*Recommended )

UniRoot = ".\[uni]\"                <server root>\\  

UniMobileRoot = ".\[unim]\"        <server root>\\  


Note: In the above cases, if "path\\" folder does not exist, "path\uni\" folder will be used instead.


The string correspond to the uniGUI version. If your uniGUI version is, the translated folder name will be uni-


If you deploy custom uniGUI themes to your server, you can also set a custom folder for theme files. You can use the UniPackagesRoot property for this.

The default value for UniPackagesRoot is "[unipack]\" which means that custom themes are placed in the default location used by the installer. You can change this location by assigning a different value to the UniPackagesRoot property. Make sure that the "themes" folder from the default installation is completely copied to the target folder:


Themes are in:


UniPackagesRoot = "C:\ext\[unipack]\"        "C:\ext\unipackages\themes\" folder

UniPackagesRoot = ".\themefiles\"        "<server root>\themefiles\themes\" folder

UniPackagesRoot = ".\[unipack]\"        "<server root>\unipackages\themes\" folder


In ServerModule there are two other path parameters: ServerRoot and CacheFolder.






ServerRoot defines the root path for all relative paths. A blank value points to the application startup folder.




A uniGUI server needs a folder to create temporary files. Normally, it is a folder named Cache created under the same folder your module exists. You can change this default location by assigning a different path to the CacheFolder parameter. Under IIS, you must be sure that your application has enough credentials for a full access to CacheFolder.


If you want to change these properties at runtime, do it on the event handler OnBeforeInit of UniServerModule.


procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
  ExtRoot := 'C:\deploy\[ext]\';
  UniRoot := 'C:\deploy\[uni]\';