Mac installer: changes for compatibility with OS 10.11 El Capitan.

This commit is contained in:
Charlie Fenton 2015-07-01 04:21:08 -07:00
parent b78c842cf9
commit 4e361ab507
4 changed files with 15 additions and 20 deletions

View File

@ -1,6 +1,6 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
// Copyright (C) 2015 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
@ -68,6 +68,7 @@ CFStringRef valueNoRestart = CFSTR("NoRestart");
int main(int argc, char *argv[])
{
char pkgPath[MAXPATHLEN];
char postInstallAppPath[MAXPATHLEN];
char temp[MAXPATHLEN];
char brand[64], s[256];
char *p;
@ -91,6 +92,9 @@ int main(int argc, char *argv[])
strlcat(pkgPath, "/Contents/Resources/", sizeof(pkgPath));
strlcpy(postInstallAppPath, pkgPath, sizeof(postInstallAppPath));
strlcat(postInstallAppPath, "PostInstall.app", sizeof(postInstallAppPath));
// To allow for branding, assume name of installer package inside bundle corresponds to name of this application
p = strrchr(temp, '/'); // Point to name of this application (e.g., "BOINC Installer.app")
if (p == NULL)
@ -109,9 +113,13 @@ int main(int argc, char *argv[])
// Expand the installer package
system("rm -dfR /tmp/BOINC.pkg");
system("rm -dfR /tmp/expanded_BOINC.pkg");
system("rm -dfR /tmp/PostInstall.app");
system("rm -f /tmp/BOINC_preferred_languages");
system("rm -f /tmp/BOINC_restart_flag");
sprintf(temp, "cp -fpR \"%s\" /tmp/PostInstall.app", postInstallAppPath);
err = system(temp);
sprintf(temp, "pkgutil --expand \"%s\" /tmp/expanded_BOINC.pkg", pkgPath);
err = system(temp);

View File

@ -22,17 +22,5 @@
<key>RootRelativeBundlePath</key>
<string>Library/Screen Savers/BOINCSaver.saver</string>
</dict>
<dict>
<key>BundleHasStrictIdentifier</key>
<true/>
<key>BundleIsRelocatable</key>
<false/>
<key>BundleIsVersionChecked</key>
<false/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<key>RootRelativeBundlePath</key>
<string>tmp/PostInstall.app</string>
</dict>
</array>
</plist>

View File

@ -2,7 +2,7 @@
<!--
# This file is part of BOINC.
# http://boinc.berkeley.edu
# Copyright (C) 2013 University of California
# Copyright (C) 2015 University of California
#
# BOINC is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License
@ -22,7 +22,6 @@
<bundle-version>
<bundle CFBundleVersion="x.y.z" id="edu.berkeley.boinc" path="Applications/BOINCManager.app"/>
<bundle CFBundleVersion="x.y.z" id="edu.berkeley.boincsaver" path="Library/Screen Savers/BOINCSaver.saver"/>
<bundle CFBundleVersion="x.y.z" id="edu.berkeley.boinc.PostInstall" path="tmp/PostInstall.app"/>
</bundle-version>
</pkg-ref>
<options customize="never" require-scripts="false" rootVolumeOnly="true"/>

View File

@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
# Copyright (C) 2014 University of California
# Copyright (C) 2015 University of California
#
# BOINC is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License
@ -43,6 +43,7 @@
## updated 12/16/14 by Charlie Fenton to also code sign the installer package
## updated 12/17/14 by Charlie Fenton to fix typo in build of BOINC+VBox installer
## updated 4/7/15 by Charlie Fenton to comment on problem with BOINC+VBox installer
## updated 7/1/15 by Charlie Fenton for compatibility with OS 10.11
##
## NOTE: This script requires Mac OS 10.6 or later, and uses XCode developer
## tools. So you must have installed XCode Developer Tools on the Mac
@ -194,7 +195,6 @@ mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/switcher
mkdir -p ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/skins
mkdir -p ../BOINC_Installer/Pkg_Root/tmp
# We must create virtualbox directory so installer will set up its
# ownership and permissions correctly, because vboxwrapper won't
@ -224,8 +224,6 @@ cp -fpRL $BUILDPATH/BOINCManager.app ../BOINC_Installer/Pkg_Root/Applications/
cp -fpRL $BUILDPATH/BOINCSaver.saver ../BOINC_Installer/Pkg_Root/Library/Screen\ Savers/
cp -fpRL $BUILDPATH/PostInstall.app ../BOINC_Installer/Pkg_Root/tmp/
## Copy the localization files into the installer tree
## Old way copies CVS and *.po files which are not needed
## cp -fpRL locale/ ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/locale
@ -310,6 +308,8 @@ sudo chmod -R u+r-w,g+r-w,o+r-w ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1
# Copy the installer wrapper application "BOINC Installer.app"
cp -fpRL $BUILDPATH/BOINC\ Installer.app ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/
cp -fpR $BUILDPATH/PostInstall.app "../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_$arch/BOINC Installer.app/Contents/Resources"
# Prepare to build the BOINC+VirtualBox installer if VirtualBox.pkg exists
VirtualBoxPackageName="VirtualBox.pkg"
if [ -f "../VirtualBox Installer/${VirtualBoxPackageName}" ]; then