Forum > General

Best way to combine projects

(1/2) > >>

whallis:
I'm working on several projects that will be standalone executables at first, just to get some data into our database. Eventually, they will all need to be combined into one large executable. Is there a 'best practice' way to do this? Create a project with a menu that calls all the others, for example? Or is there a higher-level entity that would compile all the projects together?

marcov:
No such way is provided with FPC/Lazarus. There are some hackish ways (as in storing EXEs in resources, extracting them to temp and run them there), but nothing I really can recommend.

Usually it is better to merge the at the source level.

MarkMLl:
Noting Marco's comment, but might be viable to put the meat of each standalone app in a unit (or group of units) separate from the main project file and form... call them turkey, duck and chicken or whatever... and then when you're ready write a fourth project file and main form that combines them into a succulent whole.

MarkMLl

marcov:
That 's what I meant. Note that the application startup in the .lpr is just code, you can e.g. start another form as default by just inserting code.

Most of my apps have a default and a "setup" mode (to configure IPs, comports etc). The setup mode is a totally different set of forms and associated logic, though basic units are shared between both modes.

whallis:

--- Quote from: MarkMLl on August 22, 2022, 03:23:06 pm ---Noting Marco's comment, but might be viable to put the meat of each standalone app in a unit (or group of units) separate from the main project file and form... call them turkey, duck and chicken or whatever... and then when you're ready write a fourth project file and main form that combines them into a succulent whole.

MarkMLl

--- End quote ---

Yes, that's what I was thinking to do, but wanted to see if there was a better way. Thank you both!

Navigation

[0] Message Index

[#] Next page

Go to full version