Every now and then I will see a user in the macadmin slack ask about packaging and deploying SPSS for macOS. For some reason, it is just one of those applications that everyone (including myself) always seem to struggle with. That being said, here is how I do it.
Using Composer, I drop all of the files needed into
You will also need to edit your
installer.propertiesfile to include the following:
I then create a
postinstall script that will handle the install and clean up of SPSS
#!/bin/sh ## postinstall pathToScript=$0 pathToPackage=$1 targetLocation=$2 targetVolume=$3 #Install java 10.0.2 echo "Installing JDK 10.0.2.pkg" sudo installer -pkg /Users/Shared/SPSS25/JDK\ 10.0.2.pkg -target / #Silent Install using information in the installer.properties file echo "Installing SPSS 25" sudo /Users/Shared/SPSS25/SPSS_Statistics_Installer.bin -f /Users/Shared/SPSS25/installer.properties echo "Installing SPSS 25 Update" sudo /Users/Shared/SPSS25/SPSS_Statistics_Installer_Mac_Patch.bin -f /Users/Shared/SPSS25/installer.properties #Firewall Rules echo "Adding firewall rules" sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /Applications/IBM/SPSS/Statistics/25/SPSSStatistics.app sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/IBM/SPSS/Statistics/25/SPSSStatistics.app sudo /usr/libexec/ApplicationFirewall/socketfilterfw -—add /Applications/IBM/SPSS/Statistics/25/SPSSStatistics.app/Contents/MacOS/spssLauncher #Cleanup echo "Removing /Users/Shared/SPSS25" sudo rm -r /Users/Shared/SPSS25 #Activate SPSS25 echo "Activating SPSS25" cd /Applications/IBM/SPSS/Statistics/25/SPSSStatistics.app/Contents/bin/ ./licenseactivator PASTE_YOUR_LICENSE_CODE_HERE exit 0 ## Success exit 1 ## Failure
As you can see in the script and composer screenshot above, I also include the update for SPSS.
Once you have all of this in composer, you can build a
.pkg and have yourself a stand alone SPSS installer.