Make .mpkg so it can be installed by script on Mac OSX - macos

I want to make a .mpkg that can be installed by a script on OSX. When starting the .mpkg always the GUI-dialog shows up. I tried to disable the GUI, but there seems to be no effective way to do so.
Does anyone got an hint for me how to do so?
Any answers are helpfull.

There is no way to modify the .mpkg or .pkg created by PackageMaker in such a way, so that they run without a user dialog. But you can run all .pkg/.mpkg in silentmode: http://blog.elitecoderz.net/run-installer-pkg-or-mpkg-without-user-dialog-silentmode-from-console-on-os-x/2010/07/ explains how to do so.

Related

Using Mac Terminal To Run .EXE

One of my friends sent me a link on how to use terminal to get OSU! to run on mac. It worked perfectly, but now I am wondering if it is only for certain things, or if I can use terminal commands to make a .exe program run?
Anyone know if this is possible, and if so how would I go about doing it?
Thanks.
Macs aren’t compatible with Windows apps.
But you can try an app called wine.
Wine tries to provide an environment to run Windows exes.
Download the binary packages at here
Get the stable installer.
Make sure that you’ve got xquartz installed using homebrew: brew install xquartz.
The easiest and free way to run .exe files is to run it on "PlayOnMac". It might show some bugs(never faced a major bug). but it solves the problem. You can easily copy paste files on it like if you want to crack the software.

Installing .pkg: determining if the app being updated is presently running?

I'm using the brilliant Mac OS X "Packages" to generate an install a .pkg, and wondered how one constructs a shell script to make sure the application file being updated over isn't presently running (which would seem like a Very Bad Idea).
Normally this would be handled by using a pre-install script, or installer plug-in. It's unclear what you plan on doing though if the application is running.

How to create installer for mac software

I've created software using Filemaker and I have to create an installer.
I already done it for Windows but I have to create one for Mac too. The installer will be able to install the software, install a font and ask the serial number.
Can someone help me?
I think Apple used to (still does?) offer a program with Xcode that was called PackageMaker, but I don't think they still do. It might be available from a previous version of Xcode. I found surprisingly little information about it online.
However, the command line tools that it was based on, pkgbuild, productbuild, and pkgutil , seem to be installed on my laptop running Yosemite with an Xcode utilities installation.
I would check out the accepted answer to a similar question here on Stack Overflow. It looks quite detailed, but I think it's going to be very advanced work to get a successful package created.
The above is what you probably want if you want your installer to use Apple's own Installer app. If all you want is to create an installer that gets the job done, I would probably use FileMaker itself.
Create a FileMaker file that stores your solution within a container field, lock it down with security and scripting, use Export Field Contents to get the solution file and your fonts to the right places, perhaps with some supporting AppleScript that makes use of the command line. Use FileMaker Advanced to package this up as a runtime solution and all the user has to do is double-click the runtime app and you can guide them from there. Once the installation is complete you could even open the installed solution for them and prompt them at that point to enter a serial number.

Web update application with Firemonkey on MacOS

I'm making a Firemonkey application for both Windows and MacOS, and now I'm working on making it able to check online for updates and download the update. I have got it to work on Windows, by renaming the running .exe file, download the new one and then run the downloaded .exe, works as it should.
Now my problem is MacOS, I don't have much experience with MacOS, so I don't really have any idea how I should do this :/
And even less idea as I store somedata files inside the 'program.app' folder.
So I'd really appreciate some help or ideas on how I should try to solve this problem?
Apps on OSX are really just a package of files. If you go into finder on OSX and right click on an app you will see show package contents. Open that up and you will see the constituent files that make up the "app". From there you have to decide what you need to replace.

Uninstaller for package on Mac OS X

As a service to my users I would like to provide an uninstall script to completely remove all traces of my application on Mac OS X. The application is installed using a package rather than just being dragged into the Applications folder because it is a daemon-type app that also requires to run a script at installation to be launched.
My thinking is to include a file called uninstall.sh and place it into /Library/Application Support/com.<mycompany>.<myapplication>/ and refer to this from the application documentation. The purpose is basically to stop the daemon if running, unload and delete the corresponding plist as well as remove any application files. Does this sound reasonable or are there better methods to accomplish this?
Also I am wondering if it is good practice to also remove traces of the package using pkgutil --forget - if I don't do this, the next time the package is installed it shows up as being upgraded instead of installed. Any recommendations or pointers to best-practice information?
Is there no standard way of doing this on OS X?
There is no standard way of doing this on OS X. Yes, shocking, I know. Apple consistently warns everyone away from package installers (among other things by providing insufficient documentation for them). They then exclusively use package installers for their own standalone apps.... go figure.
Yes, you should include pkgutil --forget.
If your customers are comfortable with this kind of script, then your approach sounds fine. If they want a "double-click-on-it" then you should probably put the uninstaller in /Applications, but avoid that if you can.
If you have a GUI, Status Item, or Preference Panel, then it's nice to put a "Uninstall" button or menu item there rather than requiring them to go mess around with Terminal.
BTW, if you go looking for the Software Delivery Guide, it's been moved for a year or so now, while they "update" it.
the inability to remove packages has bugged me for years, so i've written a tool to uninstall packages:
http://www.corecode.at/uninstallpkg/index.html
its a bit better than the shell scripts to do it floating around because it makes sure never to remove any files that are used by any other installed packages
The way I solved this was to use Automator, create an application document and then add dialog and script actions. Finally save your Automator application document and you end up with a simple GUI application to run the uninstall.
Often the uninstall action requires administrator privileges - I solved this in Automator by running a shell script action that generates another shell script that can then by run in an applescript action as follows:
on run {input, parameters}
do shell script "/tmp/uninstaller.sh" with administrator privileges
return input
end run
I have a similar application and came across the same issue. The approach I took was one that I have seen other applications use. Rather than simply distributing the .pkg installer, wrap it up in a .dmg file. The uninstall script can be included with the .pkg in the .dmg.
The uninstall script is then renamed to "uninstall.tool". The .tool extension allows users to run the script by double clicking, rather than having to run it from the command line.
Slightly unconventional, but aren't these all. I have Homebrew and cask installed. I was able to uninstall a .pkg with the following:
brew cask uninstall --force <pkg_name>
ex. brew cask uninstall --force dockertools

Resources