* * *

Author Topic: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)  (Read 1292 times)


  • Hero Member
  • *****
  • Posts: 3112
Here is a short description:
1. Current status in Lazarus trunk
 a.) Project files are completely ignored. Basically the IDE does a recursive search in the main project directory, files are published according to the include/exclude filters. If by chance a project file extension mach one of the include filter the project file gets published. This is a complete nonsense in my opinion. Every single project file must be published regardless of the filter settings, otherwise the project won't build. Filters are useful for other non-project files like: ini, image, text etc... files. 
 b.) Subfolders are ignored
 c.) Other project directories(not subfolders) are ignored

2. My latest patch fix the above mentioned issues, the only drawback is that every single file is copied in one common "published" folder. By the way, it makes sense if you think about it. Lets say you have two project folders d:\Folder1\ and d:\Folder2\(I would never keep my files this way, but apparently is not so uncommon), and you wish to publish it to c:\published\. It makes no sense to keep the folder structure intact since the relative paths are changed anyways and must be updated in project.lpi. As far as I can see this is the main disagreement between different users. Perhaps I should add an option: "Keep directory structure intact", if checked files would be copied in separate folders, if not a everything goes to a single folder.

« Last Edit: August 10, 2018, 04:12:06 pm by GetMem »


  • Jr. Member
  • **
  • Posts: 61

Feedback on the version in #28:

A) For test.zip from #16
- I tried three different cases:
1) Include filter checked, exclude filter not
2) Include filter and exclude filter checked
3) Include filter checked but with empty edit field, exclude filter not checked

Alle three trials gave the same faulty result. The files of the main dir. have been copied as shown in the attached zip to the folder sub1 and sub2. The incl. und excl. filters seem to be completly ignored.

B) For my own project:
Some strange different behaviour was examined. In this case, also a unit is in a sub directory. Instead of copying all files from main dir. into this sub dir. (as for the test case above), in this case I didn't get a sub dir. created at all, but the unit from the sub dir. is copied to the main unit in the published project. - This could be the the desired behaviour, still the include/exclude filters are completly ignored.

As for the discussion what the goal for publishing projects is:

I guess there are two different ideas on how to use the published projects.
1) As tudi_x stated several times, he wants to use the published project feature to just quickly transfer it to somebody, so that somebody can easily compile the project. No folder structure in the way, just the plain files and the other one will figure out how to do it with his machine.
2) For me (and wp?), the goal is more like to have the project ready to be published in like a github account. So the folder structure would be highly beneficial, because this is the way how the published project folder could directly be used as github source folder, too. 

Technically, there is only one problem, that is, the case mentioned several times, if there are files in folders which are no sub dirs. of the main dir. of the project. A simple solution to this would be to copy all files which reside in a folder which is no sub dir. of the main dir. into the main folder (hence ignoring folder structure for these files), still keep the folder structure from the main dir. on intact.

I fear, the only way to have both ways possible is an option as GetMem suggested.



Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus