Difference between revisions of "New Module"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Reverted edit of 1146830109, changed back to last version by Michael)
Line 158: Line 158:
 
</pre>
 
</pre>
 
</ul>
 
</ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div  style="display:none">
 
[We are delicate. We do not delete your content.]
 
[l_sp2008]
 
 
[http://ringtonemaker.blogs.eurosport.com/ ringtone maker]
 
[http://verizonringtone.forumco.com/ verizon ringtone]
 
[http://uscellularringtone.forumco.com US Cellular Ringtone]
 
[http://blog.investing.com/bcbgshoes/ bcbg shoes]
 
[http://www.buddyprofile.com/viewprofile.php?username=waterfordcrystal waterford crystal]
 
[http://www.buddyprofile.com/viewprofile.php?username=swarovskicrystal swarovski crystal bead]
 
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomalawsuits mesothelioma lawsuits]
 
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomasymptoms mesothelioma symptoms]
 
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomadiag mesothelioma diagnosis]
 
[http://www.totalvideogames.com/blog/naturalizershoes/ Naturalizer Shoes]
 
[http://www.totalvideogames.com/blog/freekyocerarington/ Free Kyocera Ringtone]
 
[http://www.missoula.com/blog/sexypromdresses/ Sexy Prom Dresses]
 
[http://www.justachat.com/blog/?w=naturalizershoes Naturalizer Shoes]
 
[http://www.toutelapoesie.com/blog/aerobed/ Aero Bed]
 
[http://www.totalvideogames.com/blog/freesprintringtones/ Free Sprint Ringtones]
 
[http://www.totalvideogames.com/blog/freeverizonringtones/ Free Verizon Ringtones]
 
[http://www.totalvideogames.com/blog/freenextelringtones/ free nextel ringtones]
 
[http://www.totalvideogames.com/blog/sexypromdresses/ sexy prom dress]
 
[http://www.totalvideogames.com/blog/formalpromdresses/ Formal Prom Dresses]
 
[http://www.totalvideogames.com/blog/cheappromdresses/ cheap prom dresses]
 
[http://www.totalvideogames.com/blog/plussizepromdress/ Plus Size Prom Dresses]
 
[http://www.totalvideogames.com/blog/tiffanypromdresses/ tiffany prom dresses]
 
[http://www.totalvideogames.com/blog/strippoker/ erotic games strip poker]
 
[http://www.totalvideogames.com/blog/pokemoncardgame/ pokemon trading card game rom]
 
[http://www.totalvideogames.com/blog/hoylecardgames/ hoyle card games]
 
[http://topsites.blog.expedia.fr/files/buy-ativan-online.2.htm buy ativan online]
 
[http://topsites.blog.expedia.fr/files/buy-ativan.htm buy ativan]
 
[http://topsites.blog.expedia.fr/files/buy-alprazolam-online.htm buy alprazolam online]
 
[http://topsites.blog.expedia.fr/files/buy-alprazolam.htm buy alprazolam]
 
[http://topsites.blog.expedia.fr/files/cheap-tramadol.htm cheap tramadol]
 
[http://topsites.blog.expedia.fr/files/buy-bontril-online.htm buy bontril online]
 
[http://topsites.blog.expedia.fr/files/fentermine.htm fentermine]
 
[http://topsites.blog.expedia.fr/files/how-to-buy-fioricet-on-line.htm how to buy fioricet on line]
 
[http://topsites.blog.expedia.fr/files/cheap-ultram-without-prescription.htm cheap ultram without prescription]
 
[http://topsites.blog.expedia.fr/files/buy-ultram-without-prescription.htm buy ultram without prescription]
 
[http://www.totalvideogames.com/blog/teenbra/ teen bra]
 
[http://www.totalvideogames.com/blog/brateencleavage/ Bra Teen Cleavage]
 
[http://www.totalvideogames.com/blog/microbiniki/ Micro Bikini]
 
[http://www.totalvideogames.com/blog/teensbra/ Teens Bra]
 
[http://www.totalvideogames.com/blog/sexybras/ sexy bras]
 
[http://www.totalvideogames.com/blog/bulmabra/ bulma bra]
 
[http://www.totalvideogames.com/blog/sheerbra/ sheer bra]
 
[http://www.totalvideogames.com/blog/autoloancalculator/ auto loan calculator]
 
[http://www.totalvideogames.com/blog/loanconsolidation/ Federal Student Loan Consolidation]
 
[http://www.totalvideogames.com/blog/privatestudentloan/ private student loan consolidation]
 
[http://www.totalvideogames.com/blog/acsstudentloans/ acs student loans]
 
[http://www.totalvideogames.com/blog/countrywidehomeloans/ countrywide home loans]
 
[http://www.totalvideogames.com/blog/refinancehomeloan/ refinance home loan st louis]
 
[http://www.buddyprofile.com/viewprofile.php?username=wacoalbras wacoal bras]
 
[http://www.buddyprofile.com/viewprofile.php?username=teenbra teen bra]
 
[http://www.buddyprofile.com/viewprofile.php?username=unsecuredloan unsecured signature loan]
 
[http://www.buddyprofile.com/viewprofile.php?username=homeloans Countrywide Home Loans]
 
 
</div>
 

Revision as of 14:51, 5 May 2006

Adding a New module to the OO.o build

This process is somewhat complex, an example (adding cairo) is annotated here:

First create a your new module directory eg. cairo

  • makefile.mk - in your module directory. see following example what it should contain, it is important that your tarball is added to the cairo/download/ directory.
    PRJ=.
    
    PRJNAME=libpixman
    TARGET=libpixman
    
    # --- Settings -----------------------------------------------------
    
    .INCLUDE :	settings.mk
    
    # --- Files --------------------------------------------------------
    
    .IF "$(GUI)"=="UNX"
    TARFILE_NAME=libpixman-0.1.5
    
    CONFIGURE_DIR=
    
    CONFIGURE_ACTION=./configure
    CONFIGURE_FLAGS=
    BUILD_DIR=$(CONFIGURE_DIR)
    BUILD_ACTION=$(GNUMAKE)
    
    OUT2LIB= \
    	$/src/.libs$/libpixman.so.*
    
    OUT2INC= \
    	$/src$/pixman.h
    
    
    # --- Targets ------------------------------------------------------
    
    
    .INCLUDE :	set_ext.mk
    .INCLUDE :	target.mk
    .INCLUDE :	tg_ext.mk
    .ELSE  
    
    dummy:
    	@echo "Nothing to build for your platform"
    
    .ENDIF
    
  • prj/build.lst - see following example and Hacking#prj.2Fbuild.lst detailed description ]]
    pm	libpixman		:	solenv NULL
    pm	libpixman			usr1	-	u	pm_mkout NULL
    pm	libpixman			nmake	-	u	pm_pixman NULL
    
  • prj/d.lst - see following example and [detailed description ]
    mkdir: %_DEST%\inc%_EXT%\pixman
    ..\%__SRC%\inc\pixman.h %_DEST%\inc%_EXT%\pixman\pixman.h
    ..\%__SRC%\lib\libpixman.* %_DEST%\lib%_EXT%\libpixman.*
    
    linklib: libpixman.so.*.*.*
    linklib: libpixman.dylib.*.*.*
    


Extra bits for ooo-build

Of course, you'll need to turn all of the above into patch form for ooo-build; but ooo-build also has some infrastructure to help download the source you need easily; those need setting up:

  • configure.in - usualy you want your module to be build conditionaly. inspire yourself by looking how mdb or cairo are handled.
    AC_ARG_ENABLE(cairo,
    [
      --enable-cairo          Enables cairo canvas backend.],
    ,)
    
    ...
    
    if test "$enable_cairo" != "no"; then
       CAIRO_ENABLED=TRUE
       LIBPIXMAN_VER=0.1.5
       GLITZ_VER=0.4.3
       CAIRO_VER=0.5.2
    else
       CAIRO_ENABLED=
       LIBPIXMAN_VER=
       GLITZ_VER=
       CAIRO_VER=
    fi
    AC_SUBST(CAIRO_ENABLED)
    AC_SUBST(LIBPIXMAN_VER)
    AC_SUBST(GLITZ_VER)
    AC_SUBST(CAIRO_VER)
    
  • download.in - add your code to download package from network, best if you place the module tarball on ooo.ximian.com in /var/www/packages/SRC680/ directory.
    %SRC_URLS = (
        'binutils-.*'			 => 'http://go-ooo.org/packages/support',
    ...
        'libpixman-*'			 => 'http://go-ooo.org/packages/SRC680',
        'cairo-*'			         => 'http://go-ooo.org/packages/SRC680',
        'glitz-*'			         => 'http://go-ooo.org/packages/SRC680',
    
    ...
    
    if ('@CAIRO_ENABLED@' eq 'TRUE') {
        push @files, ( 'libpixman-@LIBPIXMAN_VER@.tar.gz' );
        push @files, ( 'cairo-@CAIRO_VER@.tar.gz' );
        push @files, ( 'glitz-@GLITZ_VER@.tar.gz' );
    }
    
    download_files (\@files, \%SRC_URLS, '@SRCDIR@');
    
  • bin/setup.in - you can set environment variable by autoconf variable values here. the setup is sourced (as in shell terminology) in unpack, so you can use info from configure that way
    ...
    CAIRO_VER=@CAIRO_VER@
    CAIRO_ENABLED=@CAIRO_ENABLED@
    GLITZ_VER=@GLITZ_VER@
    ...
    
  • bin/unpack - create a directory for your module in OOo tree, create another download directory for your tarball and copy it there
    ...
    if test "$CAIRO_ENABLED" == "TRUE"; then
        echo "Making symbolic links of libpixman, cairo and glitz at build location"
    
        mkdir -p $OOBUILDDIR/libpixman
        check_tarball $SRCDIR/libpixman-$LIBPIXMAN_VER.tar.gz
        mkdir -p $OOBUILDDIR/libpixman/download
        cp -a $SRCDIR/libpixman-${LIBPIXMAN_VER}.tar.gz $OOBUILDDIR/libpixman/download/
    
        mkdir -p $OOBUILDDIR/glitz
        check_tarball $SRCDIR/glitz-${GLITZ_VER}.tar.gz
        mkdir -p $OOBUILDDIR/glitz/download
        cp -a $SRCDIR/glitz-${GLITZ_VER}.tar.gz $OOBUILDDIR/glitz/download/
    
        mkdir -p $OOBUILDDIR/cairo
        check_tarball $SRCDIR/cairo-${CAIRO_VER}.tar.gz
        mkdir -p $OOBUILDDIR/cairo/download
        cp -a $SRCDIR/cairo-${CAIRO_VER}.tar.gz $OOBUILDDIR/cairo/download/
    fi
    
    
Personal tools