Add custom step to installation using pkgbuild - xcode

I see that pkgbuild can be used to create installation files for MAC. All the examples that I see have the standard steps as shown below.
I wonder if we can add custom steps to this and execute a script during that step. Say in between "Installation" and "Summary", could I add a step called "Install Plugins" and if the user selects continue, I can run a script to download the plugins. ?

It is possible with Installer Plug-ins, but I highly discourage it: It seems Apple removed all documentation about it from the developer page. Not a good sign for its future. Which makes sense with the focus in recent years of locking down the system, because a Installer Plug-ins has like full system access.
The only details I find these days are in the framework header files, like InstallerPlugins/InstallerPane.h:
If you use Plug-ins, Install will present the user an alert with "This package will run a program to determine if the software can be installed." See here.

Related

How to add a step to electron builder installer in MacOS

I am trying to create a pkg file of my electron application using electron-installer-dmg and electron-packager.
Digging into the documentation of these two (and few other tools), I couldn't find a configuration or solution to add a step in the install process.
To be more clear, when I click on the pkg file, I would like to have a user agreement step.
For dmg, you can simply drop a license file in the build folder. Look here for more details.
For pkg, unfortunately, it is not developed yet. Here is the related issue.

how to get the name of the feature being installed using wix managed bootstrapper ui

I am using WiX to install a executable and I have used ManagedBootstrapperApplicationHost for CustomUI.
Is it possible to get the name of the feature being installed at the time of installation ?
If possible then how can we get the name of the feature ?
Any help would be appreciated.
Thanks.
Features aren't installed one after another. For example if 3 features are being installed, each with 10 files then the InstallFiles action will install all 30 files at the same time. Same thing with registry entries. So you can't display a UI that says "Installing Feature1" and then later on "Installing Feature2" because that doesn't happen. All you can know is that some list of features are being installed.
Your comment asks about finding out whether a feature installed successfully or not. This issue never comes up - there are never some features that install and others that fail. An MSI install is a transaction and it either all works or fails and rolls back and deletes changes it made so that the system is restored to its previous state.
It's not clear why the list of features is so important to display. If you use the MSI's internal UI there is a feature selection dialog where the user selects which features are to be installed; if you use the Burn UI the same thing is available, so the user can see what features have been chosen.
Inside the MSI the list of features being installed (after they've been selected) is in the ADDLOCAL property, but that's the internal name. It could be used to display a list of the features that were installed at the end, but again by definition what was chosen is installed otherwise the install would have rolled back entirely. I don't believe I've ever seen an install where the list of MSI features installed is displayed at the end - it's redundant info. It would be useful to know the scenario you have, or what problem you're trying to solve, and if you believe that you need to display a list because some might install and others might fail then there is no point, as I have said.

How to execute innosetup installer from third party silently and without it attempting to install dependencies?

I have an installer from a third party. Through trial and error I discovered it was an innosetup installer. When I call it with the /silent flag it installs just fine, until it executes installers for 3 dependencies (direct X is one, for example) which then require user input to cancel. I want to be able to run the installer and have it either install the dependencies silently or not at all. When going through the installer GUI normally it does give me 3 checkboxes at the end on the last page of the wizard (before I would hit the Finish button) that allows me to choose whether or not to install the dependencies. Is there a way of doing this that I don't know about? From my research it seems impossible without knowing the types and components available (and executing the installer with the /help or /? options had no effect) and I will probably need to get a new installer from the third party. The only other option I can think of would be to have some sort of timeout that after a certain period of time of inactivity from the installer I kill the install process (since the files I was interested in had already been installed at that point I think).
Checkboxes on the finish page sound like postinstall [Run] entries. There is no way to influence the selection of these from the command line, except that the original setup author can choose to have a different set of options selected for interactive install vs. silent install. (Or they might have extended the /LOADINF option to work with these, although this is unlikely.)
Given that this is a third-party installer, your best bet is to contact the original vendor and see if you can get them to change the default silent selection, or to add an additional command-line parameter to change the defaults.
Failing that, you could consider using a program such as AutoIt to auto-click the wizard GUI when run non-silently.
(If the things that it's trying to install really are dependencies, though, then you probably should let it install them. And it should be installing those silently too anyway.)
Killing the install process after a specified time seems like an excellent recipe for disaster.
Those are probably [Tasks] within InnoSetup's install, which you may be able to deselect by passing /tasks="" in the command line (along with the /silent). Here is a list of command line options: http://www.jrsoftware.org/ishelp/topic_setupcmdline.htm . Adding /suppressmsgboxes may help also.
It seems it is impossible to do what I wish without knowing more about the structure of their setup. I was however successful in solving my original problem by killing the third party installer after waiting a specified amount of time (which I got from reading this question).

How can I use XCode 4 to build an application that uses py2app?

Recently I finally figured out how to package a Python app (Mnemosyne) using py2app. This is cross-platform software and py2app pulls in a lot of dependencies-- PyQt, cherrypy, etc.-- so re-writing is not an option.
However, if possible, I would like to submit this application to the App Store or at least sign the code so that when Mountain Lion is released next month users will be able to install it without a warning. However, when I launch Xcode (I've never used it before), I am prompted to choose a template and I have no idea what to choose.
I can easily build the application like this:
sudo python setup.py py2app
Could someone give me a rough idea of the things I have to do in order to be able to build this instead in Xcode?
You don't need to use Xcode to sign the .app. You can also use the standalone command called codesign (that's code-sign, not co-design). Once you've created your .app, you can sign it using a command such as
codesign -s "Your Developer ID Profile Name Here" "Your Program.app"
You'll need to read the man pages to figure out what options you need exactly, but hopefully this at least points you in the right direction. Also, you obviously need to have your Developer ID certs etc in your keychain for this to work.
I have not used py2app, but I can give you a rough idea of what you have to do to build your app in Xcode. Start by creating an external build system project. An external build system project allows you to use Python's tools to build the project.
After creating the project, you may need to configure the build tool to build the project properly. Select the project file from the project navigator on the left side of the project window. This opens the project editor. Select your target on the left side of the project editor. Click the Info button at the top of the editor to configure the build tool.

Run another installer in an Inno Setup installation

My company is developing an application that has a dependency on another of our applications. That second application already has an Inno Setup installer.
So I think I'd like to bundle the second application's installer within the Inno Setup installer for the first application. But I'm not sure how to go about that properly. Does anyone know the "right way" to do this?
I found this: Inno Setup Knowledge Base—HOWTO: Install .MSI files. I assume the technique could be used for a nested Inno Setup installer. But I have a couple of questions about the fine details:
How could I make it so if the first application is uninstalled, the second is also uninstalled?
Is that a sensible thing to do (automatically uninstall the second application), or should I leave it to the user to do that manually?
If the user tries to uninstall the second application while the first is uninstalled, should I somehow detect that and give a warning? How could I do that?
For the level of uninstaller functionality you are talking about, I suggest you get familiar with pascal scripting in Inno Setup (if you are not already). It offers incredible customisation, but has the caveat of making your projects a lot more complex.
To answer your third question first:
Yes, you should do this. In order to do it properly, you need to add this functionality to the uninstaller of the second application (i.e. the one your app is dependent on). See Uninstall event functions in the Inno Setup help. You need to check in that uninstaller if your app is installed (by checking if HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SecondAppName exists, for example) and in that case show an additional warning.
As for your second question:
If it is remotely possible that your customer wants to continue using the second app, even if he decides that he wants to uninstall the first one, you should offer him the choice. I would do this with a seperate wizard page in the uninstaller for your app, after your app is uninstalled.
And finally, your first question:
You need to determine the name (full path) of the other app's uninstaller exe. You can retrieve it from the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SecondAppName\UninstallString. For executing it from a script in the [CODE] section, see Exec in the Inno Setup help.

Resources