How to import a complete .LPR to Island

Title. I would like to port a complete existent .lpr (10000 units~) to Island/Elements. I cant get around exaclt how I could manage this, any help much appreciated!

SInce when i open a .lpr with Water it says:
cannot open this project…

As of now, you can’t, Water doesnt know anything about .lpr projects. If you can send me a sample/test case, I can log a feature request to add this. Until then, you’ll have too manually create a new project and add the files in.

hmm ok, But this is a must have for you guys if you wanna allow ppl to moveover to your toolchain more quickly from where they are currently.

here the testcase
GenericResult (2).zip (67.5 KB)

You say must-have, yet in16 years this is the first time we get asked about this :wink:

I’ll have a look. I see the .lpr doesn’t really reference any of the other .pas files, nor do the other .lp* files. when importing this, should all .pas files in the current folder (and subfolders) be considered part of the project and included? (and the .lpr renamed to .pas, I guess)

hmm im wondering, like for this case, if i wanna use the src code of a famous (ion pascal area atleast famous…) engine code, and wanna exactly 1:1 port it to you guys, and continue the work with oxygene then its a must have :smiley: but also wondering if ppl reallyy never neeeded to port a complete project to you over,so they can start using ur tools without starting a big project from scratch, curious but if you say so haha

ah yes, sry forfgot to adress this, consider them part of it , this was originally a bug testcase from fpc bugtracker so use it only as a demo to port the entire thing.

FWIW, I’ve implemented a tentative .lpr import for the next build; your feedback appreciated. For now, I rename/copy the .lpr to .pas, if there’s an .lpi file, I add all the Units it lists as being part of the project.

Would be cool if you could run this against some of your projects and see how it fares, and/or if you can point me at some larger projects online to test against. (this is not in today’s 2585, but will be in the next one).

Note this only helps you top create the project, it will not magically fix your code to build with Oxygene ;).

@mh Would u mind, downloading the “castle-game-engine” from web urself i wanted to send it to you but sadly i cant upload it takes to long i guess… if you dont bother

I thought OXygene (Idk if Island plays a role on this) does support FPC/Delphi code, or am i mistaken? If not fully to what an extent :thinking:

i know its like 350 mb, but it really would give u a good idea what to do best, to allow this, when you can instant try bigger projects out, in terms of portability .)

Well, Oxygene is Object Pascal, similar to Delphi and FPC, yes. But (a) its syntax is not 100% compatible (but 99%, in Delphi Compatibility Mode) and (b) it doesn’t have then same base libraries (RTL, VCL, etc) as Delphi and FPC.

See Oxygene for Delphi Developers.

@mh ahh yea, i need to switch to the Delphi compatibility mode, to archive this, what would you say tho, is not yet fully supported when you mentioned the “99%”? what is the “1%” that is missing? And btw, could you make thatt happen with the castle game engine (sry i just couldnt upload it) would be really neat to see as a good realcase to port a big project or alteast to see, if it even ports fully or to which extent. ?

There’s some stuff that will never ever be supported. The Docs should cover most of it.

That said, where possible, we want to try to support all legacy syntaxes form Delphi and FPC, so if you run into anything, please log a bug here and we’ll try to fix it — we did a huge round of DCM improvements a few months back already, so yo should not run into too many issues.

Make what happen? You want me to port it? thats not gonna happen, I don’t have that much spare time :). But if you want to look at porting it, i’ll support you in any way I can.

Then what you meant with this :open_mouth: I may have gotten this wrong.

I was going to test (and did) the import, not spend time to port actual code. :wink:

ahh my bad then haha, thx tho. I cant wait to try that out in next beta-build :slight_smile:

And you also said that its possible now (then for next build) to really import a .LPR? That would be huge man!

Great job man :smiley: the only question now remains tho, if the units would be included in that testcase, would you say it will include them in the project creation? since I only see the main .pas file being included in the project file, (I know why ofc, since i forgot to include the 2 units direclty into the projectfile)

like for instance, if there would be 20 other units, would Water copy these 20 other units into the new water-project location? if not, this would be cool, to have a complete seperate project file with that. so all units + Program file

It’s not copying anything. It creates a new Elements project in the same folder, and references the existing files that were I included in the original lpi. (Except for the lpr, that gets copied because elements won’t understand the file unless it has a .pas extension)

1 Like