updated paths in build script & created zero input variant script

This commit is contained in:
theswgsource
2018-04-28 02:06:18 -07:00
parent c3f5e782e6
commit b95b7dbfaf
2 changed files with 112 additions and 8 deletions

View File

@@ -131,7 +131,7 @@ echo -e "\033[1;32m";
read -p "******************************************************************
G++ ONLY COMPILE METHOD!!!
This secton of script will compile the src to binaries. The new
binaries will be located in /home/swg/swg-main/build/bin
binaries will be located in /root/swg-main/build/bin
******************************************************************
******************************************************************
Do you want to recompile the server code (C++) (GCC) now? (y/n) " response
@@ -144,9 +144,9 @@ if [[ $response =~ ^(yes|y| ) ]]; then
export ORACLE_HOME=/usr/lib/oracle/12.2/client;
export JAVA_HOME=/usr/java;
export ORACLE_SID=swg;
rm -rf /home/swg/swg-main/build
mkdir /home/swg/swg-main/build
mkdir /home/swg/swg-main/build/bin
rm -rf /root/swg-main/build
mkdir /root/swg-main/build
mkdir /root/swg-main/build/bin
cd $basedir/build
if [ $(arch) == "x86_64" ]; then
@@ -179,7 +179,7 @@ fi
#read -p "******************************************************************
#CLANG ONLY COMPILER METHOD!!!
#This secton of script will compile the src to binaries. The new
#binaries will be located in /home/swg/swg-main/build/bin
#binaries will be located in /root/swg-main/build/bin
#******************************************************************
#******************************************************************
#Do you want to recompile the server code (C++) (CLANG) now? (y/n) " response
@@ -192,9 +192,9 @@ fi
# export ORACLE_HOME=/usr/lib/oracle/12.2/client;
# export JAVA_HOME=/usr/java;
# export ORACLE_SID=swg;
# rm -rf /home/swg/swg-main/build
# mkdir /home/swg/swg-main/build
# mkdir /home/swg/swg-main/build/bin
# rm -rf /root/swg-main/build
# mkdir /root/swg-main/build
# mkdir /root/swg-main/build/bin
# cd $basedir/build
#
# if type clang &> /dev/null; then

104
updateServer.sh Executable file
View File

@@ -0,0 +1,104 @@
#!/bin/bash
basedir=$PWD
PATH=$PATH:$basedir/build/bin
DBSERVICE=
DBUSERNAME=
DBPASSWORD=
HOSTIP=
CLUSTERNAME=
NODEID=
DSRC_DIR=
DATA_DIR=
# Public facing - builds profdata
#MODE=RELWITHDEBINFO
# Public facing, builds heavily optimized bins
#MODE=MINSIZEREL
if [ ! -d $basedir/build ]
then
mkdir $basedir/build
fi
echo -e "\n";
echo -e "\033[1;33m ___ __ __ ___ ___ _ ___ ";
echo -e "\033[1;33m/ __|\ \ / // __| / __| ___ _ _ _ _ __ ___ __ __/ | |_ )";
echo -e "\033[1;33m\__ \ \ \/\/ /| (_ | \__ \/ _ \| || || '_|/ _|/ -_) \ V /| | _ / /";
echo -e "\033[1;33m|___/ \_/\_/ \___| |___/\___/ \_,_||_| \__|\___| \_/ |_|(_)/___|";
echo -e "\033[1;31m";
GIT_USER=${response,,}
GIT_URL=https://${GIT_USER}@bitbucket.org/theswgsource/
GIT_REPO_DEPEND=${GIT_URL}dependencies-1.2.git
GIT_REPO_SRC=${GIT_URL}src-1.2.git
GIT_REPO_DSRC=${GIT_URL}dsrc-1.2.git
GIT_REPO_CONFIG=${GIT_URL}configs-1.2.git
GIT_REPO_CLIENTDATA=${GIT_URL}clientdata-1.2.git
GIT_REPO_DEPEND_BRANCH=master
GIT_REPO_SRC_BRANCH=master
GIT_REPO_DSRC_BRANCH=master
GIT_REPO_CONFIG_BRANCH=master
GIT_REPO_CLIENTDATA_BRANCH=master
git pull
cd $basedir/src
git pull
cd $basedir
cd $basedir/dsrc
git pull
cd $basedir
cd $basedir/configs
git pull
cd $basedir
cd $basedir/clientdata
git pull
cd $basedir
MODE=Release
unset ORACLE_HOME;
unset ORACLE_SID;
unset JAVA_HOME;
export ORACLE_HOME=/usr/lib/oracle/12.2/client;
export JAVA_HOME=/usr/java;
export ORACLE_SID=swg;
rm -rf /root/swg-main/build
mkdir /root/swg-main/build
mkdir /root/swg-main/build/bin
cd $basedir/build
export LDFLAGS=-L/usr/lib32
export CMAKE_PREFIX_PATH="/usr/lib32:/lib32:/usr/lib/i386-linux-gnu:/usr/include/i386-linux-gnu"
cmake -DCMAKE_C_FLAGS=-m32 \
-DCMAKE_CXX_FLAGS=-m32 \
-DCMAKE_EXE_LINKER_FLAGS=-m32 \
-DCMAKE_MODULE_LINKER_FLAGS=-m32 \
-DCMAKE_SHARED_LINKER_FLAGS=-m32 \
-DCMAKE_BUILD_TYPE=$MODE \
$basedir/src
make -j$(nproc)
strip -s bin/*
cd $basedir
oldPATH=$PATH
PATH=$basedir/build/bin:$PATH
$basedir/utils/build_java_multi.sh
$basedir/utils/build_miff.sh
$basedir/utils/build_tab_multi.sh
$basedir/utils/build_tpf_multi.sh
$basedir/utils/build_object_template_crc_string_tables.py
$basedir/utils/build_quest_crc_string_tables.py
PATH=$oldPATH
cd $basedir/stationapi
./build.sh
mv -T /root/swg-main/stationapi/build/bin /root/swg-main/chat
cd $basedir
echo -e "\033[1;33m";
echo "Congratulations the latest server updates have been downloaded and compiled!"