-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legal question #42
Comments
Check out the "2.2.6.4 - Restrictions" and any further section: https://www.embarcadero.com/products/rad-studio/rad-studio-eula |
Is my understanding right, that I should not open source the 2 repositories but it is OK to use the approach for the closed source applications I want to sell? My goal is to use Delphi (registered version) for creating the UI, while writing the majority of the application coding in D. |
I set the repositories to private access to avoid any legal issues until clarification. |
Hi @andre2007, |
Hi @pointermess, The idea is, that you have a Delphi dll, containing only System/FMX uses statements. In addition you add 3 Delta units which exposes generic extern C functions to access Extended RTTI. This functions can be used to call instance/static methods (including constructors and destructors) and properties of Delphi components. The Dll can be used from almost any language. Therefore on Rust side you just need wrapper classes for all Delphi components you want to use. The wrapper classes forwards the calls to the right Dll functions. But as already said by @lmbelo, publishing the FMX/System wrapper classes (Rust) is a legal issue. Therefore I keep this part closed source. Unfortunately Embarcadero currently opened the door only for python, it would be great if it could be allowed for other languages too. Kind regards |
@andre2007 I really like the idea to take FMX to Rust. |
@lmbelo You can find the source code of my 2 repositories here. The source code is under BSL, therefore you can do whatever you like with the code. The source code has some obvious issues, like it is architecture dependent (x86). delta-fmx-10-2-1-master.zip The interesting part for you in the source code are likely the Delphi units. |
I am interested in both D and Rust support with FMX and VCL..... I need to do some more research on how we can support you in these projects. |
In case your research is succesful, I have following proposal we can discuss. In the Embarcadero Github Organization a new repository e.g. DelphiFMXLib is created. This repository has following content:
enum TShiftState {ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMidldle, ssDouble, ssTouch, ssPen, ssCommand, ssHorizontal};
class TStrings: TPersistent
{
mixin PascalClass!("System.Classes.TStrings");
@property string Text();
@property void Text(string value);
int Add(string value);
int AddObject(string value, TObject aObject);
void Clear();
} If there isn't something like that, it is not bad, but it would avoid a lot of manual work.
Based on this repository wrapper for Rust and other languages could be easily build. In a separate Github repository I could then create the D wrapper coding. I copy the dynamic libraries and the API specification JSON into it. A generator script will create based on the API specification JSON the wrapper coding for D. Using a package manager and the online package repository (code.dlang.org) the package can be easily used by the community. |
@andre2007 can we schedule a review of these projects next week? |
Yes, @andre2007 , Let us schedule a meet to review these projects once.. |
@lmbelo @Priyatham10 |
@andre2007, Yeah, I'll be available during the times you mentioned. We'll think of the day, and we can schedule a meeting. |
Wednesdays are busy for me. How about Thursday ?
|
Thursday is fine for me. I made some progress. Attached you can see, how the repository "DelphiFMXLib" could look like. This is the programming language independent repository, containing the dynamic libraries, the Delphi source code of the library (OPTIONAL), and the specification JSON files. -> I found here https://github.com/Embarcadero/DelphiFMX4Python/wiki/Included-Types the information, which units are included in DelphiFMX4Python. I used this information in Project1.dpr. (Some units are not available or might have different names as my Delphi Version is 10.2 different) -> I just wonder, whether the Wiki is outdated. TImageControl needs TBitmapImage, which is located in "FMX.Graphics". But FMX.Graphics is not in the Wiki list. Where can I see, what is actually used in DelphiFMX4Python? -> The tool "pasdoc" is able to analyze Delphi pascal files and output XML files containing the public parts. I used a tool to convert the XML files to JSON, as JSON is a little bit easier to handle (read & manipulate) than XML. As the Wiki page (https://github.com/Embarcadero/DelphiFMX4Python/wiki/Included-Types) also contains a list of elements per unit (e.g. TPoint , TRect and TSize for System.Types) the JSON content could be reduced to the used classes & records. I created an incident for pasdoc, as it is not able to parse System.Types (pasdoc/pasdoc#171) |
@andre2007 the source code distributed with Delphi has minimal documentation. We have extracted it from the DocWiki. It will be available in the VCL and FMX libraries in the coming release. |
@lmbelo I do not use pasdoc for its original purpose (generating documentation based on source code) but just for analyzing the Delphi units source code (Fmx.* and System.*). But what I need to know is, whether the Wiki page https://github.com/Embarcadero/DelphiFMX4Python/wiki/Included-Types is up to date. I would like to provide the exact same set of Delphi units / classes as DelphiFMX4Python provides. |
Okay, let's meet on Thursday. @andre2007 , I just updated the wiki page with the updated Units and Types: https://github.com/Embarcadero/DelphiFMX4Python/wiki/Included-Types . It now includes all the Types that are wrapped under the correct Units. There might be some mistakenly wrapped types with a different parent for a given type. We need to update those in our upcoming releases. Our major focus at this point is to release minimal documentation for Python packages for whatever existing wrapped Types. |
@Priyatham10 Thanks for updating the wiki. I created 2 private repositories for the discussion. You should have received access: I created a file spec.json, which contains the content from the wiki in a machine readable format:
The idea is, the lib folder and the spec folder are copied to language dependent repositories (D / Rust). |
Great @andre2007 . Please invite @lmbelo and @jimmckeeth also to those repos for access. We can have a conversation. |
@Priyatham10 Yes, invitation was sent to all three of you. I also started to make a list of discussion points for thursday: |
I'll try to get a meeting scheduled for next Thursday |
@jimmckeeth |
Good question. That is ambiguous even for native English speakers too. The
19th, so not this week, but next. The 19th.
|
@Priyatham10 |
It is probably an oversight on our side. I'm not aware of any reason to exclude it. BTW, I realize today is the 19th, when I said we would meet. I had my meeting last week, and we are moving forward with another meeting, so it will still be a while before we have a "final" answer, but it is certainly optimistic. |
Thanks for the answer. This class just serve as example for the general case that the public functions / procedures/ properties using classes/ types which aren't listed. |
Hi @andre2007 , Yes there are some types that we missed wrapping. It might be one of them. We're working adding missing ones. Please contribute by noting down the list of missed types so that we can improve. You can add those ones. |
@Priyatham10 Yes, I like to contribute here. I assume we are using different Delphi versions (Mine is Delphi 10.2). Could you do me a favor and provide for the targeted Delphi version the Pasdoc SimpleXML files? Then we are working on the same base. Here some info regarding Pasdoc
The commands could look like this:
|
@Priyatham10 I just noticed the SimpleXML output of Pasdoc is incomplete in case a Property is defined protected in an ancestor class and set to published in the child class. Either protected must be included in |
We develop using Delphi 11 but keep in focus that it should at least work through Community Edition (10.4) |
There might be a small misunderstanding. The proposed solution is independent of the Delphi version. Of course, the higher the Delphi version is, the more features are available and the more bugs are fixed. The D/Rust users (building apps using FireMonkey) do not need an Delphi IDE. Also the authors of the DelphiFMX4D/DelphiFMX4Rust do not need a Delphi IDE. The perfect solution would be if a Github Action for repository DelphiFMXLib would build the DLLs, SOs... on pull request merge to main branch using a recent Delphi compiler. I wanted to say something else. With each new Delphi version, a class might move from one unit to another unit. If I now contribute to the Wiki page an we are using different Delphi versions, I would assign class A to unit ABC while for your Delphi version it is located in unit DEF. |
@andre2007 I understood your concerned point. I observed some methods and properties added in Alexandria (11, 11.2) as compared to Sydney (10.4) but didn't find any classes changing units from 10.4 to 11. So, You can go ahead with the Sydney (Community Edition) as base Delphi version. Then you can contribute to the Wiki page as per that. As far as the GitHub Action is concerned, I don't think we have a Delphi compiler available. Check this: https://docs.github.com/en/get-started/learning-about-github/github-language-support |
@Priyatham10 as far as I remember, the community version of Delphi does not have the unit source code files of the FireMonkey units. To build the Pasdoc SimpleXML files for the units specified on wiki, I need for these units the source code. But we can delay this issue. My assumption was, you are using inhouse build servers, connected to Github Actions, to build the binaries for DelphiFMX4Python. This could also be at the moment a manual step and revisited later. When the issue with pasdoc/pasdoc#176 is solved, we could also check how to involve Rust developers to build a repository similiar to DelphiFMX4D. Side remark: it would be an interesting enhancement to the Delphi compiler to output s.th. similiar to Pasdoc SimpleXML output. Therefore you can pass a Delphi unit and you will get a JSON/XML containing all routines, types, variables, interfaces, classes and records of this unit including all sub elements (like methods, properties,...). |
@Priyatham10 I just learned the Delphi compiler has the feature to generate a XML representation of a Delphi project (https://docwiki.embarcadero.com/RADStudio//Sydney/en/XML_Documentation_for_Delphi_Code). Do you know how I can get the XML out for a specific unit like "...\19.0\source\rtl\sys\System.Types.pas" ? Second question, can I get the XML output for a specific unit also when I only have it as DCU? Then I could switch to the newest Community version. |
@andre2007, As I came to this project, I directly used Delphi 11 as I was a bit new. I didn't check with this yet. Need to investigate on this.
Yes, you can get it using: Project > Options > Building > Delphi Compiler > Compiling > Other options > Generate XML documentation
This one should be checked out.. |
Hello everyone. A few weeks ago I have asked andre2007 (after seeing his amazing project for the D language) here about the possibility of using FMX within the Rust language. I did not expect to get these kind of responses, especially people from Embarcadero being interested in such a project. I've tried implementing it myself using the kind response from andre2007 but ultimately failed due to time restrictions on my end. Since it looks like some things have been done since my last check in here, I would like to ask if you have any news regarding @andre2007's proposed solution. I think such a solution would be amazing to bring the great Firemonkey UI framework to other languages. If there is anything I can do to help creating this solution, please let me know. I have an active Delphi subscription with the most recent version, if that helps with writing/generating the wrapper classes. Kind regards Milos |
Hi All (@jimmckeeth, @lmbelo, @Priyatham10), if I get the approval from Embarcadero side, I would invite @pointermess to the private repositories or make the repositories public. Please check the license files whether they are ok from your side. If it is ok, I will write a document how @pointermess can start the Rust specific repository. Kind regards |
Dear Embarcadero,
Similiar to DelphiFMX4Python I build an API to make use of Delphi FMX from the D Programming Language
https://github.com/andre2007/delta-core-10-2-1
https://github.com/andre2007/delta-fmx-10-2-1
Sample
No binary artifact (Dll containing FMX code) is distributed on the Github repository but an user of the repository needs to compile itself a DLL using an official Delphi IDE.
Dll sample source
But the repository contains D wrapper classes for Delphi classes like
https://github.com/andre2007/delta-core-10-2-1/blob/master/source/System/Classes.d
https://github.com/andre2007/delta-fmx-10-2-1/blob/master/source/FMX/Graphics.d
The mixin template generates the method bodies automatically based on the signatures.
Do you see any legal issue with providing this API and especially providing D wrapper classes for Delphi System/FMX classes on the Github repository?
Also the question when I want to ship an application, I have to distribute the compiled Delphi DLL as part of my application (like https://github.com/andre2007/delta-fmx-10-2-1/blob/master/examples/gui_custom_form/views/Project1.dpr). Do you see any legal issue here?
Kind regards
Andre
The text was updated successfully, but these errors were encountered: