OSDN Git Service

- Method for generating snapshot builds marked with the svn revision by using ./confi...
[handbrake-jp/handbrake-jp-git.git] / Jamrules
1 # $Id: Jamrules,v 1.59 2005/11/04 16:06:21 titer Exp $
2 #
3 # This file is part of the HandBrake source code.
4 # Homepage: <http://handbrake.m0k.org/>.
5 # It may be used under the terms of the GNU General Public License.
6
7 include config.jam ;
8
9 if ! $(DEFINES)
10 {
11     Exit "Please run ./configure first." ;
12 }
13
14 # This line needs to be manually bumped for each release.
15 HB_VERSION  = 0.9.3 ;
16
17 # If the user configured with the --snapshot argument,
18 # generate  version and build numbers that include
19 # the svn revision and are marked as unstable.
20 if $(SNAPSHOT) = 1
21 {
22 HB_VERSION = "$(HB_VERSION)svn$(SVN_REV)" ;
23 HB_BUILD = "$(BUILD_DATE)01" ;
24 }
25 else
26 {
27 HB_BUILD = "$(BUILD_DATE)00" ;
28 }
29
30 DEFINES    += HB_VERSION=\\\"$(HB_VERSION)\\\" HB_BUILD=$(HB_BUILD) ;
31 LANGUAGES   = fr de it pl ru nl es pt ja ;
32 RM          = rm -rf ;
33
34 # Build HandBrake.app using Xcode --
35 # Getting the right version and build numbers
36 # requires editing the .plist and specifying
37 # extra CFLAGs.
38 rule OSXApp
39 {
40     Depends     exe   : $(<) ;
41     Depends     $(<)  : $(>) ;
42     Clean       clean : $(1) macosx/build ;
43 }
44 actions OSXApp
45 {
46     $(RM) $(<) macosx/build/HandBrake.app && \
47       ( cd macosx && \
48          defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleGetInfoString '"$(HB_VERSION)"' &&\
49          defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleShortVersionString '"$(HB_VERSION)"' &&\
50          defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleVersion '"$(HB_BUILD)"' &&\
51          plutil -convert xml1 "$(FULL_PATH)"/macosx/HandBrake.plist &&\
52         xcodebuild OTHER_CFLAGS_QUOTED_1="-g -HB_BUILD="$(HB_BUILD)" -HB_VERSION=\\\"$(HB_VERSION)\\\" -DHB_BUILD="$(HB_BUILD)" -DHB_VERSION=\\\"$(HB_VERSION)\\\" -CURRENT_PROJECT_VERSION=\\\"$(HB_VERSION)\\\" " -target libhb -target HandBrake -target HandBrakeCLI ) && \
53       for i in $(LANGUAGES) ; do \
54         ( cd $(<)/Contents/Resources && \
55           cp -r English.lproj $i.lproj && \
56           cp ../../../macosx/i18n/$i.strings \
57             $i.lproj/Localizable.strings ) \
58       done ;
59 }
60 rule OSXPackage 
61 {
62     Depends $(<) : $(>) ;
63 }   
64 actions OSXPackage
65 {                 
66     rm -rf $(<) "HandBrake $(HB_VERSION)" && \
67       mkdir "HandBrake $(HB_VERSION)" && \
68       cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
69       cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
70       cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
71       cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
72       ( echo "[InternetShortcut]" && \
73         echo "URL=http://handbrake.m0k.org/" ) > \
74         "HandBrake $(HB_VERSION)/HandBrake Homepage.url" && \
75       ( echo "[InternetShortcut]" && \
76         echo "URL=http://handbrake.m0k.org/forum/" ) > \
77         "HandBrake $(HB_VERSION)/HandBrake Forums.url" && \
78       ( echo "[InternetShortcut]" && \
79         echo "URL=http://handbrake.m0k.org/contribute.php" ) > \
80         "HandBrake $(HB_VERSION)/Contribute.url" && \
81       cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \
82       zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
83       rm -rf "HandBrake $(HB_VERSION)"
84 }
85
86 rule BeOSPackage 
87 {
88     Depends         $(<) : $(>) ;
89     BuildBeOSPackage $(<) ;
90 }   
91 actions BuildBeOSPackage
92 {                 
93     rm -rf $(<) "HandBrake $(HB_VERSION)" && \
94       mkdir "HandBrake $(HB_VERSION)" && \
95       cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
96       cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
97       cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
98       cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
99       xres -o HandBrake beos/HandBrake.rsrc && \
100       cp HandBrake "HandBrake $(HB_VERSION)" && \
101       zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
102       rm -rf "HandBrake $(HB_VERSION)"
103 }