Re: [Lazarus] Project.pp
On Wed, Apr 10, 2024 at 3:42 AM Flávio Etrusco via lazarus < lazarus@lists.lazarus-ide.org> wrote: > delete the offending units from the uses clause then report back the > missing classes or functions. > Yes, I guess a project icon API should be added. > The LazIDEIntf unit doesn't exist anymore and has been refactored into > other units. > It does exist in IdeIntf. It is still a rather big unit. Juha -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
Hi, delete the offending units from the uses clause then report back the missing classes or functions. The LazIDEIntf unit doesn't exist anymore and has been refactored into other units. Regards, Flávio Em qua., 3 de abr. de 2024 às 10:14, Gabriele Cappelletto via lazarus < lazarus@lists.lazarus-ide.org> escreveu: > Ciao, > avevo un package che si complilava bene con lazarus 2.2.4 (utilizzavo > quello). Poi sono passato alla 3.2 e non funziona più. > Esattamente si interrompe perchè non trova il file contenuto in > lazarus/ide/Project.pp. Che pakage devo includere? E come mai funzionava > tranquillamente in lazarus 2.2.4 (e anche 2.2.6)? > > exactly the uses is this > > uses > Classi, SysUtils, Controlli , Forms, Dialogs, > LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; > > > > -- > ___ > lazarus mailing list > lazarus@lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
On 09/04/2024 19:39, Gabriele Cappelletto via lazarus wrote: Done, I'm missing this, I can't find how to do this in the handbook BMOptions: TBuildMatrixOption; BMOptions := TProject(AProject).BuildModes.SharedMatrixOptions.Add(bmotIDEMacro); BMOptions.Modes := 'Default'; BMOptions.MacroName := 'LCLWidgetType'; BMOptions.Value := 'nogui'; I think it needs to be transformed into CompOpts : TLazCompilerOptions; Does anyone know how to do this or how to use projectintf? Not my main area of expertise, but I did some digging and found function TBaseCompilerOptions.GetEffectiveLCLWidgetType: string; ... Vars:=GetBuildMacroValues(Self,true); if Vars<>nil then Result:=Vars.Values['LCLWidgetType']; BuildMacros are available via TLazProject(project).LazBuildModes.LazBuildModes[n].LazCompilerOptions.BuildMacros I hope that works... -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
Anyway, thank you for responding to me. Now it is just projectintf I just miss the little problem of the previous email, but it can be done by hand as well. Il 09/04/24 18:48, Martin Frb ha scritto: On 03/04/2024 16:41, Gabriele Cappelletto via lazarus wrote: TProject(AProject).UseAppBundle := False; Package BuildIntf components\buildintf\projectintf.pas => LGPL with linking exception TLazProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TLazProject(AProject).UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); This may be a problem. At least I haven't found it... You can get resources... TLazProject(AProject).Resources But the class TProjectIcon isn't available. Maybe someone else knows. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
Done, I'm missing this, I can't find how to do this in the handbook BMOptions: TBuildMatrixOption; BMOptions := TProject(AProject).BuildModes.SharedMatrixOptions.Add(bmotIDEMacro); BMOptions.Modes := 'Default'; BMOptions.MacroName := 'LCLWidgetType'; BMOptions.Value := 'nogui'; I think it needs to be transformed into CompOpts : TLazCompilerOptions; Does anyone know how to do this or how to use projectintf? Il 09/04/24 18:48, Martin Frb ha scritto: On 03/04/2024 16:41, Gabriele Cappelletto via lazarus wrote: TProject(AProject).UseAppBundle := False; Package BuildIntf components\buildintf\projectintf.pas => LGPL with linking exception TLazProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TLazProject(AProject).UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); This may be a problem. At least I haven't found it... You can get resources... TLazProject(AProject).Resources But the class TProjectIcon isn't available. Maybe someone else knows. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
On 03/04/2024 16:41, Gabriele Cappelletto via lazarus wrote: TProject(AProject).UseAppBundle := False; Package BuildIntf components\buildintf\projectintf.pas => LGPL with linking exception TLazProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TLazProject(AProject).UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); This may be a problem. At least I haven't found it... You can get resources... TLazProject(AProject).Resources But the class TProjectIcon isn't available. Maybe someone else knows. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
On 09/04/2024 17:45, Gabriele Cappelletto wrote: It is not meant to work. That is the unit "project" is part of the IDE, and only meant to be used by the IDE. From a license point of few, it is GPL (not LGPL), so if your code is GPL, then you are permitted to use it, but If even the code was gpl then there would be no commercial product for lazarus. neither tms nor anything else. IdeIntf is LGPL with linking exception IDE is GPL and the packages in the folder ide (IdeConfig, IdeDebugger) are GPL, because they used to be part of the IDE. Commercial packages are build against the IdeIntf. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
If even the code was gpl then there would be no commercial product for lazarus. neither tms nor anything else. Mine is not GPL like that of many others. At least as far as this project is concerned. If I haven't misunderstood, don't write like this if you don't want a general escape from lazarus Il 03/04/24 19:46, Martin Frb ha scritto: On 03/04/2024 18:49, Gabriele Cappelletto via lazarus wrote: The code is this function TExtPApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult; TProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); TProject(AProject).CompilerOptions.ExecuteBefore.Command := We need the reference to TProject, how do I remove this reference? Mind that getting this to work is only "being lucky". It is not meant to work. That is the unit "project" is part of the IDE, and only meant to be used by the IDE. From a license point of few, it is GPL (not LGPL), so if your code is GPL, then you are permitted to use it, but The unit comes with no warranties on it's interface. It could change in any way, and such changes would not be announced. (so long as the IDE and lazbuild themself are still working). The same is true for any file inside the ide folder. And that does include files in packages inside the ide folder. -- Also further more, it may (maybe) fail even if it compiles (at least I think it may). If either your code or the IDE is build with -O4 but not the other. Then FPC may produce different memory layout for the 2 equally named classes (it's only "equally name classes", it is not "equal classes"). And in future fpc could produce differences in other situations. You best get in a feature request, so that functionality that is required can be (considered for) included in the IdeIntf.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
Thanks for replying, I also take note of what you wrote. For now it works Il 03/04/24 19:46, Martin Frb ha scritto: On 03/04/2024 18:49, Gabriele Cappelletto via lazarus wrote: The code is this function TExtPApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult; TProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); TProject(AProject).CompilerOptions.ExecuteBefore.Command := We need the reference to TProject, how do I remove this reference? Mind that getting this to work is only "being lucky". It is not meant to work. That is the unit "project" is part of the IDE, and only meant to be used by the IDE. From a license point of few, it is GPL (not LGPL), so if your code is GPL, then you are permitted to use it, but The unit comes with no warranties on it's interface. It could change in any way, and such changes would not be announced. (so long as the IDE and lazbuild themself are still working). The same is true for any file inside the ide folder. And that does include files in packages inside the ide folder. -- Also further more, it may (maybe) fail even if it compiles (at least I think it may). If either your code or the IDE is build with -O4 but not the other. Then FPC may produce different memory layout for the 2 equally named classes (it's only "equally name classes", it is not "equal classes"). And in future fpc could produce differences in other situations. You best get in a feature request, so that functionality that is required can be (considered for) included in the IdeIntf.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
On 03/04/2024 18:49, Gabriele Cappelletto via lazarus wrote: The code is this function TExtPApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult; TProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); TProject(AProject).CompilerOptions.ExecuteBefore.Command := We need the reference to TProject, how do I remove this reference? Mind that getting this to work is only "being lucky". It is not meant to work. That is the unit "project" is part of the IDE, and only meant to be used by the IDE. From a license point of few, it is GPL (not LGPL), so if your code is GPL, then you are permitted to use it, but The unit comes with no warranties on it's interface. It could change in any way, and such changes would not be announced. (so long as the IDE and lazbuild themself are still working). The same is true for any file inside the ide folder. And that does include files in packages inside the ide folder. -- Also further more, it may (maybe) fail even if it compiles (at least I think it may). If either your code or the IDE is build with -O4 but not the other. Then FPC may produce different memory layout for the 2 equally named classes (it's only "equally name classes", it is not "equal classes"). And in future fpc could produce differences in other situations. You best get in a feature request, so that functionality that is required can be (considered for) included in the IdeIntf.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
Fixed thanks rvk, with dependencies dedebugger e ideconfig Il 03/04/24 18:49, Gabriele Cappelletto via lazarus ha scritto: The code is this function TExtPApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult; TProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); TProject(AProject).CompilerOptions.ExecuteBefore.Command := We need the reference to TProject, how do I remove this reference? Il 03/04/24 15:32, Mattias Gaertner via lazarus ha scritto: On 03.04.24 15:28, Gabriele Cappelletto via lazarus wrote: Il 03/04/24 15:26, Gabriele Cappelletto via lazarus ha scritto: HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; uses Classes, SysUtils, Controls, Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; Is this the uses section of one of your package units? Does your package trying to access the IDE unit "project" directly instead of the ProjectIntf? Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
The code is this function TExtPApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult; TProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); TProject(AProject).CompilerOptions.ExecuteBefore.Command := We need the reference to TProject, how do I remove this reference? Il 03/04/24 15:32, Mattias Gaertner via lazarus ha scritto: On 03.04.24 15:28, Gabriele Cappelletto via lazarus wrote: Il 03/04/24 15:26, Gabriele Cappelletto via lazarus ha scritto: HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; uses Classes, SysUtils, Controls, Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; Is this the uses section of one of your package units? Does your package trying to access the IDE unit "project" directly instead of the ProjectIntf? Mattias-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
TProject(AProject).UseAppBundle := False; TProject(AProject).ProjResources.XPManifest.UseManifest := False; TProject(AProject).ProjResources.ProjectIcon.SetStream(nil); This is the code that doesn't find TProject from the project unit (located in lazarus/ide/Project.pp) Il 03/04/24 16:24, Gabriele Cappelletto via lazarus ha scritto: The dipindence is Synedit, Idecondif, lazdebuggergdbmi, lcl, ideinterf this package worked on lazarus 1.6, 1.8, 2.0, 2.2.4 and 2.2.6, then I switched to lazarus 2.3 and it doesn't work anymore. Then mvk from the forum advised me to put the dependency on ideconfig and it is no longer necessary to put the path for ModeMatrixOpts, but I can't resolve the dependency for Project (lazarus/ide/Project.pp). It basically puts a pre-compiled project on the Lazarus ide. Il 03/04/24 15:32, Mattias Gaertner via lazarus ha scritto: On 03.04.24 15:28, Gabriele Cappelletto via lazarus wrote: Il 03/04/24 15:26, Gabriele Cappelletto via lazarus ha scritto: HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; uses Classes, SysUtils, Controls, Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; Is this the uses section of one of your package units? Does your package trying to access the IDE unit "project" directly instead of the ProjectIntf? Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
The dipindence is Synedit, Idecondif, lazdebuggergdbmi, lcl, ideinterf this package worked on lazarus 1.6, 1.8, 2.0, 2.2.4 and 2.2.6, then I switched to lazarus 2.3 and it doesn't work anymore. Then mvk from the forum advised me to put the dependency on ideconfig and it is no longer necessary to put the path for ModeMatrixOpts, but I can't resolve the dependency for Project (lazarus/ide/Project.pp). It basically puts a pre-compiled project on the Lazarus ide. Il 03/04/24 15:32, Mattias Gaertner via lazarus ha scritto: On 03.04.24 15:28, Gabriele Cappelletto via lazarus wrote: Il 03/04/24 15:26, Gabriele Cappelletto via lazarus ha scritto: HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; uses Classes, SysUtils, Controls, Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; Is this the uses section of one of your package units? Does your package trying to access the IDE unit "project" directly instead of the ProjectIntf? Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
On 03.04.24 15:28, Gabriele Cappelletto via lazarus wrote: Il 03/04/24 15:26, Gabriele Cappelletto via lazarus ha scritto: HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; uses Classes, SysUtils, Controls, Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; Is this the uses section of one of your package units? Does your package trying to access the IDE unit "project" directly instead of the ProjectIntf? Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Project.pp
Il 03/04/24 15:26, Gabriele Cappelletto via lazarus ha scritto: HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; uses Classes, SysUtils, Controls, Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Project.pp
HI, I had a package that compiled well with Lazarus 2.2.4 (I used that one). Then I switched to 3.2 and it doesn't work anymore. Exactly it stops because it cannot find the file contained in lazarus/ide/Project.pp. What package should I include? And why did it work fine in Lazarus 2.2.4 (and also 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Project.pp
Ciao, avevo un package che si complilava bene con lazarus 2.2.4 (utilizzavo quello). Poi sono passato alla 3.2 e non funziona più. Esattamente si interrompe perchè non trova il file contenuto in lazarus/ide/Project.pp. Che pakage devo includere? E come mai funzionava tranquillamente in lazarus 2.2.4 (e anche 2.2.6)? exactly the uses is this uses Classi, SysUtils, Controlli , Forms, Dialogs, LazIDEIntf, ProjectIntf, FormEditingIntf, Project, ModeMatrixOpts; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus