Trying to make a one Drive PKG

43 views
Skip to first unread message

Jason Content

unread,
Feb 17, 2016, 4:05:09 PM2/17/16
to The Luggage
Hi Guys, 

Im trying to make a one drive package that runs an apple script after. I want the One Drive PKG file packaged with the apple script to run after. I have to give this package to a team to deploy, but I cant work out how to add the pkg file into the the make file. 

I cant seem to figure out the right arguments for the make file. 

Do you have any examples or ideas? That I could follow please and learn from. 

Thanks in advance :) 

Mike Solin

unread,
Feb 18, 2016, 2:29:57 AM2/18/16
to the-l...@googlegroups.com
A few questions:

- Is OneDrive already a pkg?
- Can you use another language other than AppleScript to accomplish the same thing?  Perhaps Bash or Python?  What are you looking to do with the postinstall script?
- Do you have a deployment system like Munki or Casper?  Munki has the ability to add additional postinstall scripts after successfully deploying a pkg.

I’d probably provide Microsoft’s OneDrive pkg, along with a custom payload-free pkg created with The Luggage, and ask users to run both in sequence (be sure to sign your pkg with an Apple Developer certificate, so your users don’t see Gatekeeper prompts).  That way, when Microsoft updates OneDrive, you don’t have to rebuild anything - just swap out Microsoft’s pkg.

Long-term, you should consider a system like Munki that allows you to deploy pkgs from a central server.
--
You received this message because you are subscribed to the Google Groups "The Luggage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to the-luggage...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Content

unread,
Feb 18, 2016, 3:11:24 AM2/18/16
to The Luggage
Hi Mike thanks for your input,

One Drive is already a package. 
It has to be Apple Script as it makes changes to the GUI interface that I cant accomplish in bash and I dont know python, (its on my list to learn). 
We dont have Munki here but I am well transversed in it and have built munki servers and contributed to the Munki group. 
Now this package is going to go to a projects department that no nothing about macs, so I need to give them something they can just click on and run. Which brought me to Luggage. 

Any Ideas, right now im thinking of just installing One Drive and copying it all to a package with a make file and then loading the Apple Script after. But Im just not sure on the commands to do all that. 

Im reading various blogs and things to get my head round GNU's Make command. 

Geordie Korper

unread,
Feb 18, 2016, 4:54:38 AM2/18/16
to the-l...@googlegroups.com
Luggage seems like the wrong tool to use since this sounds like a one off. Using one of gui package manipulation tools I'd just modify the postinstall script in the existing package to open the AppleScript. You can add the AppleScript  at the same level in the package. The $0 variable set for the postinstall script by the installer is the path to the script so just add something like "open $0/myapplescript". After the mods you will have to then resign the package of course. I haven't done such hackery in years but I see no reason why that would not work.

Or use a payload free package that uses your AppleScript for the postinstall and put it and the onedrive package into a new metapackage.

Geordie
--

Jason Content

unread,
Feb 18, 2016, 10:58:41 AM2/18/16
to The Luggage
Hey I looked at what your talking about but I cant figure out how to get the script path into this post flight script: 

#!/bin/sh
## postflight
##
## Not supported for flat packages.

pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3

$0=

defaults write com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True
defaults write com.microsoft.OneDrive-mac EnableAddAccounts -bool True



exit 0 ## Success
exit 1 ## Failure


Where would I stick this and how would I make it run? 
Reply all
Reply to author
Forward
0 new messages