Re: [Lazarus] What does make install do?

2015-10-19 Thread Mark Morgan Lloyd

Bo Berglund wrote:

On Sun, 18 Oct 2015 10:01:40 +, Mark Morgan Lloyd
 wrote:

I've already pointed you at the relevant xdg utility, but quite frankly 
I wonder why I bother.




I do not see how me changing the operating system way of displaying
menus to another system would help. I looked up the xdg here:
http://standards.freedesktop.org/menu-spec/menu-spec-latest.html

And that was not really understandable for me.


It's hardly surprising, that link's completely irrelevant to the 
programs I explicitly pointed you at:


>>> See also xdg-desktop-menu and xdg-desktop-icon which should be
>>> included with most distreaux and tailored for their peculiarities.

MichaelVC showed you exactly what  make install  did, then you ran it 
and complained it wasn't what you wanted. You've more than once gone and 
found instructions on the web, then found they've left you with a mess- 
everything requiring root access or whatever.


If you'd read the manpage for xdg-desktop-menu you'd see, right at the start

"The xdg-desktop-menu program can be used to install new menu entries to 
the desktop's application menu."


If you looked further you'd also see

"In user mode the file is (un)installed for the current user only. In 
system mode the file is (un)installed for all users on the system."


Now, you're being given conflicting advice about where to store stuff. 
The bottom line is probably that if you've installed Lazarus (etc.) from 
the OS's repository you don't want to overwrite it... that's not as 
stupid as it sounds since even if you don't run the stock version 
installing it makes sure the prerequisites are there.


Apart from that there's no "right" answer. If you're running a multiuser 
system and don't want other people walking over your copy of Lazarus 
(and don't want to walk over other people's work) then build it 
somewhere in your home directory. If it's a single-user system or you're 
confident that the version you're setting up is what other people want, 
then build it in e.g. /usr/local/share/lazarus; in this latter case 
you'll want to make sure that you use  chown  to make it adequately 
accessible, I'm pretty sure I've given you an example of that.


In either case, use the appropriate xdg utility to set up menu entries 
for either yourself or all users. Most desktop environments have a 
(right-click) facility that allows you to set up a new program entry on 
the desktop, Raspbian omits that for some reason and my recollection is 
that the menu-editing facility isn't all that good.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sun, 18 Oct 2015 10:01:40 +, Mark Morgan Lloyd
 wrote:

>I've already pointed you at the relevant xdg utility, but quite frankly 
>I wonder why I bother.
>

I do not see how me changing the operating system way of displaying
menus to another system would help. I looked up the xdg here:
http://standards.freedesktop.org/menu-spec/menu-spec-latest.html

And that was not really understandable for me.


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sun, 18 Oct 2015 07:54:54 -0400, wkitt...@windstream.net wrote:

>the problem here is that now you've broken the install for other users since 
>they do not have access to your home directory... remember that a default 
>install needs to be usable by all users... a private install is only for the 
>one 
>user... you should create a new private link for your menus that points to 
>your 
>private installation...

I don't think so. Everyone seems to have xr or x access to use
lazarus:

-rwxr-xr-x  1 pi pi 221208688 Oct 15 21:21 lazarus
drwxr-xr-x  3 pi pi  4096 Oct 14 22:39 lazarus.app
-rwxr-xr-x  1 pi pi  69021112 Oct 15 21:10 lazbuild
drwxr-xr-x 12 pi pi  4096 Oct 15 21:05 lcl
-rw-r--r--  1 pi pi  2011 Oct 14 22:39 localize.bat
-rwxr-xr-x  1 pi pi  1240 Oct 14 22:37 localize.sh
-rw-r--r--  1 pi pi 93471 Oct 14 22:37 Makefile
-rw-r--r--  1 pi pi 14923 Oct 14 22:38 Makefile.fpc
drwxr-xr-x  6 pi pi  4096 Oct 15 21:04 packager
-rw-r--r--  1 pi pi  2727 Oct 14 22:37 README.txt
-rwxr-xr-x  1 pi pi  27797480 Oct 15 21:21 startlazarus

In any case there are no other users on most RPi systems...


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Bo Berglund wrote:


On Sat, 17 Oct 2015 11:13:11 +0200 (CEST), Michael Van Canneyt
 wrote:

But there is also a command
make install

What exactly does this do (in a Debian Jessie derivative environment)


You can see this easily for yourself by adding the -n option:


home: >make -n install

...


It seems lazarus is added to the start menu, from the line:

/usr/bin/install -c -m 644 install/lazarus.desktop 
/usr/local/share/applications/lazarus.desktop



I have tested it now with the following base data:
- Lazarus sources checked out to /home/pi/development/lazarus
- time make bigide executed inside the lazarus dir
- I deleted whatever I could find that put Lazarus on the Menu
 (this included the data in /home/pi/.local and /usr/local/share)
- verified that Lazarus was now gone from the start Menu

I realized that since make install sends stuff to /usr/local/share it
needed to be run as su so I did this:

sudo make install

This ran for a while with stops at a few commands but eventually
finished.
At this point Lazarus had returned to the start Menu below Programming
as it should. It could be started and looked OK.

Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!


That is the intention.



So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.


Usually that is NOT what you want in a default install.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sun, 18 Oct 2015 10:54:32 +0200 (CEST), Michael Van Canneyt
 wrote:

>> Then I examined what had happened and I found that the install script
>> had copied a number of files including lazarus executables to
>> /usr/local/share/lazarus and the symlinks in /usr/local/bin were
>> pointing to these executables effectively decoupling the lazarus
>> installation in the /home/pi tree from use!
>
>That is the intention.
>
>>
>> So in essence what could be done to install Lazarus in Raspbian Jessie
>> is to use the make install command as su but then adjust it by
>> changing the symlinks back to the true installation directory in the
>> home tree.
>
>Usually that is NOT what you want in a default install.
>

Well, Juha in an earlier post seem to indicate that one should keep
Lazarus in ones home dir and use it from there too...
But he did not mention make install of course.
I needed that to get a way to make Lazarus visible on the start menu.

Anyway I now examined more and found that the install actually copied
970 MB worth of data to /usr/local/share/lazarus...
Probably the entire chunk of files.


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Mark Morgan Lloyd

Bo Berglund wrote:

On Sun, 18 Oct 2015 10:54:32 +0200 (CEST), Michael Van Canneyt
 wrote:


Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!

That is the intention.


So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.

Usually that is NOT what you want in a default install.



Well, Juha in an earlier post seem to indicate that one should keep
Lazarus in ones home dir and use it from there too...


Yes, I was about to mention that.


But he did not mention make install of course.
I needed that to get a way to make Lazarus visible on the start menu.


I've already pointed you at the relevant xdg utility, but quite frankly 
I wonder why I bother.



Anyway I now examined more and found that the install actually copied
970 MB worth of data to /usr/local/share/lazarus...
Probably the entire chunk of files.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sat, 17 Oct 2015 11:13:11 +0200 (CEST), Michael Van Canneyt
 wrote:
>> But there is also a command
>> make install
>>
>> What exactly does this do (in a Debian Jessie derivative environment)
>
>You can see this easily for yourself by adding the -n option:
>
>
>home: >make -n install
...
>
>It seems lazarus is added to the start menu, from the line:
>
>/usr/bin/install -c -m 644 install/lazarus.desktop 
>/usr/local/share/applications/lazarus.desktop
>

I have tested it now with the following base data:
- Lazarus sources checked out to /home/pi/development/lazarus
- time make bigide executed inside the lazarus dir
- I deleted whatever I could find that put Lazarus on the Menu
  (this included the data in /home/pi/.local and /usr/local/share)
- verified that Lazarus was now gone from the start Menu

I realized that since make install sends stuff to /usr/local/share it
needed to be run as su so I did this:

sudo make install

This ran for a while with stops at a few commands but eventually
finished.
At this point Lazarus had returned to the start Menu below Programming
as it should. It could be started and looked OK.

Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!
The copied executables amounted to 318 MB so that is the cause for the
pauses during the script execution...

To fix this so the lazarus located in the pi home would still be used
I changed the symlinks back to point there by running these commands
from within /usr/local/bin:

sudo su
ln -sf /home/pi/development/lazarus/lazarus lazarus-ide
ln -sf /home/pi/development/lazarus/lazbuild lazbuild
ln -sf /home/pi/development/lazarus/tools/lazres lazres
ln -sf /home/pi/development/lazarus/tools/lrstolfm lrstolfm
ln -sf /home/pi/development/lazarus/startlazarus startlazarus
ln -sf /home/pi/development/lazarus/tools/updatepofiles updatepofiles
exit

Again checked that the Lazarus entry on the start Menu worked as
expected and it did.

So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Bo Berglund wrote:


On Sun, 18 Oct 2015 10:54:32 +0200 (CEST), Michael Van Canneyt
 wrote:


Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!


That is the intention.



So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.


Usually that is NOT what you want in a default install.



Well, Juha in an earlier post seem to indicate that one should keep
Lazarus in ones home dir and use it from there too...


It depends on the intention.

"make install" is intended to install something system-wide. That is it's 
function.
In this case, you must copy all files.

If you just want a private copy of Lazarus to appear in your menu, this is 
another intention.
It's probably easier to configure the menu yourself, or easier yet, create an 
icon on the desktop.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread wkitty42

On 10/18/2015 04:40 AM, Bo Berglund wrote:

Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!
The copied executables amounted to 318 MB so that is the cause for the
pauses during the script execution...

To fix this so the lazarus located in the pi home would still be used
I changed the symlinks back to point there by running these commands
from within /usr/local/bin:


the problem here is that now you've broken the install for other users since 
they do not have access to your home directory... remember that a default 
install needs to be usable by all users... a private install is only for the one 
user... you should create a new private link for your menus that points to your 
private installation...


--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] What does make install do?

2015-10-17 Thread Bo Berglund
Tried to figure this out but it was not so easy..

If I do this after getting the sources (trunk) from svn:
make clean bigide
then Lazarus builds OK and I can use it by running startlazarus

But there is also a command
make install

What exactly does this do (in a Debian Jessie derivative environment)

Does it populate start menus and the like?
Right now I have had to go through a lot of hoops to get Lazarus on
the Jessie start menu and maybe this is not necessary if make install
does it for me?


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-17 Thread Michael Van Canneyt



On Sat, 17 Oct 2015, Bo Berglund wrote:


Tried to figure this out but it was not so easy..

If I do this after getting the sources (trunk) from svn:
make clean bigide
then Lazarus builds OK and I can use it by running startlazarus

But there is also a command
make install

What exactly does this do (in a Debian Jessie derivative environment)


You can see this easily for yourself by adding the -n option:


home: >make -n install
/usr/bin/install -m 755 -d /usr/local/share
/usr/bin/install -m 755 -d /usr/local/share/lazarus
/usr/bin/install -m 755 -d /usr/local/share/applications
/usr/bin/install -m 755 -d /usr/local/share/pixmaps
/usr/bin/install -m 755 -d /usr/local/share/mime/packages
/usr/bin/install -m 755 -d /usr/local/share/icons/hicolor/48x48/mimetypes
/usr/bin/install -m 755 -d /usr/local/bin
/usr/bin/install -m 755 -d /usr/local/share/man
/usr/bin/install -m 755 -d /usr/local/share/man/man1
/bin/cp -Rfp packager debugger designer converter ide images languages 
lazarus.app units /usr/local/share/lazarus
/bin/cp -Rfp components docs doceditor examples lcl test tools 
/usr/local/share/lazarus
/bin/cp -Rfp Makefile* *.txt /usr/local/share/lazarus
/usr/bin/install -c -m 755 lazarus startlazarus lazbuild 
/usr/local/share/lazarus
ln -sf ../share/lazarus/lazarus /usr/local/bin/lazarus-ide
ln -sf ../share/lazarus/startlazarus /usr/local/bin/startlazarus
ln -sf ../share/lazarus/lazbuild /usr/local/bin/lazbuild
ln -sf ../share/lazarus/tools/lazres /usr/local/bin/lazres
ln -sf ../share/lazarus/tools/lrstolfm /usr/local/bin/lrstolfm
ln -sf ../share/lazarus/tools/updatepofiles /usr/local/bin/updatepofiles
make -C install/man install PREFIX=/usr/local GINSTALL=/usr/bin/install
make[1]: Entering directory `/home/michael/projects/lazarus/install/man'
cat man1/lazarus-ide.1 | gzip > man1/lazarus-ide.1.gz
cat man1/lazbuild.1 | gzip > man1/lazbuild.1.gz
cat man1/lazres.1 | gzip > man1/lazres.1.gz
cat man1/lrstolfm.1 | gzip > man1/lrstolfm.1.gz
cat man1/startlazarus.1 | gzip > man1/startlazarus.1.gz
cat man1/svn2revisioninc.1 | gzip > man1/svn2revisioninc.1.gz
cat man1/updatepofiles.1 | gzip > man1/updatepofiles.1.gz
/usr/bin/install -m 644 man1/lazarus-ide.1.gz man1/lazbuild.1.gz 
man1/lazres.1.gz man1/lrstolfm.1.gz man1/startlazarus.1.gz 
man1/svn2revisioninc.1.gz man1/updatepofiles.1.gz /usr/local/share/man/man1
rm -f man1/lazarus-ide.1.gz man1/lazbuild.1.gz man1/lazres.1.gz 
man1/lrstolfm.1.gz man1/startlazarus.1.gz man1/svn2revisioninc.1.gz 
man1/updatepofiles.1.gz
make[1]: Leaving directory `/home/michael/projects/lazarus/install/man'
/usr/bin/install -c -m 644 install/lazarus.desktop 
/usr/local/share/applications/lazarus.desktop
/usr/bin/install -c -m 644 images/icons/lazarus128x128.png 
/usr/local/share/pixmaps/lazarus.png
/usr/bin/install -c -m 644 install/lazarus-mime.xml 
/usr/local/share/mime/packages/lazarus.xml
/usr/bin/install -c -m 644 images/mimetypes/*.png 
/usr/local/share/icons/hicolor/48x48/mimetypes/
/usr/bin/install -m 755 -d /usr/local/share/lazarus/units/x86_64-linux/nogui
/usr/bin/install -m 755 -d /usr/local/share/lazarus/units/x86_64-linux/gtk
/usr/bin/install -m 755 -d /usr/local/share/lazarus/units/x86_64-linux/gtk2
/usr/bin/install -m 755 -d /usr/local/share/lazarus/units/x86_64-linux/qt 
/usr/bin/install -m 755 -d /usr/local/share/lazarus/components/synedit/design/languages


It seems lazarus is added to the start menu, from the line:

/usr/bin/install -c -m 644 install/lazarus.desktop 
/usr/local/share/applications/lazarus.desktop

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-17 Thread Mark Morgan Lloyd

Michael Van Canneyt wrote:

On Sat, 17 Oct 2015, Bo Berglund wrote:


Tried to figure this out but it was not so easy..

If I do this after getting the sources (trunk) from svn:
make clean bigide
then Lazarus builds OK and I can use it by running startlazarus

But there is also a command
make install

What exactly does this do (in a Debian Jessie derivative environment)


You can see this easily for yourself by adding the -n option:


home: >make -n install



It seems lazarus is added to the start menu, from the line:

/usr/bin/install -c -m 644 install/lazarus.desktop 
/usr/local/share/applications/lazarus.desktop


I don't know whether that will be immediately reliable on all window 
managers, i.e. whether the new entry will appear immediately or only 
after a reboot.


See also xdg-desktop-menu and xdg-desktop-icon which should be included 
with most distreaux and tailored for their peculiarities.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-17 Thread Bo Berglund
On Sat, 17 Oct 2015 11:13:11 +0200 (CEST), Michael Van Canneyt
 wrote:

>
>home: >make -n install

I'm learning all the time...
What a nifty switch to make!

-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus