Closed vincentparrett closed 3 years ago
OK, several issues.
Getting TSVG to compile in XE2 wasn't too difficult, deal with lack of record/string helpers etc.. replaced base64 decode with borrowed code from 10.4 (trimmed to just what was needed).
But that's where this journey ends I think. XE2-5 lack System.Messaging - and replacing that is a mega task.
I think what I will do is just keep a copy of TSVG in my project as I am custom painting in my package list control anyway, I just won't be able to use svg for toolbars etc. I'll deal with that issue later.
I tried the same thing with XE3 but with minor problems: the main one is the lack of System.Message some other little problems with some missing helpers (string.IsWhiteSpace, TRect.FitInto): if we replace the implementation of System.Message with another messaging system we can add support for XE2/3/4/5.
How can we solve this problem, to offer these components for previous versions of Delphi?
I've committed a new version that can be compiled also with Delphi XE3, and maybe XE2, XE4 and XE5. i can test only with XE3, and it works fine ;-) I've create a unit SVGMessage similar to the VCL one to maintain compatible with all the code that require messaging. @vincentparrett if you want to use this library with XE2 or other versions, can you give me a feedback? Thanks.
With 2.4.0 version I've fixed some problems compiling 2.3.0 with XE3...
Sorry I haven't had time to look at this yet, will try when time permits
I've testes with XE3 and It works fine... I'm closing this issue, if we found some other issues we can reopen it.
I like to use it with XE2 but it results in errors . [DCC Error] SVGTypes.pas(161): E2029 'END' expected but 'CONST' found [DCC Error] SVGTypes.pas(163): E2029 'IMPLEMENTATION' expected but ';' found [DCC Error] SVGTypes.pas(165): E2029 '.' expected but 'IMPLEMENTATION' found [DCC Warning] SVGTypes.pas(165): W1011 Text after final 'END.' - ignored by compiler [DCC Error] SVGTypes.pas(193): E2029 $IFEND expected but $ENDIF found [DCC Error] SVGTypes.pas(145): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.Create' [DCC Error] SVGTypes.pas(146): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.FromGPMatrix' [DCC Error] SVGTypes.pas(148): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.IsEmpty' [DCC Error] SVGTypes.pas(149): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.IsIdentity' [DCC Error] SVGTypes.pas(150): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.ToGPMatrix' [DCC Error] SVGTypes.pas(152): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.CreateRotation' [DCC Error] SVGTypes.pas(153): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.CreateScaling' [DCC Error] SVGTypes.pas(154): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.CreateTranslation' [DCC Error] SVGTypes.pas(156): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.Multiply' [DCC Error] SVGTypes.pas(157): E2065 Unsatisfied forward or external declaration: 'TAffineMatrix.Multiply' [DCC Fatal Error] SVG.pas(59): F2063 Could not compile used unit 'SVGTypes.pas'
TAffineMatrixConstants = record helper for TAffineMatrix const Empty: TAffineMatrix = (m11: 0; m12: 0; m21: 0; m22: 0; dx: 0; dy: 0); const Identity: TAffineMatrix = (m11: 1; m12: 0; m21: 0; m22: 1; dx: 0; dy: 0); end;
I have no idea how to fix these errors. The $ENDIF i changed in $IFEND but the other errors i do not know how to fix.
Is there anything stopping this library from being used with XE2 or later?
I'm considering using it in the IDE plugin for my package manager project, which supports XE2 or later.
At the moment I'm using png's for displaying package icons, but with HighDPI support in mind for later versions I think switching to png's would be a good idea.
Apart from the missing packages, is there anything else missing in the code to support those older versions. I know there is a dependency on Indy (just for base64 decode), I can work to remove that dependency.