Jump to content
Geoffrey Smith

Can the packages setup be updated for ICS in new versions?

Recommended Posts

1 hour ago, Vincent Parrett said:

any customisations you need to make to a particular version would be lost each time you generate the packages

I don't grab what you mean. Can you give an example of customization?

Share this post


Link to post
6 hours ago, FPiette said:

I don't grab what you mean. Can you give an example of customization?

Simply adding or changing the units or resources that need to be included in a dproj for specific compiler versions.  Or compiler options for that matter - delphi is not without it's issues that needs work arounds.

  • Thanks 1

Share this post


Link to post
1 hour ago, Vincent Parrett said:

Simply adding or changing the units or resources that need to be included in a dproj for specific compiler versions.  Or compiler options for that matter

I have also problems to get your point. Do you have a concrete example or is this only a gut feeling?

Share this post


Link to post

looking through my projects on github - I found one example so far - I need to change the name of the project and output dll for expert dll's - if I'm just rehashing a single dproj then where do I configure that?  

Share this post


Link to post

Perhaps I missed some point, but my understanding is that we want to simplify the creation/synchronization of Delphi package files for different Delphi versions.

Like: Hey, I have a package project for Delphi 11. Please create similar packages for all Delphi versions below down to XE7.

I don't see how renaming the project and/or output DLL fits here.

Share this post


Link to post
1 minute ago, Uwe Raabe said:

I don't see how renaming the project and/or output DLL fits here.

ok, perhaps it's just me that needs that. 

Share this post


Link to post
1 hour ago, Vincent Parrett said:

perhaps it's just me that needs that. 

Even if it were only you, I would be interested in the underlying use case for that.

Share this post


Link to post
8 minutes ago, Uwe Raabe said:

Even if it were only you, I would be interested in the underlying use case for that.

DLL projects do not support LibSuffix, so if you want to generate dll's with a different naming convention (with the default being the same for every dproj) - how do you do that if you are just copying a single dproj. Sure you can do that during the copy/generation of the projects if you code it, but where do you configure that (rather than hard coded in the generator)? 

 

BTW, I can no longer see UweRaabe/PackageMagician on github? 

Share this post


Link to post
8 hours ago, Vincent Parrett said:

DLL projects do not support LibSuffix,

Actually they do! Only the GUI doesn't support it since XE2: https://quality.embarcadero.com/browse/RSP-20623

 

This is the relevant part of the MMX_BDS.dpr:

exports InitExpert name WizardEntryPoint;

{$LIBSUFFIX '21'}

begin
  EnableCodeSite;
  TMMXInitialize.Execute;
end.

The value is adjusted for each Delphi version with a Finalbuilder action:

Text Replace [ {$LIBSUFFIX '*'}... ] with [ {$LIBSUFFIX '%LibSuffix%'}... ]  in [ %ProjectName%.dpr ]

 

8 hours ago, Vincent Parrett said:

BTW, I can no longer see UweRaabe/PackageMagician on github? 

OK. I have added you as collaborator.

Share this post


Link to post
1 hour ago, Fr0sT.Brutal said:

Hmm, didn't dproj schema change over compiler versions? It could be hard to downgrade instead of upgrade.

I never had problems opening a project with a Delphi version which was created with a higher version. Usually Delphi ignores everything it doesn't expect and adds anything missing what is needed. So when the goal is to open the project in the IDE it doesn't really matter which way we choose.

 

Perhaps others prefer to work differently, but I tend to do the work with the latest Delphi version and make fixes for previous versions when needed - namely when the build fails. The build starts with the lowest compiler version and therefore any incompatibilities in code are exposed early.

 

Up to now I never had problems with project files. That may be related to normalizing the projects with Project Magician, which also strips a whole bunch of unnecessary garbage from the project files. The MMX project mentioned in my previous comment has only one DPR and DPROJ file for all Delphi versions from Seattle to Alexandria.

 

Obviously I cannot rule out any problems appearing with other projects. Although, I tend to tackle those when they actually appear instead of trying to avoid anything unknown in advance.

 

 

  • Thanks 1

Share this post


Link to post
1 hour ago, Uwe Raabe said:

unnecessary garbage from the project files

So the garbage actually exists (produced by version differences), it's only IDE that does good job upgrading older project files

Share this post


Link to post
1 hour ago, Uwe Raabe said:

Actually they do! Only the GUI doesn't support it since XE2: https://quality.embarcadero.com/browse/RSP-20623

That's intersting, I tried it today and it didn't work, not sure what I did wrong but will try it again. There is another property for dll's - OutputExt (in the dproj) - in the IDE it's called "Target file extension" - for dcc32 it needs a command line option. Not sure when it was introduced, need to investigate for finalbuilder.

 

1 hour ago, Uwe Raabe said:

OK. I have added you as collaborator.

Thanks.

Share this post


Link to post
15 hours ago, Vincent Parrett said:

Simply adding or changing the units or resources that need to be included in a dproj for specific compiler versions.

Shouldn't this be done using conditional compilation in source code?

Share this post


Link to post
1 minute ago, FPiette said:

Shouldn't this be done using conditional compilation in source code?

Using conditionals compilation in a dpk or dpr is problematic - the IDE does not handle it well.

Share this post


Link to post
23 minutes ago, Fr0sT.Brutal said:

So the garbage actually exists (produced by version differences), it's only IDE that does good job upgrading older project files

The garbage are mostly remnants of platform values for platforms that are not used. There are even compiler options from Delphi 5 or even lower times that the more recent compilers simply ignore.

 

Regarding the second part of your statement I am still waiting for an example where using a newer project file to compile with an older version fails. Please note that I never suggested to upgrade older projects outside of the IDE. As long as no one comes with a case the where the described approach fails, I cannot see any benefit in caring about.

Share this post


Link to post
5 hours ago, FPiette said:

Shouldn't this be done using conditional compilation in source code?

If only IDE didn't consider these files as its private territory where it could do whatever it wants

Share this post


Link to post
5 hours ago, Uwe Raabe said:

Regarding the second part of your statement I am still waiting for an example where using a newer project file to compile with an older version fails

I'd be happy to know there's no issues but in this case why so many component dev's still maintain personal package files for every supported IDE version?

Share this post


Link to post
19 minutes ago, Fr0sT.Brutal said:

I'd be happy to know there's no issues but in this case why so many component dev's still maintain personal package files for every supported IDE version?

Maybe because even if you write a note in the readme file, the user keep asking for a package with his specific version number ? Or just because they always have done so 😉

 

 

Share this post


Link to post
6 minutes ago, FPiette said:

Or just because they always have done so

I was just going to write something similar. :classic_smile:

  • Like 1

Share this post


Link to post
19 hours ago, FPiette said:

Maybe because even if you write a note in the readme file, the user keep asking for a package with his specific version number ?

Hmm, probably a file like Packages\CoolLib_DelphiXE-Up_R.dproj would point them to the right idea? Or maybe CoolLib_DelphiXE-UP-TO-ANY-NEWER-FUTURE-OR-PAST-VERSION_R.dproj

Share this post


Link to post

That is exactly what VirtualTreeView does. It makes use of the $(AUTO) Libsuffix feature for 10.4 and upwards.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×