I’m new to Delphi and Oxygene. I have inherited some Delphi 7 pascal source code. I would like to compile it in Oxygene but I’m not sure how to import things. I have several Pascal files as well as some .dfm files and one .dpr file. I don’t see any “import” options. Is it possible to import a delphi 7 project into Oxygene? I’m using the trial version of Oxygene.
For one, Oxygene won’t compile most Delphi code out of the box. The language is fairly similar, but the class libraries used by Delphi are vastly different. For example, there is no “TForm”, no “TStringList”, etc.
We have an option to import Delphi code and have the language/syntax adjusted to Oxygene (for the small differences that do exist), do to this you can right-click your project in Solution Explorer and choose “Add|Import Delphi/Win32” and then browse for a .pas file. The file will be adjusted, where necessary, and added to your project.
What this import will do is adjust to syntactical differences, only. it will not rework your code so that usage of Delphi RTL or VCL functions and classes would get replaced — that’d be next to impossible.
There is an open source library called ShineOn available that brings some RTL/VCL functionality to Oxygene, but it is of limited scope. You can find it at https://github.com/teamro/shineon. Note that this is a library provided by external contributors, not created or supported by RemObjects.