Skip to content

Commit d250f7c

Browse files
committed
delphi: Keep all data files in the project directory
- Output the executable file to the project directory. - Save layout data in `data.dat` in the project directory. - Keep nwind.db in the project directory: resolves the problem with failed database connection in Report Designer. - Upgrade the project to RAD Studio 13. - Fix a minor problem with the application form.
1 parent 8b4e761 commit d250f7c

6 files changed

Lines changed: 16 additions & 19 deletions

File tree

Delphi/ReportTemplate.dproj

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{C8FCB972-B167-4D60-AB2D-37E035C49AE4}</ProjectGuid>
44
<ProjectVersion>20.3</ProjectVersion>
@@ -82,6 +82,8 @@
8282
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
8383
<PostBuildEvent><![CDATA[copy /Y "$(BDS)\Redist\win32\WebView2Loader.dll" $(OUTPUTDIR)
8484
$(PostBuildEvent)]]></PostBuildEvent>
85+
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
86+
<DCC_ExeOutput>.</DCC_ExeOutput>
8587
</PropertyGroup>
8688
<PropertyGroup Condition="'$(Base_Win64)'!=''">
8789
<DCC_UsePackage>dxPScxCommonRS29;dxPSdxChartControlLnkRS29;dxRibbonRS29;vclwinx;DataSnapServer;dxPScxExtCommonRS29;dxRichEditControlCoreRS29;fmx;dxSpreadSheetReportDesignerRS29;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;dxComnRS29;dxFlowChartDesignerRS29;appanalytics;IndyProtocols;vclx;dxBarExtDBItemsRS29;dbxcds;vcledge;cxVerticalGridRS29;FmxTeeUI;cxFireDACAdaptersRS29;dxPSDBTeeChartRS29;cxSchedulerWebServiceStorageRS29;DBXFirebirdDriver;dxRichEditControlRS29;dxPsPrVwAdvRS29;FireDACSqliteDriver;DbxClientDriver;dxPSdxGaugeControlLnkRS29;soapmidas;dxRibbonCustomizationFormRS29;TeeUI;dbexpress;dxEMFRS29;dxDockingRS29;inet;vcltouch;dxPSdxFCLnkRS29;dxorgcRS29;FireDACDBXDriver;dxSpreadSheetCoreConditionalFormattingDialogsRS29;fmxdae;dxPSRichEditControlLnkRS29;dxPSdxSpreadSheetLnkRS29;CustomIPTransport;FireDACMSSQLDriver;cxADOAdaptersRS29;dxPSPrVwRibbonRS29;IndySystem;dxPScxTLLnkRS29;dxPSdxDBOCLnkRS29;dxGDIPlusRS29;ibxbindings;vclFireDAC;dxPSCoreRS29;dxSpreadSheetRS29;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;cxGridEMFRS29;dxPSdxMapControlLnkRS29;dxGanttControlRS29;dxPScxVGridLnkRS29;dxPScxPivotGridLnkRS29;dxWizardControlRS29;dxADOServerModeRS29;bindcompdbx;rtl;FireDACMySQLDriver;dxCloudServiceLibraryRS29;cxIBXAdaptersRS29;dxServerModeRS29;DBXSqliteDriver;dxBarDBNavRS29;DBXSybaseASEDriver;dxSpreadSheetCoreRS29;dxNavBarRS29;vclimg;DataSnapFireDAC;inetdbxpress;FireDAC;xmlrtl;ibxpress;dxFireDACEMFRS29;dsnap;FireDACDb2Driver;dxPSdxLCLnkRS29;DBXOracleDriver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;DatasnapConnectorsFreePascal;dxPSLnksRS29;dxmdsRS29;dxPSdxOCLnkRS29;cxSchedulerGridRS29;dxPScxSchedulerLnkRS29;emshosting;dxADOEMFRS29;dxChartControlRS29;dxPSdxDBTVLnkRS29;FireDACCommonDriver;dxGaugeControlRS29;IndyIPClient;dxPDFViewerRS29;bindcompvclwinx;dxOrgChartAdvancedCustomizeFormRS29;emsedge;bindcompfmx;dxBarExtItemsRS29;dxReportsRS29;dxFlowChartLayoutsRS29;inetdb;dxdborRS29;ibmonitor;FireDACASADriver;Tee;dxPScxGridLnkRS29;cxPivotGridChartRS29;vclactnband;fmxFireDAC;FireDACInfxDriver;dxRichEditCoreRS29;cxTreeListdxBarPopupMenuRS29;DBXMySQLDriver;dxFlowChartAdvancedCustomizeFormRS29;VclSmp;cxSchedulerRibbonStyleEventEditorRS29;DataSnapCommon;dxPSTeeChartRS29;fmxase;dxtrmdRS29;dxFlowChartRS29;DBXOdbcDriver;dbrtl;dxPScxPCProdRS29;FireDACOracleDriver;TeeDB;FireDACMSAccDriver;cxGridRS29;dxSpellCheckerRS29;DataSnapIndy10ServerTransport;dxRichEditDocumentModelRS29;dxMapControlRS29;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;cxLibraryRS29;Skia.Package.VCL;vcldb;dxPSdxPDFViewerLnkRS29;cxSchedulerTreeBrowserRS29;bindcomp;dxTabbedMDIRS29;cxExportRS29;inetstn;IndyCore;RESTBackendComponents;dxHttpIndyRequestRS29;dxTileControlRS29;dxFireDACServerModeRS29;cxPivotGridOLAPRS29;FireDACADSDriver;RESTComponents;IndyIPServer;vcl;dsnapxml;adortl;dsnapcon;DataSnapClient;DataSnapProviderClient;dxCoreRS29;cxPivotGridRS29;dxdbtrRS29;DBXDb2Driver;dxSkinsCoreRS29;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;dxBarRS29;tethering;bindcompvcl;CloudService;DBXSybaseASADriver;dxSpreadSheetConditionalFormattingDialogsRS29;cxTreeListRS29;FMXTee;soaprtl;cxSchedulerRS29;dxDBXServerModeRS29;soapserver;FireDACIBDriver;$(DCC_UsePackage)</DCC_UsePackage>
@@ -93,6 +95,8 @@ $(PostBuildEvent)]]></PostBuildEvent>
9395
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
9496
<PostBuildEvent><![CDATA[copy /Y "$(BDS)\Redist\win64\WebView2Loader.dll" $(OUTPUTDIR)
9597
$(PostBuildEvent)]]></PostBuildEvent>
98+
<DCC_ExeOutput>.</DCC_ExeOutput>
99+
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
96100
</PropertyGroup>
97101
<PropertyGroup Condition="'$(Cfg_1)'!=''">
98102
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
@@ -162,10 +166,10 @@ $(PostBuildEvent)]]></PostBuildEvent>
162166
<Source Name="MainSource">ReportTemplate.dpr</Source>
163167
</Source>
164168
<Excluded_Packages>
165-
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k290.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
166-
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp290.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
167-
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
168-
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
169+
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k370.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
170+
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp370.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
171+
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k370.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
172+
<Excluded_Packages Name="$(BDSBIN)\dclofficexp370.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
169173
</Excluded_Packages>
170174
</Delphi.Personality>
171175
<Deployment Version="5">
@@ -1141,35 +1145,31 @@ $(PostBuildEvent)]]></PostBuildEvent>
11411145
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
11421146
<PreLinkEvent/>
11431147
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1144-
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win32\WebView2Loader.dll&quot; $(OUTPUTDIR)
1145-
</PostBuildEvent>
1148+
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win32\WebView2Loader.dll&quot; $(OUTPUTDIR)</PostBuildEvent>
11461149
<PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
11471150
</PropertyGroup>
11481151
<PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win64'">
11491152
<PreBuildEvent/>
11501153
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
11511154
<PreLinkEvent/>
11521155
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1153-
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win64\WebView2Loader.dll&quot; $(OUTPUTDIR)
1154-
</PostBuildEvent>
1156+
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win64\WebView2Loader.dll&quot; $(OUTPUTDIR)</PostBuildEvent>
11551157
<PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
11561158
</PropertyGroup>
11571159
<PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win32'">
11581160
<PreBuildEvent/>
11591161
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
11601162
<PreLinkEvent/>
11611163
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1162-
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win32\WebView2Loader.dll&quot; $(OUTPUTDIR)
1163-
</PostBuildEvent>
1164+
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win32\WebView2Loader.dll&quot; $(OUTPUTDIR)</PostBuildEvent>
11641165
<PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
11651166
</PropertyGroup>
11661167
<PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win64'">
11671168
<PreBuildEvent/>
11681169
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
11691170
<PreLinkEvent/>
11701171
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1171-
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win64\WebView2Loader.dll&quot; $(OUTPUTDIR)
1172-
</PostBuildEvent>
1172+
<PostBuildEvent>copy /Y &quot;$(BDS)\Redist\win64\WebView2Loader.dll&quot; $(OUTPUTDIR)</PostBuildEvent>
11731173
<PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
11741174
</PropertyGroup>
11751175
</Project>

Delphi/nwind.db

644 KB
Binary file not shown.

Delphi/uData.dfm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -813,12 +813,11 @@ object DataModule1: TDataModule1
813813
Top = 104
814814
object ReportsNWindConnectionString: TdxBackendDatabaseSQLConnection
815815
DisplayName = 'NWindConnectionString'
816-
ConnectionString =
817-
'XpoProvider=SQLite; Data Source=|DataDirectory|\..\..\..\nwind.d' +
818-
'b; Mode=ReadOnly'
816+
ConnectionString = 'XpoProvider=SQLite; Data Source=nwind.db; Mode=ReadOnly'
819817
end
820818
end
821819
object dxSkinController1: TdxSkinController
820+
NativeStyle = False
822821
SkinName = 'WXI'
823822
Left = 304
824823
Top = 104

Delphi/uData.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ implementation
3333

3434
{$R *.dfm}
3535
const
36-
DataFileName = '..\..\data.dat';
36+
DataFileName = 'data.dat';
3737

3838
procedure TDataModule1.DataModuleCreate(Sender: TObject);
3939
begin

Delphi/uMainForm.dfm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ object MainForm: TMainForm
2525
Width = 377
2626
Height = 25
2727
Caption = 'Design Report'
28-
SpeedButtonOptions.CanBeFocused = False
2928
TabOrder = 1
3029
OnClick = btnDesignClick
3130
end

Delphi/uMainForm.pas

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ procedure TMainForm.btnDesignClick(Sender: TObject);
6262
ShowMessage('The database is empty');
6363
Exit;
6464
end;
65-
6665
dxReport1.ReportName := DataModule1.mdLayoutsName.AsString;
6766
dxReport1.Layout.Assign(DataModule1.mdLayoutsLayout);
6867
dxReport1.ShowDesigner;

0 commit comments

Comments
 (0)