0.89b1
[adiumx.git] / Release / Makefile
blobb460217728e2c036bbc9804406d0d97159c99abd
1 ###########
2 # What to do before running this script:
3 # - openUp needs to be installed.
4 # - Set VERSION and BETA below
5 # - To enable beta, also edit Source/AIAdium.h, and set BETA_RELEASE to TRUE. Set it to FALSE when doing a final release.
6 # - Edit the following plist keys in Adium_2.plist
7 # - CFBundleGetInfoString
8 # - CFBundleShortVersionString
9 # - CFBundleVersion
11 # How to run this script:
12 # - make all
13 ###########
15 VERSION=0.89b1
16 BETA=TRUE
18 ###########
19 # To release!
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:
22 # 1) Build Adium
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 sf.net ht_docs folder. You should be able to ftp into shell.sf.net with your sf.net login/pass and then cd to the right directory (/home/groups/a/ad/adium/htdocs)
25 ###########
27 ###########
28 # No need for changes below this point
29 ###########
31 SRC_DIR=..
32 BUILD_DIR=build
33 ART_DIR=Artwork
34 ADIUM_DIR=$(BUILD_DIR)/Adium
35 RELEASE_NAME=AdiumX_$(VERSION)
36 ifeq ($(BETA),TRUE)
37 BUILDSTYLE=Deployment-Debug
38 else
39 BUILDSTYLE=Deployment
40 endif
41 BUILDFLAGS="BUILDCONFIGURATION=$(BUILDSTYLE)"
42 PRODUCT_DIR=$(shell defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null)
43 ifeq ($(strip $(PRODUCT_DIR)),)
44 ADIUM_BUILD_DIR=$(SRC_DIR)/build/$(BUILDSTYLE)
45 else
46 TARGET_BUILD_DIR=$(PRODUCT_DIR)/$(BUILDSTYLE)
47 ADIUM_BUILD_DIR=$(TARGET_BUILD_DIR)
48 endif
50 .PHONY: all update compile clean release source createfolder diskimage
52 all: update compile release
54 update:
55 svn update $(SRC_DIR)
57 compile:
58 $(MAKE) $(BUILDFLAGS) -C $(SRC_DIR)
60 testcompile:
61 $(MAKE) $(BUILDFLAGS) -C $(SRC_DIR)
63 clean:
64 rm -rf $(BUILD_DIR)
66 release: createfolder diskimage
68 createfolder:
69 @# clean build directory
70 rm -rf $(BUILD_DIR)
71 mkdir $(BUILD_DIR)
73 mkdir $(ADIUM_DIR)
75 @# copy the app
76 cp -R $(ADIUM_BUILD_DIR)/Adium.app $(ADIUM_DIR)
78 @# copy the text files
79 cp $(SRC_DIR)/Changes.txt $(ADIUM_DIR)
80 cp $(SRC_DIR)/License.txt $(ADIUM_DIR)
82 @# symlink /Applications
83 ln -s /Applications $(ADIUM_DIR)/Applications
85 @# delete svn and backup files
86 find $(BUILD_DIR) -name ".svn" -type d -exec rm -rf {} \; -prune
87 find $(BUILD_DIR) \( -name "*~" -or -name .DS_Store \) -type f -delete
89 @# delete unneeded nib files for non-beta builds
90 ifeq ($(BETA),FALSE)
91 find $(BUILD_DIR) \( -name classes.nib -or -name info.nib \) -type f -delete
92 endif
94 diskimage:
95 rm "$(BUILD_DIR)/$(RELEASE_NAME).dmg" || true
96 @# make Adium disk image
97 mkdir -p $(ADIUM_DIR)/.background
98 cp $(ART_DIR)/dmgBackground.png $(ADIUM_DIR)/.background
100 ./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(ADIUM_DIR) "Adium X $(VERSION)" dmg_adium.scpt
102 @echo Build finished