-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW] Installer-package-building overhaul. Now creates 10.4-compatibl…
…e .pkgs. Abandons evil .pmdoc files.
- Loading branch information
Showing
6 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.github.rentzsch.clicktoflash</string> | ||
<key>IFPkgFlagAllowBackRev</key> | ||
<true/> | ||
<key>IFPkgFlagAuthorizationAction</key> | ||
<string>NoAuthorization</string> | ||
<key>IFPkgFlagBackgroundAlignment</key> | ||
<string>bottomright</string> | ||
<key>IFPkgFlagBackgroundScaling</key> | ||
<string>none</string> | ||
<key>IFPkgFlagDefaultLocation</key> | ||
<string>/tmp</string> | ||
<key>IFPkgFlagFollowLinks</key> | ||
<true/> | ||
<key>IFPkgFlagInstallFat</key> | ||
<false/> | ||
<key>IFPkgFlagInstalledSize</key> | ||
<integer>1440</integer> | ||
<key>IFPkgFlagIsRequired</key> | ||
<false/> | ||
<key>IFPkgFlagOverwritePermissions</key> | ||
<false/> | ||
<key>IFPkgFlagRelocatable</key> | ||
<false/> | ||
<key>IFPkgFlagRestartAction</key> | ||
<string>NoRestart</string> | ||
<key>IFPkgFlagRootVolumeOnly</key> | ||
<true/> | ||
<key>IFPkgFlagUpdateInstalledLanguages</key> | ||
<false/> | ||
<key>IFPkgFormatVersion</key> | ||
<real>0.10000000149011612</real> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}}.} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
pkgutil --forget com.github.rentzsch.clicktoflash.pkg | ||
|
||
exit 0 |