Recent

Author Topic: Create new Package  (Read 12985 times)

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Create new Package
« on: October 17, 2012, 12:46:08 pm »
how to create a new package?
I do:
1) Create a new application (if any project is not open, then the menu is not available)
2) choose to create a new Package
3) add files to it
4) compile
5) install

I used the same package for Linux and Windows (create Package in Windows).
In Windows there is no problem, but Linux does not work.
Package in Windows and Linux compiled.
In the Windows package is installed.
In the Linux package is successfully compiled, but not installed. Writes error linking.

I decided to create different packages for Linux and Windows.
I created a new package in Linux. Added modules. Began to be compiled, but Lazarus wrote that he could not find the module Graphics (in the package created in Windows, Lazarus finds the module in Lazarus-Linux)..

I closed Lazarus and the more he does not start. Writes an error at startup.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Create new Package
« Reply #1 on: October 17, 2012, 02:01:04 pm »
Lazarus, OS versions please. See signature.

What error is displayed then? We're not mind readers.
You can try removing your Lazarus settings directory if you don't mind losing them. That will also remove what Lazarus knows about packages.
Have a look at the wiki for that.

Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #2 on: October 17, 2012, 03:52:50 pm »
What error is displayed then? We're not mind readers.

I do not know how to insert a picture on the forum. The error text:
Can't find the lazarus executable /home/pascaldev/Programas/lazarus/lazarus

I understand that when you install the package, Lazarus recompiles itself. Installing the package was a mistake - so the old file is deleted, and the new is not created.

I use a disk image of Lazarus under Linux for Virtual Box.
I copy the new image disk with Linux and Lazarus (for Android - Virtual Box).

but how do I create a new package in Linux?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Create new Package
« Reply #3 on: October 17, 2012, 04:02:45 pm »
The way you describe creating a package seems ok.  I suspect your Lazarus install on Linux may be broken.

I'm guessing you're using Lazarur 0.9.30 and a modified FPC 2.5 (old development version). But that's just my crystal ball talking.
If you don't need to develop for android, I'd recommend setting up a virtual machine with Linux and install the FPC 2.6+Lazarus 1.0.2 packages from the downloads as there will have been a lot of bugfixes.

Note: not every package has to be a design-time package - if you only use a package to make your code location independent and you have no design-time graphical components etc, you can set the package to be a runtime package.
This means you don't need to recompile Lazarus to "install" them, as they won't need to be installed. Just compile them once to make Lazarus aware of the location.

See the wiki for details.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #4 on: October 17, 2012, 04:42:01 pm »
My package works with the Web and IP cameras, so it contains graphic components. It does not contain a third-party components. I used a disk image for Andrida Lazarus, because I wanted to move components on the Android, but I could not understand how to create a new application in Lazarus under Android, so I started to do under Linux.

To install Lazarus under Linux I do not need to register the path?
It is easy to install Lazarus under Linux? In the Windows installer does all the work.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Create new Package
« Reply #5 on: October 17, 2012, 05:10:51 pm »
Yes it is easy. Good luck.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #6 on: October 19, 2012, 10:07:15 pm »
install the latest version of Lazarus did not solve the problem.
as before writes:

Code: [Select]
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lglib
RVMediaLazLin.lpr(21,1) Error: Error while linking
RVMediaLazLin.lpr(21,1) Fatal: There were 1 errors compiling module, stopping

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11458
  • FPC developer.
Re: Create new Package
« Reply #7 on: October 20, 2012, 01:08:53 pm »
glib should be a dependency of gtk.  Maybe the -dev libraries are missing.

Install gtk2 and gtk2-dev

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #8 on: October 20, 2012, 07:51:23 pm »
Yes. I understand the problem. I disabled this function in modules (functions have been used for testing). Now I have another problem.

In Delphi resource file I saved 14 frames for the animation. I created a file for the LRS Lazarus. Replaced {$ R  fileXXX.res}} to {$ I fileXXX.lrs}. To create the file, I used the "lazres.exe rvcamanimation.lrs RVACAMANI_00.png ..." in Windows. In Lazarus in Linux writes an error to file LRS (created in Windows)

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #9 on: October 21, 2012, 02:41:35 pm »
Code: [Select]
rvcamanimation.lrs(1,17) Error: Identifier not found "LazarusResources"
rvcamanimation.lrs(45,3) Error: Type conflict between set elements

file rvcamanimation.lrs:
LazarusResources.Add('RVACAMANI_00','PNG',[
  #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0'4'#0#0#0' '#8#6#0#0#0']?[f'#0#0#3
  +#220'IDATx'#156#205#153'kO'#234'X'#20#134#159#238#221#22'J'#203#165#8'H'#8#19
....


taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Create new Package
« Reply #10 on: October 21, 2012, 03:03:59 pm »
add lResources to the uses clause of the unit that has the include directive.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Create new Package
« Reply #11 on: October 21, 2012, 03:18:37 pm »
Or use "normal" Windows resources (also usable on other platforms): http://wiki.lazarus.freepascal.org/Lazarus_Resources#FPC_resources
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #12 on: October 21, 2012, 10:31:11 pm »
adding lResources solved the problem.
package is compiled. I choose to install the package (in Linux).
Lazaprus restarted (compiles itself), but I do not see a component in the tabs (I do not see my tabs RVMedia).
To register the components I use:
Code: [Select]
procedure Register;

implementation

procedure Register;
begin
   RegisterComponents ('RVMedia', [TRVCamera, TRVCamView, TRVCamControl,
     TRVCamMultiView, TRVCamSender, TRVCamReceiver, TRVMicrophone,
     TRVMicrophoneView, TRVMediaServer]);
end;

In the example I see the code is:
Code: [Select]
implementation
 
procedure Register;
begin
  RegisterUnit('GTKGLArea', @GTKGLArea.Register);
end;
 
initialization
  RegisterPackage('GTKOpenGL', @Register);
end.
How to register components in Linux, so I saw the tab RVMedia and my components?

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #13 on: October 22, 2012, 01:32:58 pm »
"Register Unit" checked the module, where the code is written to "RegisterComponents". My package is in the list of installed, but the not my tabs and my components in interface Lazarus. Can not register a few components in one module? or you can not register the components that are in another module?

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Create new Package
« Reply #14 on: October 22, 2012, 02:51:39 pm »
Possible to add new components for Lazarus under Linux or Linux version does not support the addition of new components? (I'm using the latest version of Lazarus 1.0.2)

code for the package that generated Lazarus.
Code: [Select]
{ This file was automatically created by Lazarus. Do not edit!
  This source is only used to compile and install the package.
 }

unit RVMediaLazLin;

interface

uses
  MRVCamControl, MRVCamera, MRVCamMultiView, MRVCamView, MRVInet,
  MRVMediaServer, MRVMicrophone, MRVMicrophoneLin, MRVMicrophoneViewer,
  MRVReceiver, MRVReg, MRVSender, MRVSndLin, MRVType, MRVWebCamLin,
  MWaveFuncs, MWavelet, LazarusPackageIntf;

implementation

procedure Register;
begin
  RegisterUnit('MRVReg', @MRVReg.Register);
end;

initialization
  RegisterPackage('RVMediaLazLin', @Register);
end.

 

TinyPortal © 2005-2018