This guide provides detailed instructions for installing DelphiMVCFramework in your development environment.
| Delphi Version | Package Group |
|---|---|
| Delphi 13 Athens | packages\d130\dmvcframework_group.groupproj |
| Delphi 12 Athens | packages\d120\dmvcframework_group.groupproj |
| Delphi 11.3 Alexandria | packages\d113\dmvcframework_group.groupproj |
| Delphi 11 Alexandria | packages\d110\dmvcframework_group.groupproj |
| Delphi 10.4 Sydney | packages\d104\dmvcframework_group.groupproj |
| Delphi 10.3 Rio | packages\d103\dmvcframework_group.groupproj |
| Delphi 10.2 Tokyo | packages\d102\dmvcframework_group.groupproj |
| Delphi 10.1 Berlin | packages\d101\dmvcframework_group.groupproj |
| Delphi 10.0 Seattle | packages\d100\dmvcframework_group.groupproj |
- Windows (32-bit and 64-bit)
- Linux (64-bit) - Delphi 10.2 Tokyo or newer
- Android (experimental)
-
Download the Latest Release
- Go to GitHub Releases
- Download the main framework zip file
- Download the samples zip file (optional but recommended)
-
Extract Files
Extract to: C:\DMVC (or your preferred location) -
Open Package Group
- Launch RAD Studio
- Open the appropriate package group for your Delphi version (see table above)
-
Build and Install
- Right-click on the package group → Build All
- Right-click on
dmvcframeworkDT→ Install
-
Configure Library Paths
- Go to Tools → Options → Environment Options → Delphi Options → Library
- Add these paths to Library Path:
C:\DMVC\sources C:\DMVC\lib\loggerpro C:\DMVC\lib\swagdoc\Source C:\DMVC\lib\dmustache
git clone https://github.com/danieleteti/delphimvcframework.git
cd delphimvcframeworkThen follow steps 3-5 from Method 1.
-
IDE Wizard
- Go to File → New → Other
- Verify Delphi Project → DMVC → DelphiMVCFramework Project is available
-
Create Test Project
- Use the wizard to create a new project
- Try to compile (Ctrl+F9)
- If successful, installation is complete
-
Extract Samples (if downloaded)
Extract samples to: C:\DMVC\samples -
Test Sample Project
Open: C:\DMVC\samples\hello_world\HelloWorld.dproj Compile and run (F9)
DelphiMVCFramework includes the following dependencies:
- LoggerPro - High-performance logging framework
- dmustache - Mustache template engine for Delphi
- SwagDoc - Swagger/OpenAPI documentation generator
- FireDAC - For database connectivity (comes with Delphi)
- Indy - HTTP server implementation (comes with Delphi)
You can configure global settings in your main unit:
uses
MVCFramework.Commons;
// Global serialization settings
MVCSerializeNulls := True; // Serialize null valuesCreate a .env file in your application directory:
# Database configuration
DB_HOST=localhost
DB_NAME=myapp_db
DB_USER=admin
DB_PASS=secret123
# Server settings
SERVER_PORT=8080
DEBUG_MODE=trueLoad in your application:
uses
MVCFramework.DotEnv;
var
dotEnv := NewDotEnv
.WithStrategy(TMVCDotEnvPriority.EnvThenFile)
.UseProfile('production')
.Build();program MyServer;
{$APPTYPE CONSOLE}
uses
MVCFramework,
Web.WebBroker,
IdHTTPWebBrokerBridge;
procedure RunServer;
var
LServer: TIdHTTPWebBrokerBridge;
begin
LServer := TIdHTTPWebBrokerBridge.Create(nil);
try
LServer.DefaultPort := 8080;
LServer.Active := True;
Writeln('Server started on port 8080');
ReadLn;
finally
LServer.Free;
end;
end;
begin
ReportMemoryLeaksOnShutdown := True;
RunServer;
end.// Use the DMVCFramework Service template from the wizard
// Or inherit from TMVCServiceBaselibrary MyApacheModule;
uses
Web.WebBroker,
Web.ApacheHTTP,
MyWebModuleU in 'MyWebModuleU.pas' {MyWebModule: TWebModule};
{$R *.res}
// Apache module entry point
exports
apache_module name 'dmvc_module';
begin
Application.Initialize;
Application.WebModuleClass := WebModuleClass;
Application.Run;
end.library MyISAPI;
uses
Web.WebBroker,
Web.Win.ISAPIApp,
MyWebModuleU in 'MyWebModuleU.pas' {MyWebModule: TWebModule};
{$R *.res}
// ISAPI entry point
exports
GetExtensionVersion,
HttpExtensionProc,
TerminateExtension;
begin
Application.Initialize;
Application.WebModuleClass := WebModuleClass;
Application.Run;
end.Solution: Verify all library paths are correctly configured
Check: Tools → Options → Library → Library Path
Solution: Build the runtime package first
1. Build dmvcframework.bpl
2. Install dmvcframeworkDT.bpl
Solution: Check for memory leaks
Enable: ReportMemoryLeaksOnShutdown := True;
Solution: Change the port or stop the conflicting service
Check: netstat -an | findstr :8080
Enable debug information in your project:
{$IFDEF DEBUG}
// Enable debug logging
LogI('Application starting in DEBUG mode');
// Enable detailed error messages
EMVCException.SetDetailedMessage(True);
{$ENDIF}For production environments:
// Disable debug features
{$DEFINE RELEASE}
{$O+} // Enable optimizations
{$R-} // Disable range checking
{$Q-} // Disable overflow checking
// Configure thread pool
WebRequestHandlerProc.MaxConnections := 1024;- Quick Start Guide - Get up and running quickly
- Samples - Example projects and code
- FAQ - Frequently asked questions
- Community Support - Get help from the community
If you encounter issues during installation:
- Check the FAQ for common solutions
- Search existing issues on GitHub
- Ask the community in our Facebook group
- Create a new issue on GitHub with detailed information
Next Step: Follow the Quick Start Guide to create your first DelphiMVCFramework application!