Release/Makefile
author Stephen Holt <sholt@adium.im>
Thu, 07 Apr 2011 21:33:58 -0700
changeset 3848 a5a3f570b785
parent 3098 3eaf93c20b5a
child 4075 566837fb8868
permissions -rw-r--r--
Update this date string for the first time in the past 2 years or so.
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
2646
0346ba7698b4 Bump up to 1.5hg to indicate instability.
Zachary West <zacw@adium.im>
parents: 2541
diff changeset
    20
VERSION=1.5hg
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
2237
f55083dd3e49 Version up to 1.4b1.
Zachary West <zacw@adium.im>
parents: 2175
diff changeset
    22
BETA?=TRUE
2241
171c884ac6b4 Yes, official build please!
Zachary West <zacw@adium.im>
parents: 2239
diff changeset
    23
OFFICIAL_BUILD?=TRUE
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
2107
6dcbf494dbd6 Use `hg parent` for identifying builds. Fixes #11943.
Zachary West <zacw@adium.im>
parents: 2073
diff changeset
    57
REVISION = r$(shell hg parent --template {rev})
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)
2239
22859a003ed4 Never build nightlies as betas.
Zachary West <zacw@adium.im>
parents: 2237
diff changeset
    60
	BETA=FALSE
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
    61
	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
    62
	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
    63
	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
    64
	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
    65
	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
    66
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
    67
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
    68
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
    69
    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
    70
else
59
df3a2492c746 Renamed all build configurations using the sed script I posted on adium-devl:
Peter Hosey
parents: 2
diff changeset
    71
    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
    72
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
    73
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
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
    75
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
    76
	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
    77
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
    78
2456
aa9e171af640 Borrowed from Growl: Fix how our Release Makefile finds Xcode's global custom build directory.
Peter Hosey <hg@boredzo.org>
parents: 2455
diff changeset
    79
PRODUCT_DIR=$(shell defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> /dev/null > XcodeBuildSettings.plist && defaults read $PWD/XcodeBuildSettings SYMROOT 2> /dev/null; rm XcodeBuildSettings.plist)
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
    80
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
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
    82
	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
    83
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
    84
	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
    85
	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
    86
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
    87
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
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
    89
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
    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
###########
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
# 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
    93
###########
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
    94
.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
    95
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: 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
    97
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
    98
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
    99
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
#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
   101
#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
   102
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
   103
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
   104
update:
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   105
	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
   106
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
   107
assertnochanges: assertnoconflicts
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   108
	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
   109
		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
   110
		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
   111
	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
   112
assertnoconflicts:
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   113
	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
   114
		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
   115
		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
   116
	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
   117
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
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
   119
	@# update the plists
3848
a5a3f570b785 Update this date string for the first time in the past 2 years or so.
Stephen Holt <sholt@adium.im>
parents: 3098
diff changeset
   120
	defaults write $(ADIUM_PLIST) CFBundleGetInfoString "$(VERSION), Copyright 2001-2011 The Adium Team"
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
   121
	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
   122
	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
   123
	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
   124
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
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
   126
	$(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
   127
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
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
   129
	$(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
   130
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
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
   132
	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
   133
	$(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
   134
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
   135
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
   136
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
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
   138
	@# 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
   139
	@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
   140
	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
   141
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
	@# 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
   143
	@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
   144
ifeq ($(BUILD_IN_DEBUG_MODE),FALSE)
3098
3eaf93c20b5a For releases, also clean designable.nib.
Smew
parents: 2646
diff changeset
   145
	find $(BUILD_DIR) \( -name classes.nib -or -name info.nib -or -name designable.nib \) -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
   146
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
   147
	
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   148
	@# 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
   149
	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
   150
	
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
	@# delete header files
1843
08622fed1e87 Fixing a missing quote in the Makefile.
Zachary West <zacw@adiumx.com>
parents: 1842
diff changeset
   152
	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
   153
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
	@# 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
   155
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
   156
	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
   157
		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
   158
	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
   159
	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
   160
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
   161
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
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
   163
	@# 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
   164
	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
   165
	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
   166
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
	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
   168
	
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
	@# copy the app
2455
8596de478b13 Fix handling of custom build directories containing spaces.
Peter Hosey <hg@boredzo.org>
parents: 2452
diff changeset
   170
	cp -R "$(ADIUM_BUILD_DIR)/Adium.app" $(ADIUM_DIR)
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
   171
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
	@# 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
   173
	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
   174
	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
   175
	
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
	@# 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
   177
	./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
   178
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
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
   180
	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
   181
	@# 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
   182
	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
   183
	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
   184
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
	./ensureCustomIconsExtracted $(ART_DIR)
2073
a19bc2ad5103 Unquoting.
Zachary West <zacw@adiumx.com>
parents: 2072
diff changeset
   186
	./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(ADIUM_DIR) "Adium $(VERSION)" dmg_adium.scpt $(ART_DIR)
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
   187
	
1329
8fd6d3b09119 Adding a slightly untested DSA-signing step to our release process.
Zachary West <zacw@adiumx.com>
parents: 1323
diff changeset
   188
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
   189
	@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
   190
endif
8fd6d3b09119 Adding a slightly untested DSA-signing step to our release process.
Zachary West <zacw@adiumx.com>
parents: 1323
diff changeset
   191
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
   192
	@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
   193
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
   194
#This is what nightly builds use. Does not update because buildbot does.
2071
b39da310cf6c Produce a dmg file for the nightly (seeing whether or not this works, mostly).
Zachary West <zacw@adiumx.com>
parents: 1976
diff changeset
   195
nightly: version clean compile createfolder prepare-release-bundle diskimage
1976
5d4e03677729 Rename "latest" to "latest.info" for the sake of the nightly information file, so "latest" can be a fake symbolic link to the latest file.
Zachary West <zacw@adiumx.com>
parents: 1849
diff changeset
   196
	echo $(RELEASE_NAME) > $(BUILD_DIR)/latest.info
5d4e03677729 Rename "latest" to "latest.info" for the sake of the nightly information file, so "latest" can be a fake symbolic link to the latest file.
Zachary West <zacw@adiumx.com>
parents: 1849
diff changeset
   197
	echo $(REVISION) >> $(BUILD_DIR)/latest.info
2071
b39da310cf6c Produce a dmg file for the nightly (seeing whether or not this works, mostly).
Zachary West <zacw@adiumx.com>
parents: 1976
diff changeset
   198
	md5 -q $(BUILD_DIR)/$(RELEASE_NAME).dmg >> $(BUILD_DIR)/latest.info
b39da310cf6c Produce a dmg file for the nightly (seeing whether or not this works, mostly).
Zachary West <zacw@adiumx.com>
parents: 1976
diff changeset
   199
	md5 -q $(BUILD_DIR)/$(RELEASE_NAME).dmg >> $(BUILD_DIR)/$(RELEASE_NAME).dmg.md5
b39da310cf6c Produce a dmg file for the nightly (seeing whether or not this works, mostly).
Zachary West <zacw@adiumx.com>
parents: 1976
diff changeset
   200
	ls -l $(BUILD_DIR)/$(RELEASE_NAME).dmg | awk '{print $$5}' >>$(BUILD_DIR)/latest.info
1976
5d4e03677729 Rename "latest" to "latest.info" for the sake of the nightly information file, so "latest" can be a fake symbolic link to the latest file.
Zachary West <zacw@adiumx.com>
parents: 1849
diff changeset
   201
	echo $(VERSION) >> $(BUILD_DIR)/latest.info
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
   202
ifeq ($(OFFICIAL_BUILD),TRUE)
2071
b39da310cf6c Produce a dmg file for the nightly (seeing whether or not this works, mostly).
Zachary West <zacw@adiumx.com>
parents: 1976
diff changeset
   203
	ruby sign_update.rb $(BUILD_DIR)/$(RELEASE_NAME).dmg ~/adium-dsa-sign/dsa_priv.pem >> $(BUILD_DIR)/latest.info
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
   204
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
   205
68e8612d0fa2 Create a tarball when `make nightly`-ing. Produce a 'latest' file we can use.
Zachary West <zacw@adiumx.com>
parents: 1315
diff changeset
   206
tarballapp:
1848
548b22f58674 Evaluate the revision number, don't pass around a piped message. Replace + in the hg revision number with nothing, since the buildbot will always have a changed local repository.
Zachary West <zacw@adiumx.com>
parents: 1844
diff changeset
   207
	rm $(BUILD_DIR)/$(RELEASE_NAME).tgz || true
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   208
	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
   209
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
   210
tarball:
1790
e892b322a74f Changing the release Makefile to be entirely mercurial.
Zachary West <zacwest@gmail.com>
parents: 1787
diff changeset
   211
	hg archive -t tgz ($TARBALL_DIR).tgz