Skip to content

Commit 25393e0

Browse files
committed
[NEW] Installer-package-building overhaul. Now creates 10.4-compatible .pkgs. Abandons evil .pmdoc files.
1 parent f027c41 commit 25393e0

File tree

6 files changed

+131
-0
lines changed

6 files changed

+131
-0
lines changed

Installer/Info.plist

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleIdentifier</key>
6+
<string>com.github.rentzsch.clicktoflash</string>
7+
<key>IFPkgFlagAllowBackRev</key>
8+
<true/>
9+
<key>IFPkgFlagAuthorizationAction</key>
10+
<string>NoAuthorization</string>
11+
<key>IFPkgFlagBackgroundAlignment</key>
12+
<string>bottomright</string>
13+
<key>IFPkgFlagBackgroundScaling</key>
14+
<string>none</string>
15+
<key>IFPkgFlagDefaultLocation</key>
16+
<string>/tmp</string>
17+
<key>IFPkgFlagFollowLinks</key>
18+
<true/>
19+
<key>IFPkgFlagInstallFat</key>
20+
<false/>
21+
<key>IFPkgFlagInstalledSize</key>
22+
<integer>1440</integer>
23+
<key>IFPkgFlagIsRequired</key>
24+
<false/>
25+
<key>IFPkgFlagOverwritePermissions</key>
26+
<false/>
27+
<key>IFPkgFlagRelocatable</key>
28+
<false/>
29+
<key>IFPkgFlagRestartAction</key>
30+
<string>NoRestart</string>
31+
<key>IFPkgFlagRootVolumeOnly</key>
32+
<true/>
33+
<key>IFPkgFlagUpdateInstalledLanguages</key>
34+
<false/>
35+
<key>IFPkgFormatVersion</key>
36+
<real>0.10000000149011612</real>
37+
</dict>
38+
</plist>

Installer/build_installer_pkg.command

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
cd "`dirname \"$0\"`"
3+
SCRIPT_WD=`pwd`
4+
5+
if [ -z "$PROJECT_DIR" ]; then
6+
# Script invoked outside of Xcode, figure out environmental vars for ourself.
7+
PROJECT_DIR='..'
8+
BUILT_PRODUCTS_DIR="$PROJECT_DIR/build/Release"
9+
BUILD_STYLE='Release'
10+
BUILT_PLUGIN="$BUILT_PRODUCTS_DIR/ClickToFlash.webplugin"
11+
PRODUCT_VERSION=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$BUILT_PLUGIN/Contents/Info.plist"`
12+
SYSTEM_DEVELOPER_UTILITIES_DIR='/Developer/Applications/Utilities'
13+
fi
14+
15+
if [ $BUILD_STYLE != "Release" ]; then
16+
echo "Could not generate package."
17+
echo "Active Configuration needs to be set to 'Release'."
18+
exit 1
19+
fi
20+
21+
MY_INSTALLER_ROOT="$BUILT_PRODUCTS_DIR/ClickToFlash.dst"
22+
BUILT_PLUGIN="$BUILT_PRODUCTS_DIR/ClickToFlash.webplugin"
23+
BUILT_PKG="$BUILT_PRODUCTS_DIR/ClickToFlash.pkg" # Sparkle currently can't handle -$VERSION in .pkg names.
24+
VERSIONED_NAME="ClickToFlash-$PRODUCT_VERSION"
25+
BUILT_ZIP="$BUILT_PRODUCTS_DIR/$VERSIONED_NAME.zip"
26+
27+
# Delete old files if they're around.
28+
if [ -d "$MY_INSTALLER_ROOT" ]; then
29+
rm -rf "$MY_INSTALLER_ROOT"
30+
fi
31+
if [ -d "$BUILT_PKG" ]; then
32+
rm -rf "$BUILT_PKG"
33+
fi
34+
if [ -f "$BUILT_ZIP" ]; then
35+
rm -rf "$BUILT_ZIP"
36+
fi
37+
38+
# Create the .pkg.
39+
mkdir "$MY_INSTALLER_ROOT"
40+
cp -R "$BUILT_PLUGIN" "$MY_INSTALLER_ROOT"
41+
42+
"$SYSTEM_DEVELOPER_UTILITIES_DIR/PackageMaker.app/Contents/MacOS/PackageMaker" \
43+
--root "$BUILT_PRODUCTS_DIR/ClickToFlash.dst" \
44+
--info Info.plist \
45+
--resources resources \
46+
--scripts scripts \
47+
--target 10.4 \
48+
--version "$PRODUCT_VERSION" \
49+
--verbose \
50+
--out "$BUILT_PKG"
51+
52+
# Stuff it into a .zip.
53+
cd "$BUILT_PRODUCTS_DIR"
54+
zip -r "$VERSIONED_NAME.zip" "ClickToFlash.pkg"
55+
cd $SCRIPT_WD
56+
57+
rm -rf "$MY_INSTALLER_ROOT"
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
2+
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3+
{\colortbl;\red255\green255\blue255;\red227\green35\blue27;}
4+
\paperw11900\paperh16840\margl1440\margr1440\vieww10080\viewh8960\viewkind0
5+
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li140\ql\qnatural\pardirnatural
6+
7+
\f0\b\fs20 \cf0 \
8+
9+
\fs32 ClickToFlash
10+
\fs34 \
11+
12+
\b0\fs24 \
13+
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.\
14+
\
15+
16+
\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.
17+
\b0 \cf0 \
18+
\
19+
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.\
20+
\
21+
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}}.\
22+
\
23+
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}}.}
22.3 KB
Binary file not shown.

Installer/scripts/postflight

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
rm -rf "$HOME/Library/Internet Plug-Ins/ClickToFlash.plugin"
4+
rm -rf "$HOME/Library/Internet Plug-Ins/ClickToFlash.webplugin"
5+
mv /tmp/ClickToFlash.webplugin "$HOME/Library/Internet Plug-Ins/"
6+
pkgutil --forget com.github.rentzsch.clicktoflash.pkg
7+
8+
exit 0

Installer/scripts/preflight

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
pkgutil --forget com.github.rentzsch.clicktoflash.pkg
4+
5+
exit 0

0 commit comments

Comments
 (0)