From 40a023dfb624e21f60643010b614cb3a2ebb78d8 Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 25 Aug 2014 21:25:01 +0200 Subject: [PATCH 1/6] remove prefix for install command. Set jar to share/java path. --- SConstruct | 2 -- app/cpp/SConscript | 7 +++---- app/java/SConscript | 1 - src/SConscript | 31 +++++++++++++++---------------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/SConstruct b/SConstruct index e113e5db..efd4e8e4 100644 --- a/SConstruct +++ b/SConstruct @@ -18,7 +18,6 @@ config.read( [ commonInclude = [] commonLibDir = [] -installPrefix = "/usr/local" splitChar = ";" @@ -190,7 +189,6 @@ if mymode == "debug": Export( "env" ) Export( "envJava" ) Export( "envPy" ) -Export( "installPrefix" ) Export( "resampleLibraryName" ) Export( "mymode" ) diff --git a/app/cpp/SConscript b/app/cpp/SConscript index 08c5b6b7..b9cd67b7 100644 --- a/app/cpp/SConscript +++ b/app/cpp/SConscript @@ -4,7 +4,6 @@ import platform Import( 'AvTranscoder' ) Import( 'sAvTranscoder' ) #Import( 'AvTranscoder_jar' ) -Import( 'installPrefix' ) Import( "resampleLibraryName" ) env = Environment().Clone() @@ -116,6 +115,6 @@ if platform.system() != 'Windows': env.Depends( avmeta, sAvTranscoder ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), avmeta ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), avprocessor ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), avtransform ) ) +env.Alias( "install", env.Install("bin", avmeta ) ) +env.Alias( "install", env.Install("bin", avprocessor ) ) +env.Alias( "install", env.Install("bin", avtransform ) ) diff --git a/app/java/SConscript b/app/java/SConscript index 8482f074..5e091319 100644 --- a/app/java/SConscript +++ b/app/java/SConscript @@ -6,7 +6,6 @@ Import( 'envJava' ) Import( 'mymode' ) Import( 'jAvTranscoder' ) Import( 'jAvTranscoderClass' ) -Import( 'installPrefix' ) if jAvTranscoderClass: envJava.Append( diff --git a/src/SConscript b/src/SConscript index a081959d..f31b3daf 100644 --- a/src/SConscript +++ b/src/SConscript @@ -6,7 +6,6 @@ import git Import( "env" ) Import( "envJava" ) Import( "envPy" ) -Import( "installPrefix" ) Import( "resampleLibraryName" ) # Get version from last tag of git repository @@ -104,7 +103,7 @@ else: source = javaAvTranscoder_class ) env.Depends( javaAvTranscoder_jar, javaAvTranscoder_class ) - env.Alias( "install", env.Install( os.path.join( installPrefix, "jar" ), javaAvTranscoder_jar ) ) + env.Alias( "install", env.Install( os.path.join("share", "java"), javaAvTranscoder_jar ) ) Export( { 'sAvTranscoder' : staticAvTranscoder } ) Export( { 'AvTranscoder' : sharedAvTranscoder } ) @@ -112,18 +111,18 @@ Export( { 'jAvTranscoder' : javaAvTranscoder } ) Export( { 'pyAvTranscoder' : pythonAvTranscoder } ) Export( { 'jAvTranscoderClass' : javaAvTranscoder_class } ) -env.Alias( "install", env.InstallVersionedLib( os.path.join( installPrefix, "lib" ), sharedAvTranscoder) ) -env.Alias( "install", env.Install( os.path.join( installPrefix, "lib" ), staticAvTranscoder ) ) -env.Alias( "install", env.InstallVersionedLib( os.path.join( installPrefix, "lib" ), javaAvTranscoder ) ) -env.Alias( "install", env.InstallVersionedLib( os.path.join( installPrefix, "lib" ), pythonAvTranscoder ) ) +env.Alias( "install", env.InstallVersionedLib( "lib", sharedAvTranscoder) ) +env.Alias( "install", env.Install( "lib", staticAvTranscoder ) ) +env.Alias( "install", env.InstallVersionedLib( "lib", javaAvTranscoder ) ) +env.Alias( "install", env.InstallVersionedLib( "lib", pythonAvTranscoder ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder" ), Glob( 'AvTranscoder/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/CodedStream" ), Glob( 'AvTranscoder/CodedStream/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/CodedStructures" ), Glob( 'AvTranscoder/CodedStructures/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/EssenceStream" ), Glob( 'AvTranscoder/EssenceStream/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/EssenceStructures" ), Glob( 'AvTranscoder/EssenceStructures/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/EssenceTransform" ), Glob( 'AvTranscoder/EssenceTransform/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/File" ), Glob( 'AvTranscoder/File/*.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/Metadatas" ), Glob( 'AvTranscoder/Metadatas/MediaMetadatasStructures.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/Metadatas" ), Glob( 'AvTranscoder/Metadatas/Print.hpp' ) ) ) -env.Alias( "install", env.Install(os.path.join( installPrefix, "include/AvTranscoder/Transcoder" ), Glob( 'AvTranscoder/Transcoder/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder", Glob( 'AvTranscoder/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/CodedStream", Glob( 'AvTranscoder/CodedStream/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/CodedStructures", Glob( 'AvTranscoder/CodedStructures/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/EssenceStream", Glob( 'AvTranscoder/EssenceStream/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/EssenceStructures", Glob( 'AvTranscoder/EssenceStructures/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/EssenceTransform", Glob( 'AvTranscoder/EssenceTransform/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/File", Glob( 'AvTranscoder/File/*.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/Metadatas", Glob( 'AvTranscoder/Metadatas/MediaMetadatasStructures.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/Metadatas", Glob( 'AvTranscoder/Metadatas/Print.hpp' ) ) ) +env.Alias( "install", env.Install("include/AvTranscoder/Transcoder", Glob( 'AvTranscoder/Transcoder/*.hpp' ) ) ) From 0a1cfb5b29a40fe2c1f623193a390834cb138cf7 Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 25 Aug 2014 21:50:51 +0200 Subject: [PATCH 2/6] deploy python module fix #61 --- src/SConscript | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SConscript b/src/SConscript index f31b3daf..4a2df31f 100644 --- a/src/SConscript +++ b/src/SConscript @@ -88,6 +88,11 @@ pythonAvTranscoder = envPy.SharedLibrary( SHLIBVERSION = avTranscoderVersion, ) +initFile = envPy.Command( os.path.join( 'AvTranscoder/__init__.py' ), '', Touch('$TARGET') ) +envPy.Requires( pythonAvTranscoder, initFile ) + +Touch('AvTranscoder/__init__.py') + javaAvTranscoder_class = env.Java( target = 'jAvTranscoderClass', source = Glob( envJava['JARCHDIR'] ) @@ -126,3 +131,5 @@ env.Alias( "install", env.Install("include/AvTranscoder/File", Glob( 'AvTranscod env.Alias( "install", env.Install("include/AvTranscoder/Metadatas", Glob( 'AvTranscoder/Metadatas/MediaMetadatasStructures.hpp' ) ) ) env.Alias( "install", env.Install("include/AvTranscoder/Metadatas", Glob( 'AvTranscoder/Metadatas/Print.hpp' ) ) ) env.Alias( "install", env.Install("include/AvTranscoder/Transcoder", Glob( 'AvTranscoder/Transcoder/*.hpp' ) ) ) +env.Alias( "install", env.Install(os.path.join("lib/python2.7/site-packages/AvTranscoder"), initFile ) ) +env.Alias( "install", env.Install(os.path.join("lib/python2.7/site-packages/AvTranscoder"), Glob('AvTranscoder/AvTranscoder.py') ) ) From ac229ed88ffc01bf8c42b07faf13e952bb7c165f Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 26 Aug 2014 00:24:16 +0200 Subject: [PATCH 3/6] edit man page --- app/cpp/avInfo/avinfo.man | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cpp/avInfo/avinfo.man b/app/cpp/avInfo/avinfo.man index 4fd23d5a..d2ccc000 100644 --- a/app/cpp/avInfo/avinfo.man +++ b/app/cpp/avInfo/avinfo.man @@ -1,4 +1,4 @@ -.\" Manpage for avmeta. +.\" Manpage for avinfo. .\" Contact arnaud.marcantoine@gmail.com to correct errors or typos. .TH man 1 "21 May 2014" "1.0" "avinfo man page" .SH NOM From c89f5bc363abba883fa21845db2394b55f1e8874 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 26 Aug 2014 00:24:28 +0200 Subject: [PATCH 4/6] add missing man pages to deploy more apps --- app/cpp/avplay/avplayer.man | 11 +++++++++++ app/cpp/presetChecker/avprofiles.man | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 app/cpp/avplay/avplayer.man create mode 100644 app/cpp/presetChecker/avprofiles.man diff --git a/app/cpp/avplay/avplayer.man b/app/cpp/avplay/avplayer.man new file mode 100644 index 00000000..9eb945fa --- /dev/null +++ b/app/cpp/avplay/avplayer.man @@ -0,0 +1,11 @@ +.\" Manpage for avplayer. +.\" Contact arnaud.marcantoine@gmail.com to correct errors or typos. +.TH man 1 "21 May 2014" "1.0" "avinfo man page" +.SH NOM +avplayer - play media file +.SH SYNOPSIS +avplayer inputfile.ext +.SH AUTHOR +Written by Marc-Antoine ARNAUD (arnaud.marcantoine@gmail.com) +.SH COPYRIGHT +Licence GPL-v3.0+ diff --git a/app/cpp/presetChecker/avprofiles.man b/app/cpp/presetChecker/avprofiles.man new file mode 100644 index 00000000..009ee6f1 --- /dev/null +++ b/app/cpp/presetChecker/avprofiles.man @@ -0,0 +1,11 @@ +.\" Manpage for avprofiles. +.\" Contact arnaud.marcantoine@gmail.com to correct errors or typos. +.TH man 1 "21 May 2014" "1.0" "avinfo man page" +.SH NOM +avprofiles - check options for each profile detected +.SH SYNOPSIS +avprofiles +.SH AUTHOR +Written by Marc-Antoine ARNAUD (arnaud.marcantoine@gmail.com) +.SH COPYRIGHT +Licence GPL-v3.0+ From fdc79e686f4e58648121d355d20976c0c25c1267 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 26 Aug 2014 00:25:49 +0200 Subject: [PATCH 5/6] get git version into SConstrcut and fix some deployements - set versionned binaries (missing link during install) --- SConstruct | 20 +++++++++++++++++-- app/cpp/SConscript | 50 ++++++++++++++++++++++++++++++++-------------- src/SConscript | 13 +----------- 3 files changed, 54 insertions(+), 29 deletions(-) diff --git a/SConstruct b/SConstruct index efd4e8e4..f8cb6cf6 100644 --- a/SConstruct +++ b/SConstruct @@ -7,8 +7,23 @@ import ConfigParser mymode = ARGUMENTS.get('mode', 'release') if not (mymode in ['debug', 'release']): - print "Error: expected 'debug' or 'release', found: " + mymode - Exit(1) + raise Exception("Can't select build mode ['debug', 'release']") + +avTranscoderVersion = ARGUMENTS.get('version', None) + +if not avTranscoderVersion: + import git + # Get version from last tag of git repository + repo = git.Repo( "." ) + tags = repo.tags + if tags: + lastTag = tags[-1] + avTranscoderVersion = lastTag.name[1:] + else: + raise Exception( "Can't get last version of AvTranscoder." ) + +if not avTranscoderVersion: + raise Exception( "Can't get last version of AvTranscoder." ) config = ConfigParser.RawConfigParser() @@ -191,6 +206,7 @@ Export( "envJava" ) Export( "envPy" ) Export( "resampleLibraryName" ) Export( "mymode" ) +Export( "avTranscoderVersion" ) VariantDir( 'build/'+mymode+'/src', 'src', duplicate = 0 ) VariantDir( 'build/'+mymode+'/app', 'app', duplicate = 0 ) diff --git a/app/cpp/SConscript b/app/cpp/SConscript index b9cd67b7..cba0080a 100644 --- a/app/cpp/SConscript +++ b/app/cpp/SConscript @@ -3,11 +3,8 @@ import platform Import( 'AvTranscoder' ) Import( 'sAvTranscoder' ) -#Import( 'AvTranscoder_jar' ) -Import( "resampleLibraryName" ) - -env = Environment().Clone() - +Import( 'resampleLibraryName' ) +Import( 'avTranscoderVersion' ) Import( 'env' ) avinfo = env.Program( @@ -24,7 +21,7 @@ avinfo = env.Program( ) avmeta = env.Program( - 'avmeta', + 'avmeta-' + avTranscoderVersion, Glob( 'avMeta/*.cpp' ), LIBS = [ sAvTranscoder, @@ -37,7 +34,7 @@ avmeta = env.Program( ) avtransform = env.Program( - 'av++', + 'av++-' + avTranscoderVersion, Glob( 'avTranscoder/*.cpp' ), LIBS = [ sAvTranscoder, @@ -50,7 +47,7 @@ avtransform = env.Program( ) avprocessor = env.Program( - 'avprocessor', + 'avprocessor-' + avTranscoderVersion, Glob( 'genericProcessor/*.cpp' ), LIBS = [ sAvTranscoder, @@ -67,7 +64,7 @@ avprocessor = env.Program( if platform.system() != 'Windows': avplayer = env.Program( - 'avplayer', + 'avplayer-' + avTranscoderVersion, Glob( 'avplay/*.cpp' ), LIBS = [ sAvTranscoder, @@ -82,7 +79,7 @@ if platform.system() != 'Windows': ) avprofiles = env.Program( - 'avprofiles', + 'avprofiles-' + avTranscoderVersion, Glob( 'presetChecker/*.cpp' ), LIBS = [ sAvTranscoder, @@ -97,8 +94,8 @@ if platform.system() != 'Windows': ], ) - avprofiles = env.Program( - 'avoptions', + avoptions = env.Program( + 'avoptions-' + avTranscoderVersion, Glob( 'optionChecker/*.cpp' ), LIBS = [ sAvTranscoder, @@ -115,6 +112,29 @@ if platform.system() != 'Windows': env.Depends( avmeta, sAvTranscoder ) -env.Alias( "install", env.Install("bin", avmeta ) ) -env.Alias( "install", env.Install("bin", avprocessor ) ) -env.Alias( "install", env.Install("bin", avtransform ) ) +env.Alias( "install", env.Install("bin", avinfo) ) +env.Alias( "install", env.Install("bin", avmeta) ) +env.Alias( "install", env.Install("bin", avprocessor) ) +env.Alias( "install", env.Install("share/man/man1", File("avInfo/avinfo.man") ) ) +env.Alias( "install", env.Install("share/man/man1", File("avMeta/avmeta.man") ) ) +env.Alias( "install", env.Install("share/man/man1", File("genericProcessor/avprocessor.man") ) ) +if platform.system() != 'Windows': + env.Alias( "install", env.Install("bin", avplayer) ) + env.Alias( "install", env.Install("bin", avprofiles) ) + env.Alias( "install", env.Install("share/man/man1", File("avplay/avplayer.man") ) ) + env.Alias( "install", env.Install("share/man/man1", File("presetChecker/avprofiles.man") ) ) + + def SymLink(target, source, env): + os.symlink(os.path.basename(str(source[0])), str(target[0])) + + avinfolink = env.Command( 'avinfo', avinfo, SymLink ) + avmetalink = env.Command( 'avmeta', avmeta, SymLink ) + avprocessorlink = env.Command( 'avprocessor', avprocessor, SymLink ) + avplayerlink = env.Command( 'avplayer', avplayer, SymLink ) + avprofileslink = env.Command( 'avprofiles', avprofiles, SymLink ) + + env.Alias( "install", env.Install("bin", avinfolink) ) + env.Alias( "install", env.Install("bin", avmetalink) ) + env.Alias( "install", env.Install("bin", avprocessorlink) ) + env.Alias( "install", env.Install("bin", avplayerlink) ) + env.Alias( "install", env.Install("bin", avprofileslink) ) diff --git a/src/SConscript b/src/SConscript index 4a2df31f..39ea6b13 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,21 +1,12 @@ import glob, re import os import sys -import git Import( "env" ) Import( "envJava" ) Import( "envPy" ) Import( "resampleLibraryName" ) - -# Get version from last tag of git repository -repo = git.Repo( "." ) -tags = repo.tags -if tags: - lastTag = tags[-1] - avTranscoderVersion = lastTag.name[1:] -else: - raise Exception( "Can't get last version of AvTranscoder." ) +Import( "avTranscoderVersion" ) env.Append( SHLIBVERSION = avTranscoderVersion @@ -91,8 +82,6 @@ pythonAvTranscoder = envPy.SharedLibrary( initFile = envPy.Command( os.path.join( 'AvTranscoder/__init__.py' ), '', Touch('$TARGET') ) envPy.Requires( pythonAvTranscoder, initFile ) -Touch('AvTranscoder/__init__.py') - javaAvTranscoder_class = env.Java( target = 'jAvTranscoderClass', source = Glob( envJava['JARCHDIR'] ) From 178d66d25d7a8dc989430881f0a9473c6fe7c0e4 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Arnaud Date: Wed, 27 Aug 2014 10:15:39 +0200 Subject: [PATCH 6/6] add avinfo version - will fix build --- app/cpp/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cpp/SConscript b/app/cpp/SConscript index cba0080a..4d0efbe8 100644 --- a/app/cpp/SConscript +++ b/app/cpp/SConscript @@ -8,7 +8,7 @@ Import( 'avTranscoderVersion' ) Import( 'env' ) avinfo = env.Program( - 'avinfo', + 'avinfo-' + avTranscoderVersion, Glob( 'avInfo/*.cpp' ), LIBS = [ sAvTranscoder,