diff options
author | jbrjake <[email protected]> | 2008-03-19 18:34:36 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2008-03-19 18:34:36 +0000 |
commit | 60980a0eef6853d3a34e1727c5b3570aff1be548 (patch) | |
tree | fca453b7c19ad83fb8bff745b09b71fcf837c105 | |
parent | f63833727ecf1725bb36b5d6d7dfc1353259a0e8 (diff) |
- Method for generating snapshot builds marked with the svn revision by using ./configure --snapshot; ./jam
- Targets for generating snapshot Mac universal binaries by using make snapshot and packaging Mac snapshot releases
- Sets the current date for HB_BUILD in jam
- Sets the Mac .plist version and build based on the jam/make config
- Bumps the version number to 0.9.3
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1346 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | Jamrules | 30 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | Makefile.config | 23 | ||||
-rwxr-xr-x | configure | 18 |
4 files changed, 70 insertions, 12 deletions
@@ -11,13 +11,30 @@ if ! $(DEFINES) Exit "Please run ./configure first." ; } -HB_VERSION = 0.9.2 ; -HB_BUILD = 2008021900 ; +# This line needs to be manually bumped for each release. +HB_VERSION = 0.9.3 ; + +# If the user configured with the --snapshot argument, +# generate version and build numbers that include +# the svn revision and are marked as unstable. +if $(SNAPSHOT) = 1 +{ +HB_VERSION = "$(HB_VERSION)svn$(SVN_REV)" ; +HB_BUILD = "$(BUILD_DATE)01" ; +} +else +{ +HB_BUILD = "$(BUILD_DATE)00" ; +} + DEFINES += HB_VERSION=\\\"$(HB_VERSION)\\\" HB_BUILD=$(HB_BUILD) ; LANGUAGES = fr de it pl ru nl es pt ja ; RM = rm -rf ; -# Build HandBrake.app using Xcode +# Build HandBrake.app using Xcode -- +# Getting the right version and build numbers +# requires editing the .plist and specifying +# extra CFLAGs. rule OSXApp { Depends exe : $(<) ; @@ -27,7 +44,12 @@ rule OSXApp actions OSXApp { $(RM) $(<) macosx/build/HandBrake.app && \ - ( cd macosx && xcodebuild -target libhb -target HandBrake -target HandBrakeCLI ) && \ + ( cd macosx && \ + defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleGetInfoString '"$(HB_VERSION)"' &&\ + defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleShortVersionString '"$(HB_VERSION)"' &&\ + defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleVersion '"$(HB_BUILD)"' &&\ + plutil -convert xml1 "$(FULL_PATH)"/macosx/HandBrake.plist &&\ + 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 ) && \ for i in $(LANGUAGES) ; do \ ( cd $(<)/Contents/Resources && \ cp -r English.lproj $i.lproj && \ @@ -11,6 +11,8 @@ ifeq ($(SYSTEM),Darwin) all: clean app
+snapshot: clean snapshot-app
+
all-chunky: clean app-chunky
test: clean cli
@@ -20,6 +22,9 @@ dev: clean internal app:
(./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration UB OTHER_CFLAGS_QUOTED_1="-DHB_VERSION=\\\"$(HB_VERSION)\\\" -DHB_BUILD=$(HB_BUILD) " build | sed '/^$$/d' )
+snapshot-app:
+ (./DownloadMacOsXContribBinaries.sh ; cd macosx ; defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleGetInfoString '$(SNAP_HB_VERSION)' ; defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleShortVersionString '$(SNAP_HB_VERSION)' ; defaults write "$(FULL_PATH)"/macosx/HandBrake CFBundleVersion '"$(SNAP_HB_BUILD)"' ; plutil -convert xml1 "$(FULL_PATH)"/macosx/HandBrake.plist ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration UB OTHER_CFLAGS_QUOTED_1="-g -HB_BUILD="$(SNAP_HB_BUILD)" -HB_VERSION=\\\"$(SNAP_HB_VERSION)\\\" -DHB_BUILD="$(SNAP_HB_BUILD)" -DHB_VERSION=\\\"$(SNAP_HB_VERSION)\\\" -CURRENT_PROJECT_VERSION=\\\"$(SNAP_HB_VERSION)\\\" " build | sed '/^$$/d' )
+
app-chunky:
(./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -alltargets -configuration UB OTHER_CFLAGS_QUOTED_1="-DHB_VERSION=\\\"$(HB_VERSION)\\\" -DHB_BUILD=$(HB_BUILD) " build | sed '/^$$/d' )
@@ -41,6 +46,12 @@ gui-release: cli-release:
(rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake -format UDZO HandBrake-$(HB_VERSION)-MacOSX.3_CLI_UB.dmg ; rm -rf HandBrake )
+gui-snapshot-release:
+ (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake ; hdiutil create -srcfolder HandBrake -format UDBZ HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_GUI_UB.dmg ; rm -rf HandBrake )
+
+cli-snapshot-release:
+ (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake -format UDZO HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_CLI_UB.dmg ; rm -rf HandBrake )
+
endif
#
diff --git a/Makefile.config b/Makefile.config index fa337658e..a49dbe340 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,15 +1,22 @@ -SNAP = $(shell echo $$SNAPSHOT) -ifeq ($(SNAP), 1) -HB_BUILD = $(shell date "+%Y%m%d")00 -HB_VERSION = 0.9.2s$(shell date "+%d") -else +# This line needs to be manually bumped for each release. +HB_VERSION = 0.9.3 + +# Use the current date for the build number HB_BUILD = $(shell date "+%Y%m%d")00 -HB_VERSION = "0.9.2" -endif + +# Do the same for snapshots but mark as unstable +SNAP_HB_BUILD = $(shell date "+%Y%m%d")01 + +# For snapshots add the svn revision number to the HB_VERSION +SNAP_HB_VERSION = $(HB_VERSION)svn$(shell svnversion) + +# The working path is needed for editing the MacGui .plist +FULL_PATH = $(shell pwd) +BUILD_DATE = $(shell date "+%Y%m%d") + HB_DEFPPC = $(shell uname -a | grep ppc > /dev/null ; echo RES$$?) ifeq ($(HB_DEFPPC), RES0) HB_DEFPPC = "-DWORDS_BIGENDIAN" else HB_DEFPPC = endif - @@ -97,6 +97,20 @@ else MAKE=make fi +# If the user included the --snapshot argument, mark it down. +if [[ $1 = "--snapshot" ]] +then + SNAPSHOT=1 +else + SNAPSHOT=0 +fi + +# Generating the HB_BUILD and HB_VERSION for snapshots requires +# the build date, working path, and current SVN revision. +BUILD_DATE=$(date +%Y%m%d) +FULL_PATH=$(pwd) +SVN_REV=$(svnversion) + # Generate config.jam rm -f config.jam cat << EOF > config.jam @@ -109,6 +123,10 @@ OPTIM = $OPTIM ; DEFINES = $DEFINES ; LINKLIBS = $LINKLIBS ; MAKE = $MAKE ; +SNAPSHOT = $SNAPSHOT ; +BUILD_DATE = $BUILD_DATE ; +FULL_PATH = $FULL_PATH ; +SVN_REV = $SVN_REV ; EOF echo |