Skip to content

Commit

Permalink
Revert "fsck, fixed the bug that prevented non-admin users from insta…
Browse files Browse the repository at this point in the history
…lling ClickToFlash to their OWN FRIGGIN' HOME DIRECTORY because we have to support 10.4 and because non-admin users can't write to the Receipts directory; fix involves creating TWO packages, one requiring admin privs, one not, and then creating a friggin' METAPKG which chooses which one to use based on whether the user is an admin and whether a receipt already exists, so that a password is required only when ABSOLUTELY needed; the updated script also replaces the bom and pax.gz files in one of the installers with a symbolic links to the respective files of the other installer, so we aren't having users unnecessarily download stuff; FRIGGIN' APPLE FIX YOUR INSTALLER TECHNOLOGY ALREADY, JESUS H. M. CHRIST"

This reverts commit 96f78ed.
  • Loading branch information
rentzsch committed Aug 28, 2009
1 parent aad05ed commit cf4c29f
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 217 deletions.
40 changes: 0 additions & 40 deletions Installer/Info-admin.plist

This file was deleted.

File renamed without changes.
51 changes: 5 additions & 46 deletions Installer/build_installer_pkg.command
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fi

MY_INSTALLER_ROOT="$BUILT_PRODUCTS_DIR/ClickToFlash.dst"
BUILT_PLUGIN="$BUILT_PRODUCTS_DIR/ClickToFlash.webplugin"
BUILT_PKG="$BUILT_PRODUCTS_DIR/ClickToFlash.pkg" # Sparkle currently can't handle -$VERSION in .pkg names.
VERSIONED_NAME="ClickToFlash-$PRODUCT_VERSION"
BUILT_ZIP="$BUILT_PRODUCTS_DIR/$VERSIONED_NAME.zip"

Expand All @@ -40,59 +41,17 @@ cp -R "$BUILT_PLUGIN" "$MY_INSTALLER_ROOT"

"$SYSTEM_DEVELOPER_UTILITIES_DIR/PackageMaker.app/Contents/MacOS/PackageMaker" \
--root "$BUILT_PRODUCTS_DIR/ClickToFlash.dst" \
--info Info-nonadmin.plist \
--info Info.plist \
--resources resources \
--scripts scripts \
--target 10.4 \
--version "$PRODUCT_VERSION" \
--verbose \
--out "$BUILT_PRODUCTS_DIR/ClickToFlash-nonadmin.pkg"

"$SYSTEM_DEVELOPER_UTILITIES_DIR/PackageMaker.app/Contents/MacOS/PackageMaker" \
--root "$BUILT_PRODUCTS_DIR/ClickToFlash.dst" \
--info Info-admin.plist \
--scripts scripts \
--target 10.4 \
--version "$PRODUCT_VERSION" \
--verbose \
--out "$BUILT_PRODUCTS_DIR/ClickToFlash-admin.pkg"



# go into one of the packages and strip out the contents and symbolic link them to the other
# package so that we keep the file size down, since the only difference is requiring admin auth

cd "$BUILT_PRODUCTS_DIR/ClickToFlash-admin.pkg/Contents"
rm Archive.bom
rm Archive.pax.gz
ln -s ../../ClickToFlash-nonadmin.pkg/Contents/Archive.bom ./
ln -s ../../ClickToFlash-nonadmin.pkg/Contents/Archive.pax.gz ./
cd $SCRIPT_WD



# make the friggin' distribution ourselves since friggin' PackageMaker friggin' doesn't friggin' support this
mkdir "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg"
mkdir "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents"
mkdir "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Packages/"
mkdir "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Resources/"
cp -R distribution-mpkg/resources/en.lproj "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Resources/en.lproj"
cp -R distribution-mpkg/resources/admin_privs_needed.command "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Resources/admin_privs_needed.command"
cp -R distribution-mpkg/resources/no_admin_privs_needed.command "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Resources/no_admin_privs_needed.command"
cp distribution-mpkg/distribution.dist "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/distribution.dist"

cp -R "$BUILT_PRODUCTS_DIR/ClickToFlash-nonadmin.pkg" "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Packages/ClickToFlash-nonadmin.pkg"
cp -R "$BUILT_PRODUCTS_DIR/ClickToFlash-admin.pkg" "$BUILT_PRODUCTS_DIR/ClickToFlash.mpkg/Contents/Packages/ClickToFlash-admin.pkg"


# clean up the non-mpkg pkgs

rm -rf "$BUILT_PRODUCTS_DIR/ClickToFlash-admin.pkg"
rm -rf "$BUILT_PRODUCTS_DIR/ClickToFlash-nonadmin.pkg"

--out "$BUILT_PKG"

# Stuff it into a .zip.
cd "$BUILT_PRODUCTS_DIR"
zip -r "$VERSIONED_NAME.zip" "ClickToFlash.mpkg"
zip -r "$VERSIONED_NAME.zip" "ClickToFlash.pkg"
cd $SCRIPT_WD

rm -rf "$MY_INSTALLER_ROOT"
84 changes: 0 additions & 84 deletions Installer/distribution-mpkg/distribution.dist

This file was deleted.

23 changes: 0 additions & 23 deletions Installer/distribution-mpkg/resources/admin_privs_needed.command

This file was deleted.

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion Installer/scripts/postflight
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
rm -rf "$HOME/Library/Internet Plug-Ins/ClickToFlash.plugin"
rm -rf "$HOME/Library/Internet Plug-Ins/ClickToFlash.webplugin"
mv /tmp/ClickToFlash.webplugin "$HOME/Library/Internet Plug-Ins/"
chown -R $USER "$HOME/Library/Internet Plug-Ins/ClickToFlash.webplugin"
pkgutil --forget com.github.rentzsch.clicktoflash.pkg

exit 0

0 comments on commit cf4c29f

Please sign in to comment.