viewing paste Makefile, update, ea star | Diff

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769
# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/lighta/Documents/Myscript/RO/Servs/rathena
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: Makefile.in
--- Makefile.in Base (BASE)
+++ Makefile.in Locally Modified (Based On LOCAL)
@@ -2,13 +2,12 @@
 
 HAVE_MYSQL=@HAVE_MYSQL@
 ifeq ($(HAVE_MYSQL),yes)
-   ALL_DEPENDS=common_sql login_sql char_sql map_sql tools import
-   SQL_DEPENDS=common_sql login_sql char_sql map_sql import
+   ALL_DEPENDS=sql tools
+   SQL_DEPENDS=common_sql login_sql char_sql map_sql import test
    COMMON_SQL_DEPENDS=mt19937ar libconfig
    LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql
    CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql
    MAP_SQL_DEPENDS=mt19937ar libconfig common_sql
-   CONVERTERS_DEPENDS=common_sql
 else
    ALL_DEPENDS=needs_mysql
    SQL_DEPENDS=needs_mysql
@@ -20,7 +19,7 @@
 
 
 #####################################################################
-.PHONY: sql  \
+.PHONY: all sql  \
    common_sql \
    mt19937ar \
    login_sql \
@@ -29,7 +28,8 @@
    tools \
    import \
    test \
-   clean help
+   clean help \
+   install uninstall bin-clean \
 
 all: $(ALL_DEPENDS)
 
@@ -38,12 +38,6 @@
 common_sql: $(COMMON_SQL_DEPENDS)
    @$(MAKE) -C src/common sql
 
-mt19937ar:
-   @$(MAKE) -C 3rdparty/mt19937ar
-
-libconfig:
-   @$(MAKE) -C 3rdparty/libconfig
-
 login_sql: $(LOGIN_SQL_DEPENDS)
    @$(MAKE) -C src/login sql
 
@@ -53,6 +47,12 @@
 map_sql: $(MAP_SQL_DEPENDS)
    @$(MAKE) -C src/map sql
 
+mt19937ar:
+   @$(MAKE) -C 3rdparty/mt19937ar
+
+libconfig:
+   @$(MAKE) -C 3rdparty/libconfig
+
 tools:
    @$(MAKE) -C src/tool
 
@@ -94,46 +94,22 @@
    @echo "                'map_sql' and 'import')"
    @echo "'test'        - builds tests"
    @echo "'clean'       - cleans builds and objects"
+   @echo "'install'     - run installer wich setup rathena in /opt/"
+   @echo "'bin-clean'   - delete binary installed"
+   @echo "'uninstall'   - run uninstaller wich erase all install change"
    @echo "'help'        - outputs this message"
 
-#####################################################################
-
 needs_mysql:
    @echo "MySQL not found or disabled by the configure script"
    @exit 1
 
-#####################################################################
-# TODO
+install:   
+   @sh ./install.sh
 
-install:   conf/%.conf conf/%.txt
-   $(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.")
-   $(shell mkdir -p /opt/rathena/bin/)
-   $(shell mkdir -p /opt/rathena/etc/rathena/)
-   $(shell mkdir -p /opt/rathena/var/log/rathena/)
-   $(shell mv save /opt/rathena/etc/rathena/save)
-   $(shell mv db /opt/rathena/etc/rathena/db)
-   $(shell mv conf /opt/rathena/etc/rathena/conf)
-   $(shell mv npc /opt/rathena/etc/rathena/npc)
-   $(shell mv log/* /opt/rathena/var/log/rathena/)
-   $(shell cp *-server* /opt/rathena/bin/)
-   $(shell ln -s /opt/rathena/etc/rathena/save/ /opt/rathena/bin/)
-   $(shell ln -s /opt/rathena/etc/rathena/db/ /opt/rathena/bin/)
-   $(shell ln -s /opt/rathena/etc/rathena/conf/ /opt/rathena/bin/)
-   $(shell ln -s /opt/rathena/etc/rathena/npc/ /opt/rathena/bin/)
-   $(shell ln -s /opt/rathena/var/log/rathena/ /opt/rathena/bin/log)
-
 bin-clean:
-   $(shell rm /opt/rathena/bin/login-server*)
-   $(shell rm /opt/rathena/bin/char-server*)
-   $(shell rm /opt/rathena/bin/map-server*)
+   @sh ./uninstall.sh bin
 
 uninstall:
-   $(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.")
-   bin-clean
-   $(shell rm /opt/rathena/bin/save)
-   $(shell rm /opt/rathena/bin/db)
-   $(shell rm /opt/rathena/bin/conf)
-   $(shell rm /opt/rathena/bin/npc)
-   $(shell rm /opt/rathena/bin/log)
-   $(shell rm -rf /opt/rathena/etc/rathena)
-   $(shell rm -rf /opt/rathena/var/log/rathena)
+   @sh ./uninstall.sh all
+
+#####################################################################
Index: athena-start
--- athena-start Base (BASE)
+++ athena-start Locally Modified (Based On LOCAL)
@@ -1,72 +1,119 @@
 #!/bin/sh
-# athena starting script by rowla
-# modified by [email protected] (NL101541)
 
-PATH=./:$PATH
+#source var/function
+. ./function.sh
+inst_launch_workaround
 
-L_SRV=login-server_sql
-C_SRV=char-server_sql
-M_SRV=map-server_sql
-
+PATH=./:$PATH
 print_start() {
 #    more << EOF
 echo "Athena Starting..."
-echo "            (c) 2003 Athena Project"
-echo "              modified by [email protected]"
+  echo "            (c) 2013 rAthena Project"
 echo ""
-#echo "Debug informations will appear,"
-#echo "since this is a test release."
-#echo ""
+  echo ""
 echo "checking..."
 #EOF
 }
 
-check_files() {
+get_status(){
+   PIDFILE=.$1.pid
+   if [ -e ${PIDFILE} ]; then
+    ISRUN=$(ps ax | grep $(cat ${PIDFILE}) | grep $1)
+    PSRUN=$(echo "$ISRUN" | awk '{ print substr( $0, 0, 7) }')
+   fi
+   return $PSRUN
+}
 
-    for i in ${L_SRV} ${C_SRV} ${M_SRV}
-    do
-        if [ ! -f ./$i ]; then
-            echo "$i does not exist, or can't run."
-            echo "Stop. Check your compile."
-            exit 1;
+#cheking if already started, launch and mark in log
+start_serv(){ 
+  LOGFILE="log/$1.log"
+  get_status $1
+  echo "My logfile=${LOGFILE}"
+  if [ -z ${PSRUN} ]; then
+    exec ./$1&
+    echo $! > .$1.pid
+    echo "Server '$1' started at `date +"%m-%d-%H:%M-%S"`"
+    echo "Server '$1' started at `date +"%m-%d-%H:%M-%S"`" >> ${LOGFILE}
+  else
+    echo "Can't start '$1', cause is already running p${PSRUN}"
+    echo "Can't start '$1', cause is already running p${PSRUN}" >> ${LOGFILE}
         fi
+}
+
+#experimental
+watch_serv(){
+  LOGFILE=./log/$1.log
+  ulimit -Sc unlimited
+
+  while true; do
+   get_status $1
+   if [ -z ${PSRUN} ]; then
+     $count=$count+1
+     echo "server '$1' is down" >> ${LOGFILE}
+     echo "restarting server at time at `date +"%m-%d-%H:%M-%S"`">> ${LOGFILE}
+     exec ./$1&
+     echo $! > .$1.pid   
+     if [ $3 ] && [ $3 -lt $count ]; then break; fi
+   else sleep $2    
+   fi
     done
+}
 
-#    more << EOF
-echo "Check complete."
-echo "Looks good, a nice Athena!"
-#EOF
+restart(){
+  $0 stop
+  for i in ${L_SRV} ${C_SRV} ${M_SRV}
+    do
+    while true; do
+   get_status ${i}
+   if [ ${PSRUN} ]; then echo "'${i}' is still running p${PSRUN} waiting end"; sleep 2;
+        else break; fi
+    done
+  done
+  $0 start
 }
 
-
 case $1 in
     'start')
         print_start
         check_files
-
-        exec ./${L_SRV}&
-   echo $! > .${L_SRV}.pid
-        exec ./${C_SRV}&
-   echo $! > .${C_SRV}.pid
-        exec ./${M_SRV}&
-   echo $! > .${M_SRV}.pid
-
+   echo "Check complete."
+   echo "Looks good, a nice Athena!"
+   for i in ${L_SRV} ${C_SRV} ${M_SRV}
+       do
+       start_serv $i
+       done
         echo "Now Started Athena."
 ;;
+    'watch')
+   for i in ${L_SRV} ${C_SRV} ${M_SRV}
+       do      
+       watch_serv $i 10 3
+       done
+   echo "Now watching Athena."
+;; 
     'stop')
-   for i in .${L_SRV}.pid .${C_SRV}.pid .${M_SRV}.pid
+   for i in ${L_SRV} ${C_SRV} ${M_SRV}
        do
-       if [ -e ./$i ]; then
-           kill $(cat $i)
-           rm $i
+       PIDFILE=.${i}.pid
+       if [ -e ./${PIDFILE} ]; then
+           kill $(cat ${PIDFILE})
+           rm ${PIDFILE}
        fi
        done
 ;;
     'restart')
-        $0 stop
-        $0 start
+         restart
 ;;
+    'status')
+   for i in ${L_SRV} ${C_SRV} ${M_SRV}
+   do
+       get_status ${i}
+       if [ ${PSRUN} ]; then echo "'${i}' is running p${PSRUN}"; else echo "'${i}' seem down"; fi
+   done
+;; 
     *)
-        echo "Usage: athena-start { start | stop | restart }"
+        echo "Usage: athena-start { start | stop | restart | status | watch }"
 ;;
 esac
+
+
Index: char-server.sh
--- char-server.sh Base (BASE)
+++ char-server.sh Locally Deleted
@@ -1,16 +0,0 @@
-#/bin/sh
-#Hi my naem is Kirt and I liek anime
-
-ulimit -Sc unlimited
-
-while [ 3 ] ; do
-if [ -f .stopserver3 ] ; then
-echo server marked down >> servlog.txt
-else
-echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt
-./char-server_sql
-fi
-
-sleep 5
-
-done
Index: configure
--- configure Base (BASE)
+++ configure Locally Modified (Based On LOCAL)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 17061 .
+# From configure.in Revision: 17159 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68.
 #
@@ -5886,9 +5886,9 @@
 $as_echo "$as_me: ignoring PCRE (optional)" >&6;}
 else
    host_os="`uname`"
-   if test "$host_os" = "FreeBSD" ; then PCRE_HOME="/usr/local"; fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: bsddebug, pcrehome=($PCRE_HOME)" >&5
-$as_echo "$as_me: bsddebug, pcrehome=($PCRE_HOME)" >&6;}
+   if test "$host_os" = "FreeBSD" ; then
+       if test -z "$PCRE_HOME" ; then PCRE_HOME="/usr/local"; fi
+   fi
    if test -z "$PCRE_HOME" ; then
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_study" >&5
 $as_echo_n "checking for library containing pcre_study... " >&6; }
Index: configure.in
--- configure.in Base (BASE)
+++ configure.in Locally Modified (Based On LOCAL)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_INIT(rAthena)
-AC_REVISION($Revision$)
+AC_REVISION($Revision: 17159 $)
 AC_PREREQ([2.59])
 AC_CONFIG_SRCDIR([src/common/cbasetypes.h])
 AC_CONFIG_FILES([Makefile src/common/Makefile])
@@ -780,8 +780,9 @@
    AC_MSG_NOTICE([ignoring PCRE (optional)])
 else
    host_os="`uname`"
-   if test "$host_os" = "FreeBSD" ; then PCRE_HOME="/usr/local"; fi
-   AC_MSG_NOTICE([bsddebug, pcrehome=($PCRE_HOME)])
+   if test "$host_os" = "FreeBSD" ; then 
+       if test -z "$PCRE_HOME" ; then PCRE_HOME="/usr/local"; fi
+   fi
    if test -z "$PCRE_HOME" ; then
                 AC_SEARCH_LIBS([pcre_study], [pcre], [HAVE_PCRE="yes"], [])
        if test "$HAVE_PCRE" = "yes" ; then
Index: function.sh
--- function.sh No Base Revision
+++ function.sh Locally New
@@ -0,0 +1,26 @@
+L_SRV=login-server_sql
+C_SRV=char-server_sql
+M_SRV=map-server_sql
+INST_PATH=/opt
+PKG=rathena
+PKG_PATH=$INST_PATH/$PKG
+
+check_files() {
+    for i in ${L_SRV} ${C_SRV} ${M_SRV}
+    do
+        if [ ! -f ./$i ]; then
+            echo "$i does not exist extiting"
+            exit 1;
+        fi
+    done
+}
+
+check_inst_right(){
+    if [ ! -w $INST_PATH ]; then echo "You must have sudo right to use this install (writte/read permission in /opt/ )" && exit; fi
+}
+
+inst_launch_workaround(){
+  if [ -d $PKG_PATH ]; then
+    if [ $(pwd) != $PKG_PATH ]; then cd $PKG_PATH; fi
+  fi
+}
Index: install.sh
--- install.sh No Base Revision
+++ install.sh Locally New
@@ -0,0 +1,25 @@
+#!/bin/sh
+#source var/function
+. ./function.sh
+
+check_inst_right
+check_files
+read -p "WARNING: This target dis experimental. Press Ctrl+C to cancel or Enter to continue." readEnterKey
+mkdir -p $PKG_PATH/bin/
+mkdir -p $PKG_PATH/etc/$PKG/
+mkdir -p $PKG_PATH/var/$PKG/
+
+#we copy all file into opt/ dir and treat dir like normal unix arborescence
+rsync -r --exclude .svn db/ $PKG_PATH/var/$PKG/db
+rsync -r --exclude .svn log/ $PKG_PATH/var/$PKG/log
+rsync -r --exclude .svn conf/ $PKG_PATH/etc/$PKG/conf
+rsync -r --exclude .svn npc/ $PKG_PATH/npc
+cp athena-start $PKG_PATH/ 
+mv *-server* $PKG_PATH/bin/
+
+ln -fs $PKG_PATH/var/$PKG/db/ $PKG_PATH/db
+ln -fs $PKG_PATH/var/$PKG/log/ $PKG_PATH/log
+ln -fs $PKG_PATH/etc/$PKG/conf/ $PKG_PATH/conf
+ln -fs $PKG_PATH/athena-start /usr/bin/$PKG
+for f in $(ls $PKG_PATH/bin/) ; do ln -fs $PKG_PATH/bin/$f $PKG_PATH/$f; done
+echo "Installation is done you can now control server with '$PKG start'"
Index: login-server.sh
--- login-server.sh Base (BASE)
+++ login-server.sh Locally Deleted
@@ -1,16 +0,0 @@
-#/bin/sh
-#Hi my naem is Kirt and I liek anime
-
-ulimit -Sc unlimited
-
-while [ 2 ] ; do
-if [ -f .stopserver2 ] ; then
-echo server marked down >> servlog.txt
-else
-echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt
-./login-server_sql
-fi
-
-sleep 5
-
-done
Index: map-server.sh
--- map-server.sh Base (BASE)
+++ map-server.sh Locally Deleted
@@ -1,16 +0,0 @@
-#/bin/sh
-#Hi my naem is Kirt and I liek anime
-
-ulimit -Sc unlimited
-
-while [ 1 ] ; do
-if [ -f .stopserver ] ; then
-echo server marked down >> servlog.txt
-else
-echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt
-./map-server_sql
-fi
-
-sleep 5
-
-done
Index: src/char/Makefile.in
--- src/char/Makefile.in Base (BASE)
+++ src/char/Makefile.in Locally Modified (Based On LOCAL)
@@ -21,35 +21,38 @@
 
 HAVE_MYSQL=@HAVE_MYSQL@
 ifeq ($(HAVE_MYSQL),yes)
-   CHAR_SERVER_SQL_DEPENDS=obj_sql $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ)
+   SQL_DEPENDS=char-server_sql
 else
-   CHAR_SERVER_SQL_DEPENDS=needs_mysql
+   SQL_DEPENDS=needs_mysql
 endif
+ALL_DEPENDS=sql
 
 @SET_MAKE@
 
 #####################################################################
-.PHONY : all char-server_sql clean help
+.PHONY : all sql clean help
 
-all: char-server_sql
+all: $(ALL_DEPENDS)
 
-char-server_sql: $(CHAR_SERVER_SQL_DEPENDS)
-   @echo " LD  $@"
-   @@CC@ @LDFLAGS@ -o ../../char-server_sql@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+sql: $(SQL_DEPENDS)
 
 clean:
    @echo " CLEAN   char"
    @rm -rf *.o obj_sql ../../char-server_sql@EXEEXT@
 
 help:
-   @echo "possible targets are 'char-server_sql' 'all' 'clean' 'help'"
-   @echo "'char-server_sql'  - char server (SQL version)"
+   @echo "possible targets are 'sql' 'all' 'clean' 'help'"
+   @echo "'sql'          - char server (SQL version)"
    @echo "'all'              - builds all above targets"
    @echo "'clean'            - cleans builds and objects"
    @echo "'help'             - outputs this message"
 
 #####################################################################
 
+char-server_sql: obj_sql $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ)
+   @echo " LD  $@"
+   @@CC@ @LDFLAGS@ -o ../../char-server_sql@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+
 needs_mysql:
    @echo "MySQL not found or disabled by the configure script"
    @exit 1
Index: src/common/Makefile.in
--- src/common/Makefile.in Base (BASE)
+++ src/common/Makefile.in Locally Modified (Based On LOCAL)
@@ -24,11 +24,11 @@
 
 HAVE_MYSQL=@HAVE_MYSQL@
 ifeq ($(HAVE_MYSQL),yes)
-   ALL_DEPENDS=sql
    SQL_DEPENDS=common common_sql
 else
    SQL_DEPENDS=needs_mysql
 endif
+ALL_DEPENDS=sql
 
 @SET_MAKE@
 
Index: src/common/core.c
--- src/common/core.c Base (BASE)
+++ src/common/core.c Locally Modified (Based On LOCAL)
@@ -5,13 +5,13 @@
 #include "showmsg.h"
 #include "malloc.h"
 #include "core.h"
+#include "sql.h"
 #ifndef MINICORE
 #include "db.h"
 #include "socket.h"
 #include "timer.h"
 #include "thread.h"
 #include "mempool.h"
-#include "sql.h"
 #include "cbasetypes.h"
 #include "msg_conf.h"
 #endif
Index: src/login/Makefile.in
--- src/login/Makefile.in Base (BASE)
+++ src/login/Makefile.in Locally Modified (Based On LOCAL)
@@ -19,19 +19,20 @@
 
 HAVE_MYSQL=@HAVE_MYSQL@
 ifeq ($(HAVE_MYSQL),yes)
-   LOGIN_SERVER_SQL_DEPENDS=obj_sql $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a  $(MT19937AR_OBJ)
+   SQL_DEPENDS=login-server_sql
 else
-   LOGIN_SERVER_SQL_DEPENDS=needs_mysql
+   SQL_DEPENDS=needs_mysql
 endif
+ALL_DEPENDS= sql
 
 @SET_MAKE@
 
 #####################################################################
 .PHONY :all sql clean help
 
-all: sql
+all: $(ALL_DEPENDS)
 
-sql: obj_sql login-server_sql
+sql: $(SQL_DEPENDS)
 
 clean:
    @echo " CLEAN   login"
@@ -58,7 +59,7 @@
 
 #executables
 
-login-server_sql: $(LOGIN_SERVER_SQL_DEPENDS)
+login-server_sql: obj_sql $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a  $(MT19937AR_OBJ)
    @echo " LD  $@"
    @@CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
        
Index: src/map/Makefile.in
--- src/map/Makefile.in Base (BASE)
+++ src/map/Makefile.in Locally Modified (Based On LOCAL)
@@ -31,13 +31,11 @@
 
 HAVE_MYSQL=@HAVE_MYSQL@
 ifeq ($(HAVE_MYSQL),yes)
-   ALL_DEPENDS=txt sql
    SQL_DEPENDS=map-server_sql
 else
-   ALL_TARGET=txt
    SQL_DEPENDS=needs_mysql
 endif
-TXT_DEPENDS=map-server
+ALL_DEPENDS=sql
 
 HAVE_PCRE=@HAVE_PCRE@
 ifeq ($(HAVE_PCRE),yes)
@@ -49,12 +47,10 @@
 @SET_MAKE@
 
 #####################################################################
-.PHONY : all txt sql clean help
+.PHONY : all sql clean help
 
 all: $(ALL_DEPENDS)
 
-txt: $(TXT_DEPENDS)
-
 sql: $(SQL_DEPENDS)
 
 clean:
@@ -62,13 +58,8 @@
    @rm -rf *.o obj_txt obj_sql ../../map-server@EXEEXT@ ../../map-server_sql@EXEEXT@
 
 help:
-ifeq ($(HAVE_MYSQL),yes)
    @echo "possible targets are 'sql' 'txt' 'all' 'clean' 'help'"
    @echo "'sql'   - map server (SQL version)"
-else
-   @echo "possible targets are 'txt' 'all' 'clean' 'help'"
-endif
-   @echo "'txt'   - map server (TXT version)"
    @echo "'all'   - builds all above targets"
    @echo "'clean' - cleans builds and objects"
    @echo "'help'  - outputs this message"
@@ -80,9 +71,6 @@
    @exit 1
 
 # object directories
-obj_txt:
-   @echo " MKDIR   obj_txt"
-   @-mkdir obj_txt
 
 obj_sql:
    @echo " MKDIR   obj_sql"
Index: src/map/map.c
--- src/map/map.c Base (BASE)
+++ src/map/map.c Locally Modified (Based On LOCAL)
@@ -106,8 +106,8 @@
 static struct block_list *bl_list[BL_LIST_MAX];
 static int bl_list_count = 0;
 
-#define MAX_MSG 1500
-static char* msg_table[MAX_MSG]; // map Server messages
+#define MAP_MAX_MSG 1500
+static char* msg_table[MAP_MAX_MSG]; // map Server messages
 
 struct map_data map[MAX_MAP_PER_SERVER];
 int map_num = 0;
@@ -3838,11 +3838,11 @@
 }
 
 int map_msg_config_read(char *cfgName){
-   return _msg_config_read(cfgName,MAX_MSG,msg_table);
+   return _msg_config_read(cfgName,MAP_MAX_MSG,msg_table);
 }
 const char* map_msg_txt(int msg_number){
-   return _msg_txt(msg_number,MAX_MSG,msg_table);
+   return _msg_txt(msg_number,MAP_MAX_MSG,msg_table);
 }
 void map_do_final_msg(void){
-   _do_final_msg(MAX_MSG,msg_table);
+   _do_final_msg(MAP_MAX_MSG,msg_table);
 }
Index: src/test/Makefile.in
--- src/test/Makefile.in Base (BASE)
+++ src/test/Makefile.in Locally Modified (Based On LOCAL)
@@ -19,28 +19,35 @@
 @SET_MAKE@
 
 #####################################################################
-.PHONY :all test_spinlock
+.PHONY :all test clean
 
-all: test_spinlock
+all: test
 
+test: test_spinlock
+
 clean:
    @echo " CLEAN   test"
    @rm -rf *.o obj ../../test_spinlock@EXEEXT@ 
 
+help:
+   @echo "possible targets are 'all' 'test' 'clean' 'help'"
+   @echo "'test'   - builds test_spinlock test atm"
+   @echo "'all'    - builds all above targets"
+   @echo "'clean'  - cleans builds and objects"
+   @echo "'help'   - outputs this message"
+
 #####################################################################
 
+test_spinlock: $(TEST_SPINLOCK_DEPENDS)
+   @echo " LD  $@"
+   @@CC@ @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+
 # object directories
 
 obj:
    @echo " MKDIR   obj"
    @-mkdir obj
    
-#executables
-
-test_spinlock: $(TEST_SPINLOCK_DEPENDS)
-   @echo " LD  $@"
-   @@CC@ @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
-
 # login object files
 
 obj/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H)
Index: src/test/test_spinlock.c
--- src/test/test_spinlock.c Base (BASE)
+++ src/test/test_spinlock.c Locally Modified (Based On LOCAL)
Index: testplz.tar.gz
MIME: application/octet-stream; encoding: Base64; length: 1337
H4sIAOHyKlEAA+1Xe2/bNhDPv9KnuDhKHa/1Q04yA3VdoOj6CJa2Qd0OGIbC
ZSXaZi1LHknV6VJ/9x1P1MNxn+i6YYB+CELheCTvfedpGgdaJHFHzfd+FHqI
weDUrP7gtFddDfze4GTP7/t+v++f9k6Q7vdPj0/2oPfDJKogVZpJgL1IzOaa
fZrvS/v/U5xPxs9/G0XJTMRtxeU7Lifqz8i9T+RgzmSV+oSoS7aqEs+ejl9M
Lu69eDzqJivtXvz6aCSZnvOYme9sxyuYuh4SXTeY82AxmYqIq6MWXLmAmCYS
BIgYvCuSaoMf9/MPenpDfGFCi4GYwh+wD+0pdLqegFdDMA8X2wY8mCfQwM0w
4QriRAO/FMr810KLeNbY5r4UGvxhQZsK+2TM3U0utoiVnkgTD0etTPRcjjWU
mubSWAl+T1JYYrDBnL3joNIwAboCdAKp4sgqFJibWRTB0VoKrXlXchbCisul
UAqT1BjHGLkLrQbcuEHSDo2MKBoJFTFM5/lkncgFk0kah5mAJF47BC93yJal
aNc7Wq3DFuyPdpkgqJwcZiahN//r2K3x/cgytW2KoP5Rb3yh/p/83LP1/3TQ
Oz45NfV/0BvU9f/fwMF+942Iu2ruugcqSWXA4R2T3akdC9wOVtZpOSN8osy4
LpX5Tve2Zz7clRSxnlBQ2fJ+YCrNMpEc7tyBB88eunllvkcBCGPDi+W40+k0
ir1qZT4KWtDv+ccg7YkLmbzlgS65P/ZFBbu89sC8jMVyxkk6nSpbwS/Ofnl4
dv5g1PH8zkqEbl4W2xx7j93cbFXNs/Hzl09HWDYVsEv4ADPJV1hFA6YrJ1rF
ht+iUxf2lO1KdEkDmdh6Ac0rILthc3ijtDwCr3cL8G/Qgk2TjmfdSHKdSuyS
dJfR5gC1NEoakVlkesZ7INvz8BZkvgIWh7BkcmFaCHZ7l/Ynpo2jBQCvPX/2
iCzQwN0uWgEXY7HSUqhDYdYn780lpn2PsFlnJzeNotP8ZUxgpNs2Gb/kgWnU
/g236MzePtyFitXtA2OaL6Dp+c1cFUDLvg6Z5nCzcbhsH4btw8e3D5+0D8eN
143vOAp370KphFExUrxy330WN3V2E116CwJmGja269zYMo1jY/9Vrnbje8/v
CJU1+QN+idOAWPIYxwR3zTRmofVhxYWdbulDJKeRWOJU0x4HkMb0zTFhAdZz
9B9omfKhnamuO/vz7gQvwNzXo2y56buVeUtVnICKhsk63tWp4JZc2fQHexAd
plHNzzruY9dtR9huiCHNLSdH7xhemTmKvtqRthoVg88bdM/CTjwUFqAibrK5
D/Yi2sqnQ6tG5gyvhz5PVu43z7XX3OJUnXIlNq6TiX7NI9aSTcNCJlda4CC5
E1mwZjT2Ao/DxtDq0y8HXtJyS+9MvWIhvVBLGocZMns+6kaMTdrIShWh0gYK
WmXydx2bIYYEQbJcRVxzLNSWfp4kCwWzJMEyxiAW2Juy2r+PLF9jVcea1XHK
cgeeyOkxL9WmB58m66wRYcnIXkJhhplxmpRtqNy3vOw4+HaZpvg2+D04rgrg
lE8To/FN5W0nt2yy+sa38eWyq2FUUIV1nLytYZbsNjaHzi5M5Oy0MrsplxUi
0qZVc+a2splQCQWwpIIlC+mv1on02UmFr8yF3fo6zAJ9i1FxvswqFYW+YzXK
PPBT61qsvFRsxm9DdX6GK1vmP1Dq42KVJgKJ/SFzMmworrhigevWv6Nq1KhR
o0aNGjVq1KhRo0aNGjVq1KhRo8Y/jr8BdGSpfgAoAAA=
Index: uninstall.sh
--- uninstall.sh No Base Revision
+++ uninstall.sh Locally New
@@ -0,0 +1,23 @@
+#!/bin/sh
+#source var/function
+. ./function.sh
+echo "My pkg path is $PKG_PATH"
+
+check_inst_right
+read -p "WARNING: This target dis experimental. Press Ctrl+C to cancel or Enter to continue." readEnterKey
+case $1 in
+   'bin')
+       echo "Starting binary cleanup"
+       rm -rf $PKG_PATH/bin/*
+       echo "Binary file was deleted"
+   ;;
+   'all')
+       echo "Starting uninstalling "
+       rm -rf $PKG_PATH
+       rm -rf /usr/bin/$PKG
+       echo "Uninstallation succed"
+   ;;
+   '*')
+       echo "Please enter a target usage './uninstall { all | bin }'"  
+esac
+
Viewed 1553 times, submitted by lighta.