Recent

Author Topic: BGRA Controls  (Read 161825 times)

lainz

  • Hero Member
  • *****
  • Posts: 3800
  • Leandro Diaz
Re: BGRA Controls
« Reply #405 on: July 20, 2020, 06:49:03 pm »
Hi, BGLControls is used if you want to do OpenGL stuff like a game or something like that, with BGRABitmap.

I will ask circular, maybe we can merge that into BGRAControls and get rid of the problem.
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: BGRA Controls
« Reply #406 on: July 21, 2020, 12:49:43 pm »
Hi,

I initially created BGLControls as a separate package because it depends on lazopenglcontext. I wanted to avoid this dependency as sometimes the linker fails with OpenGL library.

I just installed BGRAControls and BGLControls on Lazarus 2.0.8 MacOS and it compiled fine. I am not using OPM here, just getting the Git branch. I don't know if that makes a difference.

I don't see why there would be the problem. I can't find any circular reference. Could it be that there are multiple version of the packages at the same time?
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3800
  • Leandro Diaz
Re: BGRA Controls
« Reply #407 on: July 21, 2020, 05:54:08 pm »
I don't know why it fails but it does at least on Windows. So I asked GetMem to remove BGLControls from OPM, but if anyone wants to install it can open the lpk from the OPM downloads.

But basically most people wants to install bgrabitmap and then bgracontrols, and that was failing if bglcontrols was installed first.

I'm sure it's a bug, not sure where it's located, just how to reproduce  :(
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

GetMem

  • Hero Member
  • *****
  • Posts: 3782
Re: BGRA Controls
« Reply #408 on: July 21, 2020, 09:22:31 pm »
@circular

Please test with Lazarus 2.0.10(or Trunk) and FPC 3.2.0. You will be unable to install BGRABitmaps with BGRAControls. 
I did not remove BGLControls from OPM, for now is not installed by default. Maybe you guys can come up with a better solution. The main difference is FPC 3.2.0, with FPC 3.0.4 there was no problem installing the packages.

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: BGRA Controls
« Reply #409 on: July 22, 2020, 01:36:27 pm »
Hi

I've tested with Lazarus 2.0.10 and I get the checksum problem. Though I can compile a project that uses BGRAControls and BGLControls. So that seem to be a problem with the way Lazarus compiles itself.

I don't know why there is this checksum problem. Can it be related to compiler options that would be different depending on the package?
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: BGRA Controls
« Reply #410 on: July 22, 2020, 02:08:18 pm »
I successfully compiled Lazarus with both packages by doing the following:
- set cleanup option
- compile with BGLControls only
- remove cleanup option
- add BGRAControls and compile

Does it work for you?
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3800
  • Leandro Diaz
Re: BGRA Controls
« Reply #411 on: July 22, 2020, 06:06:15 pm »
Hi, I've used the 'clean all' option, installed first BGRAControls and then BGLControls and it did work.
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

wp

  • Hero Member
  • *****
  • Posts: 7729
Re: BGRA Controls
« Reply #412 on: July 23, 2020, 03:17:21 pm »
It seems to me that bgrabitmap and bgracontrols have files in the same directory. Separate them when such things happen, make sure that two packages do not share any files in the same directory, use separate directories instead. Do not set unit path in on one package to point to the sources of another package. Also make sure that the output directories of each package are different

martin_fr has explained it several times, e.g. https://forum.lazarus.freepascal.org/index.php/topic,47643.msg341661.html#msg341661.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

lainz

  • Hero Member
  • *****
  • Posts: 3800
  • Leandro Diaz
Re: BGRA Controls
« Reply #413 on: July 23, 2020, 04:46:59 pm »
Hi, thanks wp.

Currently bgrabitmap and bgracontrols are even in separate github repositories, so that can not be the problem, these are always into separate folders and we don't add paths, just package dependency. But the bglcontrols shares his folder with bgrabitmap, but again no path is added, is added as package dependency.

The thing is why it works in 3.0.4 and not in 3.2?
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: BGRA Controls
« Reply #414 on: July 23, 2020, 05:25:29 pm »
Hmmm BGLControls and BGRABitmap do not share files, but as they are in the same directory, could it be that the directory is added twice to the search path?
Conscience is the debugger of the mind

wp

  • Hero Member
  • *****
  • Posts: 7729
Re: BGRA Controls
« Reply #415 on: July 23, 2020, 06:36:58 pm »
I remember I had lots of problems with JVCL which constists of many units and packages. Initially all the runtime units were in a single directory, and everything worked fine. But the more units I added compilation become more and more complex, it only worked when I compiled them in a given order, and maintainance become a nightmare. Martin finally told me to separate the code into individual folders, all the units of package 1 go into folder 1, the units of package 2 to folder 2 etc. I also separated the output folders, i.e. package 1 compiles to lib/package1, package 2 to lib/package2 etc. This way the compilation issues could be solved. There is still a "duplicate unit" message sometimes.

lainz, having the packages in several repositories has no effect on the compilation issues when you merge both repositiories to the same folder on the compiling machine.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: BGRA Controls
« Reply #416 on: July 23, 2020, 06:47:37 pm »
lainz, having the packages in several repositories has no effect on the compilation issues when you merge both repositiories to the same folder on the compiling machine.
Repositories are not merged into a single folder.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: BGRA Controls
« Reply #417 on: July 23, 2020, 07:04:54 pm »
I've moved BGLControls to a separate folder and it seems it has fixed the problem. I suppose that happens because the folder of the package is always considered as a source of units.

I also separated the output folders, i.e. package 1 compiles to lib/package1, package 2 to lib/package2 etc. This way the compilation issues could be solved. There is still a "duplicate unit" message sometimes.
I get "ambiguous unit" if I only change the output folder.
« Last Edit: July 23, 2020, 07:09:25 pm by circular »
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3800
  • Leandro Diaz
Re: BGRA Controls
« Reply #418 on: August 02, 2020, 10:40:12 pm »
For those that are willing to install BGRAControls under Linux, please download the latest release of BGRABitmap, at least version 11.2.1 that fixes the compiling on Linux  :)
https://lainz.github.io/
Download LazPaint https://lazpaint.github.io/
Download BGRABitmap and BGRAControls https://github.com/bgrabitmap

kirchfritz

  • New Member
  • *
  • Posts: 28
  • WIN10 LAZ 2.0.10 FPC 3.2.0
Re: BGRA Controls
« Reply #419 on: August 13, 2020, 04:21:31 pm »
Hello Lainz,

I did some modifications to the original BCMDButtons.pas file.
For example, I implemented the feature to specify the color of a checked TabButton and the feature to specify the position of the colored check mark of an checked TabButton.
See the screenshot of my test-file here:  https://www.screencast.com/t/aRIXUtnB

I am not familar with GitHub, pull-requests and so on.
Are you willing to put my modifications to the offical source code?

Attached you will find my bcmdbutton.pas file and a ZIP Archive with the test-project

Fritz

 

TinyPortal © 2005-2018