bundle a jnlp so you can add to dock on a mac? - macos

I want to be able to drag Findbugs to the Dock on my Mac.
The problem is it's a JNLP.
Is there a distilled idiots guide to creating an Mac application bundle from a JNLP?
I saw this article on the Apple website: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html
but it was a case of 'information overload'!

Quoting from the Java Web Start section of the linked article:
Mac OS X’s desktop integration with Java Web Start lets users can create a local application bundle from any Java Web Start application. The Shortcut Creation setting in Java Preferences controls whether the user is prompted to create an application bundle when opening a Java Web Start application. Bundled Java Web Start applications have all of the benefits of native application bundles, which are described in “Mac OS X Application Bundles.”
Try looking in Applications->Utilities->Java Preferences. Click on the Advanced tab. You should see the Shortcut Creation setting. Let us know if it works for you.

Related

Integrating Oracle Java Web Start with Firefox on Mac OS X Mavericks

I would like to launch Java Web Start applications from Firefox on Mac OS X Mavericks by clicking on the link which provides the .jnlp file.
So far I only found a work around:
saving the jnlp file
opening it in finder
right click "open with"
then choosing Java Web Start
This is not comfortable and it seems it might be intended, because Java (here an Oracle Java 8 JRE) was downloaded from the Oracle web site and not from the app store.
Is there a better solution to integrate Java Web Start and Firefox?
I just had this and found the solution here: http://www.ca5.uscourts.gov/docs/default-source/cm-ecf/macfirefox.pdf
Basically:
Click the link to the jnlp file
In the window that pops up, choose Open With and in the drop down choose Other...
From the local Hard Drive, navigate to System > Library > Core Services > Java Web Start
Tick the Do this automatically for files like this from now on box
Click Open
In future, jnlp links should open with Java Web Start automatically

Open app automatically at system startup in dock

I have a MAC OS X application and I want to launch my app automatically in the dock when user opens his PC. I know a user can explicitly select an app to "alway open on startup" but what if user dont select that option. Thats why I want to do it automatically (myself) once he/she install my app. Later he can remove my app from launching at the startup though. Kindly suggest me some solution or guide me to the right path. Not very familiar with Mac development.
Thanks.
Take a look at Daemons and Services Programming Guide. What you are looking for is an agent.

Can a Mac OSX Plugin have its own Entitlements? Or extend the Main App's Entitlements?

I need to be able to define new entitlements (e.g. network access, file read) for my Print Dialog Extension (PDE) Plugin in Mac OSX 10.7 and above, where apps are now mostly sandboxed.
Is this possible? If yes, how?
Edit: Looked at XPC services. XPC seems to not work, maybe because the PDE plugin runs on top of an app, e.g. Preview, and my XPC service is not within the Main App's bundle.

Creating feature in mac app to override the users security setting

I'm a newbie at mac osx development. I would like to know if there's any way to override the mac desktop security settings to allow an application - which is not registered in the Mac App Store, to be installed?
The setting should come from the app that I'm trying to install. That means, whenever I install the app to any mac computer, regardless of its security settings as the following,
Allow applications downloaded from:
Mac App Store
Mac App Store and identified developers
Anywhere
The app should set the settings to Anywhere, allowing it to be installed.
Any help would be very much appreciated.
Launch System Preferences from the Apple menu.
Choose “Security & Privacy” and then click the “General” tab, followed by clicking the lock icon in the corner to unlock the settings.
Look for “Allow applications downloaded from:” and choose “Anywhere”.
Accept the security warning and allow.
Note that you should be careful and aware that now the job of protecting the system from malicious apps belongs to you instead of the OS.
Right click the (app) icon and click 'open' in contextual menu - no need to disable the OS security.
This is not possible. The existence of that setting is intended to protect users from malicious executables. If there were a way for any arbitrary executable to override that setting, what protection would it offer? Malicious executables would simply change the setting to "Anywhere" like you suggest, bypassing the security features of Mac OS X.
You need to sign your application using a Mac Developer certificate, which you can obtain from Apple. That will mark your app as built by an "identified developer" and it will launch just fine without changing any settings.
Control Click the app icon to override this security feature. This is a one off, you don't have to change your settings, you can do it per-app.
There is one other way...
All you have to do to do it manually is to open up Terminal, cd into the .app application, cd into the Contents folder, then cd into the MacOS folder, then type ./YourAppNameHere and execute by typing Enter.

How to deploy a FireMonkey Application for Mac OSX?

I can run a FireMonkey Application on Mac OSX with PAServer. But now, I would like to deploy the application Mac OS (something like MSI under Windows). How can I do this?
You'll want to read more about Application Bundles.
Using the application bundle that Delphi creates and deploys via PAServer
Since you're using the PAServer, you'll find that it has already created an application bundle for you. After you run the program via the PAServer, look in the following folder on the Mac for the application bundle:
/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]
If your project is named Project1, you'll see an application bundle in that folder named Project1.
If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.
Go ahead and run this application bundle directly on the Mac. If it complains about missing dylibs, such as libmidas.dylib, simply copy them from the PAServer folder into the application bundle's MacOS folder.
To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.
Changing the icon
The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.
Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.
Peeking inside the bundle
Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.
More about deployment
If your application can be self contained in an app bundle, the standard method is to put the application bundle inside a disk image .dmg file, which allows the user to drop the application into the applications folder.
If your application requires the installation of additional files, libraries, databases, or frameworks, etc., you should create a package. You can utilize PackageMaker to do this. A package is similar to the "msi" installer on Windows that you mention.
When the user double-clicks the package, it's run by Installer. It has a wizard style interface and walks the user through installing the application. You can also sign the package with your code signing certificate.
If you want to include your application bundle in the app store, you'll need to sign it. You'll also need to sandbox it.
Sandboxing and the Mac App Store - Nov 2, 2011
The vast majority of Mac users have been free from malware and we're
working on technologies to help keep it that way. As of March 1, 2012
all apps submitted to the Mac App Store must implement sandboxing.
Sandboxing your app is a great way to protect systems and users by
limiting the resources apps can access and making it more difficult
for malicious software to compromise users' systems. Learn more by
visiting the App Sandbox page.
You must create an Application Bundle in order to deploy you app on a OSX System .
Check these links for more information
Deploying Your Application (Mac OS X installers )
Application Bundle
Building Fancy DMG Images on Mac OS X

Resources