Introduced versioning (still pre-release) and new API function isoburn_version()

This commit is contained in:
Thomas Schmitt 2008-01-26 12:06:26 +00:00
parent 64ceb7c2e9
commit a7b4cf0560
6 changed files with 47 additions and 32 deletions

View File

@ -7,35 +7,21 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects]) AM_INIT_AUTOMAKE([subdir-objects])
dnl Making releases: ISOBURN_MAJOR_VERSION=0
dnl BURN_MICRO_VERSION += 1; ISOBURN_MINOR_VERSION=0
dnl BURN_INTERFACE_AGE += 1; ISOBURN_MICRO_VERSION=1
dnl BURN_BINARY_AGE += 1; ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION
dnl if any functions have been added, set BURN_INTERFACE_AGE to 0.
dnl if backwards compatibility has been broken,
dnl set BURN_BINARY_AGE and BURN_INTERFACE_AGE to 0.
dnl
dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
dnl
BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=0
BURN_MICRO_VERSION=1
BURN_INTERFACE_AGE=0
BURN_BINARY_AGE=0
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
AC_SUBST(BURN_MAJOR_VERSION) AC_SUBST(ISOBURN_MAJOR_VERSION)
AC_SUBST(BURN_MINOR_VERSION) AC_SUBST(ISOBURN_MINOR_VERSION)
AC_SUBST(BURN_MICRO_VERSION) AC_SUBST(ISOBURN_MICRO_VERSION)
AC_SUBST(BURN_INTERFACE_AGE) AC_SUBST(ISOBURN_VERSION)
AC_SUBST(BURN_BINARY_AGE)
AC_SUBST(BURN_VERSION)
dnl Libtool versioning dnl Libtool versioning
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
LT_CURRENT=`expr $BURN_MICRO_VERSION - $BURN_INTERFACE_AGE` LT_CURRENT=0
LT_REVISION=$BURN_INTERFACE_AGE LT_AGE=0
LT_AGE=`expr $BURN_BINARY_AGE - $BURN_INTERFACE_AGE` LT_REVISION=1
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
AC_SUBST(LT_RELEASE) AC_SUBST(LT_RELEASE)

View File

@ -57,17 +57,19 @@ int isoburn_initialize(char msg[1024], int flag)
return(0); return(0);
} }
iso_lib_version(&major, &minor, &micro); iso_lib_version(&major, &minor, &micro);
sprintf(msg+strlen(msg), "libisofs version %d.%d.%d , ", major, minor, micro); sprintf(msg+strlen(msg), "libisofs-%d.%d.%d , ", major, minor, micro);
if(!burn_initialize()) { if(!burn_initialize()) {
sprintf(msg+strlen(msg), "Cannot initialize libburn\n"); sprintf(msg+strlen(msg), "Cannot initialize libburn\n");
return(0); return(0);
} }
burn_version(&major, &minor, &micro); burn_version(&major, &minor, &micro);
sprintf(msg+strlen(msg), "libburn version %d.%d.%d , ", major, minor, micro); sprintf(msg+strlen(msg), "libburn-%d.%d.%d , ", major, minor, micro);
isoburn_destroy_all(&isoburn_list_start, 0); /* isoburn_list_start= NULL */ isoburn_destroy_all(&isoburn_list_start, 0); /* isoburn_list_start= NULL */
isoburn_version(&major, &minor, &micro);
sprintf(msg+strlen(msg), "libisoburn-%d.%d.%d", major, minor, micro);
return(1); return(1);
} }

View File

@ -34,8 +34,10 @@
#include "libisoburn.h" #include "libisoburn.h"
#include "isoburn.h" #include "isoburn.h"
#include "../version.h"
/* -------------------------- isoburn ----------------------- */ /* -------------------------- isoburn ----------------------- */
@ -381,3 +383,12 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
{ {
return isoburn_prepare_disc_aux(d, disc, opts, 1); return isoburn_prepare_disc_aux(d, disc, opts, 1);
} }
void isoburn_version(int *major, int *minor, int *micro)
{
*major = ISOBURN_MAJOR_VERSION;
*minor = ISOBURN_MINOR_VERSION;
*micro = ISOBURN_MICRO_VERSION;
}

View File

@ -49,6 +49,22 @@ are appropriate for particular target "drives".
int isoburn_initialize(char msg[1024], int flag); int isoburn_initialize(char msg[1024], int flag);
/** Obtain the three release version numbers of the library.
@param major The maturity version (0 for now, as we are still learning)
@param minor The development goal version.
@param micro The development step version. This has an additional meaning:
Pare numbers indicate a version with frozen API. I.e. you can
rely on the same set of features to be present in all
published releases with that major.minor.micro combination.
Odd numbers indicate that API upgrades are in progress.
I.e. new features might be already present or they might
be still missing. You need to check before compiling an
application which relies on freshly introduced features.
*/
void isoburn_version(int *major, int *minor, int *micro);
/** Aquire a target drive by its filesystem path resp. libburn persistent /** Aquire a target drive by its filesystem path resp. libburn persistent
address. address.
Wrapper for: burn_drive_scan_and_grab() Wrapper for: burn_drive_scan_and_grab()

View File

@ -1,3 +1,3 @@
#define BURN_MAJOR_VERSION @BURN_MAJOR_VERSION@ #define ISOBURN_MAJOR_VERSION @ISOBURN_MAJOR_VERSION@
#define BURN_MINOR_VERSION @BURN_MINOR_VERSION@ #define ISOBURN_MINOR_VERSION @ISOBURN_MINOR_VERSION@
#define BURN_MICRO_VERSION @BURN_MICRO_VERSION@ #define ISOBURN_MICRO_VERSION @ISOBURN_MICRO_VERSION@

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.01.26.113604" #define Xorriso_timestamP "2008.01.26.120534"