Compiling and testing your application

Top  Previous  Next

In order to create a dual Windows/HTML5 FireMonkey application, you have to compile this application including the WebFMX.Platform.dcu unit. By default, the WebFMX.Platform.dcu unit will be accessible on the installation directory, under the folder below:

 

C:\Program Files (x86)\WebFMX\dev\XE3\win32

 

C:\Program Files (x86)\WebFMX\dev\XE3\win64

 

C:\Program Files (x86)\WebFMX\dev\XE4\win32

 

C:\Program Files (x86)\WebFMX\dev\XE4\win64

 

 

The source file will only be available when you install using the Development installation mode.

 

If you install the Development Environment these paths will be automatically added to the Delphi XE3 and Delphi XE4 Library Paths (32 bits and 64 bits paths).

 

 

Follow the next steps to compile your application:

 

 

1. Open your Rad Studio or Delphi XE3 or Delphi XE4.

 

3. Open your application project.

 

4. Add the unit WebFMX.Platform to the Uses of your project source file.

 

 

program MyApp;

 

uses

 FMX.Forms,

 WebFMX.Platform,

 MyApp.Main in MyApp.Main.pas' {Form1};

 

{$R *.res}

 

begin

 Application.Initialize;

 Application.CreateForm(TForm1, Form1);

 Application.Run;

end.

 

 

5. Compile Your Program and Run it.

 

6. Observe on the Task Bar that the WebFMX Development Server icon will appear.

 

 

7. Right-click on the icon, and after that click on the "Open" menu.

 

 

A Web browser window will be opened with your application running inside.

 

 

If you don't want the debugging mode to start a new WebFMX Server or want to specify the port in which it will start, you can set change the DevServer property. You may also configure  WebFMX not to open a new browser window while running your application.