Recent

Author Topic: LAZBarcodes package  (Read 10842 times)

waltmayo

  • Newbie
  • Posts: 6
LAZBarcodes package
« on: October 08, 2015, 09:03:25 pm »
I know you guys hate these type of posts... but I am trying install the LAZBarcodes package and when attempting to compile the runtime version (required) it tosses all kinds of errors. The wiki says all you have to do is compile the runtime version, then install the design-time version. I can't get past the complete runtime stage.

One error that is always there is an inability to find ZINT which is required.

Thanks for ANY help...

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: LAZBarcodes package
« Reply #1 on: October 08, 2015, 10:26:50 pm »
I just tested it, no problems with Laz trunk/fpc2.6.4 and Laz 1.4.2/fpc2.6.4. Initially there was a compilation error due to ZINT, but an alarm of my BitDefender popped up - I had recently activated its ransomeware protection which had not yet seen the Laz1.4.2 installation. After defining exceptions for the binaries used during compilation everything was ok.

Where did you download the LazBarcode package? There are some strange links around for the ccr components. I used this one: https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/lazbarcodes/

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: LAZBarcodes package
« Reply #2 on: October 08, 2015, 10:28:55 pm »
hello,
no problem to install lazbarcodes package on windows 7 , Lazarus 1.4 32 bits, lazbarcodes package 22/7/2011.

What is your O.S ? lazarus version ?
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

waltmayo

  • Newbie
  • Posts: 6
Re: LAZBarcodes package
« Reply #3 on: October 09, 2015, 03:16:31 pm »
Latest version... just installed. Win 10.

I'm wondering if I'm just not going through the right steps.

Walt

waltmayo

  • Newbie
  • Posts: 6
Re: LAZBarcodes package
« Reply #4 on: October 11, 2015, 12:18:16 pm »
Any assistance in this installation would be greatly appreciated. I cannot get around these errors.  I'd even be willing to pay for time on Teamviewer, if needed.

Walt

rvk

  • Hero Member
  • *****
  • Posts: 6162
Re: LAZBarcodes package
« Reply #5 on: October 11, 2015, 03:57:13 pm »
Compile lazbarcodes_runtimeonly.lpk
  • Download the latest ccr components (choose "Download Snaphot" at right-above)
  • Extract all (lazarus-ccr-svn-4376)
  • Copy the components\lazbarcodes folder to C:\lazarus\components
  • In Lazarus goto Packages > Open Package File (.lpk)
  • Browse to C:\lazarus\components\lazbarcodes\packages\lazbarcodes
  • Open lazbarcodes_runtimeonly.lpk
  • Attached image should appear (you'll see that zint.pp is in ..\src)
  • Press Compile
Compile and install lazbarcodes.lpk
  • Next goto Packages > Open Package File (.lpk)
  • Open lazbarcodes.lpk
  • Attached image should appear
  • Press Compile
  • if no errors Press Use > Install
  • Press Ok and Press Yes (attached image)
Where does it go wrong for you?
(please specify or copy error-messages exactly)

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: LAZBarcodes package
« Reply #6 on: October 11, 2015, 05:00:35 pm »
rvk, nice instructions on how to install packages. What about putting this into the wiki?

rvk

  • Hero Member
  • *****
  • Posts: 6162
Re: LAZBarcodes package
« Reply #7 on: October 11, 2015, 05:17:08 pm »
rvk, nice instructions on how to install packages. What about putting this into the wiki?
If I'm correct these instuctions are already in the wiki at
http://wiki.freepascal.org/Install_Packages#Adding_new_packages

Should such instructions still be included in the individual wiki at
http://wiki.freepascal.org/LazBarcodes
?

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: LAZBarcodes package
« Reply #8 on: October 11, 2015, 05:25:19 pm »
Should such instructions still be included in the individual wiki at
http://wiki.freepascal.org/LazBarcodes
?
No idea. The two steps are already mentioned, but maybe it is good for new users to see the screenshots. On the other hand, the installation bloats up the LazBarcodes wiki with information not specific to this component.

rvk

  • Hero Member
  • *****
  • Posts: 6162
Re: LAZBarcodes package
« Reply #9 on: October 11, 2015, 06:06:11 pm »
Should such instructions still be included in the individual wiki at
http://wiki.freepascal.org/LazBarcodes?
No idea. The two steps are already mentioned, but maybe it is good for new users to see the screenshots. On the other hand, the installation bloats up the LazBarcodes wiki with information not specific to this component.
Yep, that was also my idea. Adding so much extra information to the wiki-page, which would only be for "beginners", might be too much. Although I do think the Install_Packages#Adding_new_packages could be made somewhat clearer (with images). After that a simple link to that page would be sufficient.

(and maybe this would be more in its place at a generic page about lazarus_ccr components and installation, which I couldn't find)

waltmayo

  • Newbie
  • Posts: 6
Re: LAZBarcodes package
« Reply #10 on: December 11, 2015, 03:20:32 pm »
Sorry for the delay. I was only just this week able to go through the steps to install. Everything worked using your step-by-step guide. I cannot thank you enough. I would have never, ever figured that out myself.

Walt

iorek

  • New member
  • *
  • Posts: 9
Lazarus crashes when any barcode component is placed on form
« Reply #11 on: January 05, 2016, 08:29:39 pm »
Hello,

I installed LazBarcodes package as instructed  earlier in this thread. Instalation itself goes without problems and Lazarus is succesfully rebuilt wuth  Laz Barcodes 2D components tab.
When I try to place any barcode control to form I get this error:

Invalid floating point operation.
(Attached screenshot)

and lazarus closes after that.

I have:
Lazarus 1.4.4
Windows XP

Any pointer how to overcome this are welcome.
Thanks!

LP, Tomaž

iorek

  • New member
  • *
  • Posts: 9
Re: LAZBarcodes package
« Reply #12 on: January 10, 2016, 11:38:26 am »
Hi,
If I create barcode component in code it works. The problem is somewhere in visual part of LazBarcodes package.
Code: Pascal  [Select][+][-]
  1. var
  2.   Form1: TForm1;
  3.   BarcodeQR1 : TBarcodeQR;
  4.  
  5. implementation
  6.  
  7. {$R *.lfm}
  8.  
  9. { TForm1 }
  10.  
  11. procedure TForm1.FormCreate(Sender: TObject);
  12. begin
  13.   BarcodeQR1 := TBarcodeQR.Create(Form1);
  14.   BarcodeQR1.Parent := Form1;
  15.   BarcodeQR1.Left := 10;
  16.   BarcodeQR1.Top := 10;
  17.   BarcodeQR1.Width := 70;
  18.   BarcodeQR1.Height := 70;
  19.   BarcodeQR1.BackgroundColor:= clWhite;
  20.   BarcodeQR1.ECCLevel:= eBarcodeQR_ECCLevel_Auto;
  21.   BarcodeQR1.ForegroundColor:= clBlack;
  22.   BarcodeQR1.StrictSize := true;
  23.  
  24.   BarcodeQR1.Text:= 'http://www.google.com';
  25.   BarcodeQR1.Generate;
  26.  
  27. end;
  28.  

LP, Tomaž

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: LAZBarcodes package
« Reply #13 on: January 10, 2016, 06:17:34 pm »
I can confirm your issue in design mode under XP. I did not fully go into the details, but the issue must be related to the fact that these components do not store their width and height in the lfm file. No idea why this bug does not show up in newer windows versions.

These are the modifications you have to apply to "ubarcodes.pas":
Code: Pascal  [Select][+][-]
  1. type
  2.   TLazBarcodeCustomBase=class(TGraphicControl)
  3.   ..
  4.   published
  5.     ...
  6.     property Width;  // add at end
  7.     property Height;  // add at end
  8.   end;
  9.  
  10. constructor TLazBarcodeCustomBase.Create(AOwner: TComponent);
  11. begin
  12.   inherited Create(AOwner);
  13.   FBackgroundColor:=clWhite;
  14.   FForegroundColor:=clBlack;
  15.   FStrictSize:=true;
  16.   Width := 64;  // add
  17.   Height := 64;  // add
  18. end;

Unfortunately, this does not entirely fix the component because there is also a range overflow error which, however, is suppressed in the default compiler settings. I did not have time to look into this one, yet.

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: LAZBarcodes package
« Reply #14 on: January 11, 2016, 11:07:35 am »
Fixed in r4419 (along with the range check error).

 

TinyPortal © 2005-2018