| 1 |
# |
|---|
| 2 |
# Flickr Uploadr |
|---|
| 3 |
# |
|---|
| 4 |
# Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free |
|---|
| 5 |
# software; you can redistribute it and/or modify it under the terms of the |
|---|
| 6 |
# GNU General Public License (GPL), version 2 only. This library is |
|---|
| 7 |
# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU |
|---|
| 8 |
# GPL for more details (http://www.gnu.org/licenses/gpl.html) |
|---|
| 9 |
# |
|---|
| 10 |
|
|---|
| 11 |
SRC := MacUploadr.app/Contents |
|---|
| 12 |
PKG := ~/Desktop/build |
|---|
| 13 |
BUILD := $(PKG)/Flickr\ Uploadr.app/Contents |
|---|
| 14 |
GM_VER := 1.1.10 |
|---|
| 15 |
|
|---|
| 16 |
INTL := $(filter de-de en-US es-us fr-fr it-it ko-kr pt-br zh-hk, $(MAKECMDGOALS)) |
|---|
| 17 |
|
|---|
| 18 |
all: |
|---|
| 19 |
@echo "This target doesn't do anything! Specify one of these:" |
|---|
| 20 |
@echo " build Copy everything of interest to ~/Desktop/build/" |
|---|
| 21 |
|
|---|
| 22 |
de-de: |
|---|
| 23 |
@echo "Building German (de-de)" |
|---|
| 24 |
|
|---|
| 25 |
en-US: |
|---|
| 26 |
@echo "Building English (en-US)" |
|---|
| 27 |
|
|---|
| 28 |
es-us: |
|---|
| 29 |
@echo "Building Spanish (es-us)" |
|---|
| 30 |
|
|---|
| 31 |
fr-fr: |
|---|
| 32 |
@echo "Building French (fr-fr)" |
|---|
| 33 |
|
|---|
| 34 |
it-it: |
|---|
| 35 |
@echo "Building Italian (it-it)" |
|---|
| 36 |
|
|---|
| 37 |
ko-kr: |
|---|
| 38 |
@echo "Building Korean (ko-kr)" |
|---|
| 39 |
|
|---|
| 40 |
pt-br: |
|---|
| 41 |
@echo "Building Portuguese (pt-br)" |
|---|
| 42 |
|
|---|
| 43 |
zh-hk: |
|---|
| 44 |
@echo "Building Chinese (zh-hk)" |
|---|
| 45 |
|
|---|
| 46 |
build: |
|---|
| 47 |
|
|---|
| 48 |
# Package structure |
|---|
| 49 |
rm -rf $(PKG) |
|---|
| 50 |
mkdir $(PKG) |
|---|
| 51 |
mkdir $(PKG)/Flickr\ Uploadr.app |
|---|
| 52 |
ln -s /Applications $(PKG)/Applications |
|---|
| 53 |
mkdir $(BUILD) |
|---|
| 54 |
mkdir $(BUILD)/lib |
|---|
| 55 |
mkdir $(BUILD)/Frameworks |
|---|
| 56 |
mkdir $(BUILD)/MacOS |
|---|
| 57 |
mkdir $(BUILD)/Resources |
|---|
| 58 |
cp $(SRC)/Info.plist $(BUILD)/ |
|---|
| 59 |
|
|---|
| 60 |
# GraphicsMagick config files |
|---|
| 61 |
mkdir $(BUILD)/lib/GraphicsMagick-$(GM_VER) |
|---|
| 62 |
mkdir $(BUILD)/lib/GraphicsMagick-$(GM_VER)/config |
|---|
| 63 |
cp $(SRC)/lib/GraphicsMagick-$(GM_VER)/config/*.mgk \ |
|---|
| 64 |
$(BUILD)/lib/GraphicsMagick-$(GM_VER)/config/ |
|---|
| 65 |
|
|---|
| 66 |
# XULRunner |
|---|
| 67 |
cp -R $(SRC)/Frameworks/XUL.framework $(BUILD)/Frameworks/ |
|---|
| 68 |
ln -s ../Frameworks/XUL.framework/Versions/Current/xulrunner \ |
|---|
| 69 |
$(BUILD)/MacOS/xulrunner |
|---|
| 70 |
cp $(SRC)/Resources/application.ini $(BUILD)/Resources/ |
|---|
| 71 |
cp $(SRC)/Resources/LICENSE.txt $(BUILD)/Resources/ |
|---|
| 72 |
cp $(SRC)/Resources/icons.icns $(BUILD)/Resources/ |
|---|
| 73 |
|
|---|
| 74 |
# Chrome |
|---|
| 75 |
mkdir $(BUILD)/Resources/chrome |
|---|
| 76 |
mkdir content |
|---|
| 77 |
mkdir content/uploadr |
|---|
| 78 |
cp $(SRC)/Resources/chrome/content/uploadr/*.* content/uploadr/ |
|---|
| 79 |
mkdir locale |
|---|
| 80 |
mkdir locale/branding |
|---|
| 81 |
cp $(SRC)/Resources/chrome/locale/branding/*.* locale/branding/ |
|---|
| 82 |
mkdir locale/$(INTL) |
|---|
| 83 |
cp $(SRC)/Resources/chrome/locale/$(INTL)/*.* locale/$(INTL)/ |
|---|
| 84 |
sed 's/INTL/$(INTL)/g' $(SRC)/Resources/chrome/chrome.manifest.prod > \ |
|---|
| 85 |
$(BUILD)/Resources/chrome/chrome.manifest |
|---|
| 86 |
mkdir skin |
|---|
| 87 |
# mkdir skin/hacks |
|---|
| 88 |
# mkdir skin/hacks/mac |
|---|
| 89 |
# cp $(SRC)/Resources/chrome/skin/hacks/mac/hacks.css skin/hacks/mac/ |
|---|
| 90 |
# mkdir skin/hacks/win |
|---|
| 91 |
# cp $(SRC)/Resources/chrome/skin/hacks/win/hacks.css skin/hacks/win/ |
|---|
| 92 |
# mkdir skin/hacks/unix |
|---|
| 93 |
# cp $(SRC)/Resources/chrome/skin/hacks/unix/hacks.css skin/hacks/unix/ |
|---|
| 94 |
mkdir skin/uploadr |
|---|
| 95 |
cp $(SRC)/Resources/chrome/skin/uploadr/*.css skin/uploadr/ |
|---|
| 96 |
cp $(SRC)/Resources/chrome/skin/uploadr/*.gif skin/uploadr/ |
|---|
| 97 |
cp $(SRC)/Resources/chrome/skin/uploadr/*.png skin/uploadr/ |
|---|
| 98 |
zip uploadr -r content locale skin |
|---|
| 99 |
rm -rf content locale skin |
|---|
| 100 |
mv uploadr.zip $(BUILD)/Resources/chrome/uploadr.jar |
|---|
| 101 |
|
|---|
| 102 |
# XPCOM |
|---|
| 103 |
mkdir $(BUILD)/Resources/components |
|---|
| 104 |
cp $(SRC)/Resources/components/*.xpt $(BUILD)/Resources/components/ |
|---|
| 105 |
cp $(SRC)/Resources/components/*.dylib $(BUILD)/Resources/components/ |
|---|
| 106 |
|
|---|
| 107 |
# XULRunner preferences |
|---|
| 108 |
mkdir $(BUILD)/Resources/defaults |
|---|
| 109 |
mkdir $(BUILD)/Resources/defaults/preferences |
|---|
| 110 |
cp $(SRC)/Resources/defaults/preferences/*.js \ |
|---|
| 111 |
$(BUILD)/Resources/defaults/preferences/ |
|---|
| 112 |
|
|---|
| 113 |
@echo "Build done! Now go check it and make a disk image." |
|---|