TAChart: Move OpenGL-related units to separate package to avoid requirement of OpenGL libraries when TAChart is built (https://forum.lazarus.freepascal.org/index.php/topic,46713.msg333520.html).

git-svn-id: trunk@61897 -
This commit is contained in:
wp 2019-09-18 09:13:39 +00:00
parent 6c5a95f4d7
commit 76d23f638b
11 changed files with 147 additions and 90 deletions

6
.gitattributes vendored
View File

@ -5428,6 +5428,10 @@ components/tachart/languages/tachartstrconsts.uk.po svneol=native#text/plain
components/tachart/languages/tachartstrconsts.zh_CN.po svneol=native#text/plain
components/tachart/numlib_fix/direct.inc svneol=native#text/pascal
components/tachart/numlib_fix/ipf_fix.pas svneol=native#text/plain
components/tachart/opengl/tachartopengl.lpk svneol=native#text/xml
components/tachart/opengl/tachartopengl.pas svneol=native#text/pascal
components/tachart/opengl/tadraweropengl.pas svneol=native#text/pascal
components/tachart/opengl/taopengl.pas svneol=native#text/pascal
components/tachart/print/tachartprint.lpk svneol=native#text/xml
components/tachart/print/tachartprint.pas svneol=native#text/pascal
components/tachart/print/taprint.pas svneol=native#text/pascal
@ -5456,7 +5460,6 @@ components/tachart/tadiagramdrawing.pas svneol=native#text/pascal
components/tachart/tadiagramlayout.pas svneol=native#text/pascal
components/tachart/tadrawercanvas.pas svneol=native#text/pascal
components/tachart/tadrawerfpcanvas.pas svneol=native#text/pascal
components/tachart/tadraweropengl.pas svneol=native#text/pascal
components/tachart/tadrawersvg.pas svneol=native#text/pascal
components/tachart/tadrawutils.pas svneol=native#text/pascal
components/tachart/taenumerators.pas svneol=native#text/pascal
@ -5476,7 +5479,6 @@ components/tachart/talegendpanel.pas svneol=native#text/pascal
components/tachart/tamath.pas svneol=native#text/pascal
components/tachart/tamultiseries.pas svneol=native#text/pascal
components/tachart/tanavigation.pas svneol=native#text/pascal
components/tachart/taopengl.pas svneol=native#text/pascal
components/tachart/taradialseries.pas svneol=native#text/pascal
components/tachart/taseries.pas svneol=native#text/plain
components/tachart/tasources.pas svneol=native#text/pascal

View File

@ -7,7 +7,7 @@ object Form1: TForm1
ClientHeight = 319
ClientWidth = 688
OnCreate = FormCreate
LCLVersion = '1.9.0.0'
LCLVersion = '2.1.0.0'
object OpenGLControl1: TOpenGLControl
AnchorSideLeft.Control = Bevel1
AnchorSideTop.Control = Owner

View File

@ -33,7 +33,7 @@ implementation
{$R *.lfm}
uses
TADrawUtils, TADrawerOpenGL in '../../tadraweropengl.pas', TADrawerCanvas;
TADrawUtils, TADrawerOpenGL, TADrawerCanvas;
procedure TForm1.Chart1AfterPaint(ASender: TChart);
begin

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
</General>
@ -24,20 +26,23 @@
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="4">
<Item1>
<PackageName Value="TAChartLazarusPkg"/>
<MinVersion Major="1" Valid="True"/>
<PackageName Value="TAChartOpenGL"/>
</Item1>
<Item2>
<PackageName Value="LazOpenGLContext"/>
<MinVersion Release="1" Valid="True"/>
<PackageName Value="TAChartLazarusPkg"/>
<MinVersion Major="1" Valid="True"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
<PackageName Value="LazOpenGLContext"/>
<MinVersion Release="1" Valid="True"/>
</Item3>
<Item4>
<PackageName Value="LCL"/>
</Item4>
</RequiredPackages>
<Units Count="3">
<Units Count="2">
<Unit0>
<Filename Value="opengldemo.lpr"/>
<IsPartOfProject Value="True"/>
@ -49,11 +54,6 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
<Unit2>
<Filename Value="..\..\taopengl.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="TAOpenGL"/>
</Unit2>
</Units>
</ProjectOptions>
<CompilerOptions>
@ -75,7 +75,7 @@
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Exceptions Count="4">
<Item1>
<Name Value="EAbort"/>
</Item1>
@ -85,6 +85,9 @@
<Item3>
<Name Value="EFOpenError"/>
</Item3>
<Item4>
<Name Value="EFreeType"/>
</Item4>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -7,7 +7,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, lazopenglcontext, Main, tachartlazaruspkg, TAOpenGL;
Forms, Main;
{$R *.res}

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="TAChartOpenGL"/>
<Type Value="RunAndDesignTime"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
</SearchPaths>
</CompilerOptions>
<Description Value="OpenGL drawing back-end for TAChart"/>
<Files Count="2">
<Item1>
<Filename Value="tadraweropengl.pas"/>
<UnitName Value="TADrawerOpenGL"/>
</Item1>
<Item2>
<Filename Value="taopengl.pas"/>
<UnitName Value="TAOpenGL"/>
</Item2>
</Files>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="TAChartLazarusPkg"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
</Package>
</CONFIG>

View File

@ -0,0 +1,21 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit TAChartOpenGL;
{$warn 5023 off : no warning about unused units}
interface
uses
TADrawerOpenGL, TAOpenGL, LazarusPackageIntf;
implementation
procedure Register;
begin
end;
initialization
RegisterPackage('TAChartOpenGL', @Register);
end.

View File

@ -30,7 +30,7 @@
for details about the copyright.
"/>
<Version Major="1"/>
<Files Count="55">
<Files Count="53">
<Item1>
<Filename Value="tagraph.pas"/>
<HasRegisterProc Value="True"/>
@ -138,138 +138,129 @@
<UnitName Value="TADrawerCanvas"/>
</Item24>
<Item25>
<Filename Value="tadraweropengl.pas"/>
<AddToUsesPkgSection Value="False"/>
<UnitName Value="TADrawerOpenGL"/>
</Item25>
<Item26>
<Filename Value="tadrawersvg.pas"/>
<UnitName Value="TADrawerSVG"/>
</Item26>
<Item27>
</Item25>
<Item26>
<Filename Value="taintervalsources.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TAIntervalSources"/>
</Item27>
<Item28>
</Item26>
<Item27>
<Filename Value="tachartaxisutils.pas"/>
<UnitName Value="TAChartAxisUtils"/>
</Item28>
<Item29>
</Item27>
<Item28>
<Filename Value="tachartlistbox.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TAChartListbox"/>
</Item29>
<Item30>
</Item28>
<Item29>
<Filename Value="taenumerators.pas"/>
<UnitName Value="TAEnumerators"/>
</Item30>
<Item31>
</Item29>
<Item30>
<Filename Value="tachartextentlink.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TAChartExtentLink"/>
</Item31>
<Item32>
</Item30>
<Item31>
<Filename Value="editors\tatooleditors.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TAToolEditors"/>
</Item32>
<Item33>
</Item31>
<Item32>
<Filename Value="tamath.pas"/>
<UnitName Value="TAMath"/>
</Item33>
<Item34>
</Item32>
<Item33>
<Filename Value="tachartimagelist.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TAChartImageList"/>
</Item34>
<Item35>
</Item33>
<Item34>
<Filename Value="tachartteechart.pas"/>
<UnitName Value="TAChartTeeChart"/>
</Item35>
<Item36>
</Item34>
<Item35>
<Filename Value="tadatatools.pas"/>
<UnitName Value="TADataTools"/>
</Item36>
<Item37>
</Item35>
<Item36>
<Filename Value="taanimatedsource.pas"/>
<UnitName Value="TAAnimatedSource"/>
</Item37>
<Item38>
</Item36>
<Item37>
<Filename Value="tatextelements.pas"/>
<UnitName Value="TATextElements"/>
</Item38>
<Item39>
</Item37>
<Item38>
<Filename Value="taaxissource.pas"/>
<UnitName Value="TAAxisSource"/>
</Item39>
<Item40>
</Item38>
<Item39>
<Filename Value="editors\taseriespropeditors.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TASeriesPropEditors"/>
</Item40>
<Item41>
</Item39>
<Item40>
<Filename Value="tacustomfuncseries.pas"/>
<UnitName Value="TACustomFuncSeries"/>
</Item41>
<Item42>
</Item40>
<Item41>
<Filename Value="tafitutils.pas"/>
<UnitName Value="TAFitUtils"/>
</Item42>
<Item43>
</Item41>
<Item42>
<Filename Value="taguiconnector.pas"/>
<UnitName Value="TAGUIConnector"/>
</Item43>
<Item44>
</Item42>
<Item43>
<Filename Value="tadiagram.pas"/>
<UnitName Value="TADiagram"/>
</Item44>
<Item45>
</Item43>
<Item44>
<Filename Value="tadiagramdrawing.pas"/>
<UnitName Value="TADiagramDrawing"/>
</Item45>
<Item46>
</Item44>
<Item45>
<Filename Value="tadiagramlayout.pas"/>
<UnitName Value="TADiagramLayout"/>
</Item46>
<Item47>
</Item45>
<Item46>
<Filename Value="tachartstrconsts.pas"/>
<UnitName Value="TAChartStrConsts"/>
</Item47>
<Item48>
</Item46>
<Item47>
<Filename Value="tachartcombos.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TAChartCombos"/>
</Item48>
<Item49>
</Item47>
<Item48>
<Filename Value="tahtml.pas"/>
<UnitName Value="TAHtml"/>
</Item49>
<Item50>
</Item48>
<Item49>
<Filename Value="tafonts.pas"/>
<UnitName Value="TAFonts"/>
</Item50>
<Item51>
</Item49>
<Item50>
<Filename Value="taexpressionseries.pas"/>
<UnitName Value="TAExpressionSeries"/>
</Item51>
<Item52>
<Filename Value="taopengl.pas"/>
<UnitName Value="TAOpenGL"/>
</Item52>
<Item53>
</Item50>
<Item51>
<Filename Value="tafitlib.pas"/>
<UnitName Value="TAFitLib"/>
</Item53>
<Item54>
</Item51>
<Item52>
<Filename Value="editors\tasourcepropeditors.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="TASourcePropEditors"/>
</Item54>
<Item55>
</Item52>
<Item53>
<Filename Value="tadatapointseditor.pas"/>
<UnitName Value="TADataPointsEditor"/>
</Item55>
</Item53>
</Files>
<LazDoc Paths="$(LazarusDir)\components\tachart\fpdoc"/>
<i18n>

View File

@ -18,8 +18,7 @@ uses
TATextElements, TAAxisSource, TASeriesPropEditors, TACustomFuncSeries,
TAFitUtils, TAGUIConnector, TADiagram, TADiagramDrawing, TADiagramLayout,
TAChartStrConsts, TAChartCombos, TAHtml, TAFonts, TAExpressionSeries,
TAOpenGL, TAFitLib, TASourcePropEditors, TADataPointsEditor,
LazarusPackageIntf;
TAFitLib, TASourcePropEditors, TADataPointsEditor, LazarusPackageIntf;
implementation