Lazarus

Using the Lazarus IDE => General => Topic started by: BrainChemistry on August 02, 2018, 02:51:25 pm

Title: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: BrainChemistry on August 02, 2018, 02:51:25 pm
EDIT: Since nobody responded, I try to re-phrase my problems/question:

Hi there,

Problem #1:
If I publish a project, files (mostly units) which are included in subdirectories of the original project are not included in the published project, although I added them to the project in the project inspector. In other words, only the files in the project's main dir. are also found in the folder of the published project.

What I would like to achieve/Question #1:
I would like to have ALL files to be included in the published project within the corresponding relative subdirectories. Is this a lacking feature or am I doing it wrong?

Problem #2:
If I have files which are no units (e.g. configuration files (e.g. *.ini), which are e.g. plain text files), but are still necessary for the project to run (and are located in the project's main dir.), they are not shared in the published project. It doesn't seem to matter if I add them manually to the project in the project inspector or not. - If I add them in the project inspector, they are seen in the project inspector of the published project though, but are stroken through (since the files are not shared along in the published project).

The only partial solution is, to set the include-filter to allow for this type of file ending. In this case though, ALL files with that file ending, regardless if they have been added to the project in the project inspector or not, are shared along with the project.

What I would like to achieve/Question #2:
Well, I would like to accompany all files really necessary for my project to it. But I wouldn't like to find ALL files which happen to have the same ending also to be shared if they do not belong to the project. How can I achieve this? 

Thanks for your help.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: ASBzone on August 08, 2018, 03:09:15 am
What versions of FPC / Lazarus are you running, btw?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: Handoko on August 08, 2018, 03:37:07 am
If I publish a project, files (mostly units) which are included in subdirectories of the original project are not included in the published project, although I added them to the project in the project inspector. In other words, only the files in the project's main dir. are also found in the folder of the published project.

I tested on Lazarus 1.8.4 Linux, yes I can reproduce this behavior. The *.pas files in a sub directory won't be included, even it's already included in the project inspector.

I don't use Publish Project feature because I personally think manually copy/paste is easier. But the bug should be fixed, please submit your bug report and feature request at the bug tracker forum:
https://bugs.freepascal.org/my_view_page.php
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 08, 2018, 11:59:16 am
@Handoko
what copy / paste does not solve and Publish Project should solve is updating the paths of files to the folder to where the publish is done.

@BrainChemistry
please add the update of the path attribute to new publish folder if possible in the bug. currently we cannot test if this happens due to the bug.
please advise on the bug entry number.
thank you
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 08, 2018, 12:50:50 pm
what copy / paste does not solve and Publish Project should solve is updating the paths of files to the folder to where the publish is done.
What paths do you mean? "Other unit files" and "Include files" should only contain relative paths which are part of the project, thus moving the project to another place always works.

Package dependencies are another issue. Should Publish Project deal with them somehow? Maybe not. Packages must be moved / installed separately.

Anyway the Publish Project feature should be fixed. It should also optionally compress the resulting project.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 08, 2018, 01:05:54 pm
what is Publish Project intended to do?
in other apps (for ex. Reaper FM) project publish takes all files in the project and places them in a folder. the user can take that folder to another computer and continue the work there given it has the same instruments installed would obtain same melody.

I am referring to the path of a file from another folder, ex: project in folder A using one file B1 from folder B and one file C1 from folder C.
Now my expectation is that when I use publish the end result would be folder D that will have all project files from folder A and files B1 and C1.
This will allow if i move the folder to another machine where i have the package dependencies installed to obtain no errors when compiling.
I am not saying anything about dependencies files in folder D, only the files listed in the Files tree in Project Inspector.
(now if you have here dependencies it means that you updated them and needing, isn't it?)

Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 08, 2018, 01:23:31 pm
what is Publish Project intended to do?
in other apps (for ex. Reaper FM) project publish takes all files in the project and places them in a folder. the user can take that folder to another computer and continue the work there given it has the same instruments installed would obtain same melody.
Yes, that is the goal.

Quote
I am referring to the path of a file from another folder, ex: project in folder A using one file B1 from folder B and one file C1 from folder C.
Now my expectation is that when I use publish the end result would be folder D that will have all project files from folder A and files B1 and C1.
This will allow if i move the folder to another machine where i have the package dependencies installed to obtain no errors when compiling.
I am not saying anything about dependencies files in folder D, only the files listed in the Files tree in Project Inspector.
(now if you have here dependencies it means that you updated them and needing, isn't it?)
So it would copy files B1 and C1 into the project folder. I guess it is doable.
However I think those are library files shared between projects. You should use packages for them instead of adding them directly to a project.
Many people coming from Delphi misuse "Other unit files" for library code. Things are done differently in Delphi.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 08, 2018, 01:36:46 pm
i am not coming from Delphi but from Professional Services. after 8 years of Technical Project Management in a software company i started with Lazarus as a way to perform routine activities as moved to client site as Consultant.

those files can just be files in a new folder where you just mock up something.
at a later point the developer can look into a package but maybe it does not even reach that stage especially in a start-up environment.

i will add you input for the doable part to the bug entry as soon as it is opened.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 11:16:40 am
opened:
https://bugs.freepascal.org/view.php?id=34102

thank you
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 09, 2018, 11:24:32 am
1. The "Publish Project" will export any allowed file located is in the main directory. It does not matter if it's part of the project or not. You can easily test this by copying a random pas file to the project folder then press the OK button.
2. Exporting all subdirectories inside the main folder it's seems a logical request to me. The attached patch fix this issue. Please apply it against the current trunk. The IDE will ignore the lib and backup folder.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 11:53:03 am
@GetMem
based on 1. it means that as per above scenario files B1 and C1 would not be published.
this means that files listed in Project Inspector would not be published thus the published folder cannot be transferred to a different machine and continue work.
is this what you want?

user was allowed in a legit way to add files from the system to project inspector. as soon as the file is presented in the project inspector it is part of the project and needs to be exported in the publishing action.
not taking into consideration these files from other folders but presented in project inspector would only degrade the UX.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 09, 2018, 01:29:04 pm
@tudi_x
I think you misunderstood me. Anyways all the above issues should be fixed now, namely:
1. Only project files will be published
2. Files from project subdirectories(belonging to project) will be also published
3. Files from backup and lib(unit output directory) folders will be ignored

Please test attached patch against trunk.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 01:57:17 pm
@GetMem
sorry if i misunderstood.
looking forward to a RC version i could help with the testing as I do not know how to apply the patch and no experience with trunk.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 09, 2018, 02:02:45 pm
@tudi_x
Quote
looking forward to a RC version i could help with the testing as I do not know how to apply the patch and no experience with trunk.
OK. Just wait 10 minutes. I will modify the necessary units in Laz. 1.8.4

PS:
1. Download attached zip
2. Extract zip to $(LazarusDir/IDE) folder(make backup first)
3. Rebuild Lazarus(Tools-->Build Lazarus with profile...)
4. Export your project
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: howardpc on August 09, 2018, 02:26:35 pm
Can the default "include filter" be set to include *.res files?
Otherwise you have to uncheck "ignore binaries" which is not what is desired just to get the project .res included in what is published.
Or have I missed something?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 02:49:35 pm
@GetMem
performed steps 1 - 4.

not all files from project inspector are exported. including screen capture.
looks like the B1 and C1 to be exported scenario failed as:
a. files were not exported
b. new path of these files in project inspector does not appear. old path appears with files missing
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 09, 2018, 02:58:47 pm
@howardpc
I think *.res files are considered binary files. There is a FileIsText function which will return false for res.

@tudi_x
B1 and C1 are subfolders of your project? Otherwise it won't work. Please test with the attached project.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 03:06:15 pm
B1 and C1 are not from subfolders of my project. there was never this assumption on this thread.

they are legit files added from the system.
in project inspector there is no limitation to add files only from subfolders.
if these files were added legit they would need to be published legit. based on this i can say that your assumption of subfolders is not consistent with the current IDE functionality.

i will resume testing once you start walking the project inspector tree for files.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 09, 2018, 04:01:10 pm
Quote
based on this i can say that your assumption of subfolders is not consistent with the current IDE functionality.
I did not assume anything.  :) I just see how the "publish project" feature is implemented. Unfortunately it wasn't designed for this kind of functionality, for example it doesn't care about project files(the ones you see in the project inspector). Simply searches the main folder and export files according to the include/exclude filters. By the way consider the following hypothetical situation:
Project files located at  d:\MyProjectfiles1\  and  d:\MyProjectFiles2\.  Kind of ridiculous, but OK let's move on.  I wish to export the project to c:\temp\published\. Where would you copy the directories? If both MyProjectFiles1 and MyProjctFiles2 goes inside c:\temp\published\ the IDE must update the relative paths in the project inspector, the exported project is no longer equivalent with the original one. Or am I missing something? How the project publishing should work in this particular case?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: BrainChemistry on August 09, 2018, 04:49:13 pm
Thanks everybody for your replies and efforts! I didn't expect to directly cause a bugfix request for the Publish Project-feature, to be honest :D.

What versions of FPC / Lazarus are you running, btw?

Laz. 1.8.4, Win 8.1 64bit.

I just see how the "publish project" feature is implemented. Unfortunately it wasn't designed for this kind of functionality, for example it doesn't care about project files(the ones you see in the project inspector. Simply searches the main folder and export files according to the include/exclude filters.)
I highlightened the important part. This is basically meaning this feature is useless, unfortunately. I mean, which (serious) project doesn't have sub dirs. at some point (at least for resource files, e.g. images, or what not). :)

What "Publish Project" should do at a bare minimum:

I guess, to be able to have a good Publish Project feature, it is necessary to have a look at a typical work flow for it to be useful.

PS:
1. Download attached zip
2. Extract zip to $(LazarusDir/IDE) folder(make backup first)
3. Rebuild Lazarus(Tools-->Build Lazarus with profile...)
4. Export your project

I did it, anyway, this solves the problem only partially for me. For some reason this time ALL sub dirs. of my main dir. have been published, even if they did not contain files which were mentioned in the project inspector or haven't been filtered out by the excl. filters. Keep up the good work, I stay beta testing.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 05:03:54 pm
@GetMem
say you have project file B1.pas, B2.pas in folder /home/user/B and C1.pas in /home/user/C and C2.pas in /home/user/C/extra.
publish target is /home/user/publish.

folders  /home/user/B,  /home/user/C and /home/user/C/extra should not be copied to /home/user/publish, only the files B1.pas, B2.pas, C1.pas, C2.pas should be copied to /home/user/publish.
now B1, B2, C1 and C2 are in the publish folder. to work you just need to update the file name value for these files in the project lpi file in the Units section for each corresponding entry.

the exported project is no longer equivalent to the original one and that is fine. but it compiles also on a different machine given i have the same packages installed.

note: i would not copy but the files in the project inspector tree. do not agree with latest post from BrainChemistry
from a business perspective with publishing i make something formal or bring it to another level, in this case my possible garbage notes from the main directory should not be passed along.
the export should concentrate only on the files in project inspector - nothing else. the target is to have a folder that compiles in any computer with same dependencies and the executable is the same.
this of course is more difficult as based on the file name you would need to pick the corresponding lpr, lps, ico ... files.


ps. not ridiculous :). based on SOLID the best classes do not depend on other classes. pure functions? so i can use my class in several projects.
have a project to test and develop this class and another project where i am slowly integrating this class. i will not create a package immediately.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: BrainChemistry on August 09, 2018, 05:51:06 pm
@GetMem
say you have project file B1.pas, B2.pas in folder /home/user/B and C1.pas in /home/user/C and C2.pas in /home/user/C/extra.
publish target is /home/user/publish.

folders  /home/user/B,  /home/user/C and /home/user/C/extra should not be copied to /home/user/publish, only the files B1.pas, B2.pas, C1.pas, C2.pas should be copied to /home/user/publish.
now B1, B2, C1 and C2 are in the publish folder. to work you just need to update the file name value for these files in the project lpi file in the Units section for each corresponding entry.

the exported project is no longer equivalent to the original one and that is fine. but it compiles also on a different machine given i have the same packages installed.

I understand what you are saying. For a better understanding, could you elaborate on how this is an advantage compare to a situation where the files stay in the folders they originally have been? I think of a situation where you have a beautiful folder structure and many files spread into them, and on publication the whole structure is dismissed and all the files are just dumped into the main folder. This doesn't sound good to me.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 09, 2018, 06:11:34 pm
@BrainChemistry
please check event #6 for the goal of the publishing action.
the publishing project action would touch only PROJECT files.
if a file is not in the Project Inspector it is not a project file (and we do not publish installed packages).

you might be having a folder structure but that structure is not part of Project Inspector tree thus not part of the project.
if files remain in the original folders you cannot transport the published folder to another machine and continue work and this is failing the publishing action goal.

note: In the industry, publishing the project makes the most current information available to others, including the team members assigned to the project’s tasks.
Others might not be so much interested in the folder structure. They are only interested that the project compiles on their laptops given OPM installed same package list.
If folder structure is important a package should be considered as a way to distribute the code.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 10, 2018, 11:54:30 am
@tudi_x

Now every project file is copied into a single "published" folder. Paths are renamed in OI. I will continue to improve the feature next week. Please test. The steps are the same as yesterday:
1. Download attached zip
2. Extract zip to $(LazarusDir/IDE) folder(make backup first)
3. Rebuild Lazarus(Tools-->Build Lazarus with profile...)
4. Export your project


PS: Remember that yesterday you already replaced a few files. Make sure you restore the original ones first. Alternatively you can test it on a "clean" Lazarus install.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 10, 2018, 12:03:43 pm
I also attach the patch, if somebody wish to test it in trunk.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 10, 2018, 12:28:31 pm
@GetMem
tested:
a. created project structure - attached
b. test: project files are copied - FAIL
c1.pas file is not copied. b1.pas file is copied
c. test: project files are shown in published project - PASS
d. test: project files are shown in published project with new path - PASS
e. test: only project files are considered to be published - PASS

including test project A with files from B and C for testing and my exported folder.
thank you
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: wp on August 10, 2018, 01:14:05 pm
Now every project file is copied into a single "published" folder. Paths are renamed in OI.
ATM this function does not yet seem to work. I tested it with a large project containing subfolders forms, frames, units. Only the files in the main project folder are copied.

Do I understand correctly that files in subfolders of a project will be copied to a single published folder? Sorry, but I don't like this at all. The fact that there are subfolders indicates that the programmer had some reason to do so and this will be lost. Why isn't it possible to retain the folder structure of the project folder in the published folder?

Maybe I don't understand, but tudi_x's example indicates that several independent projects should be merged into a single published folder (ignore the rest if I am wrong). Basically I think this could be a useful function, but not as "Publish project" - this is a feature for a single project - I think it should be an option for the project groups: "Publish project groups". But in any case, the folder structure within the project group and its constituent projects should be retained. What if the different projects contain files with different content but equal file names?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 10, 2018, 01:19:02 pm
@wp
you cannot have equal file names as only files shown in project inspector are published and in project inspector the file names are unique.

maybe we could have a check box if to retain the folder structure in the folder where the lpr file is?
for files outside of this folder, like B or C folders no folder structure, files are just copied.
same level / panel with ignore binaries - would that be fine?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 10, 2018, 01:38:48 pm
I think I'm gonna give up. Apparently everyone has a slightly different idea on how the publish project feature should work(which is perfectly fine by the way), but I spent way too much time on a feature that I really don't use.

@tudi_x
You should write an IDE plugin, which can publish the current project the way you want. The bulk of the work is already implemented in the zip ttached in my previous post. By the way I fixed the last bug, you can test with the new attached zip.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: tudi_x on August 10, 2018, 02:01:13 pm
@GetMemm, wp
please advise if it would be fine to integrate the code as it is in event #28 (tested also and was fine) because:
a. current publish behavior does not do what wp describes as his needs so wp has nothing to loose
b. fix in event #28 solves the initial problem #1 from BrainChemistry
wp can also benefit because now that the project compiles
c. i do not know how to write an IDE plugin, so this publish feature would remain completely broken, frustrating users with projects that do not compile?
thank you
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 10, 2018, 04:02:51 pm
@wp
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.


Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: BrainChemistry on August 11, 2018, 11:05:56 pm
@GetMem

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.



Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 27, 2018, 10:06:35 pm
I did a major revamp for the publish feature and dialog in r58785. Please test.
Fundamental changes were needed. Then respecting the existing code too much would lead to ugly hacks. So, fundamental changes I did.
Now the main function is to copy the project / package member files. Additional filters can be used to copy extra files but hopefully they will not be needed much. Form files (.lfm) and project main resource file (.res) are copied automatically even if they are not part of the project / package. That should cover most files then.

There is only one enable-CheckBox for the filters. The idea is that an empty filter means "not used" or "no effect". I realized I did not test that one but now I am too lazy and tired to test more...

I scratched my head for a while to get the directory structures right. A typical structure is like:
Code: [Select]
SoftWare
  ﹂ MyProject
        -- ReadMe.txt
      ﹂ MainDir
           -- Project1.lpr
           -- Project1.lpi
      ﹂ AnotherDir
           -- SomeSrc.pas
From Lazarus POV the project directory is "MainDir" because it contains the projects main source and info files. Logically it is directory "MyProject" because all sources are collected under it in subdirectories.
So, I built a logic to traverse project/package files and move the effective top directory "up" always when a relative '../' reference was found in front of a file name. It works with infinite number of directory levels.
Then the files are copied using the new top directory as a reference point. Perfect, even if I say it myself!  :)

The "Command after" was used only for compressing the result but it was not very cross-platform.
I removed it and added a CheckBox for compressing finally the directory. It is not implemented yet. May I ask somebody to please implement it and provide a patch, or commit it directly if having SVN rights. There is a Zipper in FPC's libs and example code somewhere. Should be easy.
There are also other ToDo items in the code. Please take a look.

I removed the CheckBox for binary files. The compiled project executable should never be copied. This feature is about publishing sources. Are there other binaries to consider?

I also removed 2 CheckBoxes for projects which made no sense in my opinion. They only added confusion.

What do you think? Is the feature set right? Was it OK to remove "Command after" and others?
Actual bugs can be reported either here or in the report which I keep open for a while.
  https://bugs.freepascal.org/view.php?id=34102
Anybody who is interested in this feature must get the SVN trunk version of Lazarus. There is no excuse especially because it is so easy to do.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 27, 2018, 10:58:26 pm
@Juha
In my opinion is much better then before. Thank you for putting all the pieces together. One feature is still missing and although I don't need it, other people explicitly asked in this thread many times before. Please take a look at the following directory structure:
Quote
    SoftWare
      ﹂ MyProject
            -- ReadMe.txt
          ﹂ MainDir
               -- Project1.lpr
               -- Project1.lpi
          ﹂ AnotherDir
               -- SomeSrc.pas
      ﹂ MyOtherProjectDir
          -- SomeOtherSrc.pas

MyOtherProjectDir is not exported. The question is where MyOtherProjectDir folder should go? Inside the publish folder, at the same level as Maindir.

PS: I will do the zipping part at a later time.

Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 28, 2018, 06:36:08 am
MyOtherProjectDir is not exported.
Did you test it? It should be exported if SomeOtherSrc.pas is part of the project and its path is relative.
Actually the file's path can be saved anyhow. In procedure AdjustTopDir I create a relative path :
  RelPath := ExtractRelativePath(FTopDir, AFilename);
and check for '../' in front of it.

Quote
The question is where MyOtherProjectDir folder should go? Inside the publish folder, at the same level as Maindir.
Why at the same level? Now the directory structure is retained.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 28, 2018, 06:12:55 pm
Quote
Did you test it?
Yes. If everything is inside a big directory the publish feature works correctly. The paths are retained, the project files are exported. I was considering more extreme cases like this:
Folder1: d:\ProjectFolder1\
Folder2: d:\ProjectFolder2\
Alternatively you can add subfolders too. If you wish to publish to d:\published\ for example, the feature will fail. Even in theory I don't know how the publish should work in this particular case, where the two folder should be copied?

Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 28, 2018, 06:49:10 pm
I was considering more extreme cases like this:
Folder1: d:\ProjectFolder1\
Folder2: d:\ProjectFolder2\
Alternatively you can add subfolders too. If you wish to publish to d:\published\ for example, the feature will fail. Even in theory I don't know how the publish should work in this particular case, where the two folder should be copied?
Their common parent is d:\ root. Thus the new logic should copy them to
 d:\published\ProjectFolder1\
and
 d:\published\ProjectFolder2\
Why is my code not doing that? Maybe ExtractRelativePath() gets confused because of the d:\ drive letter. If so, it should be fixed.
Can you please debug the code to see what is going on. Add more DebugLn calls to procedure AdjustTopDir for example. I currently can develop for Windows only with a virtual machine and it is a big pain.

Your case is not really extreme because the directories have a common parent. This would be extreme:
Folder1: c:\ProjectFolder1\
Folder2: d:\ProjectFolder2\
but if somebody makes a project spreading over 2 Windows drives then he must "pay the consequences" and deliver his project by other means.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 28, 2018, 08:18:13 pm
Quote
Can you please debug the code to see what is going on. Add more DebugLn calls to procedure AdjustTopDir for example. I currently can develop for Windows only with a virtual machine and it is a big pain.
In unit publishprojectdlg.pas, method AdjustTopDir instead of:
Code: Pascal  [Select][+][-]
  1. '../'
you need:
Code: Pascal  [Select][+][-]
  1. AppendPathDel('..')
or
Code: Pascal  [Select][+][-]
  1. '..' + DirectorySeparator;

Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 29, 2018, 01:21:19 pm
Oops, right. I remembered the paths were switched at that point to use '/' as direcory separator but they were not.
It means the code did not work at all on Windows. Now I have tested there and was able to publish a test project.
Please test with r58798.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 29, 2018, 02:01:14 pm
Tested with the latest revision, works fine now, both d:\ProjectFolder1\ and d:\ProjectFolder2\ are copied to the publish folder(subfolders too). However now two new directories appear along the main folders(as in the attached image). Folders "backup" and "lib" are originally part of ProjectFolder1. I saw a comment in the source: "Store project's BackupDir and UnitOutputDir for filtering files." I think the two directories are intentionally created, but the question is why? Both lib and backup are redundant for publishing purposes and should be ignored or I'm I missing something?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 29, 2018, 02:50:07 pm
Both lib and backup are redundant for publishing purposes and should be ignored or I'm I missing something?
You missed the ToDo comment in TPublishProjectOptions. :)
Code: Pascal  [Select][+][-]
  1. function TPublishProjectOptions.FileCanBePublished(const AFilename: string): boolean;
  2. begin
  3.   Result:=inherited FileCanBePublished(AFilename);
  4.   // ToDo: filter also based on FBackupDir and FUnitOutputDir
  5. end;
Actually I used your code from the publish.patch to separate those directory names.

I am not sure what is the best way to filter them. The ToDo comment may now be in a wrong place. Maybe procedure TPublisher.DoFileFound is a better place.
In addition to overridden procedure DoDirectoryFound there is also DoDirectoryEnter available which could be useful.
Could you please study and implement the filtering for those libs. I will probably not touch the ToDo items for at least a week.

Hmmm... how did the old code handle those directories?
BTW, why do you use the filters for your project? Are there some files which do not get copied otherwise?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 30, 2018, 08:22:41 am
Quote
You missed the ToDo comment in TPublishProjectOptions. :)
Indeed.  :)

Quote
Could you please study and implement the filtering for those libs.
Yes, but only next week. In my opinion we should ignore those folders completely. The publish feature is about creating a "clean" version of the project, only source code, no binaries, backup files, etc...

Quote
Hmmm... how did the old code handle those directories?
The old code ignored every subdirectory, so those folders were never published.

Quote
BTW, why do you use the filters for your project? Are there some files which do not get copied otherwise?
Until now I never used the publish project feature :), but I will in the future, especially when the compressing part is ready. In my opinion the Exclude filter is no longer needed, since we exclude everything, except project files. The include filter is useful if the user wish to publish other non-project files like images, resources, etc...


Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on August 30, 2018, 02:03:39 pm
In my opinion we should ignore those folders completely. The publish feature is about creating a "clean" version of the project, only source code, no binaries, backup files, etc...
Yes of course. I was only thinking how to best inspect if a certain file is under the output/backup directory. Now we extract "lib" or "backup", it is better to get the whole path and check if a file's path matches.

Quote
The old code ignored every subdirectory, so those folders were never published.
Ah yes. It was very limited.

Quote
In my opinion the Exclude filter is no longer needed, since we exclude everything, except project files. The include filter is useful if the user wish to publish other non-project files like images, resources, etc...
I guess in the old design either exclude or include filter was used at one time. It did not make much sense to use them both, unless the wildcard filters somehow overlapped. (?)
I removed the exclude filter in r58804 and simplified the GUI still more. I also renamed variables and the whole dialog.
I did not change the functionality otherwise, I will have a short pause with that now.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on August 30, 2018, 03:18:20 pm
@Juha
Looks/works great. I will implement the remaining functionality next week, also we need a lot of testing, hopefully other will join in. Regarding the filter text: "Use filter for extra files", I would change it to "Use filter to include extra files".
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 04, 2018, 10:31:30 am
I implemented the remaining functionalities(r. 58851):

1. The possibility to compress the destination folder
2. Update relative paths in the published lpi
3. Always preserve directory structure. In theory it can handle weird directory structures too, like: c:\projectfolder1; d:\projectfolder2; d:\somefolder\projectfolder3; etc...
Please test.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 04, 2018, 01:47:36 pm
I implemented the remaining functionalities(r. 58851):
Ah yes, you had the full commit rights already.
I cleaned some parts in r58853. Project and Package options have a common ancestor TBaseCompilerOptions which I forgot last time. The typecast for TProject() was wrong with packages. BackupDir and UnitOutputDir were calculated repeatedly every time a file was found which is not wise.
I also cleaned the ToDos etc. in TPublishProjectOptions.

It works but to me it looks overly complex.
Quote
2. Update relative paths in the published lpi
Why is this needed? Is it only for the weird directory structures spreading over c:\ and d:\ drives? I don't think we should even support such weirdness.
Otherwise paths in .lpi should not need adjustment because the directory structure is always kept. The file references are always relative AFAIK.

FDestProjFiles seems redundant. It is filled by iterating project files: "for i:=0 to CurProject.UnitCount-1 do"
Why not iterate them again when needed? It is used for updating paths in .lpi which also may be useless.

Why is another FindAllFiles() needed for the zipper? We already know which files were copied. BTW, FindAllFiles() uses the same TFileSearcher class that we already use.

Why all the UpperCase() calls? The code in Lazarus dealing with units, projects and packages does not UpperCase everything yet it works. What happens if you remove them?

I think TProject.WriteProject() is buggy, too. It fails to write all build modes when I have 3 of them (Default, Debug and Release). That is not caused by the Publish Module code of course.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 04, 2018, 02:39:55 pm
Quote
Why is this needed? The file references are always relative AFAIK.
Unfortunately no, not on windows at least. If you use the "Add files from the filesystem" and the file is not in the current directory, Project Inspector will add the full path of the file(see attached image). You don't have to take to the extreme, like spreading the files to c: and d: drives.

Quote
Otherwise paths in .lpi should not need adjustment because the directory structure is always kept.
Since the lpi contains absolute paths, like the one in the screenshot, taking the published folder to another computer where the particular file does not exists, will lead to load/build failure. This is why I update the lpi file. Every path becomes relative to the published folder, more precisely relative to the lpi file inside the published folder. Under Linux/GTK2(just tested) apparently the paths are always relative, which is good.

Quote
I don't think we should even support such weirdness.
In my opinion we should support it. As the current thread already showed, people do weird stuff, even if it's not recommended. Ideally no matter how spread the project is, the publish feature should bring it to one common folder, preserving the directory structure, but I don't want to insist on this subject, I can easily remove the support if necessary.

Quote
FDestProjFiles seems redundant. It is filled by iterating project files: "for i:=0 to CurProject.UnitCount-1 do"
Why not iterate them again when needed? It is used for updating paths in .lpi which also may be useless
FDestProjFiles contains the destination files, the one in the published folder, CurProject.UnitCount refers to the actual units. Again this is only needed when absolute path are used.

Quote
Why is another FindAllFiles() needed for the zipper? We already know which files were copied. BTW, FindAllFiles() uses the same TFileSearcher class that we already use.
OK, this one is indeed redundant. FDestProjFiles can be used to construct the zip file.

Quote
Why all the UpperCase() calls? The code in Lazarus dealing with units, projects and packages does not UpperCase everything yet it works. What happens if you remove them?
Call me paranoid, but I always compare strings with upper/lower case. Most likely will work without uppercase too.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 04, 2018, 03:25:39 pm
Quote
Why is this needed? The file references are always relative AFAIK.
Unfortunately no, not on windows at least. If you use the "Add files from the filesystem" and the file is not in the current directory, Project Inspector will add the full path of the file(see attached image).
That is a bug. This is a cross-platform system, projects and packages should be portable between computers and OSs even without the publish feature.
How long has it been like that? Does it happen only with the top level directories?
I should test more on Windows. Linux just works so well for me that I wouldn't want to...

Quote
OK, this one is indeed redundant. FDestProjFiles can be used to construct the zip file.
+ the filtered files. FCopiedFiles has them all, if you adjust the path.

Quote
Call me paranoid, but I always compare strings with upper/lower case. Most likely will work without uppercase too.
We should not have useless calls. It makes the code more difficult to follow and understand. I can test without UpperCases later.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 04, 2018, 05:43:13 pm
I tested on Windows. Files in a project are saved with absolute paths only if the path reference goes up to the root, meaning the common parent path is eg. C:\ or D:\ root.
Is there a technical reason why ExtractRelativePath() or similar functions cannot handle it?
The bug should be fixed where it actually is, not in the Publish Module code.
If you want to support projects split between C:\ and D:\ in the Publish Module then let's do it explicitly for only that case. When the drive letter differs from the main dir's drive then copy those files to main dir.
On a Unix based systems there is no such issue because all directories are under the same tree, even if they are on different physical hard drives.

I tested more and edited the .lpi file manually, replacing the absolute path with relative. Then I reopened the project. The file was found correctly but its path shows as absolute in Project Inspector! So the relative path is understood and it works but somewhere it is wrongly converted to absolute. It can happen in utility functions of either FPC or Lazarus, who knows.
Can you please debug where the error happens.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 05, 2018, 07:40:09 am
@Juha
In my opinion we are wasting to much time on a feature that apparently only we are interested.  :)
I did the following:
1. Removed UpperCase
2. Removed the update of the lpi file
3. Removed FDestProjFiles(I'm not sure about this, the code looks better, but since I have to do a lot of stringreplace to get the destination files, it's much slower)
4. Other minor fixes

As a conclusion the Publish project feature only fails in extreme cases. Fixing the absolute path(windows only) issue, will improve the feature even more. I attach the files from r. 58851 as future reference, if somebody wish to handle extreme cases on windows.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 05, 2018, 11:25:01 am
In my opinion we are wasting to much time on a feature that apparently only we are interested.  :)
No, I believe it will be a very popular feature once it works well. For some reason nobody else has commented about it yet ...
Thanks for your changes. Actual bugs are easier to spot and fix when there is no extra code around.
I did minor changes in r58870 and improved the debug output.

Quote
3. Removed FDestProjFiles(I'm not sure about this, the code looks better, but since I have to do a lot of stringreplace to get the destination files, it's much slower)
StringReplace is used in 2 places with identical code :
Code: Pascal  [Select][+][-]
  1. Drive := ExtractFileDrive(RelPath);
  2. if Trim(Drive) <> '' then
  3.   RelPath := StringReplace(RelPath, AppendPathDelim(Drive), '', [rfIgnoreCase]);
Drive is always found at the beginning of RelPath, isn't it? Why not use Delete() with index 1?
Code: Pascal  [Select][+][-]
  1. Delete(RelPath, 1, Length(Drive));
or similar. I think trimming the Drive is useless. All paths have been trimmed at this point.

Quote
As a conclusion the Publish project feature only fails in extreme cases. Fixing the absolute path(windows only) issue, will improve the feature even more. I attach the files from r. 58851 as future reference, if somebody wish to handle extreme cases on windows.
r.58851 can also be found in revision control easily. There is no reason to avoid revision control tools. They are such a good invention.
Everybody please test. There is comprehensive debug output by DebugLn() calls. It will be saved to a file when you start Lazarus with parameter --debug-log=<file>.
 http://wiki.freepascal.org/LazLogger#File
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: howardpc on September 05, 2018, 06:48:36 pm
Sorry, I seem to find a bug the first time I tried the trunk version.
I selected the

$(ProjPath)/published/

option for the destination directory (no filter and no compression) and immediately the attached error dialog was shown.
I did not create the /published subdirectory, assuming the tool would do that.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 05, 2018, 07:04:17 pm
Ah, I thought I was clever when I added the extra check for a subdirectory.
It must be allowed, yes. Wait...
... Now it creates a recursive loop. I will think how to fix it. Maybe it must be disabled after all.

Ok, please test with r58874.
I disallowed publishing into a subdirectory of the project/package, removed the default path selection for it and improved the error messages.
I am not sure how easy it is to prevent the recursive loop otherwise.
I don't see this as a big restriction. Any other writable directory will do.

If somebody wants to test the subdirectory stuff, just define AllowProjectSubDirectory.
There is now line:
{.$define AllowProjectSubDirectory}
Remove the dot and build Lazarus.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 05, 2018, 08:31:14 pm
@howardpc
Thanks for testing. Finally we have some feedback. Much much appreciated.

@Juha
Quote
Now it creates a recursive loop. I will think how to fix it. Maybe it must be disabled after all.
There is no recursive loop. Initially the project files are copied in the published folder, which is a subfolder in this particular case of the source directory. Then when IDE search for extra files will find the already copied project files(filter match *.pas files), then fails to copy them again since the source and the destination are the same. The FCopyFailedCount gets bigger then zero and the Run method exits without giving any clear feedback to the user. We need to add more message dialogs. Here is the antidote:
Code: Pascal  [Select][+][-]
  1. procedure TPublisher.DoFileFound;
  2. // Copy a found file if it passes the filter.
  3. var
  4.   CurDir: string;
  5. begin
  6.   //....
  7.   if (CurDir = FDestDir) then <--This one
  8.   begin
  9.     DebugLn(['DoFileFound: The destination directoty is in the same folder as the source files, skipping files: ', FileName]);
  10.     Exit;
  11.   end;            
  12.   if FOptions.FileCanBePublished(FileName) then
  13.   begin
  14.     if CopyAFile(FileName) <> mrOK then
  15.       Inc(FCopyFailedCount);
  16.   end
  17.   else
  18.     DebugLn(['DoFileFound: Rejected file ', FileName]);
  19. end;

Ps: The
Code: Pascal  [Select][+][-]
  1. if FCopiedFiles.IndexOf(AFilename) >= 0 then exit;
fails because the files inside the published folder are not added to stringlist.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: lucamar on September 05, 2018, 08:36:27 pm
It must be allowed, yes. Wait...
... Now it creates a recursive loop. I will think how to fix it. Maybe it must be disabled after all.

How about checking if destination is under origin and, if so, excluding it from any further origin file search? Just gave the source a quick glance but it doesn't seem too difficult to implement.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 05, 2018, 08:58:03 pm
Sorry guys, I edited my post before noticing the replies.
Thanks for testing.
Yes I believe the subdir problem can be solved. Now however I keep a small pause from this publish thingy and do other things. Maybe some of you will find a clean solution for it.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 05, 2018, 09:24:21 pm
Quote
Yes I believe the subdir problem can be solved. Now however I keep a small pause from this publish thingy and do other things. Maybe some of you will find a clean solution for it.
OK. Fixed in r.58876. Publishing to a subfolder is still possible. Please test. Thank you.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 05, 2018, 10:13:38 pm
OK. Fixed in r.58876. Publishing to a subfolder is still possible. Please test. Thank you.
No it is not possible. The same recursive loop still happens. The "Published" directory is created under the project dir which then contains the project + another "Published" directory which then contains the project + another ... and so on until the OS is out of memory and kills Lazarus.
I attach the project I am testing with. It (obviously) has source files above the project's main dir.
It is (obviously) zipped using this new great publish feature, although not to a project's subdirectory. :)
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: howardpc on September 05, 2018, 10:28:08 pm
For me, R58877 publishing to a /published subdirectory works well, whether compressed or not.
Does just what it says on the tin.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 05, 2018, 10:48:50 pm
@Juha
Quote
No it is not possible. The same recursive loop still happens. The "Published" directory is created under the project dir which then contains the project + another "Published" directory which then contains the project + another ... and so on until the OS is out of memory and kills Lazarus.
I attach the project I am testing with. It (obviously) has source files above the project's main dir.
Please try one more thing, add the following two line just below Result := mrOk(TPublisher.CopyAFile).
Code: Pascal  [Select][+][-]
  1. function TPublisher.CopyAFile(const AFileName: string): TModalResult;
  2. var
  3.   RelPath, LfmFile: string;
  4.   Drive: String;
  5. begin
  6.   Result := mrOK;
  7.   if Pos(FDestDir, ExtractFilePath(AFileName)) > 0 then
  8.     Exit;  
  9.   //....
  10. end;
This will prevent any recursive copy.

Quote
It is (obviously) zipped using this new great publish feature, although not to a project's subdirectory. :)
:) It was harder to implement then I initially thought.



@howardpc
Quote
For me, R58877 publishing to a /published subdirectory works well, whether compressed or not.
Does just what it says on the tin.
Thank you. Hopefully the publish project feature will become bug free soon.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 05, 2018, 11:43:41 pm
Please try one more thing, add the following two line just below Result := mrOk(TPublisher.CopyAFile).
Pos() works and AnsiStartsStr(), but the right place is method DoFileFound. You already had a test there but it was wrong.
I fixed it in r58878. I also removed the now obsolete define. (So no pause for me ...)

GetMem and howardpc, how come you were not able to reproduce the recursion problem?
Did you not test with projects having many directory levels, some of them above the project main dir? GetMem did such tests earlier I guess.
Can't you reproduce the problem even with my test project?
Many directory levels has been the challenge all the time. The old original code already was able to include all files from a flat project directory.

Quote
Hopefully the publish project feature will become bug free soon.
Now it is bug free, at least for projects!  8)
Must test packages more later.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: balazsszekely on September 06, 2018, 06:47:12 am
Quote
GetMem and howardpc, how come you were not able to reproduce the recursion problem?
Did you not test with projects having many directory levels, some of them above the project main dir? GetMem did such tests earlier I guess.
Can't you reproduce the problem even with my test project?
I did test your project, I saw no recursion issues.  Most likely the Pos function was already in place, preventing infinite loops. The bottom line is: programming all days long does not help in spotting bugs.  :)

Quote
Pos() works and AnsiStartsStr(), but the right place is method DoFileFound. You already had a test there but it was wrong.
I fixed it in r58878. I also removed the now obsolete define.
OK. Thanks.

Quote
Now it is bug free, at least for projects!  8)
Well I'm not so sure about this. Let's wait for a few days...I would say is stable enough for testing. :)
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on September 20, 2018, 08:27:05 pm
@BrainChemistry, @tudi_x and others, how does the publish feature work?
Please test. I plan to remove debug output from it soon.
Please test also publishing packages.
This feature is now part of the fresh Lazarus 2.0 branch and RC1.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: JuhaManninen on October 07, 2018, 11:15:26 am
I have removed most DebugLn() calls now.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: AnthonyTekatch on March 17, 2019, 11:55:25 am
When performing "Publish Project ...", I'm always getting:
 Error: Copying files failed.

I have selected the default destitination directory:
  $(ProjPath)/pub/

The "Use filter to include extra files" is set to the default :
  *.(pas|pp|inc|lpr|lfm|lrs|lpi|lpk|xml|sh)

I have tried "compress" and "not compress" with no difference in error report.

Some of the desired files seem to be copied to the publish directory, but my project .lpi file (which contains the project version information) is not copied despite being defined above.
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: bytebites on March 17, 2019, 01:52:06 pm
Which Lazarus version?
Title: Re: Issues publishing a project (No subdirectories incl., no non-Pas. files incl.?)
Post by: AnthonyTekatch on March 17, 2019, 02:43:18 pm
Which Lazarus version?
Version #: 2.0.0
Date: 2019-02-24
FPC Version 3.0.4
SVN Revision: Unregistered directory
x86_64-linux-gtk2

Installed from .debs from  https://www.lazarus-ide.org/index.php?page=downloads
TinyPortal © 2005-2018