Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-06

Create a package - how?

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders
to Hans-Peter Diettrich: I want to create a package from my lazarus/examples/dockmanager/easytree/ project,…
Hans-Peter Diettrich wrote
After I created the package during above steps, and updated the original sample project to use the new package, everything worked fine on Linux. Not so on Windows :-( [I'll retry and report later]

If it works on Linux but not on windows, then you probably have some old .ppu's laying round. Remove all .ppu files from examples\dockmananger and below.

Vincent

Reply by email

Hans-Peter Diettrich

I want to create a package from my
lazarus/examples/dockmanager/easytree/ project, containing the EasyDockSite docking manager. Creating the package is no problem, it compiles without problems, and as a runtime-only package with no visual components it needs no installation. But I could not yet use it in another project. The splitted EasyDocking project reports problems with multiple ppu/o files, other projects cannot find the unit files.

After some tries and assistance from the chat I've moved the package source files into a new directory dockmanager/package. Is that okay?

Next question: where to place the package project, into the dockmanager/ or dockmanager/package directory?

With the project in dockmanager/, adding files resulted in a dialog "New unit not in unitpath", suggesting "Add package/ to UnitPath". Of course the path should be added?
******************************************************************** BTW: this dialog appears on the wrong monitor, not the one with the Package dialog :-(
The same for "File not found" while loading a project.

The "Add to project" dialog has an CANCEL button with Caption="CancelDependButton".
********************************************************************

The remaining problems seem to be related to the package pathes. The "Package Options" dialog shows Unit = "$(PkgOutDir)". What's "PkgOutDir", and what's "PkgDir" found somewhere else? It looks as if the Compiler Options -> Paths defines PkgOutDir as -FU, relative to the package project file?

After some opening and closing of dialogs, the Unit entry has changed to "$(PkgOutDir)/", the added trailing "/" seems to be more consistent with other package settings?

Should I check "Add package unit to uses section" - what's the purpose or benefit of this option?

After I created the package during above steps, and updated the original sample project to use the new package, everything worked fine on Linux. Not so on Windows :-(
[I'll retry and report later]

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich
Show quoted text 11 lines
I want to create a package from my lazarus/examples/dockmanager/easytree/ project, containing the EasyDockSite docking manager. Creating the package is no problem, it compiles without problems, and as a runtime-only package with no visual components it needs no installation. But I could not yet use it in another project. The splitted EasyDocking project reports problems with multiple ppu/o files, other projects cannot find the unit files. After some tries and assistance from the chat I've moved the package source files into a new directory dockmanager/package. Is that okay?

Yes, if this is an example package only used by the examples.

Next question: where to place the package project, into the dockmanager/ or dockmanager/package directory?

I don't know what you mean with "package project". An example project for the package? Or the package main file (.lpk)?
Don't mix source directories. Every source directory should be exactly in one project or in one package.

With the project in dockmanager/, adding files resulted in a dialog "New unit not in unitpath", suggesting "Add package/ to UnitPath". Of course the path should be added?

Not always.

******************************************************************** BTW: this dialog appears on the wrong monitor, not the one with the Package dialog :-( The same for "File not found" while loading a project.

please create a bug report.

The "Add to project" dialog has an CANCEL button with Caption="CancelDependButton".

please create a bug report.

Show quoted text 5 lines
******************************************************************** The remaining problems seem to be related to the package pathes. The "Package Options" dialog shows Unit = "$(PkgOutDir)". What's "PkgOutDir",

see
http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Options#Unit

and what's "PkgDir" found somewhere else?

where is "somewhere else"?

here is the list of macros:
http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames

It looks as if the Compiler Options -> Paths defines PkgOutDir as -FU, relative to the package project file?

bingo. Except that there is no "package project file". see
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths

After some opening and closing of dialogs, the Unit entry has changed to "$(PkgOutDir)/", the added trailing "/" seems to be more consistent with other package settings?

yes, see
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths

Should I check "Add package unit to uses section" - what's the purpose or benefit of this option?

I added some info to the wiki. Press F1.

After I created the package during above steps, and updated the original sample project to use the new package, everything worked fine on Linux. Not so on Windows :-(

You forgot to tell the error message.

Mattias

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner
> After some tries and assistance from the chat I've moved the package > source files into a new directory dockmanager/package. Is that okay? Yes, if this is an example package only used by the examples.

The package contains an docking manager (LDockTree replacement), useful in every application.

Show quoted text 5 lines
> Next question: where to place the package project, into the > dockmanager/ or dockmanager/package directory? I don't know what you mean with "package project". An example project for the package? Or the package main file (.lpk)?

In Delphi packages are projects, and the package projects (main files) frequently reside in dedicated directories, one for every compiler version.

Since Lazarus has not so many problems with compiler versions, the .lpk file better should reside in the directory with all the other package files.

IMO this difference between Delphi and Lazarus packages should be mentioned in the documentation about creating Lazarus packages. I've tried to collect all the issues, that currently are not clear to a Lazarus package newbie, so that the documentation can be updated accordingly.

Don't mix source directories. Every source directory should be exactly in one project or in one package.

Another topic for the documentation. In Delphi I used to develop packages together with a test application, with all the source files in the same directory. This procedure is not suitable for Lazarus packages, since the compiled files go into different directories for compilation of the test project and the package itself. The compiler later is confused by the duplicate files in different directories, what should be prevented by stricter separation of both "projects".

Show quoted text 5 lines
> With the project in dockmanager/, adding files resulted in a dialog > "New unit not in unitpath", suggesting "Add package/ to UnitPath". Of > course the path should be added? Not always.

When and when not?

As with the other pathes, the documentation does not shed enough light on the purpose of the different pathes. Eventually the option dialogs should show according hints for the various edit fields.

Show quoted text 12 lines
> ******************************************************************** > BTW: this dialog appears on the wrong monitor, not the one with the > Package dialog :-( > The same for "File not found" while loading a project. please create a bug report. > The "Add to project" dialog has an CANCEL button with > Caption="CancelDependButton". please create a bug report.

My last reported issue already had been fixed, before I submitted the report. Sometimes the Lazarus developers react very fast on such simple issues :-)

> ********************************************************************
Show quoted text 6 lines
> The remaining problems seem to be related to the package pathes. The > "Package Options" dialog shows Unit = "$(PkgOutDir)". What's > "PkgOutDir", see http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Options#Unit

The description is hidden in
<http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames> in an unsorted list of many unrelated macros.

The wording "Unit Files" or "Other Unit Files" is very misleading, because "unit" is associated with *source* files in the first place, not with *compiled* files. I already noticed that the Lazarus project has several unit/ directories for compiled files, where a Delphi user would expect that these directories contain source files (for e.g. packages).

Descriptions like:

>

The unit path is used by the IDE and the compiler to search for pascal units (.pas, .pp, .ppu).
<<
are very confusing, because the locations for .pas and .ppu files are (should be) different for packages, and the IDE will not have much use for .ppu files, I think.

The "Other" attribute is useless as long as it is not clear what are "non-Other" items.

> and what's "PkgDir" found somewhere else? where is "somewhere else"?

I dunno remember. I've been looking through so many wiki pages and option dialogs, also for other packages, before writing this article. And finally I had more questions than answers, as you see :-(

IMO this list should be structured better, and/or sorted alphabetically. (see above)

Show quoted text 15 lines
> It looks as if > the Compiler Options -> Paths defines PkgOutDir as -FU, relative to > the package project file? bingo. Except that there is no "package project file". see http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths > After some opening and closing of dialogs, the Unit entry has changed > to "$(PkgOutDir)/", the added trailing "/" seems to be more > consistent with other package settings? yes, see http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Paths

Yes and no. The path delimiter should be added *before* the path is shown in the dialog, when a new package is created. (see below)

> Should I check "Add package unit to uses section" - what's the > purpose or benefit of this option? I added some info to the wiki. Press F1.

Where?

This option should be listed as item 1.3 in
<http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Options>, but no such item exists there :-(

Show quoted text 5 lines
> After I created the package during above steps, and updated the > original sample project to use the new package, everything worked > fine on Linux. Not so on Windows :-( You forgot to tell the error message.

This was a very weird thing, in the preceding version of the package. The compiler could not find the required package SynEdit.

The reason for this error was the missing path delimiter in the Unit path (see above). The compiler search path then contained an invalid concatenation with the inherited pathes, hiding the path to the SynEdit unit files. AFAIR I noticed the bad path in the Compiler Options -> Inherited page, where the bottom pane showed the merged path in one line. Later, when the IDE really had added the delimiter, that line occured splitted into two lines, and the compilation error disappeared.

The package creation wizard should add the missing path delimiter, to prevent such misleading compiler errors.

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich
Show quoted text 10 lines
Mattias Gaertner schrieb: >> After some tries and assistance from the chat I've moved the >> package source files into a new directory dockmanager/package. Is >> that okay? > > Yes, if this is an example package only used by the examples. The package contains an docking manager (LDockTree replacement), useful in every application.

Then it should be moved to components.

Show quoted text 19 lines
>> Next question: where to place the package project, into the >> dockmanager/ or dockmanager/package directory? > > I don't know what you mean with "package project". An example > project for the package? Or the package main file (.lpk)? In Delphi packages are projects, and the package projects (main files) frequently reside in dedicated directories, one for every compiler version. Since Lazarus has not so many problems with compiler versions, the .lpk file better should reside in the directory with all the other package files. IMO this difference between Delphi and Lazarus packages should be mentioned in the documentation about creating Lazarus packages. I've tried to collect all the issues, that currently are not clear to a Lazarus package newbie, so that the documentation can be updated accordingly.

I hope you collected them on our wiki site:
http://wiki.lazarus.freepascal.org/Lazarus_Packages

Show quoted text 11 lines
> Don't mix source directories. Every source directory should be > exactly in one project or in one package. Another topic for the documentation. In Delphi I used to develop packages together with a test application, with all the source files in the same directory. This procedure is not suitable for Lazarus packages, since the compiled files go into different directories for compilation of the test project and the package itself. The compiler later is confused by the duplicate files in different directories, what should be prevented by stricter separation of both "projects".

I wrote this many times in the wiki and the IDE has some checks. Maybe some more warnings should be added.

Show quoted text 7 lines
>> With the project in dockmanager/, adding files resulted in a dialog >> "New unit not in unitpath", suggesting "Add package/ to UnitPath". >> Of course the path should be added? > > Not always. When and when not?

For example for OS dependent units. Or for example units.

As with the other pathes, the documentation does not shed enough light on the purpose of the different pathes. Eventually the option dialogs should show according hints for the various edit fields.

You are welcome to improve the wiki and make proposals for the hint texts.

Show quoted text 15 lines
[...] >> The remaining problems seem to be related to the package pathes. >> The "Package Options" dialog shows Unit = "$(PkgOutDir)". What's >> "PkgOutDir", > > see > http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Options#Unit The description is hidden in <http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames> in an unsorted list of many unrelated macros. The wording "Unit Files" or "Other Unit Files" is very misleading, because "unit" is associated with *source* files in the first place, not with *compiled* files.

We could do a multiple choice test when starting the IDE to find out the expectation of a user and personalize the IDE. ;)

I already noticed that the Lazarus project has several unit/ directories for compiled files, where a Delphi user would expect that these directories contain source files (for e.g. packages).

Can you give an example?

Show quoted text 8 lines
Descriptions like: >> The unit path is used by the IDE and the compiler to search for pascal units (.pas, .pp, .ppu). << are very confusing, because the locations for .pas and .ppu files are (should be) different for packages, and the IDE will not have much use for .ppu files, I think.

Now I'm confused that you are confused.
Of course the compiler can do more with ppu files than the IDE. But the IDE needs the path to the ppu as well.

The "Other" attribute is useless as long as it is not clear what are "non-Other" items.

Yes, I think so too.

Show quoted text 6 lines
[...] > here is the list of macros: > http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames IMO this list should be structured better, and/or sorted alphabetically. (see above)

Sure, feel free to sort them.
It's hard as developer to step back and see the things as beginner. We need non developers that structure the documentation for beginners.

[...] Yes and no. The path delimiter should be added *before* the path is shown in the dialog, when a new package is created. (see below)

Please create a bug report.

Show quoted text 10 lines
>> Should I check "Add package unit to uses section" - what's the >> purpose or benefit of this option? > > I added some info to the wiki. Press F1. Where? This option should be listed as item 1.3 in <http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Options>, but no such item exists there :-(

Ah, I misunderstood.
Added.

Show quoted text 20 lines
>> After I created the package during above steps, and updated the >> original sample project to use the new package, everything worked >> fine on Linux. Not so on Windows :-( > > You forgot to tell the error message. This was a very weird thing, in the preceding version of the package. The compiler could not find the required package SynEdit. The reason for this error was the missing path delimiter in the Unit path (see above). The compiler search path then contained an invalid concatenation with the inherited pathes, hiding the path to the SynEdit unit files. AFAIR I noticed the bad path in the Compiler Options -> Inherited page, where the bottom pane showed the merged path in one line. Later, when the IDE really had added the delimiter, that line occured splitted into two lines, and the compilation error disappeared. The package creation wizard should add the missing path delimiter, to prevent such misleading compiler errors.

There is a probably misunderstanding.
There is a path delimiter (\ under windows) and there is a search path delimiter (semicolon).
The IDE automatically appends path delimiters.
It never automatically adds search path delimiters. Of course when concatenating two search paths it adds a search path delimiter.
Please try to reproduce the error and get some more details.

Mattias

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner
> The package contains an docking manager (LDockTree replacement), > useful in every application. Then it should be moved to components.

I have to leave that move to the maintainers, I only have SVN write access to the examples/ tree. I also would suggest a copy, not a move, so that I can continue updating the code while maintaining my own naming conventions and style. The "official" version can/should be adopted to fully conform to the Lazarus style guide.

Show quoted text 8 lines
> IMO this difference between Delphi and Lazarus packages should be > mentioned in the documentation about creating Lazarus packages. I've > tried to collect all the issues, that currently are not clear to a > Lazarus package newbie, so that the documentation can be updated > accordingly. I hope you collected them on our wiki site: http://wiki.lazarus.freepascal.org/Lazarus_Packages

You mean: I should update the wiki myself?

The consequences, resulting from the Delphi/Lazarus differences, are not always obvious. Reading the page(s) again, after being more familiar with packages, the gaps found in the first read will be hidden by the knowledge from other sources and experience.

The wording "Create standard package" suggests to me, that there can exist non-standard packages - for what special needs? Perhaps two entries should be provided, for component packages with IDE integration, and runtime-only packages. The intial settings will differ for both package types.

The Quick Start paragraph just doesn't handle the case of adding existing files to the package. This case may look as self-explaining to the experienced user, but not to the newbie. E.g. the IDE Integration has to be changed for runtime packages. It also doesn't explain where the Unit files go by default, and more such background information. IMO links should be added to the other major wiki entries, related to packages, and links back to the Package "main" page.

The path delimiter bug will bite the user when following the "Creating a new package" instructions, when "Use the Save button...". Create a new package and look at the Units path. If the delimiter isn't there, add one manually.

I wrote this many times in the wiki and the IDE has some checks. Maybe some more warnings should be added.

Just the need for mentioning something "many times" suggests to me, that the documentation structure is bad. Important details IMO should be explained in one place, which the reader *must* have seen. That's a special wiki problem, since printed documentation can be assumed to be read sequentially, and the reader may have to look back to preceding chapters for missing information. As long as the announced book about Lazarus doesn't exist, the wiki IMO should be restructured from time to time, so that it can be read in an intended sequential order, just like a book is read.

Show quoted text 6 lines
> As with the other pathes, the documentation does not shed enough > light on the purpose of the different pathes. Eventually the option > dialogs should show according hints for the various edit fields. You are welcome to improve the wiki and make proposals for the hint texts.

Aha! ;-)

Show quoted text 6 lines
> The wording "Unit Files" or "Other Unit Files" is very misleading, > because "unit" is associated with *source* files in the first place, > not with *compiled* files. We could do a multiple choice test when starting the IDE to find out the expectation of a user and personalize the IDE. ;)

The personalization of the IDE seems to be implemented already. Everybody else can use packages and frames, except me :-(

Show quoted text 6 lines
> I already noticed that the Lazarus project > has several unit/ directories for compiled files, where a Delphi user > would expect that these directories contain source files (for e.g. > packages). Can you give an example?

Look into Delphi component packages, and into the lazarus/ tree...

I accept that unit/ directories have their own meaning, by tradition. A newcomer from Delphi should have to pass the Units test, before s/he is allowed to proceed ;-)

But I disagree about package "projects". The .lpk file IMO *is* the package project file (Delphi: .dpk), distinct from the package main file (.pas).

Show quoted text 12 lines
> Descriptions like: > >> > The unit path is used by the IDE and the compiler to search for > pascal units (.pas, .pp, .ppu). > << > are very confusing, because the locations for .pas and .ppu files are > (should be) different for packages, and the IDE will not have much > use for .ppu files, I think. Now I'm confused that you are confused. Of course the compiler can do more with ppu files than the IDE. But the IDE needs the path to the ppu as well.

A separation would clarify much. The PkgDir is needed for opening the source files, and is automatically added to the search path. The PkgOutDir may become interesting only when a project or package is built (linked).

BTW, the PkgOutDir is initialized to lib/, not to unit/. What immediately raises the question about the meaning and naming of the Library path...

It's hard as developer to step back and see the things as beginner. We need non developers that structure the documentation for beginners.

True. Unfortunately a beginner (or non-developer) only can ask questions or suggest improvements, but cannot fill in the facts. After he understands the facts, he isn't a beginner any more :-(

> Yes and no. The path delimiter should be added *before* the path is > shown in the dialog, when a new package is created. (see below) Please create a bug report.

Just about...

Show quoted text 11 lines
>>> Should I check "Add package unit to uses section" - what's the >>> purpose or benefit of this option? >> I added some info to the wiki. Press F1. > Where? > > This option should be listed as item 1.3 in > <http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Options>, but > no such item exists there :-( Ah, I misunderstood. Added.

I see :-)

As I've learned now, the package main file also contains the procedure Register, when a designtime package is created. In this case the package file *must* be added? Or is this not required?

Show quoted text 6 lines
> The package creation wizard should add the missing path delimiter, to > prevent such misleading compiler errors. There is a probably misunderstanding. There is a path delimiter (\ under windows) and there is a search path delimiter (semicolon).

AFAIR the semicolon is the path *separator*.

The IDE automatically appends path delimiters.

Not at the right time :-(

It never automatically adds search path delimiters. Of course when concatenating two search paths it adds a search path delimiter. Please try to reproduce the error and get some more details.

Either the problem will be fixed soon, or I'll create an bug report with instructions. Dont worry :-)

DoDi

Reply by email

Mattias Gärtner
to Hans-Peter Diettrich

Zitat von Hans-Peter Diettrich :

Show quoted text 12 lines
Mattias Gaertner schrieb: >> The package contains an docking manager (LDockTree replacement), >> useful in every application. > > Then it should be moved to components. I have to leave that move to the maintainers, I only have SVN write access to the examples/ tree. I also would suggest a copy, not a move, so that I can continue updating the code while maintaining my own naming conventions and style. The "official" version can/should be adopted to fully conform to the Lazarus style guide.

Each package in the lazarus tree should have a unique name to not confuse users.
You can have svn write access for a directory under components.

Show quoted text 10 lines
>> IMO this difference between Delphi and Lazarus packages should be >> mentioned in the documentation about creating Lazarus packages. >> I've tried to collect all the issues, that currently are not clear >> to a Lazarus package newbie, so that the documentation can be >> updated accordingly. > > I hope you collected them on our wiki site: > http://wiki.lazarus.freepascal.org/Lazarus_Packages You mean: I should update the wiki myself?

Yes.
Write the facts in a way that you think a beginner would understand. Don't forget that wiki readers may know Delphi or may not.

Show quoted text 11 lines
The consequences, resulting from the Delphi/Lazarus differences, are not always obvious. Reading the page(s) again, after being more familiar with packages, the gaps found in the first read will be hidden by the knowledge from other sources and experience. The wording "Create standard package" suggests to me, that there can exist non-standard packages - for what special needs? Perhaps two entries should be provided, for component packages with IDE integration, and runtime-only packages. The intial settings will differ for both package types.

Where is this "Create standard package"?
Maybe it can be 'Create package'.

Show quoted text 8 lines
The Quick Start paragraph just doesn't handle the case of adding existing files to the package. This case may look as self-explaining to the experienced user, but not to the newbie. E.g. the IDE Integration has to be changed for runtime packages. It also doesn't explain where the Unit files go by default, and more such background information. IMO links should be added to the other major wiki entries, related to packages, and links back to the Package "main" page.

Lots of good ideas.

The path delimiter bug will bite the user when following the "Creating a new package" instructions, when "Use the Save button...". Create a new package and look at the Units path. If the delimiter isn't there, add one manually.

Bug report?
I created a new package and I don't know what you mean.

Show quoted text 12 lines
> I wrote this many times in the wiki and the IDE has some checks. > Maybe some more warnings should be added. Just the need for mentioning something "many times" suggests to me, that the documentation structure is bad. Important details IMO should be explained in one place, which the reader *must* have seen. That's a special wiki problem, since printed documentation can be assumed to be read sequentially, and the reader may have to look back to preceding chapters for missing information. As long as the announced book about Lazarus doesn't exist, the wiki IMO should be restructured from time to time, so that it can be read in an intended sequential order, just like a book is read.

The book will also mention it several times, because even books are not read entirely and/or memorized on first read.

To make it clear:
It is not forbidden to put several packages/projects into one directory. For example different versions or for test suites.

Show quoted text 13 lines
[...] >> I already noticed that the Lazarus project >> has several unit/ directories for compiled files, where a Delphi user >> would expect that these directories contain source files (for e.g. >> packages). > > Can you give an example? Look into Delphi component packages, and into the lazarus/ tree... I accept that unit/ directories have their own meaning, by tradition. A newcomer from Delphi should have to pass the Units test, before s/he is allowed to proceed ;-)

That's why I and several others used lib or out.
I don't know why fpc choose 'units'. With the coming fppkg there is not much choice left. That's why lazarus has switched several to 'units' already and the rest will probably follow soon.

But I disagree about package "projects". The .lpk file IMO *is* the package project file (Delphi: .dpk), distinct from the package main file (.pas).

Well, you could name it whatever you like.
But under lazarus a package is not a project. So please don't use that in the wiki. I normally name it the lpk-file of package xyz or simply the package xyz.

Show quoted text 5 lines
[...] A separation would clarify much. The PkgDir is needed for opening the source files, and is automatically added to the search path. The PkgOutDir may become interesting only when a project or package is built (linked).

Yes.

BTW, the PkgOutDir is initialized to lib/, not to unit/.

See above. It will probably be changed to units/.

What immediately raises the question about the meaning and naming of the Library path...

pretty much the same as under Delphi. Of course libraries on the various platforms is far beyond the lazarus help. See the fpc docs and the docs for libraries for each platform.

Show quoted text 6 lines
> It's hard as developer to step back and see the things as beginner. > We need non developers that structure the documentation for beginners. True. Unfortunately a beginner (or non-developer) only can ask questions or suggest improvements, but cannot fill in the facts. After he understands the facts, he isn't a beginner any more :-(

It makes a difference if you created something or if you learned something.

[...] As I've learned now, the package main file also contains the procedure Register, when a designtime package is created. In this case the package file *must* be added? Or is this not required?

The IDE always adds the main unit to itself. The option is only important for projects and packages.

Show quoted text 8 lines
>> The package creation wizard should add the missing path delimiter, >> to prevent such misleading compiler errors. > > There is a probably misunderstanding. > There is a path delimiter (\ under windows) and there is a search path > delimiter (semicolon). AFAIR the semicolon is the path *separator*.

I doubt that the English difference between delimiter and separator can be translated. I suggest to always explain in the wiki which one is meant.

> The IDE automatically appends path delimiters. Not at the right time :-(

It does not really matter. It is merely for beautification. All file handling in the IDE normalizes files, directories and search paths anyway.

[...]

Mattias

Powered by NetMail

Reply by email

Hans-Peter Diettrich
to Mattias Gärtner
Each package in the lazarus tree should have a unique name to not confuse users. You can have svn write access for a directory under components.

Hmm. Currently I have no installable components to offer, but it might make sense to have an readily selectable docking manager component, or preconfigured panels as docksites. For the name, dodi/ <g> or docking/?

BTW, components/README.txt is outdated :-(

Show quoted text 8 lines
> The wording "Create standard package" suggests to me, that there can > exist non-standard packages - for what special needs? Perhaps two > entries should be provided, for component packages with IDE > integration, and runtime-only packages. The intial settings will > differ for both package types. Where is this "Create standard package"? Maybe it can be 'Create package'.

File -> New... -> Package

To make it clear: It is not forbidden to put several packages/projects into one directory. For example different versions or for test suites.

My problems possibly resulted from the immediate use of units in test programs, whose output goes to the project directory, while the compiled package output goes into the PkgOutDir, and the resulting duplicate compiled files confused the IDE or the compiler.

When a package is created from parts of a project, the project should be updated to use the package (Required Packages), and all the package source files should be removed from the Project Files. Right?

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich
Show quoted text 12 lines
Mattias G?rtner schrieb: > Each package in the lazarus tree should have a unique name to not > confuse users. > You can have svn write access for a directory under components. Hmm. Currently I have no installable components to offer, but it might make sense to have an readily selectable docking manager component, or preconfigured panels as docksites. For the name, dodi/ <g> or docking/? BTW, components/README.txt is outdated :-(

I updated some parts.

Show quoted text 10 lines
>> The wording "Create standard package" suggests to me, that there >> can exist non-standard packages - for what special needs? Perhaps >> two entries should be provided, for component packages with IDE >> integration, and runtime-only packages. The intial settings will >> differ for both package types. > > Where is this "Create standard package"? > Maybe it can be 'Create package'. File -> New... -> Package

Add ons can register other package types there.

Show quoted text 8 lines
> To make it clear: > It is not forbidden to put several packages/projects into one > directory. For example different versions or for test suites. My problems possibly resulted from the immediate use of units in test programs, whose output goes to the project directory, while the compiled package output goes into the PkgOutDir, and the resulting duplicate compiled files confused the IDE or the compiler.

Yes, it's confusing for the IDE, the compiler and the developer. The IDE should check and warn if source directories are shared. Not only via the test function, but before every compile. It's a todo. You can create a feature request, so it won't be forgotten.

When a package is created from parts of a project, the project should be updated to use the package (Required Packages), and all the package source files should be removed from the Project Files. Right?

Yes, and the IDE should tell the user about the move. It's a todo. You can create a request too.

Mattias

Reply by email