diff --git a/Installer/Info.plist b/Installer/Info.plist new file mode 100644 index 00000000..6f71ee24 --- /dev/null +++ b/Installer/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleIdentifier + com.github.rentzsch.clicktoflash + IFPkgFlagAllowBackRev + + IFPkgFlagAuthorizationAction + NoAuthorization + IFPkgFlagBackgroundAlignment + bottomright + IFPkgFlagBackgroundScaling + none + IFPkgFlagDefaultLocation + /tmp + IFPkgFlagFollowLinks + + IFPkgFlagInstallFat + + IFPkgFlagInstalledSize + 1440 + IFPkgFlagIsRequired + + IFPkgFlagOverwritePermissions + + IFPkgFlagRelocatable + + IFPkgFlagRestartAction + NoRestart + IFPkgFlagRootVolumeOnly + + IFPkgFlagUpdateInstalledLanguages + + IFPkgFormatVersion + 0.10000000149011612 + + diff --git a/Installer/build_installer_pkg.command b/Installer/build_installer_pkg.command new file mode 100755 index 00000000..18eb160c --- /dev/null +++ b/Installer/build_installer_pkg.command @@ -0,0 +1,57 @@ +#!/bin/bash +cd "`dirname \"$0\"`" +SCRIPT_WD=`pwd` + +if [ -z "$PROJECT_DIR" ]; then + # Script invoked outside of Xcode, figure out environmental vars for ourself. + PROJECT_DIR='..' + BUILT_PRODUCTS_DIR="$PROJECT_DIR/build/Release" + BUILD_STYLE='Release' + BUILT_PLUGIN="$BUILT_PRODUCTS_DIR/ClickToFlash.webplugin" + PRODUCT_VERSION=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$BUILT_PLUGIN/Contents/Info.plist"` + SYSTEM_DEVELOPER_UTILITIES_DIR='/Developer/Applications/Utilities' +fi + +if [ $BUILD_STYLE != "Release" ]; then + echo "Could not generate package." + echo "Active Configuration needs to be set to 'Release'." + exit 1 +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" + +# Delete old files if they're around. +if [ -d "$MY_INSTALLER_ROOT" ]; then + rm -rf "$MY_INSTALLER_ROOT" +fi +if [ -d "$BUILT_PKG" ]; then + rm -rf "$BUILT_PKG" +fi +if [ -f "$BUILT_ZIP" ]; then + rm -rf "$BUILT_ZIP" +fi + +# Create the .pkg. +mkdir "$MY_INSTALLER_ROOT" +cp -R "$BUILT_PLUGIN" "$MY_INSTALLER_ROOT" + +"$SYSTEM_DEVELOPER_UTILITIES_DIR/PackageMaker.app/Contents/MacOS/PackageMaker" \ + --root "$BUILT_PRODUCTS_DIR/ClickToFlash.dst" \ + --info Info.plist \ + --resources resources \ + --scripts scripts \ + --target 10.4 \ + --version "$PRODUCT_VERSION" \ + --verbose \ + --out "$BUILT_PKG" + +# Stuff it into a .zip. +cd "$BUILT_PRODUCTS_DIR" +zip -r "$VERSIONED_NAME.zip" "ClickToFlash.pkg" +cd $SCRIPT_WD + +rm -rf "$MY_INSTALLER_ROOT" diff --git a/Installer/resources/en.lproj/ReadMe.rtf b/Installer/resources/en.lproj/ReadMe.rtf new file mode 100644 index 00000000..fd9e6484 --- /dev/null +++ b/Installer/resources/en.lproj/ReadMe.rtf @@ -0,0 +1,23 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;\red227\green35\blue27;} +\paperw11900\paperh16840\margl1440\margr1440\vieww10080\viewh8960\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li140\ql\qnatural\pardirnatural + +\f0\b\fs20 \cf0 \ + +\fs32 ClickToFlash +\fs34 \ + +\b0\fs24 \ +ClickToFlash is a WebKit plug-in that prevents automatic loading of Adobe Flash content. If you want to see the content, you can opt-in by clicking on it or adding an entire site to its whitelist.\ +\ + +\b \cf2 You MUST have Safari 3 or greater in order to run ClickToFlash. ClickToFlash will NOT work on any 1.x or 2.x version of Safari. +\b0 \cf0 \ +\ +Try control-clicking (or right-clicking) on an unloaded Flash box to access ClickToFlash's contextual menu, which allows you to do advanced things like edit its whitelist.\ +\ +Please {\field{\*\fldinst{HYPERLINK "http://rentzsch.lighthouseapp.com/projects/24342-clicktoflash/tickets/new"}}{\fldrslt report bugs and request features}} on the {\field{\*\fldinst{HYPERLINK "http://rentzsch.lighthouseapp.com/projects/24342-clicktoflash/tickets?q=all"}}{\fldrslt Lighthouse ClickToFlash project site}}.\ +\ +Want to chip in? {\field{\*\fldinst{HYPERLINK "http://rentzsch.lighthouseapp.com/projects/24342-clicktoflash/tickets?q=not-tagged%3Abrokensite+state%3Aopen&filter="}}{\fldrslt Here's what needs to be done}}.} \ No newline at end of file diff --git a/Installer/resources/en.lproj/background.tiff b/Installer/resources/en.lproj/background.tiff new file mode 100644 index 00000000..c72dd885 Binary files /dev/null and b/Installer/resources/en.lproj/background.tiff differ diff --git a/Installer/scripts/postflight b/Installer/scripts/postflight new file mode 100755 index 00000000..4c106538 --- /dev/null +++ b/Installer/scripts/postflight @@ -0,0 +1,8 @@ +#!/bin/sh + +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/" +pkgutil --forget com.github.rentzsch.clicktoflash.pkg + +exit 0 \ No newline at end of file diff --git a/Installer/scripts/preflight b/Installer/scripts/preflight new file mode 100755 index 00000000..c131ceaa --- /dev/null +++ b/Installer/scripts/preflight @@ -0,0 +1,5 @@ +#!/bin/sh + +pkgutil --forget com.github.rentzsch.clicktoflash.pkg + +exit 0 \ No newline at end of file