[lazarus] Re: Code universalizator (D6/FreePascal)
Matthijs Willemstein wrote: And because you will have to migrate the uses as well, it is more convenient not to be bothered with statements like : if source is delphi5 then such and such if source is delphi6 then so and so Ok, about the uses clause I really don´t care, but I really care if the software supports D5 dfm files or not. Does anyone know how dfm files changes over versions?? Maybe they are the same on D5 to D7? All my projects created on D5 compile without problems on D7. I still use D5 a lot ... it produces very small apps =P Felipe _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Re: Code universalizator (D6/FreePascal)
Matthijs Willemstein wrote: From D5 onwards the DFM-files are saved in text format, before they were streamed. Later changes are only properties which have been added or removed from components. This last thing is something which you have to take into account as well. Therefor it is still important to focus on 1 or maybe 2 Delphi versions at the most. Ok, I understand. Latter people interested on support for more versions (like me) can add to it =) (if the license allows it). Felipe _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: Code universalizator (D6/FreePascal)
On Thursday 3 November 2005 02:11, Felipe Monteiro de Carvalho wrote: Matej Hausenblas wrote: At first I tried to convert some very basic Delphi projects into Lazarus-compatible code without completely destroying the original delphi code. The conversion was successfull and now the tested code compiles under the two compilers (fp+d6). Did the projects include forms or they were code only? So far I have only being able to have projects without forms to be completely compatible on the two compilers (with a few IFDEFs). The projects (very small projects) include forms and the conversion with lazres was working fine at this stage. Then there were a few ifdefs in the code to keep the code compilable under Delphi and FPC. I am *very* interested in being able to create a project with forms that can compile on both. If I just convert the forms from Delphi to Lazarus and then change the form on Lazarus the changes won't affect the Delphi version =( For the moment I've got this working: - I converted a dfm with lazres into lrs (and lfm) - I edited the form under Lazarus - to get the code back to Delphi, i renamed lpr to dpr and lfm to dfm - I opened the project in Delphi and there were all changes I made under Lazarus and it seems it compiled correctly with Delphi and FPC For me, more then converting code (I can do this by hand, it's easy) it would be wonderful to have something that can really convert the forms both ways! The current conversion programs doesn't always work, it have already had quite a few problems with it =/ ... but I tested a long time ago, the problems may have being fixed I've already asked on the IRC channel and was told that it should be possible to do with delphi6/7 but not 5. Why not Delphi 5? AFAIK conversion between forms only requires the delphi forms to be based on text rather then binary and delphi 5 has text forms. I am currently working with a project that compiles on both Lazarus 0.9.10 and Delphi 5. Based on the little experience I've had with Lazarus, the conversion tools were working fine (dfm-lfm,dpr-lpr,pas-pas), so maybe the addition of some more functionalities to these utils and creation of a GUI combining these modules to get a code universalizator working on win32/delphi, win32/fpc and linux/fpc could be possible. I would love that =) - dfm conversion: - I think the current tool does a great job As far as I remember there isn't a tool to go from Lazarus to Delphi on forms. But I may be wrong. I forgot this, then it's a part of the TODO list:-) Maybe the converter could be generating exact copies for dpr and lpr, A project that compiles on both normally uses just one file for lpr and dpr (only the dpr). the lazarus lpr file happens to have the dpr extension. This works very well. dfm and lfm, but then the user should re-convert every time after modifying the code to synchronize the files... that could be acceptable and less painful? For me the only problem are the dfm and lfm files. - another problem which is annoying me a bit right from the beginning: the license: * given that it's a school project, the code written by me for this project is licensed by the school, so I don't have the right to decide which license it should be covered with. * I think I could escape this problem nicely if I'd use portions of existing code (the tools for example), so it must be released under the same license as the original parts. I think you can escape this problem by talking to your teacher and then the principal of the School. I work on the University of São Paulo and upon receiving my schoolarship I noticed that there was something on the contract that said that everyting I did would become copyright by one of the institutes. I use code I produced alone, many years ago on our projects. This code can't suddenly became property of others; I am my coleagues did not agree with the clause. He talked to the teachers and employes and had it removed. The lesson here is that this kind of problem is resolved talking to people at your school that can solve it =) Say to them that you will be doing a great job by licensing your project in such a way that it may eventually be included into Lazarus. The name of the school will also look good on the open source community. My professors are in large majority fans of free software, so the talks should be successful, I'll be talking with my professor tomorrow morning (CET), so in the evening I could have some further details on this issue. Lazarus is GPL/LGPL licensed? This tool should be also licensed this way to keep it coherent, I think. - language: I'm studying in french, so this project should be at least in english and french. Is it easy to create an application with externalized texts? I saw .po files in the lazarus sources, what does Lazarus use for the i18n? It uses an LGPL
Re: [lazarus] Re: Code universalizator (D6/FreePascal)
On Thu, 3 Nov 2005 20:20:24 +0100 Matej Hausenblas [EMAIL PROTECTED] wrote: On Thursday 3 November 2005 02:11, Felipe Monteiro de Carvalho wrote: Matej Hausenblas wrote: [...] For the moment I've got this working: - I converted a dfm with lazres into lrs (and lfm) - I edited the form under Lazarus - to get the code back to Delphi, i renamed lpr to dpr and lfm to dfm - I opened the project in Delphi and there were all changes I made under Lazarus and it seems it compiled correctly with Delphi and FPC There are some hidden bugs. Lazarus has some properties, that Delphi does not have and the other way around. The bug will appear, when the application creates the form the first time. [...] I've already asked on the IRC channel and was told that it should be possible to do with delphi6/7 but not 5. Why not Delphi 5? AFAIK conversion between forms only requires the delphi forms to be based on text rather then binary and delphi 5 has text forms. The Delphi to lazarus conversion should be able to read binary dfm. [...] Lazarus is GPL/LGPL licensed? This tool should be also licensed this way to keep it coherent, I think. Almost. The LCL is under a modified LGPL, which also allows to statically link into closed source applications. [...] Should I create a Wiki page on Lazarus' wiki to document this? Yes, it would be great. I second that. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Re: Code universalizator (D6/FreePascal)
Matej Hausenblas wrote: At first I tried to convert some very basic Delphi projects into Lazarus-compatible code without completely destroying the original delphi code. The conversion was successfull and now the tested code compiles under the two compilers (fp+d6). Did the projects include forms or they were code only? So far I have only being able to have projects without forms to be completely compatible on the two compilers (with a few IFDEFs). I am *very* interested in being able to create a project with forms that can compile on both. If I just convert the forms from Delphi to Lazarus and then change the form on Lazarus the changes won't affect the Delphi version =( For me, more then converting code (I can do this by hand, it's easy) it would be wonderful to have something that can really convert the forms both ways! The current conversion programs doesn't always work, it have already had quite a few problems with it =/ ... but I tested a long time ago, the problems may have being fixed I've already asked on the IRC channel and was told that it should be possible to do with delphi6/7 but not 5. Why not Delphi 5? AFAIK conversion between forms only requires the delphi forms to be based on text rather then binary and delphi 5 has text forms. I am currently working with a project that compiles on both Lazarus 0.9.10 and Delphi 5. Based on the little experience I've had with Lazarus, the conversion tools were working fine (dfm-lfm,dpr-lpr,pas-pas), so maybe the addition of some more functionalities to these utils and creation of a GUI combining these modules to get a code universalizator working on win32/delphi, win32/fpc and linux/fpc could be possible. I would love that =) - dfm conversion: - I think the current tool does a great job As far as I remember there isn't a tool to go from Lazarus to Delphi on forms. But I may be wrong. Maybe the converter could be generating exact copies for dpr and lpr, A project that compiles on both normally uses just one file for lpr and dpr (only the dpr). the lazarus lpr file happens to have the dpr extension. This works very well. dfm and lfm, but then the user should re-convert every time after modifying the code to synchronize the files... that could be acceptable and less painful? For me the only problem are the dfm and lfm files. - another problem which is annoying me a bit right from the beginning: the license: * given that it's a school project, the code written by me for this project is licensed by the school, so I don't have the right to decide which license it should be covered with. * I think I could escape this problem nicely if I'd use portions of existing code (the tools for example), so it must be released under the same license as the original parts. I think you can escape this problem by talking to your teacher and then the principal of the School. I work on the University of São Paulo and upon receiving my schoolarship I noticed that there was something on the contract that said that everyting I did would become copyright by one of the institutes. I use code I produced alone, many years ago on our projects. This code can't suddenly became property of others; I am my coleagues did not agree with the clause. He talked to the teachers and employes and had it removed. The lesson here is that this kind of problem is resolved talking to people at your school that can solve it =) Say to them that you will be doing a great job by licensing your project in such a way that it may eventually be included into Lazarus. The name of the school will also look good on the open source community. - language: I'm studying in french, so this project should be at least in english and french. Is it easy to create an application with externalized texts? I saw .po files in the lazarus sources, what does Lazarus use for the i18n? It uses an LGPL reimplementation of the GNU gettext (the original was GPL, witch is too restrictive). Personally I haven't used, but people recomend it. Should I create a Wiki page on Lazarus' wiki to document this? Yes, it would be great. Felipe _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: Code universalizator (D6/FreePascal)
On Wed, 2005-11-02 at 23:11 -0200, Felipe Monteiro de Carvalho wrote: Matej Hausenblas wrote: I've already asked on the IRC channel and was told that it should be possible to do with delphi6/7 but not 5. Why not Delphi 5? AFAIK conversion between forms only requires the delphi forms to be based on text rather then binary and delphi 5 has text forms. It was me who said that Matej should stick to D6 / 7. The reason for this is that from 5 to 6 some functionality changed from one unit to another. And because you will have to migrate the uses as well, it is more convenient not to be bothered with statements like : if source is delphi5 then such and such if source is delphi6 then so and so This could be done at a later stage. So it was only to narrow down the project, because otherwise failure is looming, if you try to support all delphi versions :) Matthijs -- Matthijs Willemstein [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives