gleach1 Absent Member.
Absent Member.
4701 views

best way to deploy a DMG package eg firefox

Hi All,
Have started messing aroudn with ZCM and osx and have created my first app - Firefox

So far to get it installed i've done the following:

1. 'install files' action to copy the dmg package to the mac with 755 permissions
2. run hdiutil to mount the package silently
3. run cp-r to copy the firefox.app folder to the applications folder
4. silently detach the dmg file

To launch it i have the following single step
1. use the open command with firefox as the argument to run it

Is there a better way to do this with less steps (maybe 2 steps like you can for windows with firefox, or would what i'm doing be considered good practice)?

Labels (2)
0 Likes
10 Replies
Knowledge Partner
Knowledge Partner

Re: best way to deploy a DMG package eg firefox

On 20/04/2012 06:36, gleach1 wrote:

> Have started messing aroudn with ZCM and osx and have created my first
> app - Firefox
>
> So far to get it installed i've done the following:
>
> 1. 'install files' action to copy the dmg package to the mac with 755
> permissions
> 2. run hdiutil to mount the package silently
> 3. run cp-r to copy the firefox.app folder to the applications folder
> 4. silently detach the dmg file
>
> To launch it i have the following single step
> 1. use the open command with firefox as the argument to run it
>
> Is there a better way to do this with less steps (maybe 2 steps like
> you can for windows with firefox, or would what i'm doing be considered
> good practice)?


I have a Cool Solutions article in mind but so far I've come up with
three ways and there's a possible fourth in the works:

1) as above which neatly handles copying a single file but then requires
other actions
2) since Mac .app files are actually directories use Install Directory
to "install" the .app
3) create an empty bundle that cans up the above 4 steps with a couple
of others

Future plans for ZCM include adding Mac specific actions so in time
you'd be able install a Mac app with one step! 🙂

HTH.
--
Simon
Novell/SUSE/NetIQ Knowledge Partner

------------------------------------------------------------------------
Do you work with Novell technologies at a university, college or school?
If so, your campus could benefit from joining the Novell Technology
Transfer Partner (TTP) program. See novell.com/ttp for more details.
------------------------------------------------------------------------
0 Likes
gleach1 Absent Member.
Absent Member.

Re: best way to deploy a DMG package eg firefox

Thanks Simon,
I like the sound of number 2, that would certainly save several steps and lot of messing around with simple apps such as firefox, thanks for the pointers, in case you can't tell my most recent experience with mac stuff is ZCM with osx running in virtualbox for testing

0 Likes
Knowledge Partner
Knowledge Partner

Re: best way to deploy a DMG package eg firefox

On 22/04/2012 23:36, gleach1 wrote:

> I like the sound of number 2, that would certainly save several steps
> and lot of messing around with simple apps such as firefox, thanks for
> the pointers, in case you can't tell my most recent experience with mac
> stuff is ZCM with osx running in virtualbox for testing


The problem with #2 is creating the bundle - Mac applications are
usually distributed as a .dmg file which you mount on the Mac and then
copy the .app "file" to the Applications folder.

By default Windows & Linux can't open .dmg files yet Mac is not a
supported platform for any web browser to access ZCC.

So you need to either mount the .dmg on a Mac to get the .app directory
which you can then copy (scp?) to Windows/Linux or install a third-party
utility on Windows/Linux to open .dmg.

HTH.
--
Simon
Novell/SUSE/NetIQ Knowledge Partner

------------------------------------------------------------------------
Do you work with Novell technologies at a university, college or school?
If so, your campus could benefit from joining the Novell Technology
Transfer Partner (TTP) program. See novell.com/ttp for more details.
------------------------------------------------------------------------
0 Likes
gleach1 Absent Member.
Absent Member.

Re: best way to deploy a DMG package eg firefox

Hi Simon,
I've foudn that 7-zip and browse into a dmg package on a windows box quite happily, i'm going to have a play with this 2nd method later this week if i've got some time

I know the 2nd method won't work for every app (flash player I found to be an odd one for starters), but it would probably cover around half I imaging

0 Likes
casutton
New Member.

Re: best way to deploy a DMG package eg firefox

The easiest way to deploy Firefox on a Mac is to just grab the Firefox.app from the DMG. Then create a bundle that copies Firefox.app to /Applications. Its as simple as that. I've used this same method with ARD (Apple Remote Desktop) for years.
0 Likes
jkillebrew Absent Member.
Absent Member.

Re: best way to deploy a DMG package eg firefox

The folder method doesnt appear to work with the Groupwise app. It gets damaged somehow. Works fine with firefox. I'm not sure whats different about it but the ONLY way I could install it was the dmg method. Also, installing on a client mac using the folder method seems to take longer than the dmg method, if there is a significant number of files in the app.
0 Likes
pitcherj Absent Member.
Absent Member.

Re: best way to deploy a DMG package eg firefox

I've done some fiddling around with OS X bundles in ZCM 11.2.1.

First off, the agent on OS X is a little... rough around the edges.

Although it isn't pretty, it seems to get the job done for the most part.

As a test, I created a bundle for Firefox.

What I did was use an "Install File(s)" action to copy down the "Firefox.dmg" disk image from the content repository to the workstation in a hidden location (e.g. /.staged/vendor/product/version/).

Once this was done, I used a second "Run Script" action to silently mount the DMG, copy the *.app file to /Applications, unmount the DMG, and delete the DMG from the user's hard drive.

Then, in the "Launch" tab, I pointed to the inner "firefox" executable inside of Firefox.app/Contents/MacOS.

I had to throw a sleep in after the file copy, or else ZENworks tried to move on to the launch actions of the script before Finder.app had a chance to finish copying the files (Yes, I did in fact specify "When action is complete" on my run script action.).

The "silently" part of mounting is important - you have to pass the "hdid" utility the "-nobrowse" command so that it's hidden from Finder.app, or else you'll end up with a popup in the user's face with the contents of the DMG - not something you want if you're automating things in the background.

Just thought I'd share my experience.

pitcherj
0 Likes
pitcherj Absent Member.
Absent Member.

Re: best way to deploy a DMG package eg firefox

pitcherj;2223097 wrote:
I've done some fiddling around with OS X bundles in ZCM 11.2.1.

First off, the agent on OS X is a little... rough around the edges.

Although it isn't pretty, it seems to get the job done for the most part.

As a test, I created a bundle for Firefox.

What I did was use an "Install File(s)" action to copy down the "Firefox.dmg" disk image from the content repository to the workstation in a hidden location (e.g. /.staged/vendor/product/version/).

Once this was done, I used a second "Run Script" action to silently mount the DMG, copy the *.app file to /Applications, unmount the DMG, and delete the DMG from the user's hard drive.

Then, in the "Launch" tab, I pointed to the inner "firefox" executable inside of Firefox.app/Contents/MacOS.

I had to throw a sleep in after the file copy, or else ZENworks tried to move on to the launch actions of the script before Finder.app had a chance to finish copying the files (Yes, I did in fact specify "When action is complete" on my run script action.).

The "silently" part of mounting is important - you have to pass the "hdid" utility the "-nobrowse" command so that it's hidden from Finder.app, or else you'll end up with a popup in the user's face with the contents of the DMG - not something you want if you're automating things in the background.

Just thought I'd share my experience.

pitcherj


Adding to this some...

Some vendors do not provide a silent installation method for their applications, or do not provide methods within their installers (even *.pkg installers) to pass in parameters like serial numbers, license servers, etc.

A good example are Autodesk products such as AutoCAD 2013, SketchBook Designer 2013, Maya 2013, and Mudbox 2013.

All of these products have a UI during the installation phase where you need to provide a serial number, product code, license type, and license server address.

If you run the installer silently with a shell script and try to configure the license after the fact, the product will not function properly.

You have to capture the installation (ala snappshot), then re-package it and deploy it that way.

Currently ZENworks provides no way to do this on OS X.

pitcherj
0 Likes
casutton
New Member.

Re: best way to deploy a DMG package eg firefox

You can still install Maya silently. Once you run the install manually once, you can grab the contents of the /Library/Application\ Support/Autodesk directory and deploy that after you run the silent MPKG install. Inside the Maya 2013.app folder is the .MPKG install that you can run silently.

This works great for a network license install. I think the key configuration file for network licenses is the /Library/Application\ Support/Autodesk/Adlm/PIT/MayConfig.pit file. So you may not even have to copy all the files over. Just the .PIT file.

This is pretty much how I did it for my ARD deployments. In zenworks you just run the installer command on the MPKG file and then tell the bundle to copy the AutoDesk folder with all the configurations from your manually installed workstations to the Application Support directory and you should be good to go.

I have found a ton of applications that work very similarly to this when it comes to licensing. I just keep an eye out for changes in the /Library/Application\ Support directory. Most of the time if I just copy what is created there during the install the licensing works perfectly without any manual changes.

You can easily create a new MPKG file that runs the existing Maya MPKG and then adds the Application Support stuff to it as well. ZENWorks doesn't really "package" things. It depends on native OS packaging like MSI for Windows, RPM for Linux (wish it did Debian packages too), PKG/MPKG for Mac or any command line installs that can be run as well.

I'm going to be repackaging a ton of Mac apps for ZENWorks in the next few months. I'll make sure to post my results and any tips and tricks I learn along the way.
0 Likes
pitcherj Absent Member.
Absent Member.

Re: best way to deploy a DMG package eg firefox

Chad,

Thanks for the info - my complaint was more against Autodesk and other vendors that don't provide the same silent install capabilities for OS X installers that they typically do for Windows installers. (e.g. configuration file passed to the installer, installer parameters, etc.)

I've done a large number of software deployments for our OS X workstations using a competing product, and for the most part you are correct - application configuration files are stored either in the system-wide /Library/Application\ Support/ folder, or in the system-wide /Library/Preferences/ folder, although I have come across an app here and there that stores them in the user-specific ~/Library/ respective areas as well.

I'm well aware of the difference between an application deployment solution and an application packaging solution - what I would certainly miss with ZENworks for OS X is any sort of self-heal capability - the competing product I use allows you to capture a snapshot of an application installation on OS X (Similar to SnAPPshot from ZfD7), then create a software deployment from that snapshot, customize things here and there, and deploy it - but when doing it that way, I can self-heal the app automatically if a user inadvertently deleted the software package on a lab workstation, etc.

All the best,

pitcherj
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.