Commit 509ec404 authored by Edward Hervey's avatar Edward Hervey

Initial revision


git-svn-id: svn+ssh://svn.gnome.org/svn/pitivi/trunk@2 d3729300-e425-0410-8a4c-d956edccc248
parent ab20375b
Guillaume Casanova <casano_g@epita.fr>
Mathieu Champely <champe_m@epita.fr>
Edward Hervey <hervey_e@epita.fr>
Raphael Pralat <pralat_r@epita.fr>
This diff is collapsed.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
##
## configure.in
##
## Made by guillaume casanova
## Email <casano_g@epita.fr>
##
##
# AUTOMAKE_OPTIONS = foreign
SUBDIRS = src
# will come later : pixmaps libs docs
EXTRA_DIST = \
NEWS \
NORME \
README \
AUTHORS
AUTOMAKE_OPTIONS = dist-bzip2
release: dist
make @PACKAGE@-@VERSION@.tar.gz.md5
make @PACKAGE@-@VERSION@.tar.bz2.md5
# generate md5 sum files
%.md5: %
md5sum $< > $@
rpm: dist
rpm -ta $(distdir).tar.gz
No time to add NEWS. We must finish our minimum interface for the first 6 march.
launch gst-inspect gui
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstRegistry.html
Quelques recommandations avant de se lancer dans le code sans
réfléchir :
- respecter la norme de programmation comme suit :
- un objet ou widget gtk a un fichier et a un header :
example : je fais une menubar donc
fichier source C :
- gpi_menubar.c
fichier header .h
- gpi_menubar.h
Le nommage de fichier respecte la contrainte suivante : gpi_"nom de
la widget".extension
Pkoi gpi : pour g (gstreamer, gtk, glib, gnome) et pi pour pitivi.
Le respect de ce système de nommage permet de différencier nos
fonctions
de gstreamer et autres.
- Dans le fichier source C :
Contraintes à respecter :
- entête à epita regarder les sources gip_gui (c'est assez
explicite).
- ne pas oublier les defines conditionnelles c++
dans lequel on insère du code source.
ex : ouverture -> #ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
Code Source ......
#ifdef __cplusplus
}
#endif /* __cplusplus */
- nommage des fonctions :
gpi_"nom_de_la_fonction" ()
Le nom de la fonction doit etre en anglais et le plus
explicite possible.
example : je fais une menubar, créer une menubar :
GtkWidget * gpi_menubar_new ();
- Dans les fichier headers .h
Contraintes à respecter :
s'inspirer du code sources de gtkDial, et des sources
sur le cvs.
recommendations :
- Décalaration :
#ifndef __GPI_MENBAR_H__
# define __GPI_MENBAR_H__
Déclaration des types , defines
#endif /* __GPI_MENBAR_H__ */
- NE PAS OUBLIER d'implémenter dans le .h les defines de CAST
des
WIDGETS
examples : #define GPI_MENUBAR_TYPE
gpi_menubar_get_type()
#define ....
#define ....
Les structures et les types
Deux choses importantes en ce qui concnerne
les types et les strcutures :
décalaration d'une strcuture :
struct _GPIMenubar
{
GtkWidget *widget;
....
};
typedef struct
_GpiMenubar GpiMenubar;
Header des fonctions .... .
le gobject est une simulation de l'objet donc
les méthodes et les propriétés sont dissociées :
Ainsi il faudra déclarer une structure ou vous
aurez à stocker
vos objets style par example :
partie déclaration des objets /
propriétés.
struct _GpiMenubar
{
GtkContainer parent;
GtkWidget *window;
GtkUIManager ui_manager;
GtkWidget *menu;
};
partie déclaration des méthodes.
Cette partie ne contient que des pointers sur fonctions
à part le parentClass
struct _GpiMenuBarClass
{
GtkContainerClass parent_class;
void (*show)();
.....
}
Ainsi de suite.
Point important la dérivation et l'heritage.
Pour l'instant la dérivation va plutot se faire sur la widget
GtkContainer.
Ce qui veut en gros dire qu'a chaque fois que vous créez une
widget vous
devez mettre dans la première ligne de la structure de la
propriété l'objet hérité.
et dans la classe également.
example :
struct _GpiMenubar
{
----->GtkContainer parent;
...
}
struct _GpiMenubar
{
----->GtkContainerClass parent;
...
}
Pitivi is a opensource nonlinear multimedia editor for GStreamer.
This Simple first GUI demonstrates :
- a simple minimum interface
- Playing samples of multimedia sources
- Managing MDI
#!/bin/sh
# ************************************************************
# Autotools For Pitivi-GUI
#
# Made By Casaxno <casano_g@epita.fr>
# See also : gst-autogen.sh, configure.ac, src/Makefile.am
#
# ============Modifications===================================
# Author Date Version Description
# ------------------------------------------------------------
# GC 27/02/2004 0.0.1 Including common files
# like gst-autogen.sh
# EH 26/04/2004 0.0.1 Updated
# *************************************************************
DIE=0
package=pitivi
srcfile=src/main.c
##################################
# Checking Host Operating System #
##################################
if [ $OSTYPE != linux-gnu ]
then
echo "OS Only Accepted : linux-gnu"
exit
else
###################################
# Setting Environnement Variables #
###################################
# if test -z $AUTOMAKE; then
# export AUTOMAKE=automake
# export ACLOCAL=aclocal
# if test -z $AUTOCONF; then export AUTOCONF=autoconf; fi
# else
# echo "Automake not Found : Please Install at least automake-1.7"
# exit
# fi
# CHECK PRESENCE OF GST AUTOTOOLS COMMON FUNCS
if test ! -f common/gst-autogen.sh;
then
echo "There is something wrong with your source tree."
echo "You are missing common/gst-autogen.sh"
exit 1
fi
. common/gst-autogen.sh
###################################
# Launching Autotools #
###################################
# This shouldn't be done, you never know where that Makefile comes from...
# if [ -f Makefile ]
# then
# make distclean ;
# fi
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-debug --enable-DEBUG'
autogen_options $@
### AUTOTOOLS CHECKING ###
echo -n "+ check for build tools"
if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
version_check "autoconf" \
"$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
version_check "automake" \
"$AUTOMAKE automake \
automake-1.7 automake-1.6 automake-1.5" \
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
version_check "gettext" "" \
"ftp://alpha.gnu.org/gnu/" 0 10 35 || DIE=1
version_check "intltoolize" "" \
"ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool" 0 1 5 || DIE=1
version_check "libtool" "" \
"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
version_check "pkg-config" "" \
"http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
die_check $DIE
### CHECKING PART ###
toplevel_check $srcfile
autoconf_2_52d_check || DIE=1
aclocal_check || DIE=1
autoheader_check || DIE=1
### RUNNING TOOLS ###
tool_run "libtoolize --copy --force"
tool_run "$aclocal -I common/m4/"
tool_run "$autoheader"
tool_run "$autoconf"
tool_run "$automake -ac"
### CONFIGURE PART ###
echo "+ running configure ... "
test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
echo " configure failed"
exit 1
}
### END PART COMPILATION ###
echo "Now type 'make' to compile $package."
# for go faster enables comments
# make;
# ./src/Pitivi
fi
\ No newline at end of file
2004-03-18 Thomas Vander Stichele <thomas at apestaart dot org>
* Makefile.am:
* m4/Makefile.am:
integrate these with the dist
2004-03-17 Thomas Vander Stichele <thomas at apestaart dot org>
* release.mak: add a release target
2004-03-09 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Stephane Loeuillet
* m4/ax_create_stdint_h.m4:
use head -n instead of head - (#136500)
2004-03-05 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/gst-doc.m4: don't build PS without dvips binary
2004-02-22 Julio M. Merino Vidal <jmmv@menta.net>
reviewed by: Benjamin Otte <otte@gnome.org>
* m4/as-docbook.m4:
don't use == operator with test(1) (fixes #135115)
2004-02-16 Thomas Vander Stichele <thomas at apestaart dot org>
* common/m4/gst-arch.m4: x86_64 is x86 too (clue from Fedora 2 test)
2004-02-13 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/gst-feature.m4:
remove AM_CONDITIONAL for the subsystem since automake 1.6.x
requires that call be in configure.ac
2004-02-13 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/gst-libxml2.m4:
take required version as argument, and default to 2.4.9 if not
specified
2004-02-12 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/gst-feature.m4:
rename and fix up GST_CHECK_DISABLE_SUBSYSTEM
2004-02-11 Thomas Vander Stichele <thomas at apestaart dot org>
* common/m4/as-ac-expand.m4:
* common/m4/as-auto-alt.m4:
* common/m4/as-compiler-flag.m4:
* common/m4/as-compiler.m4:
* common/m4/as-docbook.m4:
* common/m4/as-libtool.m4:
* common/m4/as-scrub-include.m4:
* common/m4/as-version.m4:
* common/m4/glib-gettext.m4:
* common/m4/gst-arch.m4:
* common/m4/gst-debuginfo.m4:
* common/m4/gst-doc.m4:
* common/m4/gst-feature.m4:
* common/m4/gst-function.m4:
* common/m4/gst-glib2.m4:
* common/m4/gst-gstreamer.m4:
* common/m4/gst-libxml2.m4:
* common/m4/gst-makecontext.m4:
* common/m4/gst-mcsc.m4:
* common/m4/pkg.m4:
fix underquoted macros as reported by automake 1.8.x (#133800)
2004-02-11 Johan Dahlin <johan@gnome.org>
* gst-autogen.sh: Use A-Z instead of A-z in sed expression to
avoid a warning
2004-02-05 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* m4/gst-doc.m4:
we use --output-format=xml and --ingnore-files options to
gtkdoc-mkdb, which got added between 0.9 and 1.0
2004-02-04 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/as-libtool.m4: remove AM_PROG_LIBTOOL so it can move back
to configure.ac to shut up libtoolize
2004-02-03 Thomas Vander Stichele <thomas at apestaart dot org>
* glib-gen.mak: added; used to generate enums and marshal code
2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org>
* gettext.patch: added; used by autogen.sh to make sure
GETTEXT_PACKAGE is understood from po/Makefile.in.in -> po/Makefile.in
SUBDIRS = m4
EXTRA_DIST = ChangeLog gettext.patch glib-gen.mak release.mak gst-autogen.sh
# some Makefile.am snippets to fix libtool's breakage w.r.t. DLL
# building
#
#
# define AS_LIBTOOL_LIB before calling. Sorry, only one lib per
# directory
#
# add this to EXTRA_DIST
as_libtool_EXTRA_DIST = $(AS_LIBTOOL_LIB).def
if AS_LIBTOOL_WIN32
as_libtool_noinst_DATA_files = $(AS_LIBTOOL_LIB).lib
as_libtool_LDFLAGS = -no-undefined
# depend on this in install-data-local
as-libtool-install-data-local:
$(INSTALL) $(AS_LIBTOOL_LIB).lib $(DESTDIR)$(libdir)
$(INSTALL) $(AS_LIBTOOL_LIB).def $(DESTDIR)$(libdir)
# depend on this in uninstall-local
as-libtool-uninstall-local:
-rm $(DESTDIR)$(libdir)/$(AS_LIBTOOL_LIB).lib
-rm $(DESTDIR)$(libdir)/$(AS_LIBTOOL_LIB).def
else
as-libtool-install-data-local:
as-libtool-uninstall-local:
endif
$(AS_LIBTOOL_LIB).lib: $(AS_LIBTOOL_LIB).la $(AS_LIBTOOL_LIB).def
dlltool -S $(CC) -f "-c" --export-all-symbols --input-def \
$(srcdir)/$(AS_LIBTOOL_LIB).def --output-lib $@
$(AS_LIBTOOL_LIB).def:
echo EXPORTS >$(AS_LIBTOOL_LIB).def.tmp
nm --defined-only -g .libs/$(AS_LIBTOOL_LIB).a | \
grep ^0 | \
awk '{ print $$3 }' | \
sed 's/^/ /' >>$(AS_LIBTOOL_LIB).def.tmp
mv $(AS_LIBTOOL_LIB).def.tmp $(AS_LIBTOOL_LIB).def
--- po/Makefile.in.in.orig 2004-01-09 16:35:54.000000000 +0100
+++ po/Makefile.in.in 2004-01-09 16:36:43.000000000 +0100
@@ -11,6 +11,9 @@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
+# thomas: add GETTEXT_PACKAGE substitution as used in Makevars
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+
SHELL = /bin/sh
@SET_MAKE@
# these are the variables your Makefile.am should set
# the example is based on the colorbalance interface
#glib_enum_headers=$(colorbalance_headers)
#glib_enum_define=GST_COLOR_BALANCE
#glib_enum_prefix=gst_color_balance
# these are all the rules generating the relevant files
%-marshal.h: %-marshal.list
glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp
mv $*-marshal.h.tmp $*-marshal.h
%-marshal.c: %-marshal.list
echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp
glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp
mv $*-marshal.c.tmp $*-marshal.c
%-enumtypes.h: $(glib_enum_headers)
glib-mkenums \
--fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
$^ > $@
%-enumtypes.c: $(glib_enum_headers)
@if test "x$(glib_enum_headers)" == "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
glib-mkenums \
--fhead "#include <$*.h>" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
$^ > $@
# a hack rule to make sure .Plo files exist because they get include'd
# from Makefile's
.deps/%-marshal.Plo:
touch $@
.deps/%-enumtypes.Plo:
touch $@
# a silly hack that generates autoregen.sh but it's handy
echo "#!/bin/sh" > autoregen.sh
echo "./autogen.sh $@ \$@" >> autoregen.sh
chmod +x autoregen.sh
# helper functions for autogen.sh
debug ()
# print out a debug message if DEBUG is a defined variable
{
if test ! -z "$DEBUG"
then
echo "DEBUG: $1"
fi
}
version_check ()
# check the version of a package
# first argument : package name (executable)
# second argument : optional path where to look for it instead
# third argument : source download url
# rest of arguments : major, minor, micro version
# all consecutive ones : suggestions for binaries to use
# (if not specified in second argument)
{
PACKAGE=$1
PKG_PATH=$2
URL=$3
MAJOR=$4
MINOR=$5
MICRO=$6
# for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null
if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi
debug "major $MAJOR minor $MINOR micro $MICRO"
VERSION=$MAJOR
if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
debug "major $MAJOR minor $MINOR micro $MICRO"
for SUGGESTION in $PKG_PATH; do
COMMAND="$SUGGESTION"
# don't check if asked not to
test -z "$NOCHECK" && {
echo -n " checking for $COMMAND >= $VERSION ... "
} || {
# we set a var with the same name as the package, but stripped of
# unwanted chars
VAR=`echo $PACKAGE | sed 's/-//g'`
debug "setting $VAR"
eval $VAR="$COMMAND"
return 0
}
debug "checking version with $COMMAND"
($COMMAND --version) < /dev/null > /dev/null 2>&1 ||
{
echo "not found."
continue
}
# strip everything that's not a digit, then use cut to get the first field
pkg_version=`$COMMAND --version|head -n 1|sed 's/^[^0-9]*//'|cut -d' ' -f1`
debug "pkg_version $pkg_version"
# remove any non-digit characters from the version numbers to permit numeric
# comparison
pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`