Release/Makefile
author David Smith <catfish.man@gmail.com>
Thu, 16 Apr 2009 20:08:51 -0700
changeset 1807 0b0818399524
parent 1790 e892b322a74f
child 1842 8058362084ad
permissions -rw-r--r--
Make the delete headers step something we do in the release makefile instead of the xcodeproj
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     1
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     2
# What to do before running this script:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     3
# - openUp needs to be installed.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     4
# - Set VERSION, BUILD_IN_DEBUG_MODE, BETA, and OFFICIAL_BUILD below.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     5
#    * The Adium plists will automatically updated to match these values.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     6
#    * BETA should be TRUE for all beta builds and FALSE for all releases.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     7
#      It primarily affects the appcast used by Adium for detecting updates.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     8
#    * BUILD_IN_DEBUG_MODE should be set to FALSE for the last beta
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     9
#      in addition to the release itself. If FALSE, debug logging is disabled
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    10
#      and certain space optimizations for nibs and strings are done which
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    11
#      also prevent modification.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    12
#    * OFFICIAL_BUILD is TRUE for the benefit of our Adium build machine, which signs 
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    13
#      official release builds. When building a release yourself, set this to FALSE, 
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    14
#      since you don't have the Adium certificate on your machine.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    15
#
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    16
# How to run this script:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    17
# - make all
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    18
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    19
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
    20
VERSION=1.4hg
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    21
BUILD_IN_DEBUG_MODE?=TRUE
2
d117b59ea271 1.4 is not in beta yet; correct the makefile
David Smith
parents: 1
diff changeset
    22
BETA?=FALSE
812
3de38d362167 Propertyize
David Smith
parents: 59
diff changeset
    23
OFFICIAL_BUILD?=FALSE
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    24
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    25
# Always builds in debug mode.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    26
NIGHTLY?=FALSE
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    27
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    28
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    29
# To release!
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    30
# Releasing requires cachefly access and adiumx.com access.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    31
#
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    32
# First upload to cachefly. If you don't have access and need to do a release, get with Evan or Chris (tick).
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    33
# Triggering the version checker once the release is up:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    34
# 1) Build Adium
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    35
# 2) Get the number out of the 'buildnum' file in Adium.app/Contents/Resources
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    36
# 3) Paste that number into the appropriate place (adium version or adium-beta version, depending on which you're triggering) in the version.plist file in our public_html folder.  *** (2) and (3) are to support the old version checker, in Adium 0.8x and earlier ***
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    37
# 4) Update and commit the appcast.xml file in the adium checkout root
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    38
# 5) Run the appcast update php script.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    39
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    40
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    41
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    42
# No need for changes below this point
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    43
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    44
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    45
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    46
# Variables
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    47
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    48
SRC_DIR=..
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    49
BUILD_DIR=build
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    50
ART_DIR=Artwork
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    51
ADIUM_DIR=$(BUILD_DIR)/Adium
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    52
RELEASE_NAME=Adium_$(VERSION)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    53
VERSION_ESCAPED=$(VERSION)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    54
RELEASE_NAME_ESCAPED=Adium_$(VERSION_ESCAPED)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    55
TARBALL_DIR=adium-$(VERSION)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    56
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
    57
REVISION=`(hg identify --num)`
1787
0b6cac9151ee Mercurialize the Release Makefile. The if(svn) stuff can die off when we move over.
Zachary West <zacw@adiumx.com>
parents: 1632
diff changeset
    58
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    59
ifeq ($(NIGHTLY),TRUE)
1787
0b6cac9151ee Mercurialize the Release Makefile. The if(svn) stuff can die off when we move over.
Zachary West <zacw@adiumx.com>
parents: 1632
diff changeset
    60
	ADIUM_DIR:=$(ADIUM_DIR)\ $(REVISION)
0b6cac9151ee Mercurialize the Release Makefile. The if(svn) stuff can die off when we move over.
Zachary West <zacw@adiumx.com>
parents: 1632
diff changeset
    61
	VERSION_ESCAPED:=$(VERSION_ESCAPED)\ $(REVISION)
0b6cac9151ee Mercurialize the Release Makefile. The if(svn) stuff can die off when we move over.
Zachary West <zacw@adiumx.com>
parents: 1632
diff changeset
    62
	VERSION:=$(VERSION)$(REVISION)
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    63
	BUILD_IN_DEBUG_MODE=TRUE
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    64
	BUILDFLAGS+="ADIUM_CFLAGS=-DNIGHTLY_RELEASE"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    65
endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    66
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    67
ifeq ($(BUILD_IN_DEBUG_MODE),TRUE)
59
df3a2492c746 Renamed all build configurations using the sed script I posted on adium-devl:
Peter Hosey
parents: 2
diff changeset
    68
    BUILDSTYLE=Release-Debug
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    69
else
59
df3a2492c746 Renamed all build configurations using the sed script I posted on adium-devl:
Peter Hosey
parents: 2
diff changeset
    70
    BUILDSTYLE=Release
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    71
endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    72
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    73
BUILDFLAGS+="BUILDCONFIGURATION=$(BUILDSTYLE)"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    74
ifeq ($(BETA),TRUE)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    75
	BUILDFLAGS+="ADIUM_CFLAGS=-DBETA_RELEASE"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    76
endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    77
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    78
PRODUCT_DIR=$(shell defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    79
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    80
ifeq ($(strip $(PRODUCT_DIR)),)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    81
	ADIUM_BUILD_DIR=$(SRC_DIR)/build/$(BUILDSTYLE)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    82
else
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    83
	TARGET_BUILD_DIR=$(PRODUCT_DIR)/$(BUILDSTYLE)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    84
	ADIUM_BUILD_DIR=$(TARGET_BUILD_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    85
endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    86
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    87
PLIST_DIR=`pwd`/../Plists
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    88
ADIUM_PLIST=$(PLIST_DIR)/Info
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    89
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    90
###########
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    91
# Targets
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    92
###########
1341
ce7d1b9dbc15 As CFM pointed out, we should run "prepare-release-bundle" for nightlies, reducing filesize.
Zachary West <zacw@adiumx.com>
parents: 1340
diff changeset
    93
.PHONY: all all-withlocalchanges all-withlocalchanges-noclean all-nopackage-noclean all-nightly update assertnochanges assertnoconflicts version compile clean release source prepare-release-bundle createfolder diskimage nightly tarball
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    94
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    95
all: update assertnochanges version clean compile release
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    96
all-withlocalchanges: update assertnoconflicts version clean compile release
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    97
all-withlocalchanges-noclean: update assertnoconflicts version compile release
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    98
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    99
#doesn't bother putting things in a dmg
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   100
#useful for builds not intended for distribution
1341
ce7d1b9dbc15 As CFM pointed out, we should run "prepare-release-bundle" for nightlies, reducing filesize.
Zachary West <zacw@adiumx.com>
parents: 1340
diff changeset
   101
all-nopackage-noclean: update assertnoconflicts version compile createfolder prepare-release-bundle
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   102
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   103
update:
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   104
	hg pull -uf
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   105
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   106
assertnochanges: assertnoconflicts
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   107
	if [[ 0 -ne `hg st $(SRC_DIR) | egrep --invert-match '\?|Info\.plist' | wc -l` ]]; then \
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   108
		echo 'You have local changes. Please do not build releases from an unclean checkout. You must revert the changes, commit them, or check out another working copy and build from that.' 1>&2; \
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   109
		exit 1; \
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   110
	fi
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   111
assertnoconflicts:
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   112
	if [[ 0 -ne `hg st $(SRC_DIR) | egrep '^C' | wc -l` ]]; then \
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   113
		echo 'You have conflicts in your checkout. You will not be able to build until these are resolved. Also, remember that even after you have fixed all conflict marks, you must use "hg resolve"; otherwise, hg will still believe the files are conflicted.' 1>&2; \
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   114
		exit 2; \
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   115
	fi
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   116
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   117
version:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   118
	@# update the plists
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   119
	defaults write $(ADIUM_PLIST) CFBundleGetInfoString "$(VERSION), Copyright 2001-2008 The Adium Team"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   120
	defaults write $(ADIUM_PLIST) CFBundleVersion "$(VERSION)"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   121
	defaults write $(ADIUM_PLIST) CFBundleShortVersionString "$(VERSION)"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   122
	plutil -convert xml1 $(ADIUM_PLIST).plist
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   123
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   124
compile:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   125
	$(MAKE) $(BUILDFLAGS) -C $(SRC_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   126
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   127
testcompile:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   128
	$(MAKE) $(BUILDFLAGS) -C $(SRC_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   129
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   130
clean:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   131
	rm -rf $(BUILD_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   132
	$(MAKE) $(BUILDFLAGS) -C $(SRC_DIR) clean
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   133
1341
ce7d1b9dbc15 As CFM pointed out, we should run "prepare-release-bundle" for nightlies, reducing filesize.
Zachary West <zacw@adiumx.com>
parents: 1340
diff changeset
   134
release: createfolder prepare-release-bundle diskimage
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   135
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   136
prepare-release-bundle:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   137
	@# Convert all nibs to the smaller binary format
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   138
	@echo Converting nibs to binary format...
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   139
	find $(BUILD_DIR) -name keyedobjects.nib -print0 | xargs -0 plutil -convert binary1
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   140
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   141
	@# delete unneeded nib files for non-beta builds
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   142
	@echo Cleaning Adium.app for release
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   143
ifeq ($(BUILD_IN_DEBUG_MODE),FALSE)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   144
	find $(BUILD_DIR) \( -name classes.nib -or -name info.nib \) -type f -delete
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   145
endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   146
	
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   147
	@# delete backup files
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   148
	find $(BUILD_DIR) \( -name "*~" -or -name .DS_Store \) -type f -delete
1807
0b0818399524 Make the delete headers step something we do in the release makefile instead of the xcodeproj
David Smith <catfish.man@gmail.com>
parents: 1790
diff changeset
   149
	
0b0818399524 Make the delete headers step something we do in the release makefile instead of the xcodeproj
David Smith <catfish.man@gmail.com>
parents: 1790
diff changeset
   150
	@# delete header files
0b0818399524 Make the delete headers step something we do in the release makefile instead of the xcodeproj
David Smith <catfish.man@gmail.com>
parents: 1790
diff changeset
   151
	find $(BUILD_DIR) \( -name "*.h \) -type f -delete
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   152
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   153
	@# sign the executable
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   154
ifeq ($(OFFICIAL_BUILD),TRUE)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   155
	if [ -e ~/adium-password ]; then \
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   156
		security unlock-keychain -p `cat ~/adium-password`; \
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   157
	fi
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   158
	codesign -v -s Adium $(ADIUM_DIR)/Adium.app/Contents/MacOS/Adium
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   159
endif
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   160
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   161
createfolder:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   162
	@# clean build directory
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   163
	rm -rf $(BUILD_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   164
	mkdir $(BUILD_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   165
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   166
	mkdir $(ADIUM_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   167
	
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   168
	@# copy the app
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   169
	cp -R $(ADIUM_BUILD_DIR)/Adium.app $(ADIUM_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   170
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   171
	@# copy the text files
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   172
	cp $(SRC_DIR)/ChangeLogs/Changes.txt $(ADIUM_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   173
	cp $(SRC_DIR)/License.txt $(ADIUM_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   174
	
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   175
	@# symlink /Applications
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   176
	./mkalias -r /Applications $(ADIUM_DIR)/Applications
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   177
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   178
diskimage:
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   179
	rm "$(BUILD_DIR)/$(RELEASE_NAME).dmg" || true
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   180
	@# make Adium disk image
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   181
	mkdir -p $(ADIUM_DIR)/.background
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   182
	cp $(ART_DIR)/dmgBackground.png $(ADIUM_DIR)/.background
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   183
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   184
	./ensureCustomIconsExtracted $(ART_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   185
	./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(ADIUM_DIR) "Adium X $(VERSION)" dmg_adium.scpt $(ART_DIR)
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   186
	
1329
8fd6d3b09119 Adding a slightly untested DSA-signing step to our release process.
Zachary West <zacw@adiumx.com>
parents: 1323
diff changeset
   187
ifeq ($(OFFICIAL_BUILD),TRUE)
1338
86af801624b6 Move the DSA private key to a more obvious location (instead of hiding it in ~/.ssh/). Get rid of the unnecessary "build" file in our nightly tarball, since the -C option for tar doesn't behave nicely.
Zachary West <zacw@adiumx.com>
parents: 1337
diff changeset
   188
	@echo DSA for Sparkle: `ruby sign_update.rb $(BUILD_DIR)/$(RELEASE_NAME_ESCAPED).dmg ~/adium-dsa-sign/dsa_priv.pem`
1329
8fd6d3b09119 Adding a slightly untested DSA-signing step to our release process.
Zachary West <zacw@adiumx.com>
parents: 1323
diff changeset
   189
endif
8fd6d3b09119 Adding a slightly untested DSA-signing step to our release process.
Zachary West <zacw@adiumx.com>
parents: 1323
diff changeset
   190
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   191
	@echo Build finished. `md5 $(BUILD_DIR)/$(RELEASE_NAME_ESCAPED).dmg`
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   192
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   193
#This is what nightly builds use. Does not update because buildbot does.
1632
bbd379dfb584 Restore the clean requirement to the nightly build.
Zachary West <zacw@adiumx.com>
parents: 1580
diff changeset
   194
nightly: version clean compile createfolder prepare-release-bundle tarballapp
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   195
	echo $(RELEASE_NAME) > $(BUILD_DIR)/latest
1787
0b6cac9151ee Mercurialize the Release Makefile. The if(svn) stuff can die off when we move over.
Zachary West <zacw@adiumx.com>
parents: 1632
diff changeset
   196
	$(REVISION) >> $(BUILD_DIR)/latest
1316
68e8612d0fa2 Create a tarball when `make nightly`-ing. Produce a 'latest' file we can use.
Zachary West <zacw@adiumx.com>
parents: 1315
diff changeset
   197
	md5 -q $(BUILD_DIR)/$(RELEASE_NAME).tgz >> $(BUILD_DIR)/latest
1335
b992f856c758 Upload the MD5 of the release for nightlies.
Zachary West <zacw@adiumx.com>
parents: 1333
diff changeset
   198
	md5 -q $(BUILD_DIR)/$(RELEASE_NAME).tgz >> $(BUILD_DIR)/$(RELEASE_NAME).tgz.md5
1319
3807dbc70b35 Add the file size properly.
Zachary West <zacw@adiumx.com>
parents: 1316
diff changeset
   199
	ls -l $(BUILD_DIR)/$(RELEASE_NAME).tgz | awk '{print $$5}' >>$(BUILD_DIR)/latest
1316
68e8612d0fa2 Create a tarball when `make nightly`-ing. Produce a 'latest' file we can use.
Zachary West <zacw@adiumx.com>
parents: 1315
diff changeset
   200
	echo $(VERSION) >> $(BUILD_DIR)/latest
1340
794a1111b8fa Codesign nightlies, and only run the DSA keygen when we're doing an official build.
Zachary West <zacw@adiumx.com>
parents: 1339
diff changeset
   201
ifeq ($(OFFICIAL_BUILD),TRUE)
1338
86af801624b6 Move the DSA private key to a more obvious location (instead of hiding it in ~/.ssh/). Get rid of the unnecessary "build" file in our nightly tarball, since the -C option for tar doesn't behave nicely.
Zachary West <zacw@adiumx.com>
parents: 1337
diff changeset
   202
	ruby sign_update.rb $(BUILD_DIR)/$(RELEASE_NAME).tgz ~/adium-dsa-sign/dsa_priv.pem >> $(BUILD_DIR)/latest
1340
794a1111b8fa Codesign nightlies, and only run the DSA keygen when we're doing an official build.
Zachary West <zacw@adiumx.com>
parents: 1339
diff changeset
   203
endif
1316
68e8612d0fa2 Create a tarball when `make nightly`-ing. Produce a 'latest' file we can use.
Zachary West <zacw@adiumx.com>
parents: 1315
diff changeset
   204
68e8612d0fa2 Create a tarball when `make nightly`-ing. Produce a 'latest' file we can use.
Zachary West <zacw@adiumx.com>
parents: 1315
diff changeset
   205
tarballapp:
1338
86af801624b6 Move the DSA private key to a more obvious location (instead of hiding it in ~/.ssh/). Get rid of the unnecessary "build" file in our nightly tarball, since the -C option for tar doesn't behave nicely.
Zachary West <zacw@adiumx.com>
parents: 1337
diff changeset
   206
	rm $(BUILD_DIR)/Adium_temp.tgz || true
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   207
	cd $(BUILD_DIR) && tar zcf $(RELEASE_NAME).tgz Adium*/ && cd ..
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   208
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
   209
tarball:
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   210
	hg archive -t tgz ($TARBALL_DIR).tgz