Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
L2j Server Datapack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
L2j
L2j Server Datapack
Commits
7ea07270
Commit
7ea07270
authored
13 years ago
by
MELERIX
Browse files
Options
Downloads
Patches
Plain Diff
BETA: Minor Improvements/Cleanup for '''database_installer.bat'''.
parent
6c168438
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
L2J_DataPack_BETA/dist/tools/database_installer.bat
+164
-224
164 additions, 224 deletions
L2J_DataPack_BETA/dist/tools/database_installer.bat
with
164 additions
and
224 deletions
L2J_DataPack_BETA/dist/tools/database_installer.bat
+
164
−
224
View file @
7ea07270
...
...
@@ -37,14 +37,14 @@ set cmode=c
set
fresh_setup
=
0
:loadconfig
title
L2JDP
Installer
-
Reading
Configuration
from
File
...
cls
title
L2JDP
Installer
-
Reading
Configuration
from
File
...
if
not
exist
%config_file%
goto
configure
ren
%config_file%
vars
.bat
call
vars
.bat
ren
vars
.bat
%config_file%
call
:colors
17
if
/i
%config_version%
==
2
goto
ls_
section
if
/i
%config_version%
==
2
goto
ls_
backup
set
upgrade_mode
=
2
echo
It
seems
to
be
the
first
time
you
run
this
version
of
echo
database_installer
but
I
found
a
settings
file
already
.
...
...
@@ -69,7 +69,7 @@ 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_
section
if
%upgrade_mode%
==
1
goto
ls_
backup
if
%upgrade_mode%
==
2
goto
configure
if
%upgrade_mode%
==
3
goto
configure
if
%upgrade_mode%
==
4
(
cls
&
type
%config_file%
&
pause
&
goto
loadconfig
)
...
...
@@ -83,9 +83,9 @@ if not "%1"=="17" ( color F ) else ( color )
goto
:eof
:configure
cls
call
:colors
17
title
L2JDP
Installer
-
Setup
cls
set
config_version
=
2
if
NOT
%upgrade_mode%
==
2
(
set
fresh_setup
=
1
...
...
@@ -148,11 +148,10 @@ echo Write the path to your MySQL binaries (no trailing slash needed):
set /P mysqlBinPath="(default
%mysqlBinPath%
): "
cls
echo.
echo 2-LoginServer settings
echo --------------------
echo I will connect to the MySQL server you specify, and setup a
echo Loginserver database there, most people use a single MySQL
echo server and database for both Login and Gameserver tables.
echo 2-Login Server settings
echo -----------------------
echo I order to connect to the MySQL Server, you should
echo specify the Login Server DataBase parameters here.
echo.
set /P lsuser="MySQL Username (default is '
%lsuser%
'): "
set /P lspass="Password (default is '
%lspass%
'): "
...
...
@@ -161,12 +160,10 @@ set /P lshost="Host (default is '%lshost%'): "
echo.
cls
echo.
echo 3-Community Board Server settings
echo --------------------
echo I will connect to the MySQL server you specify, and setup a
echo Community Board server database there, most people use a single MySQL
echo server for both Login and Gameserver which CBserver can use too,
echo but CBserver requires a different database
!
echo 3-Community Server settings
echo ---------------------------
echo I order to connect to the MySQL Server, you should
echo specify the Community Server DataBase parameters here.
echo.
set /P cbuser="MySQL Username (default is '
%cbuser%
'): "
set /P cbpass="Password (default is '
%cbpass%
'): "
...
...
@@ -175,8 +172,11 @@ set /P cbhost="Host (default is '%cbhost%'): "
echo.
cls
echo.
echo 4-GameServer settings
echo --------------------
echo 4-Game Server settings
echo ----------------------
echo I order to connect to the MySQL Server, you should
echo specify the Game Server DataBase parameters here.
echo.
set /P gsuser="User (default is '
%gsuser%
'): "
set /P gspass="Pass (default is '
%gspass%
'): "
set /P gsdb="Database (default is '
%gsdb%
'): "
...
...
@@ -189,13 +189,16 @@ echo --------------------
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%
'): "
:safe1
set safemode=y
set /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
:safe2
cls
echo.
if "
%mysqlBinPath%
" == "use path" (
set mysqlBinPath=
...
...
@@ -234,29 +237,29 @@ echo.
pause
goto loadconfig
:ls_
section
:ls_
backup
cls
call :colors 17
set cmdline=
set stage=1
title L2JDP Installer - Login Server DataBase
Set
up
title L2JDP Installer - Login Server DataBase
Back
up
echo.
echo Trying to make a backup of your Login Server
d
ata
b
ase.
echo Trying to make a backup of your Login Server
D
ata
B
ase.
set cmdline="
%mysqldumpPath%
" --add-drop-table -h
%lshost%
-u
%lsuser%
--password=
%lspass%
%lsdb%
^>
"
%backup%
\ls_backup.sql" 2
^>
NUL
%cmdline%
if
%ERRORLEVEL%
== 0 goto ls_db_ok
:ls_err1
call :colors 47
title L2JDP Installer - Login Server DataBase Setup ERROR
!
cls
set lsdbprompt=y
call :colors 47
title L2JDP Installer - Login Server DataBase Backup ERROR
!
echo.
echo Backup attempt failed
!
A possible reason for this to
echo happen, is that your DB doesn'
t
exist
yet
.
I
could
echo
try
to
create
%lsdb%
for
you
,
or
maybe
you
prefer
to
echo
proceed
with
the
CommunityServer
part
of
this
tool
.
echo
contunue
with
the
Community
Server
part
of
this
tool
.
echo
.
:ls
_ask1
set
lsdbprompt
=
y
echo
ATTEMPT
TO
CREATE
LOGINSERVER
DATABASE
:
echo
.
echo
(
y
)
Yes
...
...
@@ -267,65 +270,32 @@ echo (r) Reconfigure
echo
.
echo
(
q
)
Quit
echo
.
set
/p
lsdbprompt
=
Choose
(
default
yes
)
:
if
/i
%lsdbprompt%
==
y
goto
lsdbcreate
if
/i
%lsdbprompt%
==
n
goto
c
b
_backup
set
/p
lsdbprompt
=
Choose
(
default
yes
)
:
if
/i
%lsdbprompt%
==
y
goto
ls
_
db
_
create
if
/i
%lsdbprompt%
==
n
goto
c
s
_backup
if
/i
%lsdbprompt%
==
r
goto
configure
if
/i
%lsdbprompt%
==
q
goto
end
goto
ls_ask1
:omfg
cls
call
:colors
57
title
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 this
echo script again later. But maybe you'
d
prefer
to
go
on
now
.
echo
.
if
%stage%
==
1
set
label
=
ls_err1
if
%stage%
==
2
set
label
=
ls_err2
if
%stage%
==
3
set
label
=
cb_backup
if
%stage%
==
4
set
label
=
cb_err1
if
%stage%
==
5
set
label
=
cb_err2
if
%stage%
==
6
set
label
=
gs_backup
if
%stage%
==
7
set
label
=
gs_err1
if
%stage%
==
8
set
label
=
gs_err2
if
%stage%
==
9
set
label
=
horrible_end
if
%stage%
==
10
set
label
=
horrible_end
:omfgask
1
set
omfgprompt
=
q
echo
(
c
)
Continue
running
the
script
echo
.
echo
(
r
)
Reconfigure
echo
.
echo
(
q
)
Quit
now
echo
.
set
/p
omfgprompt
=
Choose
(
default
quit
)
:
if
/i
%omfgprompt%
==
c
goto
%label%
if
/i
%omfgprompt%
==
r
goto
configure
if
/i
%omfgprompt%
==
q
goto
horrible_end
goto
omfgask1
goto
ls_err1
:lsdbcreate
:ls
_
db
_
create
cls
call
:colors
17
set
cmdline
=
set
stage
=
2
title
L2JDP
Installer
-
Login
Server
DataBase
Setup
-
DB
Creation
title
L2JDP
Installer
-
Login
Server
DataBase
Creation
echo
.
echo
Trying
to
create
a
Login
Server
d
ata
b
ase
...
echo
Trying
to
create
a
Login
Server
D
ata
B
ase
...
set
cmdline
=
"
%mysqlPath%
"
-h
%lshost%
-u
%lsuser%
--password
=
%lspass%
-e
"CREATE DATABASE
%lsdb%
"
2
^>
NUL
%cmdline%
if
%ERRORLEVEL%
==
0
goto
ls_install
if
%safe_mode%
==
1
goto
omfg
:ls
_err2
call
:colors
47
title
L2JDP
Installer
-
Login
Server
DataBase
Setup
-
DB
Creation
ERROR
!
cls
set
omfgprompt
=
q
call
:colors
47
title
L2JDP
Installer
-
Login
Server
DataBase
Creation
ERROR
!
echo
.
echo
An
error
occured
while
trying
to
create
a
database
for
echo
your
login
server
.
echo
.
...
...
@@ -339,26 +309,23 @@ echo Unless you're sure that the pending actions of this tool
echo
could
work
,
i
'd suggest you to look for correct values
echo and try this script again later.
echo.
:ls_ask2
set omfgprompt=q
echo (c) Continue running
echo.
echo (r) Reconfigure
echo.
echo (q) Quit now
echo.
set /p omfgprompt= Choose (default quit):
if /i
%omfgprompt%
==c goto cb_backup
if /i
%omfgprompt%
==q goto horrible_end
set /p omfgprompt=Choose (default quit):
if /i
%omfgprompt%
==c goto cs_backup
if /i
%omfgprompt%
==r goto configure
goto ls_ask2
if /i
%omfgprompt%
==q goto end
goto ls_err2
:ls_db_ok
call :colors 17
title L2JDP Installer - Login Server DataBase Setup - WARNING
!
:ls_ask
cls
set loginprompt=u
call :colors 17
title L2JDP Installer - Login Server DataBase WARNING
!
echo.
echo LOGINSERVER DATABASE install type:
echo.
...
...
@@ -375,19 +342,18 @@ echo those fresh values.
echo
.
echo
(
q
)
Quit
echo
.
set
/p
loginprompt
=
Choose
(
default
upgrade
)
:
set
/p
loginprompt
=
Choose
(
default
upgrade
)
:
if
/i
%loginprompt%
==
f
goto
ls_cleanup
if
/i
%loginprompt%
==
u
goto
ls_upgrade
if
/i
%loginprompt%
==
s
goto
c
b
_backup
if
/i
%loginprompt%
==
s
goto
c
s
_backup
if
/i
%loginprompt%
==
r
goto
configure
if
/i
%loginprompt%
==
q
goto
end
goto
ls_
as
k
goto
ls_
db_o
k
:ls
_cleanup
set
stage
=
3
call
:colors
17
set
cmdline
=
title
L2JDP
Installer
-
Login
Server
DataBase
Setup
-
Full
Install
title
L2JDP
Installer
-
Login
Server
DataBase
Full
Install
echo
.
echo
Deleting
Login
Server
tables
for
new
content
.
set
cmdline
=
"
%mysqlPath%
"
-h
%lshost%
-u
%lsuser%
--password
=
%lspass%
-D
%lsdb%
^<
ls_cleanup
.sql
2
^>
NUL
...
...
@@ -411,15 +377,14 @@ move ls_errors.txt %workdir%
goto
ls_install
:ls
_install
set
stage
=
3
set
cmdline
=
if
%full%
==
1
(
title
L2JDP
Installer
-
Login
Server
DataBase
Setup
-
Installing
...
title
L2JDP
Installer
-
Login
Server
DataBase
Installing
...
echo
.
echo
Installing
new
Login
Server
content
.
echo
.
)
else
(
title
L2JDP
Installer
-
Login
Server
DataBase
Setup
-
Upgrading
...
title
L2JDP
Installer
-
Login
Server
DataBase
Upgrading
...
echo
.
echo
Upgrading
Login
Server
content
.
echo
.
...
...
@@ -430,31 +395,31 @@ for %%i in (..\sql\login\*.sql) do call :dump %%i
echo
done
...
echo
.
goto
c
b
_backup
goto
c
s
_backup
:c
b
_backup
:c
s
_backup
cls
call
:colors
17
set
cmdline
=
set
stage
=
4
title
L2JDP
Installer
-
Community
Server
DataBase
Set
up
set
stage
=
3
title
L2JDP
Installer
-
Community
Server
DataBase
Back
up
echo
.
echo
Trying
to
make
a
backup
of
your
Comunity
Server
d
ata
b
ase
.
echo
Trying
to
make
a
backup
of
your
Comunity
Server
D
ata
B
ase
.
set
cmdline
=
"
%mysqldumpPath%
"
--add-drop-table -h
%cbhost%
-u
%cbuser%
--password
=
%cbpass%
%cbdb%
^>
"
%backup%
\cs_backup.sql"
2
^>
NUL
%cmdline%
if
%ERRORLEVEL%
==
0
goto
cs_db_ok
:cb
_err1
call
:colors
47
title
L2JDP
Installer
-
Community
Server
DataBase
Setup
ERROR
!
:cs
_err1
cls
set
cbdbprompt
=
y
call
:colors
47
title
L2JDP
Installer
-
Community
Server
DataBase
Backup
ERROR
!
echo
.
echo
Backup
attempt
failed
!
A
possible
reason
for
this
to
echo
happen
,
is
that
your
DB
doesn
't exist yet. I could
echo try to create
%cbdb%
for you, or maybe you prefer to
echo
proceed
with the GameServer part of this tool.
echo
continue
with the GameServer part of this tool.
echo.
:cb_ask1
set cbdbprompt=y
echo ATTEMPT TO CREATE COMMUNITY SERVER DATABASE:
echo.
echo (y) Yes
...
...
@@ -465,30 +430,34 @@ echo (r) Reconfigure
echo.
echo (q) Quit
echo.
set /p cbdbprompt=
Choose (default yes):
if /i
%cbdbprompt%
==y goto c
b
dbcreate
set /p cbdbprompt=Choose (default yes):
if /i
%cbdbprompt%
==y goto c
s_
db
_
create
if /i
%cbdbprompt%
==n goto gs_backup
if /i
%cbdbprompt%
==r goto configure
if /i
%cbdbprompt%
==q goto end
goto c
b_ask
1
goto c
s_err
1
:cbdbcreate
:cs_db_create
cls
call :colors 17
set cmdline=
set stage=
5
title L2JDP Installer - Communty Server DataBase
Setup - DB
Creation
set stage=
4
title L2JDP Installer - Commun
i
ty Server DataBase Creation
echo.
echo Trying to create a Community Server
d
ata
b
ase...
echo Trying to create a Community Server
D
ata
B
ase...
set cmdline="
%mysqlPath%
" -h
%cbhost%
-u
%cbuser%
--password=
%cbpass%
-e "CREATE DATABASE
%cbdb%
" 2
^>
NUL
%cmdline%
if
%ERRORLEVEL%
== 0 goto cs_install
if
%safe_mode%
== 1 goto omfg
:cb_err2
call :colors 47
title L2JDP Installer - Community Board Server DataBase Setup - DB Creation ERROR
!
:cs_err2
cls
set omfgprompt=q
call :colors 47
title L2JDP Installer - Community Server DataBase Creation ERROR
!
echo.
echo An error occured while trying to create a database for
echo your Community
Board s
erver.
echo your Community
S
erver.
echo.
echo Possible reasons:
echo 1-You provided innacurate info , check user, password, etc.
...
...
@@ -500,26 +469,23 @@ echo Unless you're sure that the pending actions of this tool
echo could work, i'
d
suggest
you
to
look
for
correct
values
echo
and
try
this
script
again
later
.
echo
.
:cb
_ask2
set
omfgprompt
=
q
echo
(
c
)
Continue
running
echo
.
echo
(
r
)
Reconfigure
echo
.
echo
(
q
)
Quit
now
echo
.
set
/p
omfgprompt
=
Choose
(
default
quit
)
:
set
/p
omfgprompt
=
Choose
(
default
quit
)
:
if
/i
%omfgprompt%
==
c
goto
gs_backup
if
/i
%omfgprompt%
==
q
goto
horrible_end
if
/i
%omfgprompt%
==
r
goto
configure
goto
cb_ask2
if
/i
%omfgprompt%
==
q
goto
end
goto
cs_err2
:cs
_db_ok
call
:colors
17
title
L2JDP
Installer
-
Community
Server
DataBase
Setup
-
WARNING
!
:cs
_ask
cls
set
communityprompt
=
u
call
:colors
17
title
L2JDP
Installer
-
Community
Server
DataBase
WARNING
!
echo
.
echo
COMMUNITY
SERVER
DATABASE
install
type
:
echo
.
...
...
@@ -538,19 +504,18 @@ echo those fresh values.
echo
.
echo
(
q
)
Quit
echo
.
set
/p
communityprompt
=
Choose
(
default
upgrade
)
:
set
/p
communityprompt
=
Choose
(
default
upgrade
)
:
if
/i
%communityprompt%
==
f
goto
cs_cleanup
if
/i
%communityprompt%
==
u
goto
cs_upgrade
if
/i
%communityprompt%
==
s
goto
gs_backup
if
/i
%communityprompt%
==
r
goto
configure
if
/i
%communityprompt%
==
q
goto
end
goto
cs_
as
k
goto
cs_
db_o
k
:cs
_cleanup
set
stage
=
6
call
:colors
17
set
cmdline
=
title
L2JDP
Installer
-
Community
Server
DataBase
Setup
-
Full
Install
title
L2JDP
Installer
-
Community
Server
DataBase
Full
Install
echo
.
echo
Deleting
Community
Server
tables
for
new
content
.
set
cmdline
=
"
%mysqlPath%
"
-h
%cbhost%
-u
%cbuser%
--password
=
%cbpass%
-D
%cbdb%
^<
cs_cleanup
.sql
2
^>
NUL
...
...
@@ -574,15 +539,14 @@ move cs_errors.txt %workdir%
goto
cs_install
:cs
_install
set
stage
=
6
set
cmdline
=
if
%full%
==
1
(
title
L2JDP
Installer
-
Community
Server
DataBase
Setup
-
Installing
...
title
L2JDP
Installer
-
Community
Server
DataBase
Installing
...
echo
.
echo
Installing
new
Community
Server
content
.
echo
.
)
else
(
title
L2JDP
Installer
-
Community
Server
DataBase
Setup
-
Upgrading
...
title
L2JDP
Installer
-
Community
Server
DataBase
Upgrading
...
echo
.
echo
Upgrading
Community
Server
content
.
echo
.
...
...
@@ -599,26 +563,25 @@ goto gs_backup
cls
call
:colors
17
set
cmdline
=
set
stage
=
7
title
L2JDP
Installer
-
Game
Server
DataBase
Setup
cls
set
stage
=
5
title
L2JDP
Installer
-
Game
Server
DataBase
Backup
echo
.
echo
Trying
to
make
a
backup
of
your
Game
Server
d
ata
b
ase
.
echo
Trying
to
make
a
backup
of
your
Game
Server
D
ata
B
ase
.
set
cmdline
=
"
%mysqldumpPath%
"
--add-drop-table -h
%gshost%
-u
%gsuser%
--password
=
%gspass%
%gsdb%
^>
"
%backup%
\gs_backup.sql"
2
^>
NUL
%cmdline%
if
%ERRORLEVEL%
==
0
goto
gs_db_ok
:gs
_err1
call
:colors
47
title
L2JDP
Installer
-
Game
Server
DataBase
Setup
-
Backup
ERROR
!
cls
set
gsdbprompt
=
y
call
:colors
47
title
L2JDP
Installer
-
Game
Server
DataBase
Backup
ERROR
!
echo
.
echo
Backup
attempt
failed
!
A
possible
reason
for
this
to
happen
,
echo
is
that
your
DB
doesn
't exist yet. I could
try to create
echo
%gsdb%
for you, but maybe you prefer
me to continue with
echo last part of the script.
echo
Backup
attempt
failed
!
A
possible
reason
for
this
to
echo
happen
,
is
that
your
DB
doesn
't exist yet. I could
echo
try to create
%gsdb%
for you, but maybe you prefer
to
echo
continue with
last part of the script.
echo.
:askgsdb
set gsdbprompt=y
echo ATTEMPT TO CREATE GAME SERVER DATABASE?
echo.
echo (y) Yes
...
...
@@ -629,31 +592,34 @@ echo (r) Reconfigure
echo.
echo (q) Quit
echo.
set /p gsdbprompt=
Choose (default yes):
if /i
%gsdbprompt%
==y goto gsdbcreate
if /i
%gsdbprompt%
==n goto
horrible_end
set /p gsdbprompt=Choose (default yes):
if /i
%gsdbprompt%
==y goto gs
_
db
_
create
if /i
%gsdbprompt%
==n goto
eof
if /i
%gsdbprompt%
==r goto configure
if /i
%gsdbprompt%
==q goto end
goto
askgsdb
goto
gs_err1
:gsdbcreate
:gs_db_create
cls
call :colors 17
set stage=
8
set stage=
6
set cmdline=
title L2JDP Installer - Game Server DataBase
Setup - DB
Creation
cls
echo Trying to create a Game Server
d
ata
b
ase...
title L2JDP Installer - Game Server DataBase Creation
echo.
echo Trying to create a Game Server
D
ata
B
ase...
set cmdline="
%mysqlPath%
" -h
%gshost%
-u
%gsuser%
--password=
%gspass%
-e "CREATE DATABASE
%gsdb%
" 2
^>
NUL
%cmdline%
if
%ERRORLEVEL%
== 0 goto gs_install
if
%safe_mode%
== 1 goto omfg
:gs_err2
call :colors 47
title L2JDP Installer - Game Server DataBase Setup - DB Creation ERROR
!
cls
set omfgprompt=q
call :colors 47
title L2JDP Installer - Game Server DataBase Creation ERROR
!
echo.
echo An error occured while trying to create a database for
echo your
g
ame
s
erver.
echo your
G
ame
S
erver.
echo.
echo Possible reasons:
echo 1-You provided innacurate info, check username, pass, etc.
...
...
@@ -664,24 +630,20 @@ echo.
echo
I
'd suggest you to look for correct values and try this
echo script again later. But you can try to reconfigure it now.
echo.
:askgsdbcreate
set omfgprompt=q
echo (r) Restart script with fresh configuration values
echo (r) Reconfigure
echo.
echo (q) Quit now
echo.
set /p omfgprompt=
Choose (default quit):
set /p omfgprompt=Choose (default quit):
if /i
%omfgprompt%
==r goto configure
if /i
%omfgprompt%
==q goto
horrible_
end
goto
askgsdbcreate
if /i
%omfgprompt%
==q goto end
goto
gs_err2
:gs_db_ok
call :colors 17
title L2JDP Installer - Game Server DataBase Setup - WARNING
!
cls
:gs_ask
cls
set installtype=u
call :colors 17
title L2JDP Installer - Game Server DataBase WARNING
!
echo.
echo GAME SERVER DATABASE install:
echo.
...
...
@@ -696,18 +658,17 @@ echo updates, custom stuff...)
echo
.
echo
(
q
)
Quit
echo
.
set
/p
installtype
=
Choose
(
default
upgrade
)
:
set
/p
installtype
=
Choose
(
default
upgrade
)
:
if
/i
%installtype%
==
f
goto
gs_cleanup
if
/i
%installtype%
==
u
goto
gs_upgrade
if
/i
%installtype%
==
s
goto
custom_ask
if
/i
%installtype%
==
q
goto
end
goto
gs_
as
k
goto
gs_
db_o
k
:gs
_cleanup
call
:colors
17
set
stage
=
9
set
cmdline
=
title
L2JDP
Installer
-
Game
Server
DataBase
Setup
-
Full
Install
title
L2JDP
Installer
-
Game
Server
DataBase
Full
Install
echo
.
echo
Deleting
all
Game
Server
tables
for
new
content
...
set
cmdline
=
"
%mysqlPath%
"
-h
%gshost%
-u
%gsuser%
--password
=
%gspass%
-D
%gsdb%
^<
gs_cleanup
.sql
2
^>
NUL
...
...
@@ -731,15 +692,14 @@ move gs_errors.txt %workdir%
goto
gs_install
:gs
_install
set
stage
=
9
set
cmdline
=
if
%full%
==
1
(
title
L2JDP
Installer
-
Game
Server
DataBase
Setup
-
Installing
...
title
L2JDP
Installer
-
Game
Server
DataBase
Installing
...
echo
.
echo
Installing
new
Game
Server
content
.
echo
.
)
else
(
title
L2JDP
Installer
-
Game
Server
DataBase
Setup
-
Upgrading
...
title
L2JDP
Installer
-
Game
Server
DataBase
Upgrading
...
echo
.
echo
Upgrading
Game
Server
content
.
echo
.
...
...
@@ -766,6 +726,7 @@ goto :eof
:omfg
2
cls
set
ntpebcak
=
c
call
:colors
47
title
L2JDP
Installer
-
Potential
DataBase
Issue
at
stage
%stage%
echo
.
...
...
@@ -776,8 +737,6 @@ echo with file %~nx1
echo
.
echo
What
we
should
do
now
?
echo
.
:askomfg
2
set
ntpebcak
=
c
echo
(
l
)
Log
it
:
I
will
create
a
log
for
this
file
,
then
continue
echo
with
the
rest
of
the
list
in
non
-logging
mode
.
echo
.
...
...
@@ -790,17 +749,17 @@ echo and user info again.
echo.
echo (q) Quit now
echo.
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
ask
omfg2
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 :
end
)
goto omfg2
:logginon
cls
call :colors 17
title L2JDP Installer - Game Server
DataBase Setup -
Logging Options turned on
title L2JDP Installer - Game Server Logging Options turned on
set logging=1
if
%full%
== 1 (
set output=
%logdir%
\install-
%~nx1
.log
...
...
@@ -894,68 +853,50 @@ echo.
pause
goto end
:binaryfind
if EXIST "
%mysqlBinPath%
" (echo Found) else (echo Not Found)
goto :eof
:horrible_end
call :colors 47
title L2JDP Installer - Oops
!
:omfg
set omfgprompt=q
call :colors 57
cls
echo This wasn'
t
a
clean
run
,
but
don
't worry.
echo You can get help and support:
title L2JDP Installer - Potential PICNIC detected at stage
%stage%
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 forums
echo (http://www.l2jdp.com/forum)
echo There was some problem while executing:
echo.
echo You can ask for support in our forums or irc channel:
echo irc://irc.freenode.net channel: #l2j
echo "
%cmdline%
"
echo.
echo I'
ll
try
to
gather
some
versioning
information
that
you
echo
may
find
useful
when
asking
for
support
:
echo I'
d
suggest
you
to
look
for
correct
values
and
try
this
echo
script
again
later
.
But
maybe
you
'd prefer to go on now.
if
%stage%
== 1 set label=ls_err1
if
%stage%
== 2 set label=ls_err2
if
%stage%
== 3 set label=cs_err1
if
%stage%
== 4 set label=cs_err2
if
%stage%
== 5 set label=gs_err1
if
%stage%
== 6 set label=gs_err2
echo.
echo
Datapack
revision
reported
by
'SVN version'
:
svnversion
-n
2
>
NUL
echo (c) Continue running the script
echo.
if
%ERRORLEVEL%
==
9009
(
echo
SVN
commandline
tools
not
found
!
echo
Please
download
and
install
"Windows installer with
echo the basic win32 binaries"
(
or
something
that
fits
our
echo
binaries
needs
)
from
:
echo
http
://goo.gl/c0uyh
echo (r) Reconfigure
echo.
)
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> NUL
if not
%ERRORLEVEL%
== 0 (
echo An error occured while trying to read
echo your
%dpvf%
file
!
echo Make sure you keep it up to date
echo and in the correct place.
echo
%ERRORLEVEL%
))
echo.
rem del
%config_file%
pause
goto end
echo (q) Quit now
echo.
set /p omfgprompt=Choose (default quit):
if /i
%omfgprompt%
==c goto
%label%
if /i
%omfgprompt%
==r goto configure
if /i
%omfgprompt%
==q goto end
goto omfg
:binaryfind
if EXIST "
%mysqlBinPath%
" (echo Found) else (echo Not Found)
goto :eof
:end
call :colors 17
title L2JDP Installer - Script Execution Finished
cls
echo.
echo L2JDP Database Installer 201
1
echo L2JDP Database Installer 201
2
echo.
echo (C) 2007-201
1
L2J DataPack Team
echo Database Installer comes with ABSOLUTELY NO WARRANTY;
echo (C) 2007-201
2
L2J DataPack Team
echo
L2JDP
Database Installer comes with ABSOLUTELY NO WARRANTY;
echo This is free software, and you are welcome to redistribute it
echo under certain conditions; See the file gpl.txt for further
echo details.
...
...
@@ -964,5 +905,4 @@ echo Thanks for using our software.
echo visit http://www.l2jdp.com for more info about
echo the L2J DataPack Project.
echo.
pause
color
\ No newline at end of file
pause
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment