From 0c26a6111c7cb777ae6cbd11964c4674cf4bf221 Mon Sep 17 00:00:00 2001 From: CekisSWG Date: Fri, 19 Apr 2019 08:20:38 -0700 Subject: [PATCH] Squashed commit of the following: commit b499feffaca921d7303b0e9d41c5a95f4d37cc92 Merge: cd4eadc 07174ee Author: CekisSWG Date: Fri Apr 19 08:15:37 2019 -0700 Merge branch 'master' into ant_build # Conflicts: # build_linux.sh commit cd4eadc50a782241b393a55808b6c1c610109f47 Author: CekisSWG Date: Fri Apr 19 08:15:03 2019 -0700 Updated submodules commit 30033e17cf8d7e871414e9e83496c823af9f3a7f Author: CekisSWG Date: Mon Mar 18 23:30:43 2019 -0400 updated dsrc submodule version commit 3c938006373d128fc6d354a65740c9a841cde685 Author: CekisSWG Date: Sat Mar 16 20:55:24 2019 -0400 Fixed some unneeded Java 11 changes commit 8cecdea1f3a3e7df4892529cfcf292eceaaaa48f Author: CekisSWG Date: Sat Mar 16 20:18:52 2019 -0400 Updated build.xml to not pull before compiling commit 099e5572fb09667042d9b475d77717c06eb95d24 Merge: 64706b1 3dffac9 Author: CekisSWG Date: Thu Mar 14 17:03:29 2019 -0400 Merge branch 'ant_build' of github.com:SWG-Source/swg-main into ant_build commit 64706b1180a45f8936d8ca3fa0077c5fe209e5ab Author: CekisSWG Date: Thu Mar 14 17:03:19 2019 -0400 Updated Ant build to now checkout specific branches commit 3dffac9e7aedee902768e0e2dcc7f0c4dc3c6731 Author: Cekis Date: Mon Mar 11 00:06:41 2019 -0700 Update README.md commit 8ae089e291b7dcfe60f3a940225aea47d6ba2c05 Author: Cekis Date: Mon Mar 11 00:05:50 2019 -0700 Update README.md commit f8820a00ec3db600460534b4e400d0689c2d26da Author: CekisSWG Date: Mon Mar 11 02:59:27 2019 -0400 Modified build script to accomodate submodules commit 99987dce77061cd45d7ae82a334917f472219c65 Author: CekisSWG Date: Mon Mar 11 02:33:40 2019 -0400 Added config repo commit b28e57b4ba07a5ea63973b04e7143f50cf099d59 Author: CekisSWG Date: Sun Mar 10 15:23:25 2019 -0400 Updated per new submodule usage. commit 169d6c3f71ddee74ae2b07d5faa5407b0d32c8bf Author: CekisSWG Date: Sun Mar 10 14:55:55 2019 -0400 Adding submodules to swg-main repo for easier usage. commit fd865d971d9004b9b80c8b03a8483dccd926b249 Merge: c604a07 a8b9067 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Sun Mar 10 12:03:28 2019 -0500 Merge remote-tracking branch 'origin/master' into ant_build commit c604a07b51ea27bd3513c938f2f486bda6e89f48 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Sun Mar 10 11:51:21 2019 -0500 Update gitignore commit e0c2b752ecbcac05ccc6c615a7a09ff75d5a0dce Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Sun Mar 10 11:48:26 2019 -0500 Remove stationapi/ from swg-main. It's getting its own repo. commit d6b5d90a2cd5b9a8ea3ec41298fbf92c706f70bc Author: SWG Date: Wed Mar 6 23:59:17 2019 -0500 Added moving chat binaries to base dir for build chat target commit 6679836f0157926dfffd3feebcf17061797a3aab Author: SWG Date: Wed Mar 6 23:49:08 2019 -0500 Fixed issue where more than one cluster of the same name could be added to the system. commit cb8ab05d7e64e0c89705d09f3bbbf1a3ddc22a7c Author: SWG Date: Wed Mar 6 17:06:47 2019 -0500 fixed merge issues commit d15dde6ae5b9a997532be2b9548d482068e42c18 Merge: 33fac3c 5f452c7 Author: SWG Date: Wed Mar 6 17:00:41 2019 -0500 Added initial compile chat server target commit 33fac3cafb01b353aadbcfb13fd3353e81697581 Author: SWG Date: Wed Mar 6 16:59:48 2019 -0500 Added initial compile chat server target commit 5f452c7817a59c4b6d6a221da4e8fe85e9b50ff6 Author: Cekis Date: Sat Mar 2 21:25:03 2019 -0800 fixed service_name bug commit 27e6c912f83eb94c30273c3c7baad611c140f734 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 16:25:03 2019 -0600 Set default to something harmless commit d5f3b42dd204c7cd13c890c35c232012143222d2 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 13:31:40 2019 -0600 Instruct users to make their own local.properties if they want to commit 915ff5adecdcf60aa0f703eb5f8695013ef09509 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 13:29:01 2019 -0600 Remove sample local.properties... bummer commit 68d224850b430f8c8c216d2b7cfa35c7fe749180 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 12:55:10 2019 -0600 typos... /facepalm commit eb9f6c92cddc38da0ead50c072742461f95cfd7e Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 12:47:45 2019 -0600 gitignore local.properties so that settings users change don't mess with future git pulls commit 70b336ee148afb659729fcba4312b9032a2207a3 Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 12:45:33 2019 -0600 Add local.properties so users can change things if they want to commit 09bc9094c416db0f8bcaa8f20b905ee403657a4f Author: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Thu Feb 21 09:09:38 2019 -0600 Delete depreciated update script commit bf979ebdc28887a2a5632b0d39f8c6d186a6ac77 Author: SWG Date: Wed Feb 13 01:35:31 2019 -0500 Fixed bug caused by bad reference commit 550ba4660fe4ed7855f0bbe91545be6edd02c654 Author: SWG Date: Tue Feb 12 18:54:45 2019 -0500 Added targets to configure settings commit 26f352ed32a374e2135dd86513933027eeffcc16 Author: SWG Date: Tue Feb 12 12:32:48 2019 -0500 Fixed bugs with ant script commit 569b62783a2c58b217ea1ba549fe30283923328e Author: Cekis Date: Fri Feb 8 14:13:42 2019 -0500 Updated build.xml to handle compiler better and set default to GCC and Release mode commit d66964b27776ee22147b2b10a5d7e5c6b8eab65d Author: Cekis Date: Sun Jan 27 19:29:20 2019 -0500 Added force kill for SwgGameServer processes commit 2233d2dea70b1dfda11dbb0b123d37766df5e6eb Merge: d322a0e a7cddbd Author: Cekis Date: Sun Jan 27 19:08:43 2019 -0500 Merge branch 'master' of https://github.com/SWG-Source/swg-main into ant_build commit d322a0eb93ea70726ae089a23db69c3ea6a92a02 Author: Cekis Date: Sat Jan 19 10:36:54 2019 -0800 Update README.md commit af69d76ffff17fc4f4886a4caffb394ce7fa2841 Author: CekisSWG Date: Fri Dec 28 16:44:47 2018 -0800 Updated changes to SQLPlus targets commit 3b0bf10c0dff0ac9de2e66ee5a8789a467ab505e Author: CekisSWG Date: Fri Dec 28 21:38:19 2018 +0000 Adjusted for missing LD_LIBRARY_PATH var - oops commit 2a25db52d959b0430fc6b62ceba7b8bb8059ea5b Author: CekisSWG Date: Fri Dec 28 21:31:20 2018 +0000 Adjusted for missing LD_LIBRARY_PATH var commit 210397baca401a5ba724f4e945c8efdf15a120e6 Author: CekisSWG Date: Fri Dec 28 20:34:21 2018 +0000 added an echo to indicate which compiler is being used. commit ed6d4687c9f30f58ebde9b1af5823e124628f796 Author: CekisSWG Date: Fri Dec 28 20:31:52 2018 +0000 Added configuration to easily choose gcc or clang compilers commit ce657b4320a69c7ae3160539253cf2e221a884fb Author: CekisSWG Date: Fri Dec 28 02:36:09 2018 +0000 Added new ANT build files commit d66e44c6b99fd54f75f80d3e1b312c3a40c780d9 Author: CekisSWG Date: Thu Dec 27 19:00:41 2018 +0000 Updated build script to now use ANT for building. --- .gitignore | 7 +- .gitmodules | 17 ++ README.md | 145 +++++-------- build.properties | 29 +++ build.xml | 478 +++++++++++++++++++++++++++++++++++++++++ build_dsrc.sh | 179 ---------------- build_linux.sh | 541 ----------------------------------------------- build_tabs.sh | 41 ---- clientdata | 1 + dsrc | 1 + exe | 1 + git_targets.xml | 195 +++++++++++++++++ src | 1 + stationapi | 1 + updateServer.sh | 104 --------- 15 files changed, 778 insertions(+), 963 deletions(-) create mode 100644 .gitmodules mode change 100644 => 100755 README.md create mode 100755 build.properties create mode 100755 build.xml delete mode 100755 build_dsrc.sh delete mode 100755 build_linux.sh delete mode 100755 build_tabs.sh create mode 160000 clientdata create mode 160000 dsrc create mode 160000 exe create mode 100755 git_targets.xml create mode 160000 src create mode 160000 stationapi delete mode 100755 updateServer.sh diff --git a/.gitignore b/.gitignore index eef611b..3655760 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,8 @@ build/ chat/ -clientdata/ configs/ data/ dependencies/ -dsrc/ -exe/ -src/ -stationapi/ +miff/ .setup +local.properties diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e8cf90d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,17 @@ +[submodule "stationapi"] + path = stationapi + url = https://github.com/SWG-Source/stationapi.git +[submodule "dsrc"] + path = dsrc + url = https://github.com/SWG-Source/dsrc.git +[submodule "src"] + path = src + url = https://github.com/SWG-Source/src.git +[submodule "clientdata"] + path = clientdata + url = https://github.com/SWG-Source/clientdata.git +[submodule "exe"] + path = exe + url = https://github.com/SWG-Source/configs.git + ignore = dirty + diff --git a/README.md b/README.md old mode 100644 new mode 100755 index a0df072..b933b2f --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# SWGSource V1.2 Build Instructions +# SWGSource V2.0 (version pending) Build Instructions ## Credit -Credit the StellaBellum team (DarthArgus, Cekis, SilentGuardian, Ness, SwgNoobs, DevCodex) for making their repositories open. All source is forked from those repositories and progressed from that point. +Credit the StellaBellum team (DarthArgus, Cekis, SilentGuardian, Ness, SwgNoobs, DevCodex) for making their repositories open. All source is forked from +those repositories and progressed from that point. ## What Do You Need To Do To Get A Server Running? @@ -16,91 +17,37 @@ When the GIT repository has been cloned successfully, open the swg-main director cd /home/swg/swg-main -Create a .setup file such that the build script knows where to start: - - touch .setup - ## Building -The process is nearly fully automated by executing the build_linux.sh script located in swg-main. The script will ask you a series of questions with each -question corresponding to a different step in the build process. Each step is defined below. To complete building, kick off the build script and follow -these instructions as detailed here to understand each step. +### Requirements +- Java 8 (1.8_u101) +- Apache ANT 1.9+ + +First and foremost, IF YOU DO NOT HAVE ANT INSTALLED ALREADY, you'll need to install Apache ANT (at least version 1.9) on your VM. ANT is required for the build process to run successfully. ANT +will be included in the next VM build, but for now here are the steps to do so manually: + +1. Go to https://ant.apache.com/download and download the latest version of ANT (1.10.5 is latest as of this writing, but anything over 1.9.x should work fine). +2. Expand the ANT package (.zip or .tar) into your VM (or server) directories somewhere. Take note of the location where you expanded it. +3. Edit your .profile and add a line that sets the location where you expanded it as ANT_HOME. +4. While you're editing your profile, make sure that JAVA_HOME is set to the right spot too. You can figure out where Java is installed by using the +"which" command: ```which java``` +5. Save your .profile edits and test out that ANT_HOME is installed properly by typing in "ant" at any location on your command line. You should get a +non-standard error message about how build.xml is missing. If JAVA_HOME isn't set correctly, you'll get an error about that too. ### Starting the Build Process -Follow the instructions of the build script. The binary building phase will take roughly 1 hour for each CPU core assigned to your VM. Do not skip any steps. -Execute the following script to start building (see detail on each step below this): +To complete building, kick off the build script from your swg-main directory by typing in: ```ant swg``` - ./build_linux.sh +The build process is fully configured in the build.properties file. There is no need to touch this file unless you have a fully customized version that you +would like to run. For starters, just don't worry about touching it. -#### Cloning the Repositories -The script will first ask if you would like to retrieve any GIT folders necessary (it knows which ones it needs to get). It will attempt to get the pre-configured -repositories that are outlined in the build script by cloning them. It will simply do a pull if the repositories already exist to bring them up to date. -This currently includes "src", "dsrc", and others: +You can also run sections of the build script manually (not recommended until you are used to the environment of which you're working in). - Do you want to pull/update git? (y/n) +#### ANT Usage +DID YOU KNOW?: You can specify multiple ANT targets with a single command as well (this goes for any of these targets you give it). ANT will execute them and make sure all +of their dependencies are met in the order you provide them: -If you answer "y" to the question, it will attempt to retrieve the latest version set of the code. If you hit enter or choose "n" it will skip to the next step. - -### Compile Phase -After getting the latest version of the code, the build script will then attempt to build the server. - -#### Compile Mode -The system first needs to know how you will be compiling the code. You have a choice of either DEBUG (d) mode or RELEASE (r) mode. If you do not enter "d" or "debug" for the mode then it is assumed you wish to build a RELEASE build. (release is recommended unless you have a specific reason to want debug.) - - Is this for DEBUG mode or RELEASE mode? (d/r): - -#### Compiling SRC -The first compile step is to build the server C++ code. This is the source found in the "src" folder. Once compiled, you should have compiled code in the "build" directory of swg-main: - - Do you want to recompile the server code (C++) now? (y/n) - -#### Building the Server Configuration Files -The next step will attempt to build the configuration files. This step captures data needed for the server to execute properly. The following information is captured in this step: - - Do you want to build the config environment now? (y/n) - Enter your IP address (LAN for port forwarding or internal, outside IP for DMZ) - -Enter the IP address of the host machine that will be the server. This is typically your VM IP Address. - - Enter the DSN for the database connection - -Enter the name of the database. This is typically just "//127.0.0.1/swg" without quotes. It uses the 127.0.0.1 localhost loopback instead of the VM IP on purpose. - - Enter the database username - -Enter the user name for the database connection. This is also typically just "swg" without quotes. - - Enter the database password - -Enter the password for the database connection. This is also typically just "swg" without quotes. - - Enter a name for the galaxy cluster - -This will be the cluster name of the galaxy. Use something creative (or not), this is the name of the galaxy you're going to choose when creating a new character. NOTE: Remember your cluster name because you will need it again in a later step. - -#### Compiling DSRC -The next step will be to build the Java code that resides in the dsrc folder. This code is where 99% of the game content and AI resides. This step takes a long time so go watch a movie or something while it builds. Note: It will give you the option of using "multi" or "safe" building. Multi takes advantage of multi-threaded compiling (typically faster). However, it was found that using it SOMETIMES caused issues, but these issues are likely no around any longer. Needless to say, if you encounter issues using MULTI, try using Safe instead which does not use multi-threaded compiling: - - Do you want to recompile the scripts (.java)? (y/n) - -The Script will currently build the ENTIRE dsrc at this step. If you want to build just an individual part, please see `./build_dsrc.sh` information at the bottom of this readme. - -#### Build your chat server - -This step will (re)build the stationapi chat server. - - Do you want to build stationapi chat server now? (y/n) - -#### Importing the Database SQL -This step will attempt to create the database schema from the SQL files that are in the src directory structure. It will create all database tables, functions, views and stored procedures the game needs to use. You can run this step without fear of ruining anything that is currently in place. Keep in mind that if you do attempt to import the database over the top of an existing swg database, it will simply throw errors after a very short attempt, but will not cause issue with your current data. Basically, you can't mess this part up: - - Import database? (y/n) - -If you haven't previously entered the necessary database information above, it will ask you for that information here. - -#### Clientdata symlink -The Clientdata Repo is in /home/swg/swg-main/clientdata. You MUST have this in place and have the symbolic link created before the server can execute successfully: - - Do you want to create the symlink for the clientdata folder? (y/n) +``` +ant git_src git_dsrc +``` #### Final configuration: @@ -115,32 +62,44 @@ Point your login.cfg in your game folder (on your client machine, NOT the VM) to AND YOU'RE DONE! +#MORE READING... -## build_dsrc.sh - -You may want to build certain parts of the dsrc individually instead of all at once as done in build_linux.sh. Here is some information about the specific steps in build_dsrc.sh: +The following targets ARE NOT REQUIRED, but you may find yourself wanting to build certain parts of the dsrc individually instead of all at once as done in the +ANT build script. Here is some information about the specific targets in ANT build file: #### Compiling the mIFF files -This step will compile all *.mif files into *.iff binary files. +The "compile_miff" target will compile all *.mif files into *.iff binary files. - Do you want to build the mIFF files (.mif)? (y/n) + ```ant compile_miff``` #### Compiling the Datatable files -This step will compile all the *.tab files into *.iff binary files. Again, speed constraints aside, you have the choice of using MULTI or SAFE for compiling (see DSRC Compiling above): +The "compile_tab" target will compile all the *.tab files into *.iff binary files: - Do you want to build the datatables (.tab)? (y/n) + ```ant compile_tab``` #### Compiling Template Files -This step will compile all the *.tpf files into *.iff binary files. You have a choice of Multi or Safe here as well: +The "compile_tpf" target will compile all the *.tpf files into *.iff binary files: - Do you want to build the template files (.tpf)? (y/n) + ```ant compile_tpf``` -If you have built the TPF files in this step (i.e. you didn't skip this step) then the build script will also attempt to recreate the Object Template and Quest CRC tables and subsequently will attempt to push those changes to the database since this will also be required. A GREAT feature to have when creating new template files or changing existing ones. +If you have built the TPF files in this step (i.e. you didn't skip this step) then the target will also attempt to recreate the Object Template and Quest CRC +tables and subsequently will attempt to push those changes to the database since this will also be required. A GREAT feature to have when creating new template files +or changing existing ones. + +Again... if you wish to do a multiple of these things, you can string multiple targets together like so (not all 3 are required and they can be added in any order as +ANT handles any dependencies already): + +```ant compile_miff compile_tab compile_tpf``` + +This particular command will first build the MIFF files, then compile the TAB files, then compile and load the Template Files into the database. ### Database Phase #### Building Object Template and Quest CRC Files -This step will compile the object template and quest CRC files. These files translate the long name of these files (including file path) into a very short code that allows the server to identify them without the danger of long text being transferred over the internet in packets. Basically a optimization that SOE implemented: +This step will compile the object template and quest CRC files. These files translate the long name of these files (including file path) into a very short code that +allows the server to identify them without the danger of long text being transferred over the internet in packets. Basically an optimization that SOE implemented: - Do you want to build the Object Template or Quest CRC files? (y/n) + ```ant load_templates``` -Building these files will also trigger the build script to then populate the database with the CRC's that were generated. If you are doing this build script in pieces (i.e. you're selectively building), this is a GREAT way to re-import new or changed TPF file changes. In order to re-import CRC's into the database, if you haven't already entered it above, it will ask you for the database information here. +Building these files will also trigger the target to then populate the database with the CRC's that were generated. If you are doing this target in pieces +(i.e. you're selectively building), this is a GREAT way to re-import new or changed TPF file changes. In order to re-import CRC's into the database, if you haven't +already entered it above, it will ask you for the database information here. diff --git a/build.properties b/build.properties new file mode 100755 index 0000000..f91ceca --- /dev/null +++ b/build.properties @@ -0,0 +1,29 @@ +### Note: Please don't change these for your local setup. You may get a merge conflict when updating if ever this file gets changed by a dev. Instead, make a local.properties file for your own settings. Thanks! + +# General +# This handles if the database will be dropped or not. Turn this on if you want to drop the db and do a "ant drop_database" from the swg-main dir. +firstrun = false + +# SWG Server Settings +cluster_name = swg +# max_characters_per_account is the number of characters that a single account may have, across all clusters +max_characters_per_account = 10 +# max_characters_per_cluster is the number of characters that a single cluster may have +max_characters_per_cluster = 250 +# character_slots is the number of characters that a single account may have on one cluster +character_slots = 10 + +# Database Settings +db_username = swg +db_password = swg +db_service = swg + +# Git Settings +src_branch = master +dsrc_branch = master +clientdata_branch = master +configs_branch = master + +# SRC Compilation +compiler = gcc +src_build_type = Release diff --git a/build.xml b/build.xml new file mode 100755 index 0000000..ef05e50 --- /dev/null +++ b/build.xml @@ -0,0 +1,478 @@ + + + + This build file will build all aspects of the SWG Source Code. Created by Cekis (cekisswg@gmail.com). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IP Address: ${ADDR4} + + + + + + + + + + + + Cleaning the SRC build directory. + + + + + + Cleaning the DSRC directory. + + + + + + + + Cleaning the DSRC script directory. + + + + + + + + + + Architecture is ${arch} + + + + Creating a ${src_build_type} build + + + + + + + + + + Using the GCC compiler + + + + + + Using the CLang compiler + + + + + + + + We have ${nproc} processors (cores) to use. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into cluster_list (id, name, num_characters, address, secret, locked, not_recommended) + select (select nvl(max(id)+1,1) from cluster_list), '${cluster_name}', 0, '${ADDR4}', 'N', 'N', 'N' from dual + where not exists (select '${cluster_name}', '${ADDR4}' from cluster_list); + + + + + + update default_char_limits set account_limit = ${max_characters_per_account}, cluster_limit = ${max_characters_per_cluster}; + update default_character_slots set num_slots = ${character_slots} where character_type_id = 1; + + + + + + + + + + Database Drop Aborted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build_dsrc.sh b/build_dsrc.sh deleted file mode 100755 index f617173..0000000 --- a/build_dsrc.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/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"; - -echo -e "\033[1;36m"; -#Commenting this for now... This script doesn't pull anyways. -#read -p "What is your GIT username (so we can get the code correctly): " response -#GIT_USER=${response,,} -#GIT_URL=https://${GIT_USER}@github.com/SWG-Source/ -#GIT_REPO_DEPEND=${GIT_URL}dependencies.git -#GIT_REPO_SRC=${GIT_URL}src.git -#GIT_REPO_DSRC=${GIT_URL}dsrc.git -#GIT_REPO_CONFIG=${GIT_URL}configs.git -#GIT_REPO_CLIENTDATA=${GIT_URL}clientdata.git - -# specify git branches for each repo -#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 - - -echo -e "\033[2;31m****************************************************************** -Begin individual building of scripts for /dsrc to /data -******************************************************************"; -echo -e "\033[2;36m"; -read -p "Do you want to recompile the scripts (.java)? (y/n) " response -response=${response,,} # tolower -if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders - oldPATH=$PATH - PATH=$basedir/build/bin:$PATH - - read -p "Do you wanna use multi-core building (default) or stick with the safe option? You may need to rerun the single version if there are stragglers. (multi/safe) " response - response=${response,,} - if [[ $response =~ ^(multi|m| ) ]]; then - $basedir/utils/build_java_multi.sh - else - $basedir/utils/build_java.sh - fi - - PATH=$oldPATH -fi - -buildTemplates=false - -read -p "Do you want to build the mIFF files (.mif)? (y/n) " response -response=${response,,} -if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders - oldPATH=$PATH - PATH=$basedir/build/bin:$PATH - - $basedir/utils/build_miff.sh - - buildTemplates=true - - PATH=$oldPATH -fi - -read -p "Do you want to build the datatables (.tab)? (y/n) " response -response=${response,,} -if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders - oldPATH=$PATH - PATH=$basedir/build/bin:$PATH - - read -p "Do you wanna use multi-core building (default) or stick with the safe option? You may need to rerun the single version if there are stragglers. (multi/safe) " response - response=${response,,} - if [[ $response =~ ^(multi|m| ) ]]; then - $basedir/utils/build_tab_multi.sh - else - $basedir/utils/build_tab.sh - fi - - buildTemplates=true - - PATH=$oldPATH -fi - -read -p "Do you want to build the template files (.tpf)? (y/n) " response -response=${response,,} -if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders - oldPATH=$PATH - PATH=$basedir/build/bin:$PATH - - read -p "Do you wanna use multi-core building (default) or stick with the safe option? You may need to rerun the single version if there are stragglers. (multi/safe) " response - response=${response,,} - if [[ $response =~ ^(multi|m| ) ]]; then - $basedir/utils/build_tpf_multi.sh - else - $basedir/utils/build_tpf.sh - fi - - buildTemplates=true - - PATH=$oldPATH -fi - -if [[ $buildTemplates = false ]]; then - read -p "Do you want to build the Object Template or Quest CRC files? (y/n) " response - response=${response,,} - if [[ $response =~ ^(yes|y| ) ]]; then - $buildTemplates=true - fi -fi - -templatesLoaded=false - -if [[ $buildTemplates = true ]]; then - echo "Object Template and Quest CRC files will now be built and re-imported into the database." - - if [[ -z "$DBSERVICE" ]]; then - echo "Enter the DSN for the database connection e.g. //127.0.0.1/swg" - read DBSERVICE - fi - - if [[ -z "$DBUSERNAME" ]]; then - echo "Enter the database username " - read DBUSERNAME - fi - - if [[ -z "$DBPASSWORD" ]]; then - echo "Enter the database password " - read DBPASSWORD - fi - - #prepare environment to run data file builders - oldPATH=$PATH - PATH=$basedir/build/bin:$PATH - - $basedir/utils/build_object_template_crc_string_tables.py - $basedir/utils/build_quest_crc_string_tables.py - - cd $basedir/src/game/server/database - - echo "Loading template list" - - perl ./templates/processTemplateList.pl < $basedir/dsrc/sku.0/sys.server/built/game/misc/object_template_crc_string_table.tab > $basedir/build/templates.sql - sqlplus ${DBUSERNAME}/${DBPASSWORD}@${DBSERVICE} @$basedir/build/templates.sql > $basedir/build/templates.out - - templatesLoaded=true - - cd $basedir - PATH=$oldPATH -fi -echo -e "\033[2;36m"; -echo -e "\033[1;31m****************************************************************** -END of individual building of scripts for /dsrc to /data -******************************************************************" diff --git a/build_linux.sh b/build_linux.sh deleted file mode 100755 index c2dd6fe..0000000 --- a/build_linux.sh +++ /dev/null @@ -1,541 +0,0 @@ -#!/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"; - -echo -e "\033[1;36m"; -#read -p "What is your GIT username (so we can get the code correctly): " response -#GIT_USER=${response,,} -GIT_URL=https://github.com/SWG-Source/ -GIT_REPO_DEPEND=${GIT_URL}dependencies.git -GIT_REPO_SRC=${GIT_URL}src.git -GIT_REPO_DSRC=${GIT_URL}dsrc.git -GIT_REPO_CONFIG=${GIT_URL}configs.git -GIT_REPO_CLIENTDATA=${GIT_URL}clientdata.git -GIT_REPO_STATIONAPI=${GIT_URL}stationapi.git - -# specify git branches for each repo -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_REPO_STATIONAPI_BRANCH=master - -echo -e "\033[1;31m"; -if [ ! -f $basedir/.setup ]; then - if [[ $(lsb_release -a) =~ .*Ubuntu.* ]] || [ -f "/etc/debian_version" ] - then -read -p "****************************************************************** -This section of the build script will install latest dependencies -****************************************************************** -****************************************************************** -!!!ONLY RUN ONCE!!! Do you want to install dependencies (y/n)?" response - response=${response,,} # tolower - if [[ $response =~ ^(yes|y| ) ]]; then - if [[ $(git lfs install) = *"Git LFS initialized." ]]; then - if [ ! -d $basedir/dependencies ]; then - git clone -b $GIT_REPO_DEPEND_BRANCH $GIT_REPO_DEPEND dependencies - cd $basedir/dependencies - git lfs install - git lfs pull - cd $basedir - else - cd $basedir/dependencies - git pull - git lfs pull - cd $basedir - fi - $basedir/utils/init/debian.sh - source /etc/profile.d/java.sh - source /etc/profile.d/oracle.sh - touch $basedir/.setup - - echo "Please login and out or reboot as changes have been made to your PATH " - else - echo "Please install Git LFS and try again." - fi - fi - fi -fi - -echo -e "\033[1;36m"; -read -p "****************************************************************** -This section of script will pull latest src/dsrc from our github -repo. https://github.com/SWG-Source -****************************************************************** -****************************************************************** -Do you want to pull/update git? (y/n) " response -response=${response,,} # tolower -if [[ $response =~ ^(yes|y| ) ]]; then - # update main repo - git pull - - # update or clone each sub-repo - if [ ! -d $basedir/src ]; then - git clone -b $GIT_REPO_SRC_BRANCH $GIT_REPO_SRC src - else - cd $basedir/src - git pull - cd $basedir - fi - - if [ ! -d $basedir/dsrc ]; then - git clone -b $GIT_REPO_DSRC_BRANCH $GIT_REPO_DSRC dsrc - else - cd $basedir/dsrc - git pull - cd $basedir - fi - - if [ ! -d $basedir/configs ]; then - git clone -b $GIT_REPO_CONFIG_BRANCH $GIT_REPO_CONFIG configs - else - cd $basedir/configs - git pull - cd $basedir - fi - if [ ! -d $basedir/clientdata ]; then - git clone -b $GIT_REPO_CLIENTDATA_BRANCH $GIT_REPO_CLIENTDATA clientdata - else - cd $basedir/clientdata - git pull - cd $basedir - fi - if [ ! -d $basedir/stationapi/.git ]; then - rm -rf $basedir/stationapi - git clone -b $GIT_REPO_STATIONAPI_BRANCH $GIT_REPO_STATIONAPI stationapi - else - cd $basedir/stationapi - git pull - cd $basedir - fi -fi - -read -p "Is this for DEBUG mode or RELEASE mode? (d/r): " response -response=${response,,} -if [[ $response =~ ^(debug|d| ) ]]; then - MODE=Debug -else - MODE=Release -fi - -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 -****************************************************************** -****************************************************************** -Do you want to recompile the server code (C++) (GCC) now? (y/n) " response -response=${response,,} # tolower -if [[ $response =~ ^(yes|y| ) ]]; then - - 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 $basedir/build - mkdir $basedir/build - mkdir $basedir/build/bin - cd $basedir/build - - if [ $(arch) == "x86_64" ]; then - 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 - else - cmake $basedir/src -DCMAKE_BUILD_TYPE=$MODE - fi - - make -j$(nproc) - - # This option strips the bins of debug to make smaller size - if [[ $MODE =~ ^(Release) ]]; then - strip -s bin/* - fi - - cd $basedir - -fi - -#echo -e "\033[2;33m"; -#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 -#****************************************************************** -#****************************************************************** -#Do you want to recompile the server code (C++) (CLANG) now? (y/n) " response -#response=${response,,} # tolower -#if [[ $response =~ ^(yes|y| ) ]]; then -# -# 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 /home/swg/swg-main/build -# mkdir /home/swg/swg-main/build -# mkdir /home/swg/swg-main/build/bin -# cd $basedir/build -# -# if type clang &> /dev/null; then -# export CC=clang -# export CXX=clang++ -# fi -# -# if [ $(arch) == "x86_64" ]; then -# 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 -# else -# cmake $basedir/src -DCMAKE_BUILD_TYPE=$MODE -# fi -# -# make -j$(nproc) -# -# # This option strips the bins of debug to make smaller size -# if [[ $MODE =~ ^(Release) ]]; then -# strip -s bin/* -# fi -# -# cd $basedir -# -#fi -echo -e "\033[1;36m"; -read -p "****************************************************************** -This section of script will add your VM's IP to NGE Server configs -New configs will be built in /home/swg/swg-main/exe/linux -****************************************************************** -****************************************************************** -Do you want to build the config environment now? (y/n) " response -response=${response,,} # tolower -if [[ $response =~ ^(yes|y| ) ]]; then - - # Prompt for configuration environment. -# read -p "Configure environment (local, live, tc)? " config_env -# - # Make sure the configuration environment exists. -# if [ ! -d $basedir/configs/$config_env ]; then -# echo "Invalid configuration environment." -# exit -# fi -# - - echo "Enter your IP address (LAN for port forwarding or internal, outside IP for DMZ)" - read HOSTIP - - echo "Enter the DSN for the database connection. i.e. //127.0.0.1/swg " - read DBSERVICE - - echo "Enter the database username. i.e. swg " - read DBUSERNAME - - echo "Enter the database password. i.e. swg " - read DBPASSWORD - - echo "Enter a name for the galaxy cluster. Use the same name for importing your swg database. " - read CLUSTERNAME - - if [ -d $basedir/exe ]; then - rm -rf $basedir/exe - fi - - mkdir -p $basedir/exe/linux/logs - mkdir -p $basedir/exe/shared - - ln -s $basedir/build/bin $basedir/exe/linux/bin - - cp -u $basedir/configs/$config_env/linux/* $basedir/exe/linux - cp -u $basedir/configs/$config_env/shared/* $basedir/exe/shared - - for filename in $(find $basedir/exe -name '*.cfg'); do - sed -i -e "s@DBSERVICE@$DBSERVICE@g" -e "s@DBUSERNAME@$DBUSERNAME@g" -e "s@DBPASSWORD@$DBPASSWORD@g" -e "s@CLUSTERNAME@$CLUSTERNAME@g" -e "s@HOSTIP@$HOSTIP@g" $filename - done - - # - # Generate other config files if their template exists. - # - - # Generate at least 1 node that is the /etc/hosts IP. - $basedir/utils/build_node_list.sh -fi -echo -e "\033[2;32m"; -read -p "****************************************************************** -This section of script will compile your /dsrc to /data. It will -basically convert your Java scripts, tabs & tpf to .iff that server -will be able to read. -NOTE: It will do all the conversions at once, or you can skip this -section of the script and run each individually with next sections -of script. -****************************************************************** -****************************************************************** -Do you want to build all the scripts now? (y/n) " response -response=${response,,} # tolower -if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders - oldPATH=$PATH - PATH=$basedir/build/bin:$PATH - - read -p "Do you wanna use multicore scripts or the safe option? -Recommended you use safe for this VM operation.(multi/safe) " response - response=${response,,} - if [[ $response =~ ^(multi|m| ) ]]; then - $basedir/utils/build_java_multi.sh - $basedir/utils/build_miff.sh - $basedir/utils/build_tab_multi.sh - $basedir/utils/build_tpf_multi.sh - else - $basedir/utils/build_java.sh - $basedir/utils/build_miff.sh - $basedir/utils/build_tab.sh - $basedir/utils/build_tpf.sh - fi - - $basedir/utils/build_object_template_crc_string_tables.py - $basedir/utils/build_quest_crc_string_tables.py - - PATH=$oldPATH -fi -#echo -e "\033[2;31m****************************************************************** -#Begin individual building of scripts for /dsrc to /data -#******************************************************************"; -#echo -e "\033[2;36m"; -#read -p "Do you want to recompile the scripts (.java)? (y/n) " response -#response=${response,,} # tolower -#if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders -# oldPATH=$PATH -# PATH=$basedir/build/bin:$PATH -# -# read -p "Do you wanna use multi-core building (default) or stick with the safe option? You may need to rerun the single version if there are stragglers. (multi/safe) " response -# response=${response,,} -# if [[ $response =~ ^(multi|m| ) ]]; then -# $basedir/utils/build_java_multi.sh -# else -# $basedir/utils/build_java.sh -# fi -# -# PATH=$oldPATH -#fi -# -#buildTemplates=false -# -#read -p "Do you want to build the mIFF files (.mif)? (y/n) " response -#response=${response,,} -#if [[ $response =~ ^(yes|y| ) ]]; then -# #prepare environment to run data file builders -# oldPATH=$PATH -# PATH=$basedir/build/bin:$PATH -# -# $basedir/utils/build_miff.sh -# -# buildTemplates=true -# -# PATH=$oldPATH -#fi -# -#read -p "Do you want to build the datatables (.tab)? (y/n) " response -#response=${response,,} -#if [[ $response =~ ^(yes|y| ) ]]; then - #prepare environment to run data file builders -# oldPATH=$PATH -# PATH=$basedir/build/bin:$PATH -# -# read -p "Do you wanna use multi-core building (default) or stick with the safe option? You may need to rerun the single version if there are stragglers. (multi/safe) " response -# response=${response,,} -# if [[ $response =~ ^(multi|m| ) ]]; then -# $basedir/utils/build_tab_multi.sh -# else -# $basedir/utils/build_tab.sh -# fi -# -# buildTemplates=true -# -# PATH=$oldPATH -#fi -# -#read -p "Do you want to build the template files (.tpf)? (y/n) " response -#response=${response,,} -#if [[ $response =~ ^(yes|y| ) ]]; then -# #prepare environment to run data file builders -# oldPATH=$PATH -# PATH=$basedir/build/bin:$PATH -# -# read -p "Do you wanna use multi-core building (default) or stick with the safe option? You may need to rerun the single version if there are stragglers. (multi/safe) " response -# response=${response,,} -# if [[ $response =~ ^(multi|m| ) ]]; then -# $basedir/utils/build_tpf_multi.sh -# else -# $basedir/utils/build_tpf.sh -# fi -# -# buildTemplates=true -# -# PATH=$oldPATH -#fi -# -#if [[ $buildTemplates = false ]]; then -# read -p "Do you want to build the Object Template or Quest CRC files? (y/n) " response -# response=${response,,} -# if [[ $response =~ ^(yes|y| ) ]]; then -# buildTemplates=true -# fi -#fi -# -#templatesLoaded=false -# -#if [[ $buildTemplates = true ]]; then -# echo "Object Template and Quest CRC files will now be built and re-imported into the database." -# -# if [[ -z "$DBSERVICE" ]]; then -# echo "Enter the DSN for the database connection " -# read DBSERVICE -# fi -# -# if [[ -z "$DBUSERNAME" ]]; then -# echo "Enter the database username " -# read DBUSERNAME -# fi -# -# if [[ -z "$DBPASSWORD" ]]; then -# echo "Enter the database password " -# read DBPASSWORD -# fi -# -# #prepare environment to run data file builders -# oldPATH=$PATH -# PATH=$basedir/build/bin:$PATH -# -# $basedir/utils/build_object_template_crc_string_tables.py -# $basedir/utils/build_quest_crc_string_tables.py -# -# cd $basedir/src/game/server/database -# -# echo "Loading template list" -# -# perl ./templates/processTemplateList.pl < $basedir/dsrc/sku.0/sys.server/built/game/misc/object_template_crc_string_table.tab > $basedir/build/templates.sql -# sqlplus ${DBUSERNAME}/${DBPASSWORD}@${DBSERVICE} @$basedir/build/templates.sql > $basedir/build/templates.out -# -# templatesLoaded=true -# -# cd $basedir -# PATH=$oldPATH -#fi -#echo -e "\033[2;36m"; -#echo -e "\033[1;31m****************************************************************** -#END of individual building of scripts for /dsrc to /data -#******************************************************************" -# -echo -e "\033[2;32m"; -read -p "****************************************************************** -This script will (re)build your stationapi (chat server) -****************************************************************** -****************************************************************** -Do you want to build stationapi chat server now? (y/n) " response -response=${response,,} - if [[ $response =~ ^(yes|y| ) ]]; then - cd $basedir/stationapi - ./build.sh - mv -T $basedir/stationapi/build/bin $basedir/chat - cd $basedir -fi - -echo -e "\033[0;37m"; -read -p "****************************************************************** -This script will import the SWG database into Oracle 12.2 R2. -****************************************************************** -****************************************************************** -Do you want to import the database to Oracle? (y/n) " response -response=${response,,} -if [[ $response =~ ^(yes|y| ) ]]; then - cd $basedir/src/game/server/database/build/linux; - unset ORACLE_HOME; - unset ORACLE_SID; - unset JAVA_HOME; - export JAVA_HOME=/usr/java; - export ORACLE_HOME=/usr/lib/oracle/12.2/client; - export ORACLE_SID=swg; - export PATH=$ORACLE_HOME/bin:$PATH; - - if [[ -z "$DBSERVICE" ]]; then - echo "Enter the DSN for the database connection i.e. //127.0.0.1/swg " - read DBSERVICE - fi - - if [[ -z "$DBUSERNAME" ]]; then - echo "Enter the database username i.e. swg " - read DBUSERNAME - fi - - if [[ -z "$DBPASSWORD" ]]; then - echo "Enter the database password i.e. swg " - read DBPASSWORD - fi - - ./database_update.pl --username=$DBUSERNAME --password=$DBPASSWORD --service=$DBSERVICE --goldusername=$DBUSERNAME --loginusername=$DBUSERNAME --createnewcluster --packages - - if [[ $templatesLoaded = false ]]; then - echo "Loading template list from object_template_crc_string table " - perl $basedir/src/game/server/database/templates/processTemplateList.pl < $basedir/dsrc/sku.0/sys.server/built/game/misc/object_template_crc_string_table.tab > $basedir/build/templates.sql - sqlplus ${DBUSERNAME}/${DBPASSWORD}@${DBSERVICE} @$basedir/build/templates.sql > $basedir/build/templates.out - cd $basedir - fi -fi -read -p "****************************************************************** -This section will link your clientdata folder to sys.client in the server -*************************************************************************** -****************************************************************** -Do you want to create the symlink for the clientdata folder? (y/n) " response -response=${response,,} -if [[ $response =~ ^(yes|y| ) ]]; then -cd $basedir/data/sku.0/sys.client -mkdir compiled -ln -s $basedir/clientdata/ $basedir/data/sku.0/sys.client/compiled/ -fi -echo -e "\033[1;33m"; -echo "Congratulations build_linux script is complete!" diff --git a/build_tabs.sh b/build_tabs.sh deleted file mode 100755 index 41101e5..0000000 --- a/build_tabs.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -server=$(find ./dsrc/sku.0/sys.server/compiled/game/datatables -name '*.tab') -inc=$(find ./dsrc/sku.0/sys.shared/compiled/game/datatables/include -name '*.tab') -shared=$(find ./dsrc/sku.0/sys.shared/compiled/game/datatables -name '*.tab') - -filenames=("${server[@]}" "${inc[@]}" "${shared[@]}") - -spinstr='|/-\' -i=0 -current=0 -total=$(ls ${filenames[@]} | wc -l) - -compile () { - ofilename=${filename/dsrc/data} - ofilename=${ofilename/.tab/.iff} - mkdir -p $(dirname $ofilename) - - [ -e $ofilename ] && rm "$ofilename" - - result=$(./exe/linux/bin/DataTableTool -i "$filename" -- -s SharedFile searchPath10=data/sku.0/sys.shared/compiled/game searchPath10=data/sku.0/sys.server/compiled/game 2>&1) - - if [[ ! $result =~ .*SUCCESS.* ]]; then - printf "\r$filename\n" - printf "$result\n\n" - fi -} - -for filename in ${filenames[@]}; do - current=$((current+1)) - i=$(( (i+1) %4 )) - perc=$(bc -l <<< "scale=0; $current*100/$total") - printf "\rGenerating Datatables: [${spinstr:$i:1}] $perc%%" - while [ `jobs | wc -l` -ge 12 ] - do - sleep 5 - done - compile $filename & done -wait - -echo "" diff --git a/clientdata b/clientdata new file mode 160000 index 0000000..e345de3 --- /dev/null +++ b/clientdata @@ -0,0 +1 @@ +Subproject commit e345de3e1f963be3b70f99add04e14e660122ead diff --git a/dsrc b/dsrc new file mode 160000 index 0000000..5c2e112 --- /dev/null +++ b/dsrc @@ -0,0 +1 @@ +Subproject commit 5c2e112349ad24d2f82d943c91e8994c37bd6adb diff --git a/exe b/exe new file mode 160000 index 0000000..2f5013d --- /dev/null +++ b/exe @@ -0,0 +1 @@ +Subproject commit 2f5013dea3b054f4a25b09b1a64e3c06683ad32c diff --git a/git_targets.xml b/git_targets.xml new file mode 100755 index 0000000..17f7f4e --- /dev/null +++ b/git_targets.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pulling @{dir}, branch: @{branch} + + + + + + + + + + + + + Pushing @{dir} to @{branch} + + + + + + + + + + + + + Checking out @{branch} branch + + + + + + + + + + + + + + Commiting @{file} to git on branch @{branch} + + + + + + + + + + + + + + + + + + + + + + + + Tagging @{dir} @{version} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cloning @{extn} with branch @{branch} (named: @{extn}@{branch}) + + + + + + + + + + + + + + + Updating @{dir}, extn: @{extn} + + + + + + diff --git a/src b/src new file mode 160000 index 0000000..a66c0d1 --- /dev/null +++ b/src @@ -0,0 +1 @@ +Subproject commit a66c0d1a915d700a9b8791245d2f08d145251d58 diff --git a/stationapi b/stationapi new file mode 160000 index 0000000..ae46b8a --- /dev/null +++ b/stationapi @@ -0,0 +1 @@ +Subproject commit ae46b8a6177ea800b0dde00630051a19876cffae diff --git a/updateServer.sh b/updateServer.sh deleted file mode 100755 index 71a1ff4..0000000 --- a/updateServer.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/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://github.com/SWG-Source/ -GIT_REPO_DEPEND=${GIT_URL}dependencies.git -GIT_REPO_SRC=${GIT_URL}src.git -GIT_REPO_DSRC=${GIT_URL}dsrc.git -GIT_REPO_CONFIG=${GIT_URL}configs.git -GIT_REPO_CLIENTDATA=${GIT_URL}clientdata.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 /home/swg/swg-main/build -mkdir /home/swg/swg-main/build -mkdir /home/swg/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 /home/swg/swg-main/stationapi/build/bin /home/swg/swg-main/chat -cd $basedir - - -echo -e "\033[1;33m"; -echo "Congratulations the latest server updates have been downloaded and compiled!"