2 # What to do before running this script:
3 # - openUp needs to be installed.
4 # - Set VERSION and BETA below.
5 # The Adium and Adium Crash Reporter plists will automatically
6 # updated to match these values.
7 # - To enable beta, also edit Source/AIAdium.h, and set BETA_RELEASE to TRUE. Set it to FALSE when doing a final release.
9 # How to run this script:
18 # Releasing requires cachefly access and adiumx.com access.
20 # First upload to cachefly. If you don't have access and need to do a release, get with Evan or Chris (tick).
21 # Triggering the version checker once the release is up:
23 # 2) Get the number out of the 'buildnum' file in Adium.app/Contents/Resources
24 # 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 ***
25 # 4) Update and commit the appcast.xml file in the adium checkout root
26 # 5) Run the appcast update php script.
30 # No need for changes below this point
36 ADIUM_DIR
=$(BUILD_DIR
)/Adium
37 RELEASE_NAME
=Adium_
$(VERSION
)
39 BUILDSTYLE
=Deployment-Debug
43 BUILDFLAGS
="BUILDCONFIGURATION=$(BUILDSTYLE)"
44 PRODUCT_DIR
=$(shell defaults read com.apple.Xcode PBXProductDirectory
2> /dev
/null
)
45 ifeq ($(strip $(PRODUCT_DIR
)),)
46 ADIUM_BUILD_DIR
=$(SRC_DIR
)/build
/$(BUILDSTYLE
)
48 TARGET_BUILD_DIR
=$(PRODUCT_DIR
)/$(BUILDSTYLE
)
49 ADIUM_BUILD_DIR
=$(TARGET_BUILD_DIR
)
51 PLIST_DIR
=`pwd`/..
/Plists
52 ADIUM_PLIST
=$(PLIST_DIR
)/Adium_2
53 CRASH_REPORTER_PLIST
=$(PLIST_DIR
)/Adium\ Crash\ Reporter-Info
55 .PHONY
: all update version compile
clean release source prepare-release-bundle createfolder diskimage
57 all: update version
clean compile release
59 all-noclean
: update version compile release
66 defaults write
$(ADIUM_PLIST
) CFBundleGetInfoString
'$(VERSION), Copyright 2001-2007 The Adium Team'
67 defaults write
$(ADIUM_PLIST
) CFBundleVersion
'$(VERSION)'
68 defaults write
$(ADIUM_PLIST
) CFBundleShortVersionString
'$(VERSION)'
69 defaults write
$(CRASH_REPORTER_PLIST
) CFBundleGetInfoString
'$(VERSION), Copyright 2001-2007 The Adium Team'
70 defaults write
$(CRASH_REPORTER_PLIST
) CFBundleVersion
'$(VERSION)'
71 defaults write
$(CRASH_REPORTER_PLIST
) CFBundleShortVersionString
'$(VERSION)'
72 plutil
-convert xml1
$(ADIUM_PLIST
).plist
73 plutil
-convert xml1
$(CRASH_REPORTER_PLIST
).plist
76 $(MAKE
) $(BUILDFLAGS
) -C
$(SRC_DIR
)
79 $(MAKE
) $(BUILDFLAGS
) -C
$(SRC_DIR
)
83 $(MAKE
) $(BUILDFLAGS
) -C
$(SRC_DIR
) clean
85 release
: createfolder prepare-release-bundle diskimage
87 prepare-release-bundle
:
88 @
# Convert all nibs to the smaller binary format
89 @echo Converting nibs to binary format...
90 find
$(BUILD_DIR
) -name keyedobjects.nib
-print0 | xargs
-0 plutil
-convert binary1
92 @
# delete unneeded nib files for non-beta builds
93 @echo Cleaning Adium.app for release
95 find
$(BUILD_DIR
) \
( -name classes.nib
-or
-name
info.nib \
) -type f
-delete
98 @
# delete svn and backup files
99 find
$(BUILD_DIR
) -name
".svn" -type d
-exec
rm -rf
{} \
; -prune
100 find
$(BUILD_DIR
) \
( -name
"*~" -or
-name .DS_Store \
) -type f
-delete
104 @
# clean build directory
111 cp
-R
$(ADIUM_BUILD_DIR
)/Adium.app
$(ADIUM_DIR
)
113 @
# copy the text files
114 cp
$(SRC_DIR
)/Changes.txt
$(ADIUM_DIR
)
115 cp
$(SRC_DIR
)/License.txt
$(ADIUM_DIR
)
117 @
# symlink /Applications
118 .
/mkalias
-r
/Applications
$(ADIUM_DIR
)/Applications
121 rm "$(BUILD_DIR)/$(RELEASE_NAME).dmg" || true
122 @
# make Adium disk image
123 mkdir
-p
$(ADIUM_DIR
)/.background
124 cp
$(ART_DIR
)/dmgBackground.png
$(ADIUM_DIR
)/.background
126 .
/ensureCustomIconsExtracted
$(ART_DIR
)
127 .
/make-diskimage.sh
$(BUILD_DIR
)/$(RELEASE_NAME
).dmg
$(ADIUM_DIR
) "Adium X $(VERSION)" dmg_adium.scpt
$(ART_DIR
)
129 @echo Build finished.
`md5 $(BUILD_DIR)/$(RELEASE_NAME).dmg`