installer plugins for non gui silent installation
Hi, This question relates to the installer plugins that can be added to installer pkg file using this Packages. I wonder is Packages has any exposed configuration that enable the user to make the plugins run on non-gui mode.
In details, I'd like to have an installer that can run either from command line
installer -pkg ~/myInstaller.pkg -target /
Or in gui mode using
open ~/myInstaller.pkg
Sadly, each new installer pane plugin main class derives from InstallerPane by default, so I guess they designed not to run on non-gui mode...
#import <InstallerPlugins/InstallerPlugins.h>
@interface MyInstallerPane : InstallerPane
But perhaps there's a way to write non-GUI based installer plugins that can also run in command-line mode by inheriting from different class ?
And if this is not possible, so perhaps there's a way to get any indication on the current installation mode (gui/no gui) from the post/preinstall scripts, in order to avoid running the same logic twice ?
you should be able to test for the presence of COMMAND_LINE_INSTALL in the ENV to know if you're being run via installer
you should be able to test for the presence of
COMMAND_LINE_INSTALLin the ENV to know if you're being run viainstaller
Thank you for suggestion. I'll try it in near future.
Installer Plugins are not loaded when the installation process is run in headless mode (command line, deployment solutions).
As mentioned, you can check the COMMAND_LINE_INSTALL env and act accordingly.
I would not recommend popping up windows during a headless install.