diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-06-17 08:37:58 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-06-17 08:37:58 +0000 |
commit | b405d4efbcf32b6ab2010dbc165c6808b73c83ea (patch) | |
tree | b55f3dd67c004073b35d7b6dbbea6403aa21072c /odk/setsdkenv_unix.sh.in | |
parent | INTEGRATION: CWS sb31 (1.5.4); FILE MERGED (diff) | |
download | core-b405d4efbcf32b6ab2010dbc165c6808b73c83ea.tar.gz core-b405d4efbcf32b6ab2010dbc165c6808b73c83ea.zip |
INTEGRATION: CWS sb31 (1.5.4); FILE MERGED
2005/06/10 13:45:36 sb 1.5.4.5: #121392# Made STLport a public part of the URE.
2005/06/02 13:21:04 sb 1.5.4.4: RESYNC: (1.5-1.6); FILE MERGED
2005/05/25 13:21:42 sb 1.5.4.3: #121931# Work around problems with ln -sf on Solaris.
2005/05/20 13:23:06 sb 1.5.4.2: #121931# Adapt sh syntax for Solaris.
2005/05/04 12:51:20 sb 1.5.4.1: #121393# Adapted the SDK to work with either an Office or a URE.
Diffstat (limited to 'odk/setsdkenv_unix.sh.in')
-rw-r--r-- | odk/setsdkenv_unix.sh.in | 94 |
1 files changed, 75 insertions, 19 deletions
diff --git a/odk/setsdkenv_unix.sh.in b/odk/setsdkenv_unix.sh.in index cb825eacbfcd..f526924c1d3b 100644 --- a/odk/setsdkenv_unix.sh.in +++ b/odk/setsdkenv_unix.sh.in @@ -21,6 +21,11 @@ OO_SDK_HOME=@OO_SDK_HOME@ # Example: OFFICE_HOME=/opt/staroffice OFFICE_HOME=@OFFICE_HOME@ +# URE installation directory. +# Example: OO_SDK_URE_HOME=/opt/openoffice.org/ure +OO_SDK_URE_HOME=@OO_SDK_URE_HOME@ +export OO_SDK_URE_HOME + # Directory of the make command. # Example: OO_SDK_MAKE_HOME=/usr/bin OO_SDK_MAKE_HOME=@OO_SDK_MAKE_HOME@ @@ -59,20 +64,42 @@ fi export OO_SDK_HOME # Check installation path for the office. -if [ -z "$OFFICE_HOME" ] +if [ -z "${OFFICE_HOME}" ] && [ -z "${OO_SDK_URE_HOME}" ] then - echo Error: Please insert a correct value for the variable OFFICE_HOME. + echo 'Error: Please set either the environment variable OFFICE_HOME or the' + echo 'environment variable OO_SDK_URE_HOME.' exit 0 fi -# Set office program path. -OFFICE_PROGRAM_PATH=$OFFICE_HOME/program -export OFFICE_PROGRAM_PATH +# Set office program path (only set when using an Office). +if [ "${OFFICE_HOME}" ] +then + OFFICE_PROGRAM_PATH=${OFFICE_HOME}/program + export OFFICE_PROGRAM_PATH +fi # Set UNO path, necessary to ensure that the cpp examples using the -# new UNO bootstrap mechanism use the configured office installation. -UNO_PATH=$OFFICE_PROGRAM_PATH -export UNO_PATH +# new UNO bootstrap mechanism use the configured office installation (only set +# when using an Office). +if [ "${OFFICE_HOME}" ] +then + UNO_PATH=${OFFICE_PROGRAM_PATH} + export UNO_PATH +fi + +if [ "${OO_SDK_URE_HOME}" ] +then + OO_SDK_URE_BIN_DIR=${OO_SDK_URE_HOME}/bin + OO_SDK_URE_LIB_DIR=${OO_SDK_URE_HOME}/lib + OO_SDK_URE_JAVA_DIR=${OO_SDK_URE_HOME}/share/java +else + OO_SDK_URE_BIN_DIR=${OFFICE_PROGRAM_PATH} + OO_SDK_URE_LIB_DIR=${OFFICE_PROGRAM_PATH} + OO_SDK_URE_JAVA_DIR=${OFFICE_PROGRAM_PATH}/classes +fi +export OO_SDK_URE_BIN_DIR +export OO_SDK_URE_LIB_DIR +export OO_SDK_URE_JAVA_DIR OO_EXAMPLE_OUT=$OO_SDK_HOME # Prepare appropriate output directory. @@ -97,8 +124,11 @@ case $sd_platform in directoryname=solintel platform='Solaris x86' fi + comid=C52 + pltfrm=sunpro + soext=so exampleout=SOLARISexample.out - LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:$OFFICE_PROGRAM_PATH:.:$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:${OO_SDK_URE_LIB_DIR}:.:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; @@ -110,9 +140,12 @@ case $sd_platform in fi directoryname=macosx + comid=gcc3 + pltfrm=gcc + soext=dylib exampleout=MACOSXexample.out platform=MacOSX - DYLD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:$OFFICE_PROGRAM_PATH:.:$DYLD_LIBRARY_PATH + DYLD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:${OO_SDK_URE_LIB_DIR}:.:$DYLD_LIBRARY_PATH export DYLD_LIBRARY_PATH ;; @@ -124,9 +157,12 @@ case $sd_platform in fi directoryname=linux + comid=gcc3 + pltfrm=gcc + soext=so exampleout=LINUXexample.out platform=Linux - LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:$OFFICE_PROGRAM_PATH:.:$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:${OO_SDK_URE_LIB_DIR}:.:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; @@ -138,9 +174,12 @@ case $sd_platform in fi directoryname=freebsd + comid=gcc3 + pltfrm=gcc + soext=so exampleout=FREEBSDexample.out platform=FreeBSD - LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:$OFFICE_PROGRAM_PATH:.:$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:${OO_SDK_URE_LIB_DIR}:.:$LD_LIBRARY_PATH export LD_LIBRARY_PATH if [ -e "/sbin/sysctl" ] @@ -169,15 +208,10 @@ case $sd_platform in esac # Add directory of the SDK tools to the path. -PATH=$OO_SDK_HOME/$directoryname/bin:$OO_EXAMPLE_OUT/$exampleout/bin:$OFFICE_PROGRAM_PATH:.:$PATH +PATH=$OO_SDK_HOME/$directoryname/bin:$OO_EXAMPLE_OUT/$exampleout/bin:${OO_SDK_URE_BIN_DIR}:.:$PATH # Set the classpath -if [ -n "$CLASSPATH" ] -then -CLASSPATH=$OFFICE_PROGRAM_PATH/classes/jurt.jar:$OFFICE_PROGRAM_PATH/classes/unoil.jar:$OFFICE_PROGRAM_PATH/classes/ridl.jar:$OFFICE_PROGRAM_PATH/classes/juh.jar:$CLASSPATH -else -CLASSPATH=$OFFICE_PROGRAM_PATH/classes/jurt.jar:$OFFICE_PROGRAM_PATH/classes/unoil.jar:$OFFICE_PROGRAM_PATH/classes/ridl.jar:$OFFICE_PROGRAM_PATH/classes/juh.jar -fi +CLASSPATH=${OO_SDK_URE_JAVA_DIR}/juh.jar:${OO_SDK_URE_JAVA_DIR}/jurt.jar:${OO_SDK_URE_JAVA_DIR}/ridl.jar:${OO_SDK_URE_JAVA_DIR}/unoloader.jar${OFFICE_PROGRAM_PATH+:${OFFICE_PROGRAM_PATH}/classes/unoil.jar}${CLASSPATH+:${CLASSPATH}} export CLASSPATH @@ -226,6 +260,27 @@ fi export PATH +# For URE, prepare symbolic links for libraries: +rm -f "${OO_SDK_HOME}/${directoryname}/lib/libuno_cppu.${soext}" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_sal.${soext}" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \ + "${OO_SDK_HOME}/${directoryname}/lib/libstlport_${pltfrm}.${soext}" +if [ "${OO_SDK_URE_HOME}" ] +then + mkdir -p "${OO_SDK_HOME}/${directoryname}/lib" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_cppu.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_sal.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \ + "${OO_SDK_HOME}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libstlport_${pltfrm}.${soext}" \ + "${OO_SDK_HOME}/${directoryname}/lib/libstlport_${pltfrm}.${soext}" +fi + # Prepare shell with all necessary environment variables. echo echo " ************************************************************************" @@ -234,6 +289,7 @@ echo " * SDK environment is prepared for ${platform}" echo " *" echo " * SDK = $OO_SDK_HOME" echo " * Office = $OFFICE_HOME" +echo " * URE = $OO_SDK_URE_HOME" echo " * Make = $OO_SDK_MAKE_HOME" echo " * Zip = $OO_SDK_ZIP_HOME" echo " * C++ Compiler = $OO_SDK_CPP_HOME" |