Changeset 844


Ignore:
Timestamp:
Dec 1, 2008, 5:24:41 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Addresses #50, #53. Automatic download of required components. Using external abstract class, updatede INSTALL.

Location:
plugins/base1/se.lu.thep.wenni/trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/base1/se.lu.thep.wenni/trunk/ChangeLog

    r827 r844  
    4646  - Changed project site URL.
    4747  - Added more checks on required build tools.
    48 
     48  - Using external abstract class when building Java wrapper.
     49  - Automatic download of required BASE components.
     50 
    4951version 0.6 (revision 92):
    5052  - Minor changes, basically a maintenence version.
  • plugins/base1/se.lu.thep.wenni/trunk/INSTALL

    r838 r844  
    6262server.
    6363
     64== Short instructions ==
     65
     66It can be this easy:
     67
     68 1. Download and unpack WeNNI and `cd` to the root directory of the
     69    distribution.
     70
     71 2. If you haven't access to a BASE2 installation or prefer to use the
     72    standard compilation components, run the configure script with
     73
     74    $ `./configure --with-plugindir=/path/to/base/plugin-directory/wenni`
     75    $ `make`
     76    $ `make check`
     77    $ `make install`
     78
     79If you have probems check the pre-requisites below.
     80
    6481== Pre-requisite ==
    6582
    6683 1. Java 1.6.
    6784
    68  2. A working BASE2 installation or Internet connection. The BASE
     85 2. A working BASE2 installation or Internet connection. Some BASE2
    6986    program libraries are required for the creation of the wrapper
    70     plug-in. If no local BASE installation is available the required
    71     packages will be downloaded automatically.
     87    plug-in. Required libraries will be downloaded automatically, or
     88    local libraries can be used.
    7289
    7390 3. Version x of net.sf.basedb. .... package. Needed for creation of
    74     the Java wrapper. The package is downloaded during the compilation
    75     process.
     91    the Java wrapper. If the package is not available it will
     92    automatically be downloaded during the compilation process.
    7693
    7794 4. BASE 2.9 or later for plug-in use. Earlier versions may work but
     
    8198    programs can be run manually, see README for details.
    8299
     100== Automatic download of required BASE components ==
     101
     102During the build process and depending on configuration options,
     103required program libraries will be downloaded from the official base
     104sites, http://base2.thep.lu.se and http://baseplugins.thep.lu.se. If
     105you feel uncomfortable with this procedure you need to do some manual
     106work.
     107
     108 1. If you have no working BASE2 installation, download the latest
     109    BASE2 binary package from http://base.thep.lu.se and unpack
     110    it. There is no need for further work, use the created directory
     111    as the path for the `--with-basedir` option given to the configure
     112    script below.
     113
     114 2. Download the PluginsUtilites package from
     115    http://base.thep.lu.se/wiki/se.lu.thep.WeNNI and place the package
     116    file in directory `base/base2`. The install process will use this
     117    file automatically but beware, a `make distclean` will erase the
     118    file (but `make clean` will not). This WeNNI package is known to
     119    work with version 0.1 of the PluginUtilities package (only the
     120    latest known version will be given here), and the stated version
     121    is the one automatically downloaded in the build process.
     122
    83123== Building and installing the plug-in (WeNNI and the Java wrapper) ==
    84124
     
    90130
    91131    $ `./configure`
     132
     133    This will automatically download required BASE related libraries
     134    from the official BASE package repositories (see output from the
     135    configure scipt on details about the downloads).
    92136
    93137    There is a possiblity to use the build tools to automatically
     
    97141    $ `./configure --with-plugindir=DIR`
    98142
    99     The default plug-in installation directory is in the directory
     143    The default plug-in installation directory is the directory
    100144    plugins/se/lu/thep/wenni rooted in `basedir`.
    101145
     
    107151
    108152    $ `./configure --with-basedir=/path/to/base`
     153
     154    where `/path/to/base` should point to the directory containing
     155    directory `www`.
    109156
    110157    Some notes on configure options:
     
    251298script is written in Perl.
    252299
     300== Short instructions ==
     301
     302It can be this easy:
     303
     304 1. Download and unpack WeNNI and `cd` to the root directory of the
     305    distribution.
     306
     307 2. Do
     308
     309    $ `./configure --enable-state=stand-alone`
     310    $ `make`
     311    $ `make check`
     312    $ `make install`
     313
    253314== Pre-requisite ==
    254315
  • plugins/base1/se.lu.thep.wenni/trunk/base/base2/Makefile.am

    r837 r844  
    3434clean-local:; @( rm -rf *.jar *.class *~ $(TOPBUILDDIR))
    3535
     36distclean-local: clean-local
     37  @( rm -rf $(PLUGINutilities)*)
     38
    3639
    3740install-exec-local: $(JAR)
     
    3942  test -z "$(bindir)" || $(MKDIR_P) "$(bindir)"
    4043  $(INSTALL) "$(JAR)" "$(bindir)"
     44  $(INSTALL) "$(PLUGINutilities)/$(PLUGINutilities).jar" "$(bindir)"
    4145
    42 $(JAR): $(BUILDDIR) $(CLASS)
     46$(JAR): $(BUILDDIR) $(PLUGINutilities) $(CLASS)
    4347  @echo Creating $(JAR)
    4448  @(cd $(TOPBUILDDIR) ; \
     
    5458  @$(MKDIR_P) $@
    5559
     60$(PLUGINutilities): $(PLUGINutilities).tgz
     61  tar zxpf $<
     62
     63$(PLUGINutilities).tgz:
     64  wget $(PLUGINutilitiesURLpart)/$@
  • plugins/base1/se.lu.thep.wenni/trunk/base/base2/WeNNI.java

    r824 r844  
    2525package se.lu.thep.wenni;
    2626
    27 import se.lu.thep.wenni.RunBinaryPlugin;
     27import net.sf.basedb.plugins.AbstractRunBinaryPlugin;
    2828
    2929import net.sf.basedb.core.DbControl;
     
    5656
    5757public class WeNNI
    58   extends RunBinaryPlugin
     58  extends AbstractRunBinaryPlugin
    5959{
    6060
  • plugins/base1/se.lu.thep.wenni/trunk/configure.ac

    r843 r844  
    5454AC_PROG_RANLIB
    5555AC_PROG_SED
     56
     57# existence of wget and tar should be checked
    5658
    5759AM_CXXFLAGS="-Wall -pedantic"
     
    8385AM_CONDITIONAL([BASE2], [test x$state = xbase2])
    8486
     87AC_ARG_ENABLE(downloadBASE2API,
     88              [AS_HELP_STRING([--enable-downloadBASE2API=ARG],
     89                              [enable download of required BASE2 API files])],
     90              [DOWNLOADBASE2API=true],[DOWNLOADBASE2API=false])
     91
    8592AC_ARG_WITH(basedir,[AS_HELP_STRING([--with-basedir=DIR],
    8693                                    [root directory for base installation])],
    87             [BASEDIR=$withval],[BASEDIR=/usr/local/base])
     94            [BASEDIR=$withval DOWNLOADBASE2API=false],[BASEDIR=/usr/local/base])
    8895
    8996AC_ARG_WITH(plugindir,[AS_HELP_STRING([--with-plugindir=DIR],
    90                                       [root directory for base plug-ins])],
     97                                      [the base plug-in install directory])],
    9198            [PLUGINDIR=$withval],
    9299            [if (test x$state = xbase1); then
     
    114121  AC_SUBST(BASEPLUGINEXECNAME)
    115122  AC_CONFIG_FILES([base/base1/base_plugin_script/plugin_WeNNI.base])
    116 fi
    117 if (test x$state = xbase2); then
    118   AC_CHECK_FILE([$BASEDIR/www/WEB-INF/lib/BASE2Core.jar], [],
    119                 [AC_MSG_FAILURE([cannot find BASE2Core.jar])])
    120   JAVACFLAGS=$BASEDIR/www/WEB-INF/lib/BASE2Core.jar
    121   AC_CHECK_FILE([$BASEDIR/www/WEB-INF/lib/BASE2CorePlugins.jar], [],
    122                 [AC_MSG_FAILURE([cannot find BASE2CorePlugins.jar])])
    123   JAVACFLAGS="$BASEDIR/www/WEB-INF/lib/BASE2CorePlugins.jar:$JAVACFLAGS"
     123elif (test x$state = xbase2); then
     124  if (test $DOWNLOADBASE2API = false); then
     125    AC_CHECK_FILE([$BASEDIR/www/WEB-INF/lib/BASE2Core.jar], [],
     126                  [AC_MSG_FAILURE([cannot find BASE2Core.jar])])
     127    JAVACFLAGS+=$BASEDIR/www/WEB-INF/lib/BASE2Core.jar
     128    AC_CHECK_FILE([$BASEDIR/www/WEB-INF/lib/BASE2CorePlugins.jar], [],
     129                  [AC_MSG_FAILURE([cannot find BASE2CorePlugins.jar])])
     130    JAVACFLAGS="$BASEDIR/www/WEB-INF/lib/BASE2CorePlugins.jar:$JAVACFLAGS"
     131  fi
     132  PLUGINutilitiesURLpart="http://www.thep.lu.se/~jari"
     133  PLUGINutilities=AbstractRunBinaryPlugin-0.1pre
     134  JAVACFLAGS="$JAVACFLAGS:./$PLUGINutilities/$PLUGINutilities.jar"
     135  AC_SUBST(PLUGINutilities)
     136  AC_SUBST(PLUGINutilitiesURLpart)
    124137  AC_SUBST(JAVACFLAGS)
     138fi
     139if (test x$state = xbase1 || test x$state = xbase2); then
     140  # Change binary installation directory, is this kosher?
     141  bindir=$PLUGINDIR
    125142fi
    126143
     
    166183# Some more messages.
    167184AC_MSG_NOTICE([])
    168 AC_MSG_NOTICE([ Ready to build WeNNI package containing])
    169 AC_MSG_NOTICE([])
    170 AC_MSG_NOTICE([     stand-alone binaries:])
    171 AC_MSG_NOTICE([         NNIFileConverter])
    172 AC_MSG_NOTICE([         nni])
     185AC_MSG_NOTICE([Ready to build WeNNI package containing])
     186AC_MSG_NOTICE([])
    173187if (test x$state = xbase1); then
    174   AC_MSG_NOTICE([     BASE1 plug-in:])
    175   AC_MSG_NOTICE([         BaseFileConverter])
    176   AC_MSG_NOTICE([         base_plugin_script])
    177 fi
    178 if (test x$state = xbase2); then
    179   AC_MSG_NOTICE([     BASE2 plug-in:])
    180   AC_MSG_NOTICE([         WeNNI.jar])
    181 fi
    182 AC_MSG_NOTICE([])
    183 AC_MSG_NOTICE([ WeNNI package will be installed in])
    184 AC_MSG_NOTICE([    $PLUGINDIR ])
    185 AC_MSG_NOTICE([])
    186 AC_MSG_NOTICE([ The following libs and flags will be used:])
    187 AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
     188  AC_MSG_NOTICE([BASE1 plug-in files:])
     189  AC_MSG_NOTICE([    NNIFileConverter])
     190  AC_MSG_NOTICE([    nni])
     191  AC_MSG_NOTICE([    BaseFileConverter])
     192  AC_MSG_NOTICE([    base_plugin_script])
     193  AC_MSG_NOTICE([])
     194  AC_MSG_NOTICE([WeNNI plug-in binaries will be installed in])
     195  AC_MSG_NOTICE([    $PLUGINDIR ])
     196elif (test x$state = xbase2); then
     197  AC_MSG_NOTICE([BASE2 plug-in files:])
     198  AC_MSG_NOTICE([    nni])
     199  AC_MSG_NOTICE([    WeNNI.jar])
     200  AC_MSG_NOTICE([    $PLUGINutilities.jar])
     201  AC_MSG_NOTICE([])
     202  AC_MSG_NOTICE([If not already there, downloading])
     203  AC_MSG_NOTICE([    $PLUGINutilitiesURLpart/$PLUGINutilities])
     204  AC_MSG_NOTICE([])
     205  if (test $DOWNLOADBASE2API = true ); then
     206    AC_MSG_NOTICE([Downloading required BASE2 API from ...])
     207  else
     208    AC_MSG_NOTICE([Using local BASE2 API in directory])
     209    AC_MSG_NOTICE([    $BASEDIR])
     210  fi
     211  AC_MSG_NOTICE([])
     212  AC_MSG_NOTICE([WeNNI plug-in binaries will be installed in])
     213  AC_MSG_NOTICE([    $PLUGINDIR ])
     214else
     215  AC_MSG_NOTICE([stand-alone binaries:])
     216  AC_MSG_NOTICE([    NNIFileConverter])
     217  AC_MSG_NOTICE([    nni])
     218fi
     219AC_MSG_NOTICE([])
     220AC_MSG_NOTICE([The following libs and flags will be used:])
     221AC_MSG_NOTICE([+++++++++++++++++++++++++++++++++++++++++++++++])
    188222AC_MSG_NOTICE([  CPPFLAGS     = $CPPFLAGS $AM_CPPFLAGS])
    189223AC_MSG_NOTICE([  CXXFLAGS     = $CXXFLAGS $AM_CXXFLAGS])
     
    193227  AC_MSG_NOTICE([  BASECPPFLAGS = $BASECPPFLAGS])
    194228  AC_MSG_NOTICE([  BASELDFLAGS  = $BASELDFLAGS])
    195 fi
    196 if (test x$state = xbase2); then
    197   AC_MSG_NOTICE([  JAVACFLAGS=\"$JAVACFLAGS\"])
    198 fi
    199 AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
     229elif (test x$state = xbase2); then
     230  AC_MSG_NOTICE([  JAVACFLAGS   = $JAVACFLAGS])
     231fi
     232AC_MSG_NOTICE([+++++++++++++++++++++++++++++++++++++++++++++++])
    200233AC_MSG_NOTICE([])
    201234AC_MSG_NOTICE([ Now type 'make ; make check ; make install'.])
Note: See TracChangeset for help on using the changeset viewer.