Mac installer: To avoid invalidating our code signing: use a metapackage instead of modifying the property list file to trigger a system restart when needed.

This commit is contained in:
Charlie Fenton 2013-06-11 05:40:44 -07:00
parent 10576cbcbc
commit d709e6ff20
2 changed files with 6 additions and 5 deletions

View File

@ -107,7 +107,7 @@ int main(int argc, char *argv[])
strlcat(MetaPkgPath, "+VirtualBox.mpkg", sizeof(MetaPkgPath));
strlcpy(MetaPkgRestartPath, pkgPath, sizeof(MetaPkgRestartPath));
strlcat(MetaPkgRestartPath, "+VirtualBox .mpkg", sizeof(MetaPkgRestartPath));
strlcat(MetaPkgRestartPath, " + VirtualBox.mpkg", sizeof(MetaPkgRestartPath));
strlcpy(pkgRestartPath, pkgPath, sizeof(MetaPkgPath));
strlcat(pkgRestartPath, ".mpkg", sizeof(pkgPath));

View File

@ -304,11 +304,12 @@ ENDOFFILE
cp -fpR mac_installer/${VirtualBoxPackageName} ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC\ Installer.app/Contents/Resources/
# Now create the "BOINC+VirtualBox .mpkg" metapackage (used if installer.app
# Now create the "BOINC + VirtualBox.mpkg" metapackage (used if installer.app
# determines that we need user to restart OS X after installation)
cp -fpR "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox .mpkg"
# Change "NoRestart" to "RequiredRestart" in BOINC+VirtualBox .mpkg
sed -i "" s/"NoRestart"/"RequiredRestart"/g "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox .mpkg/Contents/Info.plist"
# Note the name of this version has spaces around the "+"
cp -fpR "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC+VirtualBox.mpkg" "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC + VirtualBox.mpkg"
# Change "NoRestart" to "RequiredRestart" in BOINC + VirtualBox.mpkg
sed -i "" s/"NoRestart"/"RequiredRestart"/g "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources/BOINC + VirtualBox.mpkg/Contents/Info.plist"
fi
# Build the stand-alone client distribution