diff --git a/checkin_notes b/checkin_notes index ceb8d27527..58e281bc60 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8335,7 +8335,8 @@ Charlie 5 Sep 2007 - Mac SCR: Do screen blanking in screensaver since CC no longer does it. - Fix a compiler warning. - Mac Installer: Remove old BOINC Manager and screensaver bundles before - installing new ones to guarantee a clean install. + installing new ones to guarantee a clean install. Updates for Grid + Republic. clientscr/ mac_saver_module.cpp @@ -8346,3 +8347,4 @@ Charlie 5 Sep 2007 release_GridRepublic.sh make_GridRepublic.sh preinstall + uninstall.cpp diff --git a/mac_installer/make_GridRepublic.sh b/mac_installer/make_GridRepublic.sh index 75f1136a09..4322850534 100644 --- a/mac_installer/make_GridRepublic.sh +++ b/mac_installer/make_GridRepublic.sh @@ -99,14 +99,15 @@ cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf" sed -i "" s/""/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf" # Create the installer's preinstall and preupgrade scripts from the standard preinstall script -cp -fp "${SOURCE_PKG_PATH}/Resources/preinstall" "${IR_PATH}/" +# Older versions of BOINC installer did not use preinstall and preupgrade scripts, so check first +if [ -f "${SOURCE_PKG_PATH}/Resources/preinstall" ]; then + cp -fp "${SOURCE_PKG_PATH}/Resources/preinstall" "${IR_PATH}/" -##### We've decided not to customize BOINC Data directory name for branding -#### sed -i "" s/BOINC/temp/g "${IR_PATH}/preinstall" -#### sed -i "" s/"${BRAND_NAME}"/BOINC/g "${IR_PATH}/preinstall" -#### sed -i "" s/temp/"${BRAND_NAME}"/g "${IR_PATH}/preinstall" + sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${IR_PATH}/preinstall" + sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${IR_PATH}/preinstall" -cp -fp "${IR_PATH}/preinstall" "${IR_PATH}/preupgrade" + cp -fp "${IR_PATH}/preinstall" "${IR_PATH}/preupgrade" +fi cp -fp "${SOURCE_PKG_PATH}/Resources/postinstall" "${IR_PATH}/" cp -fp "${SOURCE_PKG_PATH}/Resources/postupgrade" "${IR_PATH}/" @@ -150,7 +151,8 @@ mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINC sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist" sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings" -# Replace screensaver's boinc.tiff file +# Replace screensaver's boinc.tiff or boinc.jpg file +rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg" cp -fp "${SAVER_SYSPREF_ICON}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff" # Copy and rename the Uninstall application's bundle and rename its executable inside the bundle @@ -165,6 +167,8 @@ sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PAT # Replace the Uninstall application's MacUninstaller.icns file sudo cp -fp "${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}" sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns" +# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog +sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc" sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app" sudo chmod -R 555 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app" diff --git a/mac_installer/release_GridRepublic.sh b/mac_installer/release_GridRepublic.sh index 0ee6c0fdd7..a9ae182139 100644 --- a/mac_installer/release_GridRepublic.sh +++ b/mac_installer/release_GridRepublic.sh @@ -91,6 +91,9 @@ sed -i "" s/""/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf" # Create the installer's preinstall and preupgrade scripts from the standard preinstall script cp -fp mac_installer/preinstall "${IR_PATH}/" +sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${IR_PATH}/preinstall" +sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${IR_PATH}/preinstall" + ##### We've decided not to customize BOINC Data directory name for branding #### sed -i "" s/BOINC/temp/g "${IR_PATH}/preinstall" #### sed -i "" s/"${BRAND_NAME}"/BOINC/g "${IR_PATH}/preinstall" @@ -168,7 +171,8 @@ mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINC sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist" sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings" -# Replace screensaver's boinc.tiff file +# Replace screensaver's boinc.tiff or boinc.jpg file +rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg" cp -fp "${SAVER_SYSPREF_ICON_PATH}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff" ## Fix up ownership and permissions @@ -210,6 +214,8 @@ sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PAT # Replace the Uninstall application's MacUninstaller.icns file sudo cp -fp "clientgui/res/${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}" sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns" +# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog +sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc" sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app" sudo chmod -R 555 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app" diff --git a/mac_installer/uninstall.cpp b/mac_installer/uninstall.cpp index 4842cc897c..0fae29e6a2 100644 --- a/mac_installer/uninstall.cpp +++ b/mac_installer/uninstall.cpp @@ -96,9 +96,14 @@ int main(int argc, char *argv[]) p = strchr(appName, ' '); p += 1; // Point to brand name following "Uninstall " - cancelled = (Alert(128, NULL) == cancel); -// cancelled = ! ShowMessage(true, "Are you sure you want to completely remove %s and all its data from your computer?\n\n" -// "Any unreported results will be lost.", p); + if (GetResource('ALRT', 128)) { + // BOINC uses custom dialog with custom PICT + cancelled = (Alert(128, NULL) == cancel); + } else { + // Grid Republic uses generic dialog with Uninstall application's icon + cancelled = ! ShowMessage(true, "Are you sure you want to completely remove %s and all its data from your computer?\n\n" + "Any unreported results will be lost.", p); + } if (! cancelled) err = DoPrivilegedExec(p, pathToSelf, "--privileged", NULL, NULL, NULL, NULL);