Jump to content

borgotech

Members
  • Posts

    14
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by borgotech

  1. Hi, this is my script and it work very well under FreeBSD 8.2 amd64. There are two files, one is the script, named mangos_autocompile and another file is the config file namned mangoscnf. Change the path of "where you want to install your core" in mangoscnf file, .... chmox +x mangos_autocompile and execute it.

    [== ==]
    mangos_autocompile
    

    #!/bin/sh

    #

    . mangoscnf

    echo "-----------------------------------"

    echo "- Mangos Autocompiler by me.. :-) -"

    echo "-----------------------------------"

    echo "Cleaning up directories of old Mangos souces"

    if [ -e $SOURCES ]; then

    rm -r $SOURCES

    else

    mkdir $SOURCES

    cd $SOURCES

    echo "... old sources cleaned up ..."

    fi

    echo "############################ "

    echo "Downloading MANGOS Core ...."

    echo "############################"

    git clone $SOURCES_GIT $SOURCES

    echo "######################################### "

    echo "Downloading Script Engine ScriptDev2 ...."

    echo "######################################### "

    git clone $SOURCES_GIT_SD2

    echo "Mangos and Script Engine have been downloaded"

    echo "######################################## "

    echo "Applying Script Engine patch to Core ..."

    echo "######################################## "

    cd $PATCHES_DIR

    FILENAME=`ls | grep .patch`

    PATCH_FILE=$FILENAME

    patch -d ${SOURCES} -p1 < ${PATCH_FILE}

    #git apply $PATCHES_DIR/$PATCH_FILE

    cd $SOURCES

    echo "############### "

    echo "configuring ..."

    echo "############### "

    automake $SOURCES/src/bindings/ScriptDev2/Makefile

    mkdir build

    cd build

    cmake ../ -DPREFIX=$INSTALL_DIR -DDEBUG=0 -DPCH=0 -DTBB_USE_EXTERNAL=0 -DUSE_STD_MALLOC=0 -DACE_USE_EXTERNAL=1

    echo "###############################"

    echo "Configuration completed."

    echo "Entering compilation process..."

    echo "###############################"

    make -j$CORES

    echo "##########################################"

    echo "Core compilation completed, installing ... "

    echo "##########################################"

    make install

    echo "Cleaning ...."

    make clean

    echo "Done."

    [== ==]
    --------------------------------------------------
    

    [== ==]
    mangoscnf
    

    #######################

    ########CONFIG#########

    # Where will be install Core.

    INSTALL_DIR="/usr/home/user/mangos_server"

    #

    # The copilation source directory..

    SOURCES="/usr/home/user/mangos_src"

    # Mangos Core source GIT repository

    SOURCES_GIT="git://github.com/mangos/mangos.git"

    # ScriptDev2 GIT repository

    SOURCES_GIT_SD2="git://github.com/scriptdev2/scriptdev2.git $SOURCES/src/bindings/ScriptDev2"

    #

    # ScriptDev2 patch file directory

    PATCHES_DIR="$SOURCES/src/bindings/ScriptDev2/patches"

    #

    # Nr. of cores+1 Ex: dual core=2+1

    CORES=3

    #########END###########

    #######################

    [== ==]
    -----------------------------------------------------------------------
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use