Thank you for the links.
There are a few problems left:
(1) file Myprog and directory Myprog.app
When comiling myprog in Lazarus, I get a file
myprog (without extension)
myprog.app/Contents/MacOS/myprog (the executable file)
If I double click to myprog.app (the finder does not show the extension), the program does not really work and it is executed via terminal window. User input gets into the terminal window instead of myapp.
If I double click myprog without .app extension (a file, not a directory), the application works fine.
What do I have to copy into /Applications folder that myprog works fine? I haven't seen additional files without extension in the Applications folder for other programs. I do not want to run the program via terminal window, of course.
(2) Stripping executables in MacOSX
On Windows and Linux, I can enter
strip --strip-all Myprog
and the executable file size gets reduced.
In MacOSX, there's also a strip command, but with other functionality and syntax. I assume, strip is part of XCode and not of Lazarus.
What is the reccomended way to reduce the size? Do I have to install upx additionally or instead?
Martin