Sign in Join

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

Mailing lists / lazarus / 2012-09

lazdebian.lpk - Create Debian package from exiting Lazarus Project

24 messages · 11 people · –

Reply by email Subscribe to this list Your subscription

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

Bernd

I made a Lazarus package for creating Debian packages from Lazarus projects:

* Create binary (.deb) Package
- optionally signed with gpg key

* Create Debian source package
- optionally signed
- optionally upload to Launchpad PPA for automatic building and publishing.

Screenshots, source code and short explanation here: http://prof7bit.github.com/lazdebian/

Now we can start flooding the Ubuntu ecosystem with high quality Lazarus Applications with only a few clicks of the mouse.

The package is 95% complete already, works with simple projects out of the box with default settings, only need to fix some small remaining problems, maybe one day it would qualify for inclusion in the packages that ship with Lazarus by default (for this I still need a proper solution to my other question (version info), maybe a newly implemented macro that returns the version number)?

Bernd

Reply by email

Andrew Brunner
to Bernd

Thanks!

I was about to need that. :-)

Bernd wrote 30 lines
I made a Lazarus package for creating Debian packages from Lazarus projects: * Create binary (.deb) Package - optionally signed with gpg key * Create Debian source package - optionally signed - optionally upload to Launchpad PPA for automatic building and publishing. Screenshots, source code and short explanation here: http://prof7bit.github.com/lazdebian/ Now we can start flooding the Ubuntu ecosystem with high quality Lazarus Applications with only a few clicks of the mouse. The package is 95% complete already, works with simple projects out of the box with default settings, only need to fix some small remaining problems, maybe one day it would qualify for inclusion in the packages that ship with Lazarus by default (for this I still need a proper solution to my other question (version info), maybe a newly implemented macro that returns the version number)? Bernd -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Andrew Brunner Aurawin LLC 512.574.6298 http://aurawin.com/ Aurawin is a great new way to store, share, and enjoy your photos, videos, music and more.

Reply by email

Bernd
to Krzysztof

2012/9/30 Krzysztof :

Wow. I have not tested it yet. But are you planning create something similar for RPM?

I don't have any RPM based distribution but maybe at least for the binary debs it should be possible to make an option to run the produced .deb through alien. The produced binary debs are quite simple and do not contain any sophisticated debian-related voodoo so I guess it should be possible without problems.

Reply by email

Reinier Olislagers
to Bernd: I made a Lazarus package for creating Debian packages from Lazarus projects: * Create…
Bernd wrote
I made a Lazarus package for creating Debian packages from Lazarus projects:

<snip>

Show quoted text 7 lines
The package is 95% complete already, works with simple projects out of the box with default settings, only need to fix some small remaining problems, maybe one day it would qualify for inclusion in the packages that ship with Lazarus by default (for this I still need a proper solution to my other question (version info), maybe a newly implemented macro that returns the version number)?

Awesome, Bernd,

thanks very much! Hope the remaining problems get sorted as well, but looking at your email, it's nice enough already.

Regards,
Reinier

Reply by email

zeljko
to Bernd: I made a Lazarus package for creating Debian packages from Lazarus projects: * Create…
Bernd wrote 23 lines
I made a Lazarus package for creating Debian packages from Lazarus projects: * Create binary (.deb) Package - optionally signed with gpg key * Create Debian source package - optionally signed - optionally upload to Launchpad PPA for automatic building and publishing. Screenshots, source code and short explanation here: http://prof7bit.github.com/lazdebian/ Now we can start flooding the Ubuntu ecosystem with high quality Lazarus Applications with only a few clicks of the mouse. The package is 95% complete already, works with simple projects out of the box with default settings, only need to fix some small remaining problems, maybe one day it would qualify for inclusion in the packages that ship with Lazarus by default (for this I still need a proper solution to my other question (version info), maybe a newly implemented macro that returns the version number)?

Great, I guess that it won't be a big deal to create an rpm package creator too, and yes I'd like to see it in lazarus/components

z.

Reply by email

Bernd
to zeljko

2012/10/1 zeljko :

Great, I guess that it won't be a big deal to create an rpm package creator too, and yes I'd like to see it in lazarus/components

I have refactored it a little yesterday evening and put all debian specific stuff into a separate class (only the backend, not the gui yet). I guess then it would also need a different name because "lazdebian" implies that it is debian only.

Maybe then it would also make sense to implement creating windows installers and android packages.

Reply by email

Reinier Olislagers
to Bernd
Bernd wrote
I have refactored it a little yesterday evening and put all debian specific stuff into a separate class (only the backend, not the gui yet). I guess then it would also need a different name because "lazdebian" implies that it is debian only.

lazinstaller.... nice and ambiguous ;)

Maybe then it would also make sense to implement creating windows installers and android packages.

If you want me to, I can have a look at extending the backend for Inno Setup on Windows; I'm working on extending fpcup to create a Lazarus installer using Inno anyway (actually running the batch scripts that contain the installer, but I have to look up the Inno compiler location anyway)....

Regards,
Reinier

Reply by email

Unknown author
to Reinier Olislagers
Reinier Olislagers wrote
If you want me to, I can have a look at extending the backend for Inno Setup on Windows;

Patches (or pull requests) are very welcome. But at the moment I am still moving a lot of stuff around, so currently it might very well be possible that one morning you update your working copy to my latest revision and suddenly you won't find my (or your) classes or methods anymore that were still there a few hours ago and everything looking totally different ;-) -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121001/afcd2498/attachment.html>

Reply by email

Reinier Olislagers
to Unknown author
Show quoted text 11 lines
On , Reinier Olislagers wrote: > If you want me to, I can have a look at extending the backend for Inno > Setup on Windows; Patches (or pull requests) are very welcome. But at the moment I am still moving a lot of stuff around, so currently it might very well be possible that one morning you update your working copy to my latest revision and suddenly you won't find my (or your) classes or methods anymore that were still there a few hours ago and everything looking totally different ;-)

Thanks. Things appearing totally different in the morning is not altogether unknown to me but regarding your code... perhaps I'll wait a bit ;)

Regards,
Reinier

Reply by email

Bernd
to Bernd: I made a Lazarus package for creating Debian packages from Lazarus projects: * Create…

2012/9/30 Bernd :

I renamed the entire project, including the github repository and website URL: http://prof7bit.github.com/LazPackager/
https://github.com/prof7bit/LazPackager

all units are renamed also to reflect this change, the only thing I still need to rename now is the .lpk file itself, it will be called lazpackager.lpk (later this evening maybe or tomorrow). Also the names of the settings in the project file have changed and there is now (internally) a distinction between settings that are needed (or useful) for all packagers and setting that apply to a specific packager (debian) only, the settings names in the project file now reflect this. So after updating all your settings will be reset to the defaults.

Reply by email

Krzysztof
to Bernd

When I try to build debian package I get errors:

make: *** [build] B??d 2
dpkg-buildpackage: b??d: debian/rules build return error 2 debuild: fatal error at line 1350:
dpkg-buildpackage -rfakeroot -d -us -uc -b failed

Regards

Reply by email

Bernd
to Krzysztof

2012/10/27 Krzysztof :

make: *** [build] B??d 2

The real error must have happened earlier, please post the lines before this error message.

Also please note that yesterday I have committed a change that entirely removes the need for a makefile (you can still use one if you like but it is not auto-generated anymore). For this I also have changed the default debian/rules file template to replace its functionality (its probably not complete yet, expect more updates). If you update to the newest version you must therefore reset the rules file template.

Reply by email

Bernd
to Bernd

2012/10/27 Bernd :

Show quoted text 6 lines
2012/10/27 Krzysztof : > make: *** [build] B??d 2 The real error must have happened earlier, please post the lines before this error message.

Error has been found: lazbuild executable was not in the search path on the build machine.

Reply by email

Curt Carpenter
to zeljko: Great, I guess that it won't be a big deal to create an rpm package creator too, and yes…

Hello.

I am using Lazarus 0.9.30.4 with FPC 2.6.0 under Windows XP.

In my system, the two functions "hi(x)" and "lo(x)" don't seem to work if the argument x is an integer variable (although both functions work fine if x is a WORD variable).

To see if I could figure out why this is, I started trying to find the System unit that contains these two functions. I haven't been able to locate it though.

Could anyone tell me where I'll find the system unit source? I have the source for FPC, but can's seem to find system.pas anywhere.

Thanks for any help.

Regards,
Curt Carpenter

Reply by email

Sven Barth
to Curt Carpenter: Hello. I am using Lazarus 0.9.30.4 with FPC 2.6.0 under Windows XP. In my system, the two…
Curt Carpenter wrote 8 lines
Hello. I am using Lazarus 0.9.30.4 with FPC 2.6.0 under Windows XP. In my system, the two functions "hi(x)" and "lo(x)" don't seem to work if the argument x is an integer variable (although both functions work fine if x is a WORD variable).

Why do you come to the conclusion that they work incorrectly? Do you have an example where you can state what you expect and what you get?

To see if I could figure out why this is, I started trying to find the System unit that contains these two functions. I haven't been able to locate it though.

The hi and lo functions are compiler intrinsics and are not visible in code (the compiler generates specific code for them). If you still want to explore: they are implemented in compiler/ninl.pas (look for "in_XX_YYY" where "XX" is either "hi" or "lo" and "YYY" is "word", "long" or "qword").

Could anyone tell me where I'll find the system unit source? I have the source for FPC, but can's seem to find system.pas anywhere.

The system units are called "system.pp" (not .pas) and are located for each target in rtl/TARGET/system.pp (these usually include files from rtl/inc or rtl/TARGET or rtl/PLATFORM) (example for TARGET is win32 or linux, example for PLATFORM is i386 or arm)

Regards,
Sven

Reply by email

Curt Carpenter
to Sven Barth

Hello Sven.

Thank you for the help.

I tried this code:

procedure test;
var c: integer;
       loc,hic: byte;
begin
     c := 1000;
     hic := hi(c);
     loc := lo(c);
end;

The result is always hic = 0 and loc = 0 for me.

I have looked in ninl.pas as you suggested, and found the in_lo_xxxxxx items around line 2780 in that file. I note that in_lo_integer and in_hi_integer do not appear among the items listed.

In fpc/rtl/inc/system.inc, I find Hi(b:byte): byte declared. in fpc/rtl/inc/systemh.inc, I find only declarations for hi and lo.

I'm guessing that somehow hi(i:integer): byte and lo(i:integer): byte got dropped from the code base somehow (but remained in the fpc documentation).

Perhaps it's located somewhere that I have not looked yet?

Anyway -- thanks to all who gave me some pointers! I don't have the skill to try to suggest a fix, if in fact one is required. The work-around for me is to simply use word rather than integer types.

Regards,
Curt Carpenter

Sven Barth wrote 40 lines
Am 14.11.2012 05:19, schrieb Curt Carpenter: > Hello. > > I am using Lazarus 0.9.30.4 with FPC 2.6.0 under Windows XP. > > In my system, the two functions "hi(x)" and "lo(x)" don't seem to > work if the argument x is an integer variable (although both > functions work fine if x is a WORD variable). > Why do you come to the conclusion that they work incorrectly? Do you have an example where you can state what you expect and what you get? > To see if I could figure out why this is, I started trying to find > the System unit that contains these two functions. I haven't been > able to locate it though. The hi and lo functions are compiler intrinsics and are not visible in code (the compiler generates specific code for them). If you still want to explore: they are implemented in compiler/ninl.pas (look for "in_XX_YYY" where "XX" is either "hi" or "lo" and "YYY" is "word", "long" or "qword"). > > Could anyone tell me where I'll find the system unit source? I have > the source for FPC, but can's seem to find system.pas anywhere. > The system units are called "system.pp" (not .pas) and are located for each target in rtl/TARGET/system.pp (these usually include files from rtl/inc or rtl/TARGET or rtl/PLATFORM) (example for TARGET is win32 or linux, example for PLATFORM is i386 or arm) Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Sven Barth
to Curt Carpenter
Curt Carpenter wrote 10 lines
procedure test; var c: integer; loc,hic: byte; begin c := 1000; hic := hi(c); loc := lo(c); end; The result is always hic = 0 and loc = 0 for me.

Please provide a complete example (especially including an eventual "mode" directive as SizeOf(Integer) is different depending on the mode). I tested the following program here (using FPC 2.6.0) and I have no problems:

=== program begin ===

program hilotest;
{$mode fpc}
procedure test;
var c: integer;
       loc,hic: word;
begin
     c := 1000;
     hic := hi(c);
     loc := lo(c);
     Writeln(hic, ' ', loc);
end;
procedure test2;
var c: integer;
       loc,hic: byte;
begin
     c := 1000;
     hic := hi(c);
     loc := lo(c);
     Writeln(hic, ' ', loc);
end;
begin
   test;
   test2;
end.

=== program end ===

The following output is generated:

=== output begin ===

3 232
3 232

=== output end ===

If I change the mode from "fpc" to "objfpc" the output becomes:

=== output begin ===

0 1000
0 232

=== output end ===

Show quoted text 13 lines
I have looked in ninl.pas as you suggested, and found the in_lo_xxxxxx items around line 2780 in that file. I note that in_lo_integer and in_hi_integer do not appear among the items listed. In fpc/rtl/inc/system.inc, I find Hi(b:byte): byte declared. in fpc/rtl/inc/systemh.inc, I find only declarations for hi and lo. I'm guessing that somehow hi(i:integer): byte and lo(i:integer): byte got dropped from the code base somehow (but remained in the fpc documentation). Perhaps it's located somewhere that I have not looked yet?

It seems that you haven't read the declarations in systemh.inc correctly:

Function  lo(l : Longint) : Word;  [INTERNPROC: fpc_in_lo_long];

The "INTERNPROC" tells you that the function is a compiler intrinsic (and as such implemented in ninl.pas)

Regards,
Sven

Reply by email

Curt Carpenter
to Sven Barth

Hello Sven.

I understand now. I am using lazarus, which uses 4-byte integers.

"It seems that you haven't read the declarations in systemh.inc correctly:"

Yes. I'm new to this, and that is quite possible. But now I will know where to look next time.:-)

Thanks again.

Reply by email

Sven Barth
to Curt Carpenter
Curt Carpenter wrote
Hello Sven. I understand now. I am using lazarus, which uses 4-byte integers.

While it might be true that you are using Lazarus this is not directly the answer to my question. ;) At the top of a unit or program in Free Pascal there is usually a "$mode blabla" directive where normally "blabla" is either "objfpc" or "delphi" (other modes are possible). If no mode directive is given than the default is used which is "fpc" normally except you pass a corresponding command line parameter (which Lazarus does and which you can influence through the Compiler Settings (page "Parser").

Nevertheless you said that you use a mode where SizeOf(Integer) = 4. In that case it is incorrect to expect Byte values:

var
   loval, hival: Byte;
begin
   loval := Lo(SomeInt);
   hival := Hi(SomeInt);
end;

Lo/Hi of a 4 Byte value will give the lower and higher Word (16 Bit) value not a 8 Bit value. So if you have this value: $12345678 you will get $1234 and $5678 by Lo/Hi and loval and hival will both contain the Lower value ($34, $78) respectively.

I hope this helps you in finding the problem.

Regards,
Sven

Reply by email

Salvatore Coppola
to Curt Carpenter: Hello Sven. Thank you for the help. I tried this code: procedure test; var c: integer;…

Maybe the follow can help
Byte 0 .. 255 1
Shortint -128 .. 127 1
Smallint -32768 .. 32767 2
Word 0 .. 65535 2
Integer either smallint or longint size 2 or 4
Cardinal longword 4
Longint -2147483648 .. 2147483647 4
Longword 0 .. 4294967295 4
Int64 -9223372036854775808 .. 9223372036854775807 8 QWord 0 .. 18446744073709551615 8

http://www.freepascal.org/docs-html/ref/refsu5.html

2012/11/14 Curt Carpenter :

Show quoted text 87 lines
Hello Sven. Thank you for the help. I tried this code: procedure test; var c: integer; loc,hic: byte; begin c := 1000; hic := hi(c); loc := lo(c); end; The result is always hic = 0 and loc = 0 for me. I have looked in ninl.pas as you suggested, and found the in_lo_xxxxxx items around line 2780 in that file. I note that in_lo_integer and in_hi_integer do not appear among the items listed. In fpc/rtl/inc/system.inc, I find Hi(b:byte): byte declared. in fpc/rtl/inc/systemh.inc, I find only declarations for hi and lo. I'm guessing that somehow hi(i:integer): byte and lo(i:integer): byte got dropped from the code base somehow (but remained in the fpc documentation). Perhaps it's located somewhere that I have not looked yet? Anyway -- thanks to all who gave me some pointers! I don't have the skill to try to suggest a fix, if in fact one is required. The work-around for me is to simply use word rather than integer types. Regards, Curt Carpenter On 11/14/2012 4:50 AM, Sven Barth wrote: > > Am 14.11.2012 05:19, schrieb Curt Carpenter: >> >> Hello. >> >> I am using Lazarus 0.9.30.4 with FPC 2.6.0 under Windows XP. >> >> In my system, the two functions "hi(x)" and "lo(x)" don't seem to work if >> the argument x is an integer variable (although both functions work fine if >> x is a WORD variable). >> > Why do you come to the conclusion that they work incorrectly? Do you have > an example where you can state what you expect and what you get? > >> To see if I could figure out why this is, I started trying to find the >> System unit that contains these two functions. I haven't been able to >> locate it though. > > > The hi and lo functions are compiler intrinsics and are not visible in > code (the compiler generates specific code for them). If you still want to > explore: they are implemented in compiler/ninl.pas (look for "in_XX_YYY" > where "XX" is either "hi" or "lo" and "YYY" is "word", "long" or "qword"). > >> >> Could anyone tell me where I'll find the system unit source? I have the >> source for FPC, but can's seem to find system.pas anywhere. >> > The system units are called "system.pp" (not .pas) and are located for > each target in rtl/TARGET/system.pp (these usually include files from > rtl/inc or rtl/TARGET or rtl/PLATFORM) (example for TARGET is win32 or > linux, example for PLATFORM is i386 or arm) > > Regards, > Sven > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email