Foru 0 Опубликовано 29 августа, 2012 Доброго времени суток. Сборка [Freya] L2Inc. При заполнении табличек в Navicat, в конце процесса заполнения удаляются, созданые таблички. Как это исправить? Батник установочника. @echo offREM ##############################################REM ## L2JDP Database Installer - (by DrLecter) ##REM ##############################################REM ## Interactive script setup - (by TanelTM) ##REM ##############################################REM Copyright (C) 2010 L2J DataPackREM This program is free software; you can redistribute it and/or modifyREM it under the terms of the GNU General Public License as published byREM the Free Software Foundation; either version 2 of the License, or (atREM your option) any later version.REMREM This program is distributed in the hope that it will be useful, butREM WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITYREM or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public LicenseREM for more details.REMREM You should have received a copy of the GNU General Public License alongREM with this program; if not, write to the Free Software Foundation, Inc.,REM 675 Mass Ave, Cambridge, MA 02139, USA. Or contact the Official L2JREM DataPack Project at http://www.l2jdp.com, http://www.l2jdp.com/forum orREM #l2j-datapack @ irc://irc.freenode.netset config_file=vars.txtset config_version=0set workdir="%cd%"set full=0set stage=0set logging=0set upgrade_mode=0set backup=.set logdir=.set safe_mode=1set cmode=cset fresh_setup=0:loadconfigtitle L2JDP installer - Reading configuration from file...clsif not exist %config_file% goto configureren %config_file% vars.batcall vars.batren vars.bat %config_file%call :colors 17if /i %config_version% == 2 goto ls_sectionset upgrade_mode=2echo It seems to be the first time you run this version ofecho database_installer but I found a settings file already.echo I'll hopefully ask this questions just once.echo.echo Configuration upgrade options:echo.echo (1) Import and continue: I'll read your old settings andecho continue execution, but since no new settings will beecho saved, you'll see this menu again next time.echo.echo (2) Import and configure: This tool has some new availableecho options, you choose the values that fit your needsecho using former settings as a base.echo.echo (3) Ignose stored settings: I'll let you configure meecho with a fresh set of default values as a base.echo.echo (4) View saved settings: See the contents of the configecho file.echo.echo (5) Quit: Did you came here by mistake?echo.set /P upgrade_mode="Type a number, press Enter (default is '%upgrade_mode%'): "if %upgrade_mode%==1 goto ls_sectionif %upgrade_mode%==2 goto configureif %upgrade_mode%==3 goto configureif %upgrade_mode%==4 (cls&type %config_file%&pause&goto loadconfig)if %upgrade_mode%==5 goto :eofgoto loadconfig:colorsif /i "%cmode%"=="n" (if not "%1"=="17" ( color F ) else ( color )) else ( color %1 )goto :eof:configurecall :colors 17title L2JDP installer - Setupclsset config_version=2if NOT %upgrade_mode% == 2 (set fresh_setup=1set mysqlBinPath=%ProgramFiles%\MySQL\MySQL Server 5.0\binset lsuser=rootset lspass=123set lsdb=l2jdbset lshost=localhostset cbuser=rootset cbpass=123set cbdb=l2jcbset cbhost=localhostset gsuser=rootset gspass=123set gsdb=l2jdbset gshost=localhostset cmode=cset backup=.set logdir=.)set mysqlPath=%mysqlBinPath%\mysql.exeecho New settings will be created for this tool to run inecho your computer, so I need to ask you some questions.echo.echo 1-MySql Binariesecho --------------------echo In order to perform my tasks, I need the path for commandsecho such as 'mysql' and 'mysqldump'. Both executables areecho usually stored in the same place.echo.if "%mysqlBinPath%" == "" (set mysqlBinPath=use pathecho I can't determine if the binaries are available with yourecho default settings.) else (echo I can try to find out if the current setting actually works...echo.echo %mysqlPath%)if not "%mysqlBinPath%" == "use path" call :binaryfindecho.path|find "MySQL">NULif %errorlevel% == 0 (echo I found MySQL is in your PATH, this will be used by default.echo If you want to use something different, change 'use path' forecho something else.set mysqlBinPath=use path) else (echo Look, I can't find "MYSQL" in your PATH environment variable.echo It would be good if you go and find out where "mysql.exe" andecho "mysqldump.exe" are.echo.echo If you have no idea about the meaning of words such as MYSQLecho or PATH, you'd better close this window, and consider googlingecho and reading about it. Setup and host an L2J server requires aecho minimum of technical skills.)echo.echo Write the path to your MySQL binaries (no trailing slash needed):set /P mysqlBinPath="(default %mysqlBinPath%): "clsecho.echo 2-LoginServer settingsecho --------------------echo I will connect to the MySQL server you specify, and setup aecho Loginserver database there, most people use a single MySQLecho server and database for both Login and Gameserver tables.echo.set /P lsuser="MySQL Username (default is '%lsuser%'): "set /P lspass="Password (will be shown as you type, default '%lspass%'): "set /P lsdb="Database (default is '%lsdb%'): "set /P lshost="Host (default is '%lshost%'): "if NOT "%lsuser%"=="%gsuser%" set gsuser=%lsuser%if NOT "%lspass%"=="%gspass%" set gspass=%lspass%if NOT "%lsdb%"=="%gsdb%" set gsdb=%lsdb%if NOT "%lshost%"=="%gshost%" set gshost=%lshost%echo.clsecho.echo 3-Community Board Server settingsecho --------------------echo I will connect to the MySQL server you specify, and setup aecho Community Board server database there, most people use a single MySQLecho server for both Login and Gameserver which CBserver can use too,echo but CBserver requires a different database!echo.set /P cbuser="MySQL Username (default is '%cbuser%'): "set /P cbpass="Password (will be shown as you type, default '%cbpass%'): "set /P cbdb="Database (default is '%cbdb%'): "set /P cbhost="Host (default is '%cbhost%'): "echo.echo 4-GameServer settingsecho --------------------set /P gsuser="User (default is '%gsuser%'): "set /P gspass="Pass (default is '%gspass%'): "set /P gsdb="Database (default is '%gsdb%'): "set /P gshost="Host (default is '%gshost%'): "echo.echo 5-Misc. settingsecho --------------------set /P cmode="Color mode (c)olor or (n)on-color, default %cmode% : "set /P backup="Path for your backups (default '%backup%'): "set /P logdir="Path for your logs (default '%logdir%'): ":safe1set safemode=yset /P safemode="Debugging messages and increase verbosity a lil bit (y/n, default '%safemode%'): "if /i %safemode%==y (set safe_mode=1&goto safe2)if /i %safemode%==n (set safe_mode=0&goto safe2)goto safe1:safe2echo.if "%mysqlBinPath%" == "use path" (set mysqlBinPath=set mysqldumpPath=mysqldumpset mysqlPath=mysql) else (set mysqldumpPath=%mysqlBinPath%\mysqldump.exeset mysqlPath=%mysqlBinPath%\mysql.exe)echo @echo off > %config_file%echo set config_version=%config_version% >> %config_file%echo set cmode=%cmode%>> %config_file%echo set safe_mode=%safe_mode% >> %config_file%echo set mysqlPath=%mysqlPath%>> %config_file%echo set mysqlBinPath=%mysqlBinPath%>> %config_file%echo set mysqldumpPath=%mysqldumpPath%>> %config_file%echo set lsuser=%lsuser%>> %config_file%echo set lspass=%lspass%>> %config_file%echo set lsdb=%lsdb%>> %config_file%echo set lshost=%lshost% >> %config_file%echo set gsuser=%gsuser%>> %config_file%echo set gspass=%gspass%>> %config_file%echo set gsdb=%gsdb%>> %config_file%echo set gshost=%gshost%>> %config_file%echo set logdir=%logdir%>> %config_file%echo set backup=%backup%>> %config_file%echo.echo Script setup complete, your settings were saved in theecho '%config_file%' file. Remember: your passwords are storedecho as clear text.echo.echo press any key to continue...pause> nulgoto loadconfig:ls_sectionclscall :colors 17set cmdline=set stage=1title L2JDP installer - Login Server database setupecho.echo Trying to make a backup of your loginserver database.set cmdline="%mysqldumpPath%" --add-drop-table -h %lshost% -u %lsuser% --password=%lspass% %lsdb% ^> "%backup%\loginserver_backup.sql" 2^> NUL%cmdline%if %ERRORLEVEL% == 0 goto lsdbokREM if %safe_mode% == 1 goto omfg:ls_err1call :colors 47title L2JDP installer - Login Server database setup ERROR!!!clsecho.echo Backup attempt failed! A possible reason for this toecho happen, is that your DB doesn't exist yet. I couldecho try to create %lsdb% for you, or maybe you prefer toecho proceed with the CommunityServer part of this tool.echo.:ls_ask1set lsdbprompt=yecho ATTEMPT TO CREATE LOGINSERVER DATABASE:echo.echo (y)esecho.echo (n)oecho.echo (r)econfigureecho.echo (q)uitecho.set /p lsdbprompt= Choose (default yes):if /i %lsdbprompt%==y goto lsdbcreateif /i %lsdbprompt%==n goto gs_backupif /i %lsdbprompt%==r goto configureif /i %lsdbprompt%==q goto endgoto ls_ask1:omfgclscall :colors 57title L2JDP installer - potential PICNIC detected at stage %stage%echo.echo There was some problem while executing:echo.echo "%cmdline%"echo.echo I'd suggest you to look for correct values and try thisecho script again later. But maybe you'd prefer to go on now.echo.if %stage% == 1 set label=ls_err1if %stage% == 2 set label=ls_err2if %stage% == 6 set label=gs_backupif %stage% == 7 set label=gs_err1if %stage% == 8 set label=gs_err2if %stage% == 9 set label=horrible_endif %stage% == 10 set label=horrible_end:omfgask1set omfgprompt=qecho (c)ontinue running the scriptecho.echo (r)econfigureecho.echo (q)uit nowecho.set /p omfgprompt= Choose (default quit):if /i %omfgprompt%==c goto %label%if /i %omfgprompt%==r goto configureif /i %omfgprompt%==q goto horrible_endgoto omfgask1:lsdbcreatecall :colors 17set cmdline=set stage=2title L2JDP installer - Login Server database setup - DB Creationecho.echo Trying to create a Login Server database...set cmdline="%mysqlPath%" -h %lshost% -u %lsuser% --password=%lspass% -e "CREATE DATABASE %lsdb%" 2^> NUL%cmdline%if %ERRORLEVEL% == 0 goto logininstallif %safe_mode% == 1 goto omfg:ls_err2call :colors 47title L2JDP installer - Login Server database setup - DB Creation errorclsecho An error occured while trying to create a database forecho your login server.echo.echo Possible reasons:echo 1-You provided innacurate info , check user, password, etc.echo 2-User %lsuser% don't have enough privileges forecho database creation. Check your MySQL privileges.echo 3-Database exists already...?echo.echo Unless you're sure that the pending actions of this toolecho could work, i'd suggest you to look for correct valuesecho and try this script again later.echo.:ls_ask2set omfgprompt=qecho (c)ontinue runningecho.echo (r)econfigureecho.echo (q)uit nowecho.set /p omfgprompt= Choose (default quit):if /i %omfgprompt%==c goto gs_backupif /i %omfgprompt%==q goto horrible_endif /i %omfgprompt%==r goto configuregoto ls_ask2:lsdbokcall :colors 17title L2JDP installer - Login Server database setup - WARNING!!!echo.:askloginif %fresh_setup%==0 (set loginprompt=sset msg=default skip) else (set loginprompt=xset msg=no default for fresh install)echo LOGINSERVER DATABASE install type:echo.echo (f)ull: I will destroy data in your `accounts` andecho and `gameserver` tables.echo.echo (s)kip: I'll take you to the communityserver databaseecho installation and upgrade options.echo.echo (r)econfigure: You'll be able to redefine MySQL path,echo user and database information and start over withecho those fresh values.echo.echo (q)uitecho.set /p loginprompt= Choose (%msg%) :if /i %loginprompt%==f goto logininstallif /i %loginprompt%==s goto gs_backupif /i %loginprompt%==r goto configureif /i %loginprompt%==q goto endgoto asklogin:logininstallset stage=3call :colors 17set cmdline=title L2JDP installer - Login Server database setup - Full installecho Deleting loginserver tables for new content.set cmdline="%mysqlPath%" -h %lshost% -u %lsuser% --password=%lspass% -D %lsdb% ^< login_install.sql 2^> NUL%cmdline%if not %ERRORLEVEL% == 0 goto omfgset full=1goto gs_backup:gs_backupclscall :colors 17set cmdline=if %full% == 1 goto fullinstallset stage=7title L2JDP installer - Game server database setupclsecho.echo Making a backup of the original gameserver database.set cmdline="%mysqldumpPath%" --add-drop-table -h %gshost% -u %gsuser% --password=%gspass% %gsdb% ^> "%backup%\gameserver_backup.sql" 2^> NUL%cmdline%if %ERRORLEVEL% == 0 goto gsdbokrem if %safe_mode% == 1 goto omfg:gs_err1call :colors 47title L2JDP installer - Game Server database setup - Backup failed!clsecho.echo Backup attempt failed! A possible reason for this to happen,echo is that your DB doesn't exist yet. I could try to createecho %gsdb% for you, but maybe you prefer me to continue withecho last part of the script.echo.:askgsdbset gsdbprompt=yecho ATTEMPT TO CREATE GAMESERVER DATABASE?echo.echo (y)esecho.echo (n)oecho.echo (r)econfigureecho.echo (q)uitecho.set /p gsdbprompt= Choose (default yes):if /i %gsdbprompt%==y goto gsdbcreateif /i %gsdbprompt%==n goto horrible_endif /i %gsdbprompt%==r goto configureif /i %gsdbprompt%==q goto endgoto askgsdb:gsdbcreatecall :colors 17set stage=8set cmdline=title L2JDP installer - Game Server database setup - DB Creationclsecho Trying to create Game Server database...set cmdline="%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -e "CREATE DATABASE %gsdb%" 2^> NUL%cmdline%if %ERRORLEVEL% == 0 goto fullinstallif %safe_mode% == 1 goto omfg:gs_err2call :colors 47title L2JDP installer - Game Server database setup - DB Creation failed!clsecho.echo An error occured while trying to create a database forecho your game server.echo.echo Possible reasons:echo 1-You provided innacurate info, check username, pass, etc.echo 2-User %gsuser% don't have enough privileges forecho database creation.echo 3-Database exists already...?echo.echo I'd suggest you to look for correct values and try thisecho script again later. But you can try to reconfigure it now.echo.:askgsdbcreateset omfgprompt=qecho (r)estart script with fresh configuration valuesecho.echo (q)uit nowecho.set /p omfgprompt= Choose (default quit):if /i %omfgprompt%==r goto configureif /i %omfgprompt%==q goto horrible_endgoto askgsdbcreate:gsdbokcall :colors 17title L2JDP installer - Game Server database setup - WARNING!!!clsecho.:asktypeset installtype=uecho GAMESERVER DATABASE install:echo.echo (f)ull: WARNING! I'll destroy ALL of your existing characterecho data (i really mean it: items, pets.. ALL)echo.echo (u)pgrade: I'll do my best to preserve all of your characterecho data.echo.echo (s)kip: We'll get into the last set of questions (cummulativeecho updates, custom stuff...)echo.echo (q)uitecho.set /p installtype= Choose (default upgrade):if /i %installtype%==f goto fullinstallif /i %installtype%==u goto upgradeinstallif /i %installtype%==s goto customif /i %installtype%==q goto endgoto asktype:fullinstallcall :colors 17set stage=9set cmdline=title L2JDP installer - Game Server database setup - Full installecho Deleting all gameserver tables for new content...set cmdline="%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^< full_install.sql 2^> NUL%cmdline%if not %ERRORLEVEL% == 0 goto omfgset full=1echo.echo Game Server tables were deleted.goto upgradeinstall:upgradeinstallset stage=9set cmdline=if %full% == 1 (title L2JDP installer - Game Server database setup - Installing...echo Installing new gameserver content.) else (title L2JDP installer - Game Server database setup - Upgrading...echo Upgrading gameserver content.)if %logging% == 0 set output=NULset dest=lsfor %%i in (accounts.sqlaccount_data.sqlgameservers.sql) do call :dump %%iset dest=gsfor %%i in (armorsets.sqlauction_bid.sqlauction_watch.sqlcastle_door.sqlcastle_doorupgrade.sqlcastle_functions.sqlcastle_manor_procure.sqlcastle_manor_production.sqlcastle_siege_guards.sqlchar_creation_items.sqlcharacter_buffs.sqlcharacter_friends.sqlcharacter_hennas.sqlcharacter_instance_time.sqlcharacter_loginitems.sqlcharacter_macroses.sqlcharacter_quest_global_data.sqlcharacter_quests.sqlcharacter_raid_points.sqlcharacter_recipebook.sqlcharacter_recommends.sqlcharacter_schemes.sqlcharacter_scheme_buffs.sqlcharacter_shortcuts.sqlcharacter_skills.sqlcharacter_save_skill_effects.sqlcharacter_save_skill_reuses.sqlcharacter_subclasses.sqlcharacter_tpbookmark.sqlcharacter_ui_actions.sqlcharacter_ui_categories.sqlcharacter_vars.sqlcharacters.sqlclan_crests.sqlclan_data.sqlclan_notices.sqlclan_privs.sqlclan_skills.sqlclan_squad_skills.sqlclan_subpledges.sqlclan_wars.sqlclanhall_functions.sqlclass_list.sqlcommunity_clan_introductions.sqlcommunity_comments.sqlcommunity_forums.sql;community_posts.sqlcommunity_topics.sqlcursed_weapons.sqlconsole_accounts.sqldimensional_rift.sqldroplist.sqlenchant_skill_groups.sqlfake_pcs.sqlfish.sqlfort_doorupgrade.sqlfort_functions.sqlfort_siege_guards.sqlfort_spawnlist.sqlfort_staticobjects.sqlfortsiege_clans.sqlfour_sepulchers_spawnlist.sqlgames.sqlglobal_tasks.sqlglobal_variables.sqlgrandboss_list.sqlhellbound.sqlhelper_buff_list.sqlhenna.sqlhenna_trees.sqlheroes.sqlheroes_diary.sqlirc.sqlitem_attributes.sqlitem_auction.sqlitem_auction_bid.sqlitems.sqlitemsonground.sqlitemTemplates.sqlkamaloka_results.sqllocations.sqllvlupgain.sqlmagicteleport.sqlmapregion.sqlmerchant_areas_list.sqlmerchant_buylists.sqlmerchant_lease.sqlmerchant_shopids.sqlmerchant_wearlists.sqlmerchants.sqlmessages.sqlminions.sqlnpc.sqlnpcskills.sqlolympiad_data.sqlolympiad_fights.sqlolympiad_nobles.sqlolympiad_nobles_eom.sqlpets.sqlpets_skills.sqlpets_stats.sqlquest_global_data.sqlraidboss_spawnlist.sqlrandom_spawn.sqlrandom_spawn_loc.sqlseven_signs.sqlsiege_clans.sqlsummon_save_skill_effects.sqlskill_learn.sqlskill_residential.sqlskill_spellbooks.sqlspawnlist.sqlspecial_skill_trees.sqlteleport.sqltopic.sqltransform_skill_trees.sqlterritories.sqlterritory_registrations.sqlterritory_spawnlist.sqltransform_skill_trees.sqlwalker_routes.sqlcharacter_offline_trade.sqlcharacter_offline_trade_items.sql) do call :dump %%iif %full% == 1 (for %%i in (auction.sqlcastle.sqlclanhall.sqlfort.sqlforums.sqlnpc_buffer.sqlgrandboss_data.sqlseven_signs_festival.sqlseven_signs_status.sql) do call :dump %%i)echo Installing Datacd ..\sql\data\merchant_buylistsif exist errors.txt del errors.txtecho @echo off> temp.batfor %%i in (*.sql) do echo "%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^< %%i 2^>^> errors.txt >> temp.batcall temp.bat> nuldel temp.batmove errors.txt %workdir%cd %workdir%cd ..\sql\data\merchant_wearlistsif exist errors.txt del errors.txtecho @echo off> temp.batfor %%i in (*.sql) do echo "%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^< %%i 2^>^> errors.txt >> temp.batcall temp.bat> nuldel temp.batmove errors.txt %workdir%cd %workdir%echo done...echo.goto custom:dumpset cmdline=if /i %full% == 1 (set action=Installing) else (set action=Upgrading)echo %action% %1>>"%output%"echo %action% %~nx1if "%dest%"=="ls" set cmdline="%mysqlPath%" -h %lshost% -u %lsuser% --password=%lspass% -D %lsdb% ^< ..\sql\%1 2^>^>"%output%"if "%dest%"=="gs" set cmdline="%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^< ..\sql\%1 2^>^>"%output%"%cmdline%if %logging%==0 if NOT %ERRORLEVEL%==0 call :omfg2 %1goto :eof:omfg2clscall :colors 47title L2JDP installer - potential database issue at stage %stage%echo.echo Something caused an error while executing instruction :echo %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb%echo.echo with file %~nx1echo.echo What we should do now?echo.:askomfg2set ntpebcak=cecho (l)og it: I will create a log for this file, then continueecho with the rest of the list in non-logging mode.echo.echo (c)ontinue: Let's pretend that nothing happened and continue withecho the rest of the list.echo.echo (r)econfigure: Perhaps these errors were caused by a typo.echo you can restart from scratch and redefine paths, databasesecho and user info again.echo.echo (q)uit nowecho.set /p ntpebcak= Choose (default continue):if /i %ntpebcak%==c (call :colors 17 & goto :eof)if /i %ntpebcak%==l (call :logginon %1 & goto :eof)if /i %ntpebcak%==r (call :configure & exit)if /i %ntpebcak%==q (call :horrible_end & exit)goto askomfg2:logginonclscall :colors 17title L2JDP installer - Game Server database setup - Logging options turned onset logging=1if %full% == 1 (set output=%logdir%\install-%~nx1.log) else (set output=%logdir%\upgrade-%~nx1.log)echo.echo Per your request, i'll create a log file for your reading pleasure.echo.echo I'll call it %output%echo.echo If you already have such a file and would like to keep a copy.echo go now and read it or back it up, because it's not going to be rotatedecho or anything, instead i'll just overwrite it.echo.echo When you're done or if you don't mind, press any key to start.pause>NULset cmdline="%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^<..\sql\%1 2^>^>"%output%"date /t >"%output%"time /t >>"%output%"%cmdline%echo Log file created, resuming normal operations...call :colors 17set logging=0set output=NULgoto :eof:customecho.set cstprompt=nset /p cstprompt=Install custom gameserver DB tables: (y) yes or (N) no or (q) quit?if /i %cstprompt%==y goto cstinstallif /i %cstprompt%==n goto newbie_helperif /i %cstprompt%==q goto endgoto newbie_helper:cstinstallecho Installing custom content.cd ..\sql\custom\echo @echo off> temp.batif exist errors.txt del errors.txtfor %%i in (*.sql) do echo "%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^< %%i 2^>^> custom_errors.txt >> temp.batcall temp.bat> nuldel temp.batmove custom_errors.txt %workdir%title L2JDP installer - Game Server database setup - custom tables processing completeclsecho Database structure for custom additions finished, i'm leaving aecho 'custom_errors.txt' file for your consideration.echo.echo Remember that in order to get these additions actually workingecho you need to edit your configuration files.echo.pausecd %workdir%title L2JDP installer - Game Server database setup - L2J Modsclsecho L2J provides a basic infraestructure for some non-retail featuresecho (aka L2J mods) to get enabled with a minimum of changes.echo.echo Some of these mods would require extra tables in order to workecho and those tables could be created now if you wanted to.echo.cd ..\sql\mods\REM L2J mods that needed extra tables to work properly, should beREM listed here. To do so copy & paste the following 4 lines andREM change them properly:REM MOD: Wedding.set modprompt=nset /p modprompt=Install "Wedding Mod" tables: (y) yes or (N) no?if /i %modprompt%==y "%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < mods_wedding.sql 2>>NULtitle L2JDP installer - Game Server database setup - L2J Mods setup completeclsecho Database structure for L2J mods finished.echo.echo Remember that in order to get these additions actually workingecho you need to edit your configuration files.echo.pausecd %workdir%goto newbie_helper:newbie_helpercall :colors 17set stage=10title L2JDP installer - Game/CB Server database setup - update SQL filesclsif %full% == 1 goto endecho.echo In the sql/updates folder,echo we use to store cummulative changes needed byecho the database structures.echo.echo Usually these SQL files are created whenever some newecho feature implementation requires it.echo.echo If you're too lame to know what these changes are about,echo i can try to apply these patches for you.:asknbset nbprompt=aecho.echo What we do with the files in sql/updates folder?echo.echo (a)utomagic processing: I'll get into the folders andecho try to dump _every_ '.sql' file i find there, intoecho your database. A fresh setup wouldn't usually needecho such a thing. And, as any automagic task, this mayecho pose a risk on your data.echo.echo (s)kip: I'll do nothing, it's up to you to find outecho which file does what, which one could be of use forecho you, etc.echo.set /p nbprompt= Choose (default auto):if /i %nbprompt%==a goto nbinstallif /i %nbprompt%==s goto endgoto asknb:nbinstallcd ..\sql\updates\echo @echo off> temp.batif exist errors.txt del errors.txtfor %%i in (*.sql) do echo "%mysqlPath%" -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% ^< %%i 2^>^> errors.txt >> temp.batcall temp.bat> nuldel temp.batmove errors.txt %workdir%cd %workdir%if /i %nbprompt%==g goto nbfinished:nbfinishedtitle L2JDP installer - Game Server database setup - updates processing completeclsecho Automagic processing finished, i'm leaving an 'errors.txt'echo file for your consideration.echo.echo Remember that some of these files could have tried to add stuff that wereecho part of your database structure already, so don't go out yelling aboutecho.echo 'Duplicate column name'echo.echo messages you may find there.echo.echo Rather you should focus in those that sayecho.echo 'Table doesn't exist'echo.echo for example.echo.pausegoto end:binaryfindif EXIST "%mysqlBinPath%" (echo Found) else (echo Not Found)goto :eof:horrible_endcall :colors 47title L2JDP installer - Oops!clsecho This wasn't a clean run, but don't worry.echo You can get help and support:echo.echo 1-Read the L2J Datapack project wiki :echo (http://www.l2jdp.com/trac/wiki)echo 2-Search for a similar problem in our forumsecho (http://www.l2jdp.com/forum)echo.echo You can ask for support in our forums or irc channel:echo irc://irc.freenode.net channel: #l2j-datapackecho.echo I'll try to gather some versioning information that youecho may find useful when asking for support :echo.echo Datapack revision reported by 'SVN version':svnversion -n 2>NULecho.if %ERRORLEVEL% == 9009 (echo SVN commandline tools not found!echo Please download and install "Windows installer withecho the basic win32 binaries" (or something that fits ourecho binaries needs) from :echo http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91echo.)set dpvf="..\config\l2jdp-version.properties"echo Datapack revision reported by properties file :if NOT EXIST %dpvf% (echo Your %dpvf% file is missing!echo Use eclipse/ant to build one from your DP SVN copy.echo With it we'll be able to help you better.) else (type %dpvf% | find "version" 2> NULif not %ERRORLEVEL% == 0 (echo An error occured while trying to readecho your %dpvf% file!echo Make sure you keep it up to dateecho and in the correct place.echo %ERRORLEVEL%))echo.rem del %config_file%pausegoto end:endcall :colors 17title L2JDP installer - Script execution finishedclsecho.echo L2JDP database_installer version 0.2.2echo (C) 2007-2010 L2J Datapack Teamecho database_installer comes with ABSOLUTELY NO WARRANTY;echo This is free software, and you are welcome to redistribute itecho under certain conditions; See the file gpl.txt for furtherecho details.echo.echo Thanks for using our software.echo visit http://www.l2jdp.com for more info aboutecho the Official L2J Datapack project.echo.pausecolor Я все же умудрился, избежать процесса, удаления табличек. Сервер запустился с ошибками но запустился. (Ошибки, и за тех же табличек, не хватает пару штук, но это не кретично) Тут возникла другая проблема, я не могу понять как регистрировать логин сервер? Если брать другие сборки то там через hexid.txt. Но в сборке [Freya] L2Inc вместо hexid.txt, файл hex_71_Core.id я закинул его, по стандартной инструкции. При запуске сервера, вот такое. Как лечить? Ссылка на сборку Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
genokk22 174 Опубликовано 29 августа, 2012 порты внимательно проверь. смысли неправильные в конфигах они. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Foru 0 Опубликовано 29 августа, 2012 По подробние пожалуйста.(Ох.. Отпусти мои смутные затмения, по этой сборке) Что именно глянуть? Порты пробрасывать, не нужно? Через брандмауэр? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
SmokiMo 892 Опубликовано 30 августа, 2012 http://forummaxi.ru/index.php?showtopic=12863 Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты