Forum > macOS / Mac OS X
How to generate a MacOSX application archive?
Martin V:
After successfully compiling my MacOSX application, there's a lot of minor stuff left to get an installation file for the user:
(1) generate additional files for a distribution, make the correct folder structure and place the files to the correct location
(2) generate a PKG file which gets unpacked by the installation program
(3) generate a DMG file where the PKG file resides.
A few small steps, but a complete new world for Windows programmers...
Where's the best documentation how to do this? I need to begin from zero... Not only the structure of the archive has to be explained, also the structure of saving MacOSX applications in the app folders on the hard disk. Thanks for any hints.
Martin
Lord_ZealoN:
This could help http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips
skalogryz:
--- Quote from: Martin V on June 29, 2010, 01:42:04 pm ---(1) generate additional files for a distribution, make the correct folder structure and place the files to the correct location
(2) generate a PKG file which gets unpacked by the installation program
(3) generate a DMG file where the PKG file resides.
Where's the best documentation how to do this? I need to begin from zero... Not only the structure of the archive has to be explained, also the structure of saving MacOSX applications in the app folders on the hard disk. Thanks for any hints.
--- End quote ---
http://wiki.lazarus.freepascal.org/Deploying_Your_Application#Mac_OS_X_installers
Martin V:
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
skalogryz:
--- Quote from: Martin V on July 17, 2010, 03:21:15 pm ---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.
--- End quote ---
This is odd. Try to delete the .app dir (bundle) and recompile the project.
It should re-created the .app dir, so Finder can launch the application correctly.
myprog inside of the bundle is actually a symbolic link to the myprog executable outside of the bundle!
Whenever you distribute your application you should move myprog inside of the bundle, instead of using the symbolic link
--- Quote from: Martin V on July 17, 2010, 03:21:15 pm ---(2) Stripping executables in MacOSX
What is the reccomended way to reduce the size? Do I have to install upx additionally or instead?
--- End quote ---
upx is additional executable files packer. it works different from strip.
Navigation
[0] Message Index
[#] Next page