How to distribute a Mac application?
lazarus / 33-macOS - Mac OS X
----------------------------------------------------------------------
vonskie · 2014-03-18 15:02
I create an app bundle via the button
And then what?
I zip the app bundle up the other person copies it to their
application folder and it runs?
Does creating the app bundle put the compiled application inside of
the app bundle or does it just link to it and the user needs to copy
both files so the bundle can be launched?
Also how do you change the icon for the app bundle it is just the
default paper pen and ruler one.
----------------------------------------------------------------------
skalogryz · 2014-03-18 15:12
Quote from: vonskie on March 18, 2014, 04:02:59 pmI create an app
bundle via the button
And then what?
I zip the app bundle up the other person copies it to their
application folder and it runs?
Yes
Quote from: vonskie on March 18, 2014, 04:02:59 pmDoes creating the
app bundle put the compiled application inside of the app bundle or
does it just link to it and the user needs to copy both files so the
bundle can be launched?
It creates a link. You'll need to copy the executable inside of the
bundle before distributing the bundle.
----------------------------------------------------------------------
kamischi · 2014-03-18 18:59
Quote from: vonskie on March 18, 2014, 04:02:59 pmAlso how do you
change the icon for the app bundle it is just the default paper pen
and ruler one.You have to create an icon, place it inside
Contents/Resources and replace/add its name in the Info.plist file to
the property "Icon file" either with the Property List Editor or a
plain text editor. In plain xml it should be:
CFBundleIconFile
NameOfYourIconFile
As much as i know, no path to the file and no extension (.icns)
Sometimes it needs to move the application bundle in the Finder to
another place and back to initiate the change.
The developer docs from Apple have more details.
MiSchi
----------------------------------------------------------------------
vonskie · 2014-03-18 19:40
Thank you both!
Once you get your bundle all bundled up what is the easiest way to
create a dmg out of it with license text?
Is there a wizard type DMG builder that is very easy to use do not
need many features.
----------------------------------------------------------------------
Fred vS · 2014-03-18 20:29
QuoteOnce you get your bundle all bundled up what is the easiest way
to create a dmg out of it with license text?
Personally, for the OSX sharewares, i give a zipped file with :
=> the_folder_application.app => /Contents => /MacOS and /Ressources
=> Readme.txt
=> Licence.txt
And they seems happy...
----------------------------------------------------------------------
kamischi · 2014-03-18 21:53
Quote from: vonskie on March 18, 2014, 08:40:25 pmOnce you get your
bundle all bundled up what is the easiest way to create a dmg out of
it with license text?
Is there a wizard type DMG builder that is very easy to use do not
need many features.Maybe. For Ultrastar Deluxe I added some shell
commands to the Makefile. The essential parts are:
hdiutil create -type SPARSE -size 100m -fs HFS+ -volname
UltraStarDeluxe -ov UltraStarDeluxe.sparseimage
hdiutil attach UltraStarDeluxe.sparseimage
/bin/cp -R UltraStarDeluxe.app /Volumes/UltraStarDeluxe
hdiutil detach /Volumes/UltraStarDeluxe
hdiutil convert UltraStarDeluxe.sparseimage -format UDBZ -o
UltraStarDeluxe.dmg
rm UltraStarDeluxe.sparseimage
You may have to adjust the -size 100m to your needs. Also, you might
add a nice background image and an alias to the folder /Applications
for easier installation.
MiSchi
----------------------------------------------------------------------
vonskie · 2014-03-19 03:57
Quote from: kamischi on March 18, 2014, 07:59:29 pmQuote from: vonskie
on March 18, 2014, 04:02:59 pmAlso how do you change the icon for the
app bundle it is just the default paper pen and ruler one.You have to
create an icon, place it inside Contents/Resources and replace/add its
name in the Info.plist file to the property "Icon file" either with
the Property List Editor or a plain text editor. In plain xml it
should be:
CFBundleIconFile
NameOfYourIconFile
As much as i know, no path to the file and no extension (.icns)
Sometimes it needs to move the application bundle in the Finder to
another place and back to initiate the change.
The developer docs from Apple have more details.
MiSchi
I did the above and looked at an example file. But it did not change
the bundle icon will an ICO file work and does it have to be a certain
size?
----------------------------------------------------------------------
jwdietrich · 2014-03-19 06:38
Quote from: vonskie on March 19, 2014, 04:57:35 amI did the above and
looked at an example file. But it did not change the bundle icon will
an ICO file work and does it have to be a certain size?
No, it has to be an icns file. You can create icns files with several
programs, e.g. with Apple's Icon Composer. I personally prefer
Mscape's Iconographier.
----------------------------------------------------------------------
vonskie · 2014-03-19 13:29
Quote from: jwdietrich on March 19, 2014, 07:38:51 amQuote from:
vonskie on March 19, 2014, 04:57:35 amI did the above and looked at an
example file. But it did not change the bundle icon will an ICO file
work and does it have to be a certain size?
No, it has to be an icns file. You can create icns files with several
programs, e.g. with Apple's Icon Composer. I personally prefer
Mscape's Iconographier.
What resolution?
----------------------------------------------------------------------
kamischi · 2014-03-19 13:50
An icns file is composed from a series of images (for example png's)
with different resolutions. The more resolutions you add, the better
the result of intermediate, interpolated sizes. The complete series
is:
16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024
MiSchi
----------------------------------------------------------------------
vonskie · 2014-03-19 14:57
Quote from: kamischi on March 19, 2014, 02:50:31 pmAn icns file is
composed from a series of images (for example png's) with different
resolutions. The more resolutions you add, the better the result of
intermediate, interpolated sizes. The complete series is:
16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024
MiSchi
Now I am really confused I got a ico file and used img2icns to convert
it then put it in the resource folder and it still does not changed
the app bundle icon from default.
Here is the plist file
CFBundleDevelopmentRegion
English
CFBundleExecutable
ScannerScreen
CFBundleName
Scanner Screen
CFBundleIdentifier
com.company.ScannerScreen
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
APPL
CFBundleSignature
Scan
CFBundleShortVersionString
0.1
CFBundleVersion
1
CSResourcesFileMapped
CFBundleDocumentTypes
CFBundleTypeRole
Viewer
CFBundleTypeExtensions
*
CFBundleIconFile
ScannerScreen.icns
CFBundleTypeOSTypes
fold
disk
****
Please help!
----------------------------------------------------------------------
Fred vS · 2014-03-19 15:11
Hello.
I have the application icon .icns here and it works :
myapplication.app/Contents/Resources/myapplication.icns
PS: Once you have changed your icon, you must re-load it (delete the
old link and re-create a new one).
[EDIT]
Here the begin of info.plist
Quote
CFBundleIconFile
myapplication.icns
...
[2 th EDIT]
It is possible that you even have to re-boot after change your icon to
have the new one !
(I know it is strange, it is Mac...)
----------------------------------------------------------------------
vonskie · 2014-03-19 15:43
Quote from: Fred vS on March 19, 2014, 04:11:24 pmHello.
I have the application icon .icns here and it works :
myapplication.app/Contents/Resources/myapplication.icns
PS: Once you have changed your icon, you must re-load it (delete the
old link and re-create a new one).
[EDIT]
Here the begin of info.plist
Quote
CFBundleIconFile
myapplication.icns
...
[2 th EDIT]
It is possible that you even have to re-boot after change your icon to
have the new one !
(I know it is strange, it is Mac...)
Set it up like you suggested still no go guess I need to reboot
----------------------------------------------------------------------
vonskie · 2014-03-19 16:17
Thanks it worked
Renamed the file plist was refreshed and icon appeared for app