/
Makefile
83 lines (64 loc) · 2.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#Things to change for version upgrades:
# Makefiles - Change this makefile, the VERSION declaration.
# Plists - Modify all plists, they should all have version numbers.
# Check the Perian.component target and PerianPane target.
VERSION=1.3b1
BETA=TRUE
SRC_DIR=..
BUILD_DIR=build
COMMAND_BUILD_DIR=CommandLineComponents
RELEASE_NAME=Perian
PERIAN_DIR=$(BUILD_DIR)/Perian
ART_DIR=Artwork
ifeq ($(BETA),TRUE)
BUILDSTYLE=Deployment+Debug
else
BUILDSTYLE=Deployment
endif
ifeq ($(strip $(PRODUCT_DIR)),)
PERIAN_BUILD_DIR=$(SRC_DIR)/build/$(BUILDSTYLE)
else
TARGET_BUILD_DIR=$(PRODUCT_DIR)/$(BUILDSTYLE)
PERIAN_BUILD_DIR=$(TARGET_BUILD_DIR)
endif
BUILDFLAGS="BUILDCONFIGURATION=$(BUILDSTYLE)"
release: compile createfolder diskimage
command: compile
@# clean build dir
rm -rf $(COMMAND_BUILD_DIR)
mkdir $(COMMAND_BUILD_DIR)
cp $(PERIAN_BUILD_DIR)/Perian.prefPane/Contents/Resources/Components/*.zip $(PERIAN_BUILD_DIR)/Perian.prefPane/Contents/Resources/Components/*/*.zip $(COMMAND_BUILD_DIR)
cp CommandLine-Perian-Install.sh $(COMMAND_BUILD_DIR)
makeself --nocrc --nocomp --nox11 $(COMMAND_BUILD_DIR) Perian-CommandLine-$(VERSION).sh Perian ./CommandLine-Perian-Install.sh
compile:
$(MAKE) $(BUILDFLAGS) -C $(SRC_DIR)
createfolder:
@# clean build directory
rm -rf $(BUILD_DIR)
mkdir $(BUILD_DIR)
mkdir $(PERIAN_DIR)
@# copy the app
cp -R $(PERIAN_BUILD_DIR)/Perian.prefPane $(PERIAN_DIR)
# strip -s $(SRC_DIR)/exportedSymbols -u $(PERIAN_DIR)/Perian.component/Contents/MacOS/Perian
@# copy the text files
# cp $(SRC_DIR)/Changes.txt $(PERIAN_DIR)
# cp $(SRC_DIR)/License.txt $(PERIAN_DIR)
cp $(SRC_DIR)/Release/Read\ Me.rtf $(PERIAN_DIR)
cp $(SRC_DIR)/Release/Changes.txt $(PERIAN_DIR)
@# symlink /Library/QuickTime
# ln -s /Library/QuickTime $(PERIAN_DIR)/QuickTime
@# delete svn and backup files
find $(BUILD_DIR) -name ".svn" -type d -exec rm -rf {} \; -prune
find $(BUILD_DIR) \( -name "*~" -or -name .DS_Store \) -type f -delete
@# delete unneeded nib files for non-beta builds
ifeq ($(BETA),FALSE)
find $(BUILD_DIR) \( -name classes.nib -or -name info.nib \) -type f -delete
endif
diskimage:
rm "$(BUILD_DIR)/$(RELEASE_NAME).dmg" || true
@# make Perian disk image
mkdir -p $(PERIAN_DIR)/.background
#.background
cp $(ART_DIR)/periandmgbg.png $(PERIAN_DIR)/.background
./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME)_$(VERSION).dmg $(PERIAN_DIR) "Perian $(VERSION)" dmg_perian.scpt
@echo Build finished