diff options
author | konablend <[email protected]> | 2009-03-02 03:35:10 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-03-02 03:35:10 +0000 |
commit | 64246f1cf34a761b36de02d6564dfa552f6c9111 (patch) | |
tree | b68058f1707bd586698d2433d28f8609acdbcdd6 | |
parent | 237081eafa3234411e138b0c9a25c701ad0c835d (diff) |
BuildSystem:
- changed HandBrakeCLI to use project.h when showing version in hblog
- changed macosx/Info.h.m4 to supply correct version; eg: MacGUI about-panel
- HandBrakeCLI hblog now displays architecture; eg: Darwin i386
- HandBrake.app about-panel now displays architecture; eg: i386
- updated all versioning to reflect project policies:
a. HB_PROJECT_VERSION now behave as old HB_VERSION
b. HB_PROJECT_BUILD now behaves as old HB_BUILD
c. dropped HB_PROJECT_VERSION_FORMAL as it is no longer referenced
- renamed HOST.proc -> HOST.machine for clarity
- renamed BUILD.proc -> BUILD.machine for clarity
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2192 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/project.h.m4 | 9 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 12 | ||||
-rw-r--r-- | macosx/Info.h.m4 | 5 | ||||
-rw-r--r-- | make/configure.py | 85 | ||||
-rw-r--r-- | make/include/main.defs | 2 | ||||
-rw-r--r-- | make/include/main.rules | 2 | ||||
-rw-r--r-- | test/test.c | 4 |
7 files changed, 73 insertions, 46 deletions
diff --git a/libhb/project.h.m4 b/libhb/project.h.m4 index 0b6af661f..73388fd39 100644 --- a/libhb/project.h.m4 +++ b/libhb/project.h.m4 @@ -18,7 +18,6 @@ dnl <<#>>define HB_PROJECT_VERSION_MINOR __HB_version_minor <<#>>define HB_PROJECT_VERSION_POINT __HB_version_point <<#>>define HB_PROJECT_VERSION "__HB_version" -<<#>>define HB_PROJECT_VERSION_FORMAL "__HB_version_formal" <<#>>define HB_PROJECT_VERSION_HEX 0x<<>>__HB_version_hex<<>>LL <<#>>define HB_PROJECT_BUILD __HB_build <<#>>define HB_PROJECT_REPO_URL "__HB_repo_url" @@ -29,6 +28,14 @@ dnl <<#>>define HB_PROJECT_REPO_WCVERSION "__HB_repo_wcversion" <<#>>define HB_PROJECT_REPO_OFFICIAL __HB_repo_official <<#>>define HB_PROJECT_REPO_TYPE "__HB_repo_type" + +<<#>>define HB_PROJECT_BUILD_SPEC "__BUILD_spec" +<<#>>define HB_PROJECT_BUILD_MACHINE "__BUILD_machine" +<<#>>define HB_PROJECT_BUILD_VENDOR "__BUILD_vendor" +<<#>>define HB_PROJECT_BUILD_SYSTEM "__BUILD_system" +<<#>>define HB_PROJECT_BUILD_SYSTEMC "__BUILD_systemc" +<<#>>define HB_PROJECT_BUILD_RELEASE "__BUILD_release" +<<#>>define HB_PROJECT_BUILD_TITLE "__BUILD_title" <<#>>define HB_PROJECT_BUILD_ARCH "__BUILD_arch" #endif /* HB_PROJECT_PROJECT_H */ diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index dcd6dc774..34862dae3 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -997,7 +997,7 @@ IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; INFOPLIST_FILE = Info.plist; - INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional -undef"; INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( @@ -1124,7 +1124,7 @@ IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; INFOPLIST_FILE = Info.plist; - INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional -undef"; INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( @@ -1251,7 +1251,7 @@ IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; INFOPLIST_FILE = Info.plist; - INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional -undef"; INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( @@ -1378,7 +1378,7 @@ IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; INFOPLIST_FILE = Info.plist; - INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional -undef"; INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( @@ -1431,7 +1431,7 @@ IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; INFOPLIST_FILE = Info.plist; - INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional -undef"; INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( @@ -1483,7 +1483,7 @@ IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; INFOPLIST_FILE = Info.plist; - INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional -undef"; INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( diff --git a/macosx/Info.h.m4 b/macosx/Info.h.m4 index 308e38f6a..39ff7ad64 100644 --- a/macosx/Info.h.m4 +++ b/macosx/Info.h.m4 @@ -7,9 +7,8 @@ include(<<handbrake.m4>>)dnl dnl dnl dnl -<<#>>define HB_PLIST_BUNDLEVERSION svn<<>>__HB_repo_rev +<<#>>define HB_PLIST_BUNDLEVERSION __HB_build <<#>>define HB_PLIST_DISPLAYNAME __HB_name <<#>>define HB_PLIST_GETINFOSTRING __HB_build -<<#>>define HB_PLIST_SHORTVERSIONSTRING __HB_version_formal +<<#>>define HB_PLIST_SHORTVERSIONSTRING __HB_version __BUILD_arch <<#>>define HB_PLIST_SUFEEDURL __HB_url_appcast -<<#>>define HB_PLIST_VERSION __HB_version diff --git a/make/configure.py b/make/configure.py index 421001791..ace634d9f 100644 --- a/make/configure.py +++ b/make/configure.py @@ -119,43 +119,49 @@ if len( project_dir ) == 0: ## class Guess: def __init__( self ): - self.proc = 'unknown' + self.machine = 'unknown' self.vendor = 'unknown' self.system = 'unknown' + self.systemc = 'Unknown' self.release = '0.0.0' self.extra = '' p_system = platform.system().lower() + p_systemc = platform.system() p_release = platform.release().lower() p_processor = platform.processor().lower() p_machine = platform.machine().lower() if re.match( 'cygwin', p_system ): - self.proc = p_machine + self.machine = p_machine self.vendor = 'pc' self.system = 'cygwin' + self.systemc = 'Cygwin' self.release = '' self.extra = '' elif re.match( 'darwin', p_system ): - self.proc = p_machine + self.machine = p_machine self.vendor = 'apple' self.system = p_system + self.systemc = p_systemc self.release = p_release self.extra = '' elif re.match( 'linux', p_system ): - self.proc = p_machine + self.machine = p_machine self.vendor = 'unknown' self.system = p_system + self.systemc = p_systemc self.release = '' self.extra = 'gnu' + self.title = 'Linux %s' % (p_machine) else: errf( 'unrecognized host system: %s', p_system ) def __str__( self ): if len(self.extra): - return '%s-%s-%s%s-%s' % (self.proc,self.vendor,self.system,self.release,self.extra) + return '%s-%s-%s%s-%s' % (self.machine,self.vendor,self.system,self.release,self.extra) else: - return '%s-%s-%s%s' % (self.proc,self.vendor,self.system,self.release) + return '%s-%s-%s%s' % (self.machine,self.vendor,self.system,self.release) def match( self, spec ): return fnmatch.fnmatch( str(self), spec ) @@ -288,7 +294,7 @@ elif guessHost.match( 'i386-*-darwin9.*' ): elif guessHost.match( 'powerpc-*-darwin9.*' ): archMode = OptionMode( 2, 'i386', 'x86_64', 'ppc', 'ppc64' ) else: - archMode = OptionMode( 0, guessHost.proc ) + archMode = OptionMode( 0, guessHost.machine ) if guessHost.match( '*-*-darwin*' ): d_prefix = '/Applications' @@ -300,7 +306,7 @@ parser = OptionParser( 'Usage: %prog' ) group = OptionGroup( parser, 'Installation Options' ) group.add_option( '', '--prefix', default=d_prefix, action='store', - help='install destination for final products (%s)' % (d_prefix) ) + help='specify destination for final products (%s)' % (d_prefix) ) parser.add_option_group( group ) group = OptionGroup( parser, 'Feature Options' ) @@ -371,15 +377,15 @@ archMode.setFromOption( 'architecture', options.arch ) ## update guessBuild as per architecture mode if guessHost.match( '*-*-darwin*' ): if archMode.mode == 'i386': - guessBuild.proc = 'i386' + guessBuild.machine = 'i386' elif archMode.mode == 'x86_64': - guessBuild.proc = 'x86_64' + guessBuild.machine = 'x86_64' elif archMode.mode == 'ppc': - guessBuild.proc = 'powerpc' + guessBuild.machine = 'powerpc' elif archMode.mode == 'ppc64': - guessBuild.proc = 'powerpc64' + guessBuild.machine = 'powerpc64' else: - guessBuild.proc = archMode.mode + guessBuild.machine = archMode.mode guessBuild.cross = 0 if archMode.default == archMode.mode else 1 # locate tools @@ -471,34 +477,46 @@ class Repository: ## class Project: def __init__( self ): - self.name = 'HandBrake' - self.name_lower = self.name.lower() - self.name_upper = self.name.upper() - self.acro_lower = 'hb' - self.acro_upper = 'HB' - self.url_website = 'http://handbrake.fr' - self.url_community = 'http://forum.handbrake.fr' - self.url_irc = 'irc://irc.freenode.net/handbrake' + if repo.type == 'unofficial': + self.name = 'NoNameBrand' + self.acro_lower = 'nnb' + self.acro_upper = 'NNB' + self.url_website = 'http://nonamebrand.com' + self.url_community = 'http://forum.nonamebrand.com' + self.url_irc = 'irc://irc.freenode.net/nonamebrand' + else: + self.name = 'HandBrake' + self.acro_lower = 'hb' + self.acro_upper = 'HB' + self.url_website = 'http://handbrake.fr' + self.url_community = 'http://forum.handbrake.fr' + self.url_irc = 'irc://irc.freenode.net/handbrake' + + self.name_lower = self.name.lower() + self.name_upper = self.name.upper() self.vmajor = 0 self.vminor = 9 - self.vpoint = 3 + self.vpoint = 4 - self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint) appcastfmt = 'http://handbrake.fr/appcast%s.xml' if repo.type == 'release': - self.version_formal = '%s Release' % (self.version) + self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint) self.url_appcast = appcastfmt % ('') + self.build = time.strftime('%Y%m%d') + '00' + self.title = '%s %s (%s)' % (self.name,self.version,self.build) elif repo.type == 'developer': - self.version_formal = '%s Developer ' % (self.version) + self.version = 'svn%d' % (repo.rev) self.url_appcast = appcastfmt % ('_unstable') + self.build = time.strftime('%Y%m%d') + '01' + self.title = '%s svn%d (%s)' % (self.name,repo.rev,self.build) else: - self.version_formal = '%s Unnofficial ' % (self.version) + self.version = 'svn%d' % (repo.rev) + self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint) self.url_appcast = appcastfmt % ('_unofficial') - - self.title = '%s %s' % (self.name,self.version) - self.build = time.strftime('%Y%m%d') + '01' + self.build = time.strftime('%Y%m%d') + '99' + self.title = 'Unofficial svn%d (%s)' % (repo.rev,self.build) ############################################################################### @@ -599,7 +617,6 @@ config.add( 'HB.version.major', project.vmajor ) config.add( 'HB.version.minor', project.vminor ) config.add( 'HB.version.point', project.vpoint ) config.add( 'HB.version', project.version ) -config.add( 'HB.version.formal', project.version_formal ) config.add( 'HB.version.hex', '%04x%02x%02x%02x%06x' % (project.vmajor,project.vminor,project.vpoint,0,repo.rev) ) config.add( 'HB.build', project.build ) @@ -616,18 +633,22 @@ config.add( 'HB.repo.type', repo.type ) config.addBlank() config.add( 'HOST.spec', guessHost ) -config.add( 'HOST.proc', guessHost.proc ) +config.add( 'HOST.machine', guessHost.machine ) config.add( 'HOST.vendor', guessHost.vendor ) config.add( 'HOST.system', guessHost.system ) +config.add( 'HOST.systemc', guessHost.systemc ) config.add( 'HOST.release', guessHost.release ) +config.add( 'HOST.title', '%s %s' % (guessHost.systemc,archMode.default) ) config.add( 'HOST.extra', guessHost.extra ) config.addBlank() config.add( 'BUILD.spec', guessBuild ) -config.add( 'BUILD.proc', guessBuild.proc ) +config.add( 'BUILD.machine', guessBuild.machine ) config.add( 'BUILD.vendor', guessBuild.vendor ) config.add( 'BUILD.system', guessBuild.system ) +config.add( 'BUILD.systemc', guessBuild.systemc ) config.add( 'BUILD.release', guessBuild.release ) +config.add( 'BUILD.title', '%s %s' % (guessBuild.systemc,archMode.mode) ) config.add( 'BUILD.extra', guessBuild.extra ) config.add( 'BUILD.cross', guessBuild.cross ) config.add( 'BUILD.date', time.strftime('%c') ) diff --git a/make/include/main.defs b/make/include/main.defs index c40e2b62a..45fb178ae 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -72,4 +72,4 @@ MODULES += doc include $(MODULES:%=$(PROJECT/)%/module.defs) include $(PROJECT/)make/variant/$(HOST.system).defs --include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.proc).defs +-include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.machine).defs diff --git a/make/include/main.rules b/make/include/main.rules index 881c21486..b389022f3 100644 --- a/make/include/main.rules +++ b/make/include/main.rules @@ -19,7 +19,7 @@ mrproper: xclean include $(MODULES:%=$(PROJECT/)%/module.rules) -include $(PROJECT/)make/variant/$(HOST.system).rules --include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.proc).rules +-include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.machine).rules ############################################################################### diff --git a/test/test.c b/test/test.c index 0fd39f527..e2ab620b4 100644 --- a/test/test.c +++ b/test/test.c @@ -158,8 +158,8 @@ int main( int argc, char ** argv ) h = hb_init( debug, update ); /* Show version */ - fprintf( stderr, "HandBrake %s (%d) - http://handbrake.fr/\n", - hb_get_version( h ), hb_get_build( h ) ); + fprintf( stderr, "%s - %s - %s\n", + HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE ); /* Check for update */ if( update ) |