LORDofDOOM / MMOCore

This core is not supported anymore - Please use the new MMOCoreEvo
https://github.com/LORDofDOOM/MMOCoreEvo
GNU General Public License v2.0
34 stars 40 forks source link

[Sql] CombinedSql batch #39

Open ghost opened 12 years ago

ghost commented 12 years ago

hey i made a sql combine because MMoCore have to much sql to execute one by one :) it's based into the combinedsql form trinitycore but i have adapted to the MMoCore

@echo off setlocal EnableDelayedExpansion set WorldUpdates=All_World_Updates.sql set CharactersUpdates=All_Characters_Updates.sql set AuthUpdates=All_Auth_Updates.sql set FcUpdates=All_Fc_updates.sql set CharactersFcUpdates=All_CharactersFc_updates.sql set WorldFcUpdates=All_WorldFc_updates.sql set WorldMMUpdates=All_WorldMM_updates.sql set MMCharactersUpdates=All_MMCharacters_updates.sql set MMAuthUpdates=All_MMAuth_updates.sql set CastleUpdates=All_Castle_updates

if exist %CharactersUpdates% del %CharactersUpdates% if exist %AuthUpdates% del %AuthUpdates% if exist %WorldUpdates% del %WorldUpdates%

for %%a in (sql\updates\world.sql) do ( echo /* >>%WorldUpdates% echo * %%a >>%WorldUpdates% echo / >>%WorldUpdates% copy/b %WorldUpdates%+"%%a" %WorldUpdates% echo. >>%WorldUpdates% echo. >>%WorldUpdates%)

for %%a in (sql\updates\characters.sql) do ( echo /* >>%CharactersUpdates% echo * %%a >>%CharactersUpdates% echo / >>%CharactersUpdates% copy/b %CharactersUpdates%+"%%a" %CharactersUpdates% echo. >>%CharactersUpdates% echo. >>%CharactersUpdates%)

for %%a in (sql\updates\auth.sql) do ( echo /* >>%AuthUpdates% echo * %%a >>%AuthUpdates% echo / >>%AuthUpdates% copy/b %AuthUpdates%+"%%a" %AuthUpdates% echo. >>%AuthUpdates% echo. >>%AuthUpdates%)

for %%a in (sql\updates\fc_updates.sql) do ( echo /* >>%FcUpdates% echo * %%a >>%FcUpdates% echo / >>%FcUpdates% copy/b %FcUpdates%+"%%a" %FcUpdates% echo. >>%FcUpdates% echo. >>%FcUpdates%)

for %%a in (sql\updates\fc_updates_characters.sql) do ( echo /* >>%CharactersFcUpdates% echo * %%a >>%CharactersFcUpdates% echo / >>%CharactersFcUpdates% copy/b %CharactersFcUpdates%+"%%a" %CharactersFcUpdates% echo. >>%CharactersFcUpdates% echo. >>%CharactersFcUpdates%)

for %%a in (sql\updates\fc_updates_world.sql) do ( echo /* >>%WorldFcUpdates% echo * %%a >>%WorldFcUpdates% echo / >>%WorldFcUpdates% copy/b %WorldFcUpdates%+"%%a" %WorldFcUpdates% echo. >>%WorldFcUpdates% echo. >>%WorldFcUpdates%)

for %%a in (sql\updates\mmo_updates_world.sql) do ( echo /* >>%WorldMMUpdates% echo * %%a >>%WorldMMUpdates% echo / >>%WorldMMUpdates% copy/b %WorldMMUpdates%+"%%a" %WorldMMUpdates% echo. >>%WorldMMUpdates% echo. >>%WorldMMUpdates%)

for %%a in (sql\updates\mmo_updates_characters.sql) do ( echo /* >>%MMCharactersUpdates% echo * %%a >>%MMCharactersUpdates% echo / >>%MMCharactersUpdates% copy/b %MMCharactersUpdates%+"%%a" %MMCharactersUpdates% echo. >>%MMCharactersUpdates% echo. >>%MMCharactersUpdates%)

for %%a in (sql\updates\mmo_updates_auth.sql) do ( echo /* >>%MMAuthUpdates% echo * %%a >>%MMAuthUpdates% echo / >>%MMAuthUpdates% copy/b %MMAuthUpdates%+"%%a" %MMAuthUpdates% echo. >>%MMAuthUpdates% echo. >>%MMAuthUpdates%)

for %%a in (sql\updates\castle_updates.sql) do ( echo /* >>%CastleUpdates% echo * %%a >>%CastleUpdates% echo / >>%CastleUpdates% copy/b %CastleUpdates%+"%%a" %CastleUpdates% echo. >>%CastleUpdates% echo. >>%CastleUpdates%)

LORDofDOOM commented 12 years ago

Hi,

thank you -> That's great for Windows users - I've added a similar script for Linux -> https://github.com/LORDofDOOM/MMOCore/blob/master/mmoupdater.sh

This should work under windows too (using cygwin)

ghost commented 12 years ago

and cmd by a simple archive .bat works correctly i tested it

topher80 commented 12 years ago

Hello how you made ​​to run mmoupdater.sh. because when I run the file it shows me Restarting Core, and nothing will download and compile.

Thanks in advance Sincerely topher.

LORDofDOOM commented 12 years ago

Hi,

do you have all needed Linux packages from the script (e.g. screen etc.) ?

I use it in /home/trinity (here you need to have ALL sh/bash scripts in this directory)

As I wrote in the mmoupdater.sh the scripts MUST be located in another folder. Execution from the source folder can not work.

You should have:

mmoconfig.in
mmokillserver.sh
mmorestarter.sh
mmoupdater.sh
mmowatcher.sh

in this directory - Make sure that your user (e.g. trinity) has the right to execute the scripts.

Please take a look in the ini file too - Verifiy that all variables are OK

topher80 commented 12 years ago

Hello, as you talk of Linux packages from the script (eg, screen etc..) Can you give me the list of packages?

LORDofDOOM commented 12 years ago

You need all packages for TC compile (http://www.trinitycore.info/How-to:Linux)

and

screen, grep, sudo, git, mysql for the script

topher80 commented 12 years ago

yes I have installed all the package quoted, but still nothing Restarting core is always displayed and nothing is compiled yet I've done everything that is said. By cons I'm on Ubuntu 12.04 lts nothing changes?

LORDofDOOM commented 12 years ago

I use Ubuntu too (LTS version) there should not be a problem... INI File is OK ?