aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am41
-rw-r--r--configure.ac20
-rw-r--r--contrib/Makefile.am8
-rw-r--r--contrib/extractor/Makefile471
-rw-r--r--contrib/extractor/README.linux16
-rw-r--r--contrib/extractor/System.cpp15
-rw-r--r--contrib/extractor/adt.cpp44
-rw-r--r--contrib/extractor/adt.h1
-rw-r--r--contrib/extractor/libmpq/Makefile17
-rw-r--r--contrib/extractor/libmpq/mpq.cpp2
-rw-r--r--contrib/vmap_debugger/ModelContainerView.cpp4
-rw-r--r--contrib/vmap_debugger/ModelContainerView.h2
-rw-r--r--contrib/vmap_extractor_v2/doc/MoPaQ_0.9.txt318
-rw-r--r--contrib/vmap_extractor_v2/doc/MoPaQ_1.0.txt421
-rw-r--r--contrib/vmap_extractor_v2/stormlib/Makefile58
-rw-r--r--contrib/vmap_extractor_v2/stormlib/bzip2/Makefile205
-rw-r--r--contrib/vmap_extractor_v2/stormlib/zlib/Makefile175
-rw-r--r--contrib/vmap_extractor_v2/stormlib/zlib/Makefile.in175
-rw-r--r--contrib/vmap_extractor_v2/stormlib/zlib/configure212
-rw-r--r--contrib/vmap_extractor_v2/stormlib/zlib/contrib/minizip/Makefile25
-rw-r--r--contrib/vmap_extractor_v2/stormlib/zlib/contrib/untgz/Makefile14
-rw-r--r--dep/include/Makefile.am56
-rw-r--r--dep/lib/Makefile.am10
-rw-r--r--src/Makefile.am6
-rw-r--r--src/shared/Makefile.am116
-rw-r--r--src/shared/SystemConfig.h.in15
26 files changed, 144 insertions, 2303 deletions
diff --git a/Makefile.am b/Makefile.am
index 2650fd4659e..802982ea875 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,10 +22,39 @@
SUBDIRS = dep doc src
## Additional files to include when running 'make dist'
-EXTRA_DIST = win
-
-
-
-
-
+# Win32 project workspace for Visual Studio .NET 2003
+EXTRA_DIST = \
+ win/mangosdVC71.sln \
+ win/VC71/framework.vcproj \
+ win/VC71/game.vcproj \
+ win/VC71/mangosd.vcproj \
+ win/VC71/realmd.vcproj \
+ win/VC71/shared.vcproj \
+ win/VC71/zlib.vcproj \
+ win/VC71/g3dlite.vcproj \
+ win/VC71/zthread.vcproj
+
+# Win32 project workspace for Visual Studio .NET 2005
+EXTRA_DIST += \
+ win/mangosdVC80.sln \
+ win/VC80/framework.vcproj \
+ win/VC80/game.vcproj \
+ win/VC80/mangosd.vcproj \
+ win/VC80/realmd.vcproj \
+ win/VC80/shared.vcproj \
+ win/VC80/zlib.vcproj \
+ win/VC80/g3dlite.vcproj \
+ win/VC80/zthread.vcproj
+
+# Win32 project workspace for Visual Studio .NET 2008
+EXTRA_DIST += \
+ win/mangosdVC90.sln \
+ win/VC90/framework.vcproj \
+ win/VC90/game.vcproj \
+ win/VC90/mangosd.vcproj \
+ win/VC90/realmd.vcproj \
+ win/VC90/shared.vcproj \
+ win/VC90/zlib.vcproj \
+ win/VC90/g3dlite.vcproj \
+ win/VC90/zthread.vcproj
diff --git a/configure.ac b/configure.ac
index 4a830706ddb..fd14e0ca3a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -290,13 +290,6 @@ TRINI_INCLUDES="$POSTGRE_INCLUDES $MYSQL_INCLUDES $TRINI_INCLUDES"
TRINI_LIBS="$POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $SSLLIB $TRINI_LIBS"
## Export defined variables
-AC_SUBST(ZLIB)
-AC_SUBST(COMPATLIB)
-AC_SUBST(SSLLIB)
-AC_SUBST(MYSQL_INCLUDES)
-AC_SUBST(MYSQL_LIBS)
-AC_SUBST(POSTGRE_INCLUDES)
-AC_SUBST(POSTGRE_LIBS)
AC_SUBST(DOXYGEN)
AC_SUBST(TRINITYD_DEBUG_INFO)
AC_SUBST(TRINITYD_ENABLE_CLI)
@@ -321,6 +314,8 @@ AC_CONFIG_FILES([
doc/Makefile
Makefile
src/Makefile
+ src/tools/Makefile
+ src/tools/genrevision/Makefile
src/framework/Makefile
src/shared/Makefile
src/shared/Auth/Makefile
@@ -329,8 +324,10 @@ AC_CONFIG_FILES([
src/shared/vmap/Makefile
src/shared/SystemConfig.h
src/game/Makefile
- src/trinityrealm/Makefile
- src/trinitycore/Makefile
+ src/realmd/Makefile
+ src/realmd/realmd.conf.dist
+ src/mangosd/Makefile
+ src/mangosd/mangosd.conf.dist
src/bindings/Makefile
src/bindings/interface/Makefile
])
@@ -340,11 +337,6 @@ if test X$tri_need_to_build_ace = Xyes; then
AC_CONFIG_SUBDIRS([dep/ACE_wrappers])
fi
-## Configure ACE
-if test X$tri_build_scripts = Xyes; then
-AC_CONFIG_FILES([src/bindings/scripts/Makefile])
-fi
-
AC_CONFIG_COMMANDS([default],[
echo ""
echo "Configuration of TrinityCore $PACKAGE_VERSION is now complete."
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 47ba379c089..653e691a1f0 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,6 +1,4 @@
-# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
-#
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+# Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -9,12 +7,12 @@
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
diff --git a/contrib/extractor/Makefile b/contrib/extractor/Makefile
deleted file mode 100644
index 55eb35f336a..00000000000
--- a/contrib/extractor/Makefile
+++ /dev/null
@@ -1,471 +0,0 @@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
-#
-# Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-SOURCES = $(ad_SOURCES)
-
-srcdir = .
-top_srcdir = .
-
-pkgdatadir = $(datadir)/mangos
-pkglibdir = $(libdir)/mangos
-pkgincludedir = $(includedir)/mangos
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /usr/bin/ginstall -c
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = i686-pc-linux-gnu
-host_triplet = i686-pc-linux-gnu
-bin_PROGRAMS = ad$(EXEEXT)
-subdir = contrib/extractor
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am_ad_OBJECTS = System.$(OBJEXT) adt.$(OBJEXT) dbcfile.$(OBJEXT) \
- mpq_libmpq.$(OBJEXT)
-ad_OBJECTS = $(am_ad_OBJECTS)
-ad_DEPENDENCIES =
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(ad_SOURCES)
-DIST_SOURCES = $(ad_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL =
-ALLOCA =
-AMDEP_FALSE = #
-AMDEP_TRUE =
-AMTAR = ${SHELL} /home/wow/MaNGOS/trunk/missing --run tar
-AR = ar
-AUTOCONF = ${SHELL} /home/wow/MaNGOS/trunk/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/wow/MaNGOS/trunk/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/wow/MaNGOS/trunk/missing --run automake-1.9
-AWK = gawk
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O3
-COMPILER_OPTIONS = -g -O3
-CPP = gcc -E
-CPPFLAGS =
-CXX = g++
-CXXCPP = g++ -E
-CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -g -O3
-CYGPATH_W = echo
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-ECHO = echo
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = grep -E
-EXEEXT =
-EXTRA_COMPILER_OPTIONS =
-EXTRA_LINKER_OPTIONS =
-F77 =
-FFLAGS =
-INCLUDES = -I$(srcdir)
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LDFLAGS =
-LIBOBJS =
-LIBS = -lz -lpthread
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-LINKER_OPTIONS = -static
-LN_S = ln -s
-LTLIBOBJS =
-LT_AGE = 2
-LT_CURRENT = 2
-LT_RELEASE = 2.3.2
-LT_REVISION = 3
-MAINT = #
-MAINTAINER_MODE_FALSE =
-MAINTAINER_MODE_TRUE = #
-MAKEINFO =
-MANGOSD_CONFIG = /home/wow/server/etc/mangosd.conf
-MANGOSD_CONFIGDIR = /home/wow/server/etc
-MANGOSD_DATA = /home/wow/server/share/mangos
-OBJEXT = o
-PACKAGE = mangos
-PACKAGE_BUGREPORT = http://www.mangosproject.org/
-PACKAGE_NAME = MaNGOS
-PACKAGE_STRING = MaNGOS 0.2-SVN
-PACKAGE_TARNAME = mangos
-PACKAGE_VERSION = 0.2-SVN
-PATH_SEPARATOR = :
-RANLIB = ranlib
-SET_MAKE =
-SHELL = /bin/sh
-STRIP = strip
-VERSION = 0.2-SVN
-ac_ct_AR = ar
-ac_ct_CC = gcc
-ac_ct_CXX = g++
-ac_ct_F77 =
-ac_ct_RANLIB = ranlib
-ac_ct_STRIP = strip
-am__fastdepCC_FALSE = #
-am__fastdepCC_TRUE =
-am__fastdepCXX_FALSE = #
-am__fastdepCXX_TRUE =
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = i686-pc-linux-gnu
-build_alias =
-build_cpu = i686
-build_os = linux-gnu
-build_vendor = pc
-datadir = ${prefix}/share
-exec_prefix = ${prefix}
-host = i686-pc-linux-gnu
-host_alias =
-host_cpu = i686
-host_os = linux-gnu
-host_vendor = pc
-includedir = ${prefix}/include
-infodir = ${prefix}/info
-install_sh = /home/wow/MaNGOS/trunk/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localstatedir = ${prefix}/var
-mandir = ${prefix}/man
-mkdir_p = mkdir -p --
-oldincludedir = /usr/include
-prefix = /home/wow/server
-program_transform_name = s,x,x,
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-
-# use our configured sysconfdir
-sysconfdir = /home/wow/server/etc
-target_alias =
-ad_SOURCES = \
- System.cpp \
- adt.h \
- adt.cpp \
- dbcfile.cpp \
- dbcfile.h \
- mpq_libmpq.cpp \
- mpq_libmpq.h
-
-ad_LDADD = libmpq/libmpq.a
-add_LDFLAGS = -L$(srcdir) -L$(srcdir)/libmpq
-
-all: create-dir all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
-
-.PRECIOUS: Makefile
-
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-ad$(EXEEXT): $(ad_OBJECTS) $(ad_DEPENDENCIES)
- @rm -f ad$(EXEEXT)
- $(CXXLINK) $(ad_LDFLAGS) $(ad_OBJECTS) $(ad_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-.cpp.o:
- if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
-# $(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
- if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
-# $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
- if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-# source='$<' object='$@' libtool=yes \
-# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
-# $(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
- -rm .deps/*
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS);
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-
-create-dir:
- mkdir -p ".deps"
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/extractor/README.linux b/contrib/extractor/README.linux
index 52b907391b8..e1ebdb8bb2e 100644
--- a/contrib/extractor/README.linux
+++ b/contrib/extractor/README.linux
@@ -1,7 +1,13 @@
-= Trinity Core -- Linux instructions for extractor =
+Linux instructions
+------------------
-Copyright (C) Trinity Core (http://www.trinitycore.org)
+1. Configure and build MaNGOS.
+2. cd contrib/map_extractor/libmpq/
+3. make
+4. cd ..
+5. make
+6. run ad
-1: Configure and build MaNGOS.
-2: cd contrib/extractor/libmpq && make && cd .. && make
-3: run ad \ No newline at end of file
+if there are any problems create folder named .deps in contrib/map_extractor/
+it is old bug from first extractor and i am too lasy to fix it :)
+
diff --git a/contrib/extractor/System.cpp b/contrib/extractor/System.cpp
index 1753f40801a..85d06369f24 100644
--- a/contrib/extractor/System.cpp
+++ b/contrib/extractor/System.cpp
@@ -278,7 +278,7 @@ void LoadLocaleMPQFiles(int const locale)
new MPQArchive(filename);
}
}
-
+
void LoadCommonMPQFiles()
{
char filename[512];
@@ -289,6 +289,7 @@ void LoadCommonMPQFiles()
new MPQArchive(filename);
sprintf(filename,"%s/Data/expansion.MPQ", input_path);
new MPQArchive(filename);
+
for(int i = 1; i < 5; ++i)
{
char ext[3] = "";
@@ -315,7 +316,7 @@ int main(int argc, char * arg[])
HandleArgs(argc, arg);
int FirstLocale = -1;
-
+
for (int i = 0; i < LANG_COUNT; i++)
{
char tmp1[512];
@@ -323,10 +324,10 @@ int main(int argc, char * arg[])
if (FileExists(tmp1))
{
printf("Detected locale: %s\n", langs[i]);
-
+
//Open MPQs
LoadLocaleMPQFiles(i);
-
+
if((extract & EXTRACT_DBC) == 0)
{
FirstLocale = i;
@@ -352,15 +353,15 @@ int main(int argc, char * arg[])
printf("No locales detected\n");
return 0;
}
-
+
if (extract & EXTRACT_MAP)
{
printf("Using locale: %s\n", langs[FirstLocale]);
-
+
// Open MPQs
LoadLocaleMPQFiles(FirstLocale);
LoadCommonMPQFiles();
-
+
// Extract maps
ExtractMapsFromMpq();
diff --git a/contrib/extractor/adt.cpp b/contrib/extractor/adt.cpp
index 71cbf88a37b..dde87e5fc28 100644
--- a/contrib/extractor/adt.cpp
+++ b/contrib/extractor/adt.cpp
@@ -111,24 +111,8 @@ bool LoadADT(char* filename)
{
ChunkLiqHeight[j] = -999999; // no liquid/water
}
-<<<<<<< HEAD:contrib/extractor/adt.cpp
-
- }*/
- break;
- }
- case 0x4d574d4f: // MWMO
- {
- /*
- if (size)
- {
- char *buf = new char[size];
- mf.read(buf, size);
- char *p=buf;
- while (p<buf+size)
-=======
// теперь вычисляем те что с водой и перезаписываем их в куске
for(int b = 0; b <= LiqChunkData1->height; ++b)
->>>>>>> upstream/master:contrib/extractor/adt.cpp
{
for(int c = LiqChunkData1->xOffset; c <= (LiqChunkData1->xOffset + LiqChunkData1->width); ++c)
{
@@ -156,31 +140,8 @@ bool LoadADT(char* filename)
MapLiqHeight[k] = ChunkLiqHeight[p + s];
++k;
}
-<<<<<<< HEAD:contrib/extractor/adt.cpp
- delete[] buf;
- }*/
- break;
- }
- case 0x4d564552: // MVER
- case 0x4d484452: // MHDR header
- case 0x4d434e4b: // MCNK
- case 0x4d544558: // MTEX textures (strings)
- case 0x4d4d4458: // MMDX m2 models (strings)
- case 0x4d4d4944: // MMID offsets for strings in MMDX
- case 0x4d574944: // MWID offsets for strings in MWMO
- case 0x4d444446: // MDDF
- case 0x4d46424f: // MFBO new in BC
- case 0x4d48324f: // MH2O new in WotLK
- break;
- default:
- {
- // mf.seekRelative(-3);
- printf("Unhandled map chunk: %u\n",fourcc);
- break;
-=======
k = k + 120;
}
->>>>>>> upstream/master:contrib/extractor/adt.cpp
}
delete LiqOffsData;
delete LiqChunkData1;
@@ -317,10 +278,6 @@ inline void LoadMapChunk(MPQFile &mf, chunk *_chunk)
if(chunkflags & 4 || chunkflags & 8)
MapLiqFlag[chunk_num] |= 1; // water
if(chunkflags & 16)
-<<<<<<< HEAD:contrib/extractor/adt.cpp
- _chunk->flag |=2;
-
-=======
MapLiqFlag[chunk_num] |= 2; // magma/slime
}
// заполнем так же как в MH2O
@@ -336,7 +293,6 @@ inline void LoadMapChunk(MPQFile &mf, chunk *_chunk)
++k;
}
k = k + 120;
->>>>>>> upstream/master:contrib/extractor/adt.cpp
}
delete []ChunkLiqHeight;
break;
diff --git a/contrib/extractor/adt.h b/contrib/extractor/adt.h
index ec607c9d7bc..52196c4e7e6 100644
--- a/contrib/extractor/adt.h
+++ b/contrib/extractor/adt.h
@@ -126,4 +126,3 @@ uint8 *MapLiqFlag;
uint32 k, m, chunk_num;
void LoadMapChunk(MPQFile &, chunk*);
#endif
-
diff --git a/contrib/extractor/libmpq/Makefile b/contrib/extractor/libmpq/Makefile
deleted file mode 100644
index eb1965e29f1..00000000000
--- a/contrib/extractor/libmpq/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-CC = g++
-AR = ar
-objects = common.o explode.o extract.o huffman.o wave.o mpq.o parser.o
-zlib_objects = ../../../dep/src/zlib/*.o #adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o inftrees.o inffast.o
-
-all: libmpq.a libmpq.so
-
-clean:
- rm -f libmpq.a libmpq.so *.o
-
-libmpq.a: $(objects) $(zlib_objects)
- $(AR) cru $@ $+
-libmpq.so: $(objects) $(zlib_objects)
- $(CC) -fPIC -o $@ $+
-
-%.o:%.cpp
- $(CC) -I../ -c $+
diff --git a/contrib/extractor/libmpq/mpq.cpp b/contrib/extractor/libmpq/mpq.cpp
index 9d1cd883386..c6a5d7d7bdb 100644
--- a/contrib/extractor/libmpq/mpq.cpp
+++ b/contrib/extractor/libmpq/mpq.cpp
@@ -199,7 +199,7 @@ int libmpq_archive_info(mpq_archive *mpq_a, unsigned int infotype) {
/*
* This function returns some useful file information.
*/
-int libmpq_file_info(mpq_archive *mpq_a, unsigned int infotype, const int unsigned number) {
+int libmpq_file_info(mpq_archive *mpq_a, unsigned int infotype, const unsigned int number) {
int blockindex = number; //-1;
int i = 0;
mpq_block *mpq_b = NULL;
diff --git a/contrib/vmap_debugger/ModelContainerView.cpp b/contrib/vmap_debugger/ModelContainerView.cpp
index fa6b2b40b29..c29666c0bca 100644
--- a/contrib/vmap_debugger/ModelContainerView.cpp
+++ b/contrib/vmap_debugger/ModelContainerView.cpp
@@ -451,7 +451,7 @@ namespace VMAP
//====================================================================
- Vector3 ModelContainerView::convertPositionToTrinityRep(float x, float y, float z) const {
+ Vector3 ModelContainerView::convertPositionToMangosRep(float x, float y, float z) const {
float pos[3];
pos[0] = z;
pos[1] = x;
@@ -490,7 +490,7 @@ namespace VMAP
#if 0
i_App->defaultController.getPosition();
Vector3 pos = i_App->defaultController.getPosition();
- Vector3 pos2 = convertPositionToTrinityRep(pos.x, pos.y, pos.z);
+ Vector3 pos2 = convertPositionToMangosRep(pos.x, pos.y, pos.z);
//Vector3 pos3 = iVMapManager->convertPositionToInternalRep(pos2.x, pos2.y, pos2.z);
//pos3 = iVMapManager->convertPositionToInternalRep(pos2.x, pos2.y, pos2.z);
diff --git a/contrib/vmap_debugger/ModelContainerView.h b/contrib/vmap_debugger/ModelContainerView.h
index ff41f7d1784..28d992a0c16 100644
--- a/contrib/vmap_debugger/ModelContainerView.h
+++ b/contrib/vmap_debugger/ModelContainerView.h
@@ -51,7 +51,7 @@ namespace VMAP
bool iPosSent;
Array<Command> iPrevLoadCommands;
private:
- Vector3 convertPositionToTrinityRep(float x, float y, float z) const;
+ Vector3 convertPositionToMangosRep(float x, float y, float z) const;
public:
ModelContainerView(const G3D::GApp::Settings& settings);
diff --git a/contrib/vmap_extractor_v2/doc/MoPaQ_0.9.txt b/contrib/vmap_extractor_v2/doc/MoPaQ_0.9.txt
deleted file mode 100644
index ce8d8f70166..00000000000
--- a/contrib/vmap_extractor_v2/doc/MoPaQ_0.9.txt
+++ /dev/null
@@ -1,318 +0,0 @@
-THE MOPAQ ARCHIVE FORMAT
-v0.9 (Thursday, June 30, 2005)
-by Justin Olbrantz(Quantam)
-
-Distribution and reproduction of this specification are allowed without limitation, as long as it is not altered. Quoting
-in other works is freely allowed, as long as the source and author of the quote is stated.
-
-TABLE OF CONTENTS
-1. Introduction to the MoPaQ Format
-2. The MoPaQ Format
- 2.1 General Archive Layout
- 2.2 Archive Header
- 2.3 Block Table
- 2.4 Hash Table
- 2.5 File Data
- 2.6 Listfile
- 2.7 Extended Attributes
- 2.8 Weak (Old) Digital Signature
- 2.9 Strong (New) Digital Signature
-3. Algorithm Source Code
- 3.1 Encryption/Decryption
- 3.2 Hashing
- 3.3 Conversion of FILETIME and time_t
-
-1. INTRODUCTION TO THE MOPAQ FORMAT
-The MoPaQ (or MPQ) format is an archive file format designed by Mike O'Brien (hence the name Mike O'brien PaCK) at Blizzard
-Entertainment. The format has been used in all Blizzard games since (and including) Diablo. It is heavily optimized to be
-a read-only game archive format, and excels at this role.
-
-The Blizzard MoPaQ-reading functions are contained in the Storm module, which my be either statically or dynamically linked.
-The Blizzard MoPaQ-writing functions are contained in the MPQAPI module, which is always statically linked.
-
-2. THE MOPAQ FORMAT
-All numbers in the MoPaQ format are in little endian. Data types are listed either as int (integer, the number of bits specified),
-byte (8 bits), and char (bytes which contain ASCII characters). All sizes and offsets are in bytes, unless specified otherwise.
-Structure members are listed in the following general form:
-offset from the beginning of the structure: data type(array size) member name : member description
-
-2.1 GENERAL ARCHIVE LAYOUT
-- Archive Header
-- File Data
-- File Data - Special Files
-- Hash Table
-- Block Table
-- Strong Digital signature
-
-This is the usual archive format, and is not absolutely essential. Some archives have been observed placing the hash table
-and file table after the archive header, and before the file data.
-
-2.2 ARCHIVE HEADER
-00h: char(4) Magic : Indicates that the file is a MoPaQ archive. Must be ASCII "MPQ" 1Ah.
-04h: int32 HeaderSize : Size of the archive header. Should be 32.
-08h: int32 ArchiveSize : Size of the whole archive, including the header. Does not include the strong digital signature, if present.
-This size is used, among other things, for determining the region to hash in computing the digital signature.
-0Ch: int16 Unknown : Unknown
-0Eh: int8 SectorSizeShift : Power of two exponent specifying the number of 512-byte disk sectors in each logical sector
-in the archive. The size of each logical sector the archive is 512 * 2^SectorSizeShift. Bugs in the Storm library dictate
-that this should always be 3 (4096 byte sectors).
-10h: int32 HashTableOffset : Offset to the beginning of the hash table, relative to the beginning of the archive.
-14h: int32 BlockTableOffset : Offset to the beginning of the block table, relative to the beginning of the archive.
-18h: int32 HashTableEntries : Number of entries in the hash table. Must be a power of two, and must be less than 2^16.
-1Ch: int32 BlockTableEntries : Number of entries in the block table.
-
-The archive header is the first structure in the archive, at archive offset 0, but the archive does not need to be at offset
-0 of the containing file. The offset of the archive in the file is referred to here as ArchiveOffset. If the archive is not
-at the beginning of the file, it must begin at a disk sector boundary (512 bytes). Early versions of Storm require that the
-archive be at the end of the containing file (ArchiveOffset + ArchiveSize = file size), but this is not required in newer
-versions (due to the strong digital signature not being considered a part of the archive).
-
-2.3 BLOCK TABLE
-The block table contains entries for each region in the archive. Regions may be either files or empty space, which may be
-overwritten by new files (typically this space is from deleted file data). The block table is encrypted, using the hash
-of "(block table)" as the key. Each entry is structured as follows:
-
-00h: int32 BlockOffset : Offset of the beginning of the block, relative to the beginning of the archive. Meaningless if the block size is 0.
-04h: int32 BlockSize : Size of the block in the archive.
-08h: int32 FileSize : Size of the file data stored in the block. Only valid if the block is a file, otherwise meaningless, and should be 0. If the file is compressed, this is the size of the uncompressed file data.
-0Ch: int32 Flags : Bit mask of the flags for the block. The following values are conclusively identified:
- 80000000h: Block is a file, and follows the file data format; otherwise, block is free space, and may be overwritten. If the block is not a file, all other flags should be cleared.
- 01000000h: File is stored as a single unit, rather than split into sectors.
- 00020000h: The file's encryption key is adjusted by the block offset and file size (explained in detail in the File Data section). File must be encrypted.
- 00010000h: File is encrypted.
- 00000200h: File is compressed. Mutually exclusive to file imploded.
- 00000100h: File is imploded. Mutually exclusive to file compressed.
-
-2.4 HASH TABLE
-Instead of storing file names, for quick access MoPaQs use a fixed, power of two-size hash table of files in the archive. A file is uniquely identified by its file path, its language, and its platform. The home entry for a file in the hash table is computed as a hash of the file path. In the event of a collision (the home entry is occupied by another file), progressive overflow is used, and the file is placed in the next available hash table entry. Searches for a desired file in the hash table proceed from the home entry for the file until either the file is found, the entire hash table is searched, or an empty hash table entry (FileBlockIndex of FFFFFFFFh) is encountered. The hash table is encrypted using the hash of "(hash table)" as the key. Each entry is structured as follows:
-
-00h: int32 FilePathHashA : The hash of the file path, using method A.
-04h: int32 FilePathHashB : The hash of the file path, using method B.
-08h: int16 Language : The language of the file. This is a Windows LANGID data type, and uses the same values. 0 indicates the default language (American English), or that the file is language-neutral.
-0Ah: int8 Platform : The platform the file is used for. 0 indicates the default platform. No other values have been observed.
-0Ch: int32 FileBlockIndex : If the hash table entry is valid, this is the index into the block table of the file. Otherwise, one of the following two values:
- FFFFFFFFh: Hash table entry is empty, and has always been empty. Terminates searches for a given file.
- FFFFFFFEh: Hash table entry is empty, but was valid at some point (in other words, the file was deleted). Does not terminate searches for a given file.
-
-2.5 FILE DATA
-00h: int32(SectorsInFile + 1) SectorOffsetTable : Offsets to the start of each sector's data, relative to the beginning of the file data. Not present if this information is calculatable (see details below).
-immediately following SectorOffsetTable: SectorData : Data of each sector in the file, packed end to end (see details below).
-
-Normally, file data is split up into sectors, for simple streaming. All sectors, save for the last, will contain as many bytes of file data as specified in the archive header's SectorSizeShift; the last sector may be smaller than this, depending on the size of the file data. This sector size is the size of the raw file data; if the file is compressed, the compressed sector will be smaller or the same size as the uncompressed sector size. Individual sectors in a compressed file may be stored uncompressed; this occurs if and only if the sector could not be compressed by the algorithm used (if the compressed sector size was greater than or equal to the size of the raw data), and is indicated by the sector's compressed size in SectorOffsetTable being equal to the uncompressed size of the sector (which may be calculated from the FileSize).
-
-If the sector is compressed (but not imploded), a bit mask byte of the compression algorithm(s) used to compress the sector is appended to the beginning of the compressed sector data. This additional byte counts towards the total size of the sector; if the size of the sector (including this byte) exceeds or matches the uncompressed size of the sector data, the sector will be stored uncompressed, and this byte omitted. Multiple compression algorithms may be used on the same sector; in this case, successive compression occurs in the order the algorithms are listed below, and decompression occurs in the opposite order. For implimentations of all of these algorithms, see StormLib.
- 40h: IMA ADPCM mono
- 80h: IMA ADPCM stereo
- 01h: Huffman encoded
- 02h: Deflated (see ZLib)
- 08h: Imploded (see PKWare Data Compression Library)
- 10h: BZip2 compressed (see BZip2)
-
-If the file is stored as a single unit (indicated in the file's Flags), there is effectively only a single sector, which
-contains the entire file.
-
-If the file is encrypted, each sector (after compression and appendage of the compression type byte, if applicable)
-is encrypted with the file's key. The base key for a file is determined by a hash of the file name stripped of the
-directory (i.e. the key for a file named "directory\file" would be computed as the hash of "file"). If this key is
-adjusted, as indicated in the file's Flags, the final key is calculated as ((base key + BlockOffset - ArchiveOffset)
-XOR FileSize) (StormLib - an open-source implementation of the MoPaQ reading and writing functions,
-by Ladislav Zezula - incorrectly uses an AND in place of the XOR). Each sector is encrypted using the key + the
-0-based index of the sector in the file. The SectorOffsetTable, if present, is encrypted using the key - 1.
-
-The SectorOffsetTable is omitted when the sizes and offsets of all sectors in the file are calculatable from the FileSize.
-This can happen in several circumstances. If the file is not compressed/imploded, then the size and offset of all sectors
-is known, based on the archive's SectorSizeShift. If the file is stored as a single unit compressed/imploded, then the
-SectorOffsetTable is omitted, as the single file "sector" corresponds to BlockSize and FileSize, as mentioned previously.
-Note that the SectorOffsetTable will always be present if the file is compressed/imploded and the file is not stored as
-a single unit, even if there is only a single sector in the file (the size of the file is less than or equal to the
-archive's sector size).
-
-2.6 LISTFILE
-The listfile is a very simple extension to the MoPaQ format that contains the file paths of (most) files in the archive.
-The languages and platforms of the files are not stored in the listfile. The listfile is contained in the file "(listfile)",
-and is simply a non-Unix-style text file with one file path on each line, lines terminated with the bytes 0Dh 0Ah. The file
-"(listfile)" may not be listed in the listfile.
-
-2.7 EXTENDED ATTRIBUTES
-The extended attributes are optional file attributes for files in the block table. These attributes were added at times after
-the MoPaQ format was already finalized, and it is not necessary for every archive to have all (or any) of the extended attributes.
-If an archive contains a given attribute, there will be an instance of that attribute for every block in the block table, although
-the attribute will be meaningless if the block is not a file. The order of the attributes for blocks correspond to the order of the
-blocks in the block table, and are of the same number. The attributes are stored in parallel arrays in the "(attributes)" file,
-in the archive. The attributes corresponding to this file need not be valid (and logically cannot be). Unlike all the other
-structures in the MoPaQ format, entries in the extended attributes are NOT guaranteed to be aligned. Also note that in some
-archives, malicious zeroing of the attributes has been observed, perhaps with the intent of breaking archive viewers. This
-file is structured as follows:
-
-00h: int32 Version : Specifies the extended attributes format version. For now, must be 100.
-04h: int32 AttributesPresent : Bit mask of the extended attributes present in the archive:
- 00000001h: File CRC32s.
- 00000002h: File timestamps.
- 00000004h: File MD5s.
-08h: int32(BlockTableEntries) CRC32s : CRC32s of the (uncompressed) file data for each block in the archive. Omitted if the
-archive does not have CRC32s. immediately after CRC32s: FILETIME(BlockTableEntries) Timestamps : Timestamps for each block
-in the archive. The format is that of the Windows FILETIME structure. Omitted if the archive does not have timestamps.
-immediately after Timestamps: MD5(BlockTableEntries) MD5s : MD5s of the (uncompressed) file data for each block in the archive.
-Omitted if the archive does not have MD5s.
-
-2.8 WEAK DIGITAL SIGNATURE
-The weak digital signature is a digital signature using Microsoft CryptoAPI. It is an implimentation of the RSASSA-PKCS1-v1_5
-digital signature protocol, using the MD5 hashing algorithm and a 512-bit (weak) RSA key (for more information about this
-protocol, see the RSA Labs PKCS1 specification). The public key and exponent are stored in a resource in Storm. The signature
-is stored uncompressed, unencrypted in the file "(signature)" in the archive. The archive is hashed from the beginning of the
-archive (ArchiveOffset in the containing file) to the end of the archive (the length indicated by ArchiveSize); the signature
-file is added to the archive before signing, and the space occupied by the file is considered to be all binary 0s during
-signing/verification. This file is structured as follows:
-
-00h: int32 Unknown : Must be 0.
-04h: int32 Unknown : must be 0.
-08h: int512 Signature : The digital signature. Like all other numbers in the MoPaQ format, this is stored in little-endian order.
-
-2.9 STRONG DIGITAL SIGNATURE
-The strong digital signature uses a simple proprietary implementation of RSA signing, using the SHA-1 hashing algorithm and
-a 2048-bit (strong) RSA key. The default public key and exponent are stored in Storm, but other keys may be used as well.
-The strong digital signature is stored immediately after the archive, in the containing file; the entire archive (ArchiveSize
-bytes, starting at ArchiveOffset in the containing file) is hashed as a single block. The signature has the following format:
-
-00h: char(4) Magic : Indicates the presence of a digital signature. Must be "NGIS" ("SIGN" backwards).
-04h: int2048 Signature : The digital signature, stored in little-endian format.
-
-When the Signature field is decrypted with the public key and exponent, and the result stored in little-endian order, it is structured as follows:
-
-00h: byte Padding : Must be 0Bh.
-01h: byte(235) Padding : Must be BBh.
-ECh: byte(20) SHA-1 : SHA-1 hash of the archive, in standard SHA-1 format.
-
-3. ALGORITHM SOURCE CODE
-3.1 ENCRYPTION/DECRYPTION
-I believe this was derived at some point from code in StormLib. Assumes the long type to be 32 bits, and the machine to be little endian order.
-
-unsigned long dwCryptTable[0x500];
-
-void InitializeCryptTable()
-{
- unsigned long seed = 0x00100001;
- unsigned long index1 = 0;
- unsigned long index2 = 0;
- int i;
-
- for (index1 = 0; index1 < 0x100; index1++)
- {
- for (index2 = index1, i = 0; i < 5; i++, index2 += 0x100)
- {
- unsigned long temp1, temp2;
-
- seed = (seed * 125 + 3) % 0x2AAAAB;
- temp1 = (seed & 0xFFFF) << 0x10;
-
- seed = (seed * 125 + 3) % 0x2AAAAB;
- temp2 = (seed & 0xFFFF);
-
- dwCryptTable[index2] = (temp1 | temp2);
- }
- }
-}
-
-void EncryptData(void *lpbyBuffer, unsigned long dwLength, unsigned long dwKey)
-{
- unsigned long *lpdwBuffer = (unsigned long *)lpbyBuffer;
- unsigned long seed = 0xEEEEEEEE;
- unsigned long ch;
-
- assert(lpbyBuffer);
-
- dwLength /= sizeof(unsigned long);
-
- while(dwLength-- > 0)
- {
- seed += dwCryptTable[0x400 + (dwKey & 0xFF)];
- ch = *lpdwBuffer ^ (dwKey + seed);
-
- dwKey = ((~dwKey << 0x15) + 0x11111111) | (dwKey >> 0x0B);
- seed = *lpdwBuffer + seed + (seed << 5) + 3;
-
- *lpdwBuffer++ = ch;
- }
-}
-
-void DecryptData(void *lpbyBuffer, unsigned long dwLength, unsigned long dwKey)
-{
- unsigned long *lpdwBuffer = (unsigned long *)lpbyBuffer;
- unsigned long seed = 0xEEEEEEEE;
- unsigned long ch;
-
- assert(lpbyBuffer);
-
- dwLength /= sizeof(unsigned long);
-
- while(dwLength-- > 0)
- {
- seed += dwCryptTable[0x400 + (dwKey & 0xFF)];
- ch = *lpdwBuffer ^ (dwKey + seed);
-
- dwKey = ((~dwKey << 0x15) + 0x11111111) | (dwKey >> 0x0B);
- seed = ch + seed + (seed << 5) + 3;
-
- *lpdwBuffer++ = ch;
- }
-}
-
-3.2 HASHING
-Based on code from StormLib.
-
-// Different types of hashes to make with HashString
-#define MPQ_HASH_TABLE_OFFSET 0
-#define MPQ_HASH_NAME_A 1
-#define MPQ_HASH_NAME_B 2
-#define MPQ_HASH_FILE_KEY 3
-
-unsigned long HashString(const char *lpszString, unsigned long dwHashType)
-{
- unsigned long seed1 = 0x7FED7FED;
- unsigned long seed2 = 0xEEEEEEEE;
- int ch;
-
- while (*lpszString != 0)
- {
- ch = toupper(*lpszString++);
-
- seed1 = dwCryptTable[(dwHashType * 0xFF) + ch] ^ (seed1 + seed2);
- seed2 = ch + seed1 + seed2 + (seed2 << 5) + 3;
- }
- return seed1;
-}
-
-3.3 CONVERSION OF FILETIME AND time_t
-
-#define EPOCH_OFFSET 116444736000000000ULL // Number of 100 ns units between 01/01/1601 and 01/01/1970
-
-bool GetTimeFromFileTime(FILETIME &fileTime, time_t &time)
-{
- // The FILETIME represents a 64-bit integer: the number of 100 ns units since January 1, 1601
- unsigned long long nTime = ((unsigned long long)fileTime.dwHighDateTime << 32) + fileTime.dwLowDateTime;
-
- if (nTime < EPOCH_OFFSET)
- return false;
-
- nTime -= EPOCH_OFFSET; // Convert the time base from 01/01/1601 to 01/01/1970
- nTime /= 10000000ULL; // Convert 100 ns to sec
-
- time = (time_t)nTime;
-
- // Test for overflow (FILETIME is 64 bits, time_t is 32 bits)
- if ((nTime - (unsigned long long)time) > 0)
- return false;
-
- return true;
-}
-
-void GetFileTimeFromTime(time_t &time, FILETIME &fileTime)
-{
- unsigned long long nTime = (unsigned long long)time;
-
- nTime *= 10000000ULL;
- nTime += EPOCH_OFFSET;
-
- fileTime.dwLowDateTime = (DWORD)nTime;
- fileTime.dwHighDateTime = (DWORD)(nTime >> 32);
-}
diff --git a/contrib/vmap_extractor_v2/doc/MoPaQ_1.0.txt b/contrib/vmap_extractor_v2/doc/MoPaQ_1.0.txt
deleted file mode 100644
index 6a21eca5472..00000000000
--- a/contrib/vmap_extractor_v2/doc/MoPaQ_1.0.txt
+++ /dev/null
@@ -1,421 +0,0 @@
-THE MOPAQ ARCHIVE FORMAT
-v1.0 (Friday, September 1, 2006)
-by Justin Olbrantz(Quantam)
-
-Distribution and reproduction of this specification are allowed without limitation, as long as it is not altered. Quotation in other works is freely allowed, as long as the source and author of the quote are stated.
-
-TABLE OF CONTENTS
-1. Introduction to the MoPaQ Format
-2. The MoPaQ Format
- 2.1 General Archive Layout
- 2.2 Archive Header
- 2.3 Block Table
- 2.4 Extended Block Table
- 2.5 Hash Table
- 2.6 File Data
- 2.7 Listfile
- 2.8 Extended Attributes
- 2.9 Weak (Old) Digital Signature
- 2.10 Strong (New) Digital Signature
-3. Algorithm Source Code
- 3.1 Encryption/Decryption
- 3.2 Hashing and File Key Computation
- 3.3 Finding Files
- 3.4 Deleting Files
- 3.5 Conversion of FILETIME and time_t
- 3.6 Forming a 64-bit Large Archive Offset from 32-bit and 16-bit Components
-4. Revision History
-
-1. INTRODUCTION TO THE MOPAQ FORMAT
-The MoPaQ (or MPQ) format is an archive file format designed by Mike O'Brien (hence the name Mike O'brien PaCK) at Blizzard Entertainment. The format has been used in all Blizzard games since (and including) Diablo. It is heavily optimized to be a read-only game archive format, and excels at this role.
-
-The Blizzard MoPaQ-reading functions are contained in the Storm module, which my be either statically or dynamically linked. The Blizzard MoPaQ-writing functions are contained in the MPQAPI module, which is always statically linked.
-
-StormLib - mentioned several times in this specification - is an open-source MoPaQ reading and writing library written by Ladislav Zezula (no affiliation with Blizzard Entertainment). While it's a bit dated, and does not support all of the newer MoPaQ features, it contains source code to the more exotic compression methods used by MoPaQ, such as the PKWare implode algorithm, MoPaQ's huffman compression algorithm, and the IMA ADPCM compression used by MoPaQ.
-
-2. THE MOPAQ FORMAT
-All numbers in the MoPaQ format are in little endian byte order; signed numbers use the two's complement system. Data types are listed either as int (integer, the number of bits specified), byte (8 bits), or char (bytes which contain ASCII characters). All sizes and offsets are in bytes, unless specified otherwise. Structure members are listed in the following general form:
-offset from the beginning of the structure: data type(array size) member name : member description
-
-2.1 GENERAL ARCHIVE LAYOUT
-- Archive Header
-- File Data
-- File Data - Special Files
-- Hash Table
-- Block Table
-- Extended Block Table
-- Strong Digital signature
-
-This is the usual archive format, but it is not mandatory. Some archives have been observed placing the hash table and file table after the archive header, and before the file data.
-
-2.2 ARCHIVE HEADER
-00h: char(4) Magic : Indicates that the file is a MoPaQ archive. Must be ASCII "MPQ" 1Ah.
-04h: int32 HeaderSize : Size of the archive header.
-08h: int32 ArchiveSize : Size of the whole archive, including the header. Does not include the strong digital signature, if present. This size is used, among other things, for determining the region to hash in computing the digital signature. This field is deprecated in the Burning Crusade MoPaQ format, and the size of the archive is calculated as the size from the beginning of the archive to the end of the hash table, block table, or extended block table (whichever is largest).
-0Ch: int16 FormatVersion : MoPaQ format version. MPQAPI will not open archives where this is negative. Known versions:
- 0000h: Original format. HeaderSize should be 20h, and large archives are not supported.
- 0001h: Burning Crusade format. Header size should be 2Ch, and large archives are supported.
-0Eh: int8 SectorSizeShift : Power of two exponent specifying the number of 512-byte disk sectors in each logical sector in the archive. The size of each logical sector in the archive is 512 * 2^SectorSizeShift. Bugs in the Storm library dictate that this should always be 3 (4096 byte sectors).
-10h: int32 HashTableOffset : Offset to the beginning of the hash table, relative to the beginning of the archive.
-14h: int32 BlockTableOffset : Offset to the beginning of the block table, relative to the beginning of the archive.
-18h: int32 HashTableEntries : Number of entries in the hash table. Must be a power of two, and must be less than 2^16 for the original MoPaQ format, or less than 2^20 for the Burning Crusade format.
-1Ch: int32 BlockTableEntries : Number of entries in the block table.
-Fields only present in the Burning Crusade format and later:
-20h: int64 ExtendedBlockTableOffset : Offset to the beginning of the extended block table, relative to the beginning of the archive.
-28h: int16 HashTableOffsetHigh : High 16 bits of the hash table offset for large archives.
-2Ah: int16 BlockTableOffsetHigh : High 16 bits of the block table offset for large archives.
-
-The archive header is the first structure in the archive, at archive offset 0; however, the archive does not need to be at offset 0 of the containing file. The offset of the archive in the file is referred to here as ArchiveOffset. If the archive is not at the beginning of the file, it must begin at a disk sector boundary (512 bytes). Early versions of Storm require that the archive be at the end of the containing file (ArchiveOffset + ArchiveSize = file size), but this is not required in newer versions (due to the strong digital signature not being considered a part of the archive).
-
-2.3 BLOCK TABLE
-The block table contains entries for each region in the archive. Regions may be either files, empty space, which may be overwritten by new files (typically this space is from deleted file data), or unused block table entries. Empty space entries should have BlockOffset and BlockSize nonzero, and FileSize and Flags zero; unused block table entries should have BlockSize, FileSize, and Flags zero. The block table is encrypted, using the hash of "(block table)" as the key. Each entry is structured as follows:
-
-00h: int32 BlockOffset : Offset of the beginning of the block, relative to the beginning of the archive.
-04h: int32 BlockSize : Size of the block in the archive.
-08h: int32 FileSize : Size of the file data stored in the block. Only valid if the block is a file; otherwise meaningless, and should be 0. If the file is compressed, this is the size of the uncompressed file data.
-0Ch: int32 Flags : Bit mask of the flags for the block. The following values are conclusively identified:
- 80000000h: Block is a file, and follows the file data format; otherwise, block is free space or unused. If the block is not a file, all other flags should be cleared, and FileSize should be 0.
- 01000000h: File is stored as a single unit, rather than split into sectors.
- 00020000h: The file's encryption key is adjusted by the block offset and file size (explained in detail in the File Data section). File must be encrypted.
- 00010000h: File is encrypted.
- 00000200h: File is compressed. File cannot be imploded.
- 00000100h: File is imploded. File cannot be compressed.
-
-2.4 EXTENDED BLOCK TABLE
-The extended block table was added to support archives larger than 4 gigabytes (2^32 bytes). The table contains the upper bits of the archive offsets for each block in the block table. It is simply an array of int16s, which become bits 32-47 of the archive offsets for each block, with bits 48-63 being zero. Individual blocks in the archive are still limited to 4 gigabytes in size. This table is only present in Burning Crusade format archives that exceed 4 gigabytes size.
-
-As of the Burning Crusade Friends and Family beta, this table is not encrypted.
-
-2.5 HASH TABLE
-Instead of storing file names, for quick access MoPaQs use a fixed, power of two-size hash table of files in the archive. A file is uniquely identified by its file path, its language, and its platform. The home entry for a file in the hash table is computed as a hash of the file path. In the event of a collision (the home entry is occupied by another file), progressive overflow is used, and the file is placed in the next available hash table entry. Searches for a desired file in the hash table proceed from the home entry for the file until either the file is found, the entire hash table is searched, or an empty hash table entry (FileBlockIndex of FFFFFFFFh) is encountered. The hash table is encrypted using the hash of "(hash table)" as the key. Each entry is structured as follows:
-
-00h: int32 FilePathHashA : The hash of the file path, using method A.
-04h: int32 FilePathHashB : The hash of the file path, using method B.
-08h: int16 Language : The language of the file. This is a Windows LANGID data type, and uses the same values. 0 indicates the default language (American English), or that the file is language-neutral.
-0Ah: int8 Platform : The platform the file is used for. 0 indicates the default platform. No other values have been observed.
-0Ch: int32 FileBlockIndex : If the hash table entry is valid, this is the index into the block table of the file. Otherwise, one of the following two values:
- FFFFFFFFh: Hash table entry is empty, and has always been empty. Terminates searches for a given file.
- FFFFFFFEh: Hash table entry is empty, but was valid at some point (in other words, the file was deleted). Does not terminate searches for a given file.
-
-2.6 FILE DATA
-The data for each file is composed of the following structure:
-00h: int32(SectorsInFile + 1) SectorOffsetTable : Offsets to the start of each sector, relative to the beginning of the file data. The last entry contains the file size, making it possible to easily calculate the size of any given sector. This table is not present if this information can be calculated (see details below).
-immediately following SectorOffsetTable: SECTOR Sectors(SectorsInFile) : Data of each sector in the file, packed end to end (see details below).
-
-Normally, file data is split up into sectors, for simple streaming. All sectors, save for the last, will contain as many bytes of file data as specified in the archive header's SectorSizeShift; the last sector may contain less than this, depending on the size of the entire file's data. If the file is compressed or imploded, the sector will be smaller or the same size as the file data it contains. Individual sectors in a compressed or imploded file may be stored uncompressed; this occurs if and only if the file data the sector contains could not be compressed by the algorithm(s) used (if the compressed sector size was greater than or equal to the size of the file data), and is indicated by the sector's size in SectorOffsetTable being equal to the size of the file data in the sector (which may be calculated from the FileSize).
-
-The format of each sector depends on the kind of sector it is. Uncompressed sectors are simply the the raw file data contained in the sector. Imploded sectors are the raw compressed data following compression with the implode algorithm (these sectors can only be in imploded files). Compressed sectors (only found in compressed - not imploded - files) are compressed with one or more compression algorithms, and have the following structure:
-00h: byte CompressionMask : Mask of the compression types applied to this sector. If multiple compression types are used, they are applied in the order listed below, and decompression is performed in the opposite order. This byte counts towards the total sector size, meaning that the sector will be stored uncompressed if the data cannot be compressed by at least two bytes; as well, this byte is encrypted with the sector data, if applicable. The following compression types are defined (for implementations of these algorithms, see StormLib):
- 40h: IMA ADPCM mono
- 80h: IMA ADPCM stereo
- 01h: Huffman encoded
- 02h: Deflated (see ZLib)
- 08h: Imploded (see PKWare Data Compression Library)
- 10h: BZip2 compressed (see BZip2)
-01h: byte(SectorSize - 1) SectorData : The compressed data for the sector.
-
-If the file is stored as a single unit (indicated in the file's Flags), there is effectively only a single sector, which contains the entire file data.
-
-If the file is encrypted, each sector (after compression/implosion, if applicable) is encrypted with the file's key. The base key for a file is determined by a hash of the file name stripped of the directory (i.e. the key for a file named "directory\file" would be computed as the hash of "file"). If this key is adjusted, as indicated in the file's Flags, the final key is calculated as ((base key + BlockOffset - ArchiveOffset) XOR FileSize) (StormLib incorrectly uses an AND in place of the XOR). Each sector is encrypted using the key + the 0-based index of the sector in the file. The SectorOffsetTable, if present, is encrypted using the key - 1.
-
-The SectorOffsetTable is omitted when the sizes and offsets of all sectors in the file are calculatable from the FileSize. This can happen in several circumstances. If the file is not compressed/imploded, then the size and offset of all sectors is known, based on the archive's SectorSizeShift. If the file is stored as a single unit compressed/imploded, then the SectorOffsetTable is omitted, as the single file "sector" corresponds to BlockSize and FileSize, as mentioned previously. However, the SectorOffsetTable will be present if the file is compressed/imploded and the file is not stored as a single unit, even if there is only a single sector in the file (the size of the file is less than or equal to the archive's sector size).
-
-2.7 LISTFILE
-The listfile is a very simple extension to the MoPaQ format that contains the file paths of (most) files in the archive. The languages and platforms of the files are not stored in the listfile. The listfile is contained in the file "(listfile)" (default language and platform), and is simply a text file with file paths separated by ';', 0Dh, 0Ah, or some combination of these. The file "(listfile)" may not be listed in the listfile.
-
-2.8 EXTENDED ATTRIBUTES
-The extended attributes are optional file attributes for files in the block table. These attributes were added at times after the MoPaQ format was already finalized, and it is not necessary for every archive to have all (or any) of the extended attributes. If an archive contains a given attribute, there will be an instance of that attribute for every block in the block table, although the attribute will be meaningless if the block is not a file. The order of the attributes for blocks correspond to the order of the blocks in the block table, and are of the same number. The attributes are stored in parallel arrays in the "(attributes)" file (default language and platform), in the archive. The attributes corresponding to this file need not be valid (and logically cannot be). Unlike all the other structures in the MoPaQ format, entries in the extended attributes are NOT guaranteed to be aligned. Also note that in some archives, malicious zeroing of the attributes has been observed, perhaps with the intent of breaking archive viewers. This file is structured as follows:
-
-00h: int32 Version : Specifies the extended attributes format version. For now, must be 100.
-04h: int32 AttributesPresent : Bit mask of the extended attributes present in the archive:
- 00000001h: File CRC32s.
- 00000002h: File timestamps.
- 00000004h: File MD5s.
-08h: int32(BlockTableEntries) CRC32s : CRC32s of the (uncompressed) file data for each block in the archive. Omitted if the archive does not have CRC32s.
-immediately after CRC32s: FILETIME(BlockTableEntries) Timestamps : Timestamps for each block in the archive. The format is that of the Windows FILETIME structure. Omitted if the archive does not have timestamps.
-immediately after Timestamps: MD5(BlockTableEntries) MD5s : MD5s of the (uncompressed) file data for each block in the archive. Omitted if the archive does not have MD5s.
-
-2.9 WEAK DIGITAL SIGNATURE
-The weak digital signature is a digital signature using Microsoft CryptoAPI. It is an implimentation of the RSASSA-PKCS1-v1_5 digital signature protocol, using the MD5 hashing algorithm and a 512-bit (weak) RSA key (for more information about this protocol, see the RSA Labs PKCS1 specification). The public key and exponent are stored in a resource in Storm, the private key is stored in a separate file, whose filename is passed to MPQAPI (the private key is not stored in MPQAPI). The signature is stored uncompressed, unencrypted in the file "(signature)" (default language and platform) in the archive. The archive is hashed from the beginning of the archive (ArchiveOffset in the containing file) to the end of the archive (the length indicated by ArchiveSize, or calculated in the Burning Crusade MoPaQ format); the signature file is added to the archive before signing, and the space occupied by the file is considered to be all binary 0s during signing/verification. This file is structured as follows:
-
-00h: int32 Unknown : Must be 0.
-04h: int32 Unknown : Must be 0.
-08h: int512 Signature : The digital signature. Like all other numbers in the MoPaQ format, this is stored in little-endian order. The structure of this, when decrypted, follows the RSASSA-PKCS1-v1_5 specification; this format is rather icky to work with (I wrote a program to verify this signature using nothing but an MD5 function and huge integer functions; it wasn't pleasant), and best left to an encryption library such as Cryto++.
-
-2.10 STRONG DIGITAL SIGNATURE
-The strong digital signature uses a simple proprietary implementation of RSA signing, using the SHA-1 hashing algorithm and a 2048-bit (strong) RSA key. The default public key and exponent are stored in Storm, but other keys may be used as well. The strong digital signature is stored immediately after the archive, in the containing file; the entire archive (ArchiveSize bytes, starting at ArchiveOffset in the containing file) is hashed as a single block. The signature has the following format:
-
-00h: char(4) Magic : Indicates the presence of a digital signature. Must be "NGIS" ("SIGN" backwards).
-04h: int2048 Signature : The digital signature, stored in little-endian format.
-
-When the Signature field is decrypted with the public key and exponent, and the resulting large integer is stored in little-endian order, it is structured as follows:
-
-00h: byte Padding : Must be 0Bh.
-01h: byte(235) Padding : Must be BBh.
-ECh: byte(20) SHA-1 : SHA-1 hash of the archive, in standard SHA-1 byte order.
-
-3. ALGORITHM SOURCE CODE
-All of the sample code here assumes little endian machine byte order, that the short type is 16 bits, that the long type is 32 bits, and that the long long type is 64 bits. Adjustments must be made if these assumptions are not correct on a given platform. All code not credited otherwise was written by myself in the writing of this specification.
-
-3.1 ENCRYPTION/DECRYPTION
-Based on code from StormLib.
-
-unsigned long dwCryptTable[0x500];
-
-// The encryption and hashing functions use a number table in their procedures. This table must be initialized before the functions are called the first time.
-void InitializeCryptTable()
-{
- unsigned long seed = 0x00100001;
- unsigned long index1 = 0;
- unsigned long index2 = 0;
- int i;
-
- for (index1 = 0; index1 < 0x100; index1++)
- {
- for (index2 = index1, i = 0; i < 5; i++, index2 += 0x100)
- {
- unsigned long temp1, temp2;
-
- seed = (seed * 125 + 3) % 0x2AAAAB;
- temp1 = (seed & 0xFFFF) << 0x10;
-
- seed = (seed * 125 + 3) % 0x2AAAAB;
- temp2 = (seed & 0xFFFF);
-
- dwCryptTable[index2] = (temp1 | temp2);
- }
- }
-}
-
-void EncryptData(void *lpbyBuffer, unsigned long dwLength, unsigned long dwKey)
-{
- assert(lpbyBuffer);
-
- unsigned long *lpdwBuffer = (unsigned long *)lpbyBuffer;
- unsigned long seed = 0xEEEEEEEE;
- unsigned long ch;
-
- dwLength /= sizeof(unsigned long);
-
- while(dwLength-- > 0)
- {
- seed += dwCryptTable[0x400 + (dwKey & 0xFF)];
- ch = *lpdwBuffer ^ (dwKey + seed);
-
- dwKey = ((~dwKey << 0x15) + 0x11111111) | (dwKey >> 0x0B);
- seed = *lpdwBuffer + seed + (seed << 5) + 3;
-
- *lpdwBuffer++ = ch;
- }
-}
-
-void DecryptData(void *lpbyBuffer, unsigned long dwLength, unsigned long dwKey)
-{
- assert(lpbyBuffer);
-
- unsigned long *lpdwBuffer = (unsigned long *)lpbyBuffer;
- unsigned long seed = 0xEEEEEEEEL;
- unsigned long ch;
-
- dwLength /= sizeof(unsigned long);
-
- while(dwLength-- > 0)
- {
- seed += dwCryptTable[0x400 + (dwKey & 0xFF)];
- ch = *lpdwBuffer ^ (dwKey + seed);
-
- dwKey = ((~dwKey << 0x15) + 0x11111111L) | (dwKey >> 0x0B);
- seed = ch + seed + (seed << 5) + 3;
-
- *lpdwBuffer++ = ch;
- }
-}
-
-3.2 HASHING AND FILE KEY COMPUTATION
-These functions may have been derived from StormLib code at some point in the very distant past. It was so long ago that I don't remember for certain.
-
-// Different types of hashes to make with HashString
-#define MPQ_HASH_TABLE_OFFSET 0
-#define MPQ_HASH_NAME_A 1
-#define MPQ_HASH_NAME_B 2
-#define MPQ_HASH_FILE_KEY 3
-
-// Based on code from StormLib.
-unsigned long HashString(const char *lpszString, unsigned long dwHashType)
-{
- assert(lpszString);
- assert(dwHashType <= MPQ_HASH_FILE_KEY);
-
- unsigned long seed1 = 0x7FED7FEDL;
- unsigned long seed2 = 0xEEEEEEEEL;
- int ch;
-
- while (*lpszString != 0)
- {
- ch = toupper(*lpszString++);
-
- seed1 = dwCryptTable[(dwHashType * 0x100) + ch] ^ (seed1 + seed2);
- seed2 = ch + seed1 + seed2 + (seed2 << 5) + 3;
- }
- return seed1;
-}
-
-#define BLOCK_OFFSET_ADJUSTED_KEY 0x00020000L
-
-unsigned long ComputeFileKey(const char *lpszFilePath, const BlockTableEntry &blockEntry, unsigned long nArchiveOffset)
-{
- assert(lpszFilePath);
-
- // Find the file name part of the path
- const char *lpszFileName = strrchr(lpszFilePath, '\\');
- if (lpszFileName)
- lpszFileName++; // Skip the \
- else
- lpszFileName = lpszFilePath;
-
- // Hash the name to get the base key
- unsigned long nFileKey = HashString(lpszFileName, MPQ_HASH_FILE_KEY);
-
- // Offset-adjust the key if necessary
- if (blockEntry.Flags & BLOCK_OFFSET_ADJUSTED_KEY)
- nFileKey = (nFileKey + blockEntry.BlockOffset) ^ blockEntry.FileSize;
-
- return nFileKey;
-}
-
-3.3 FINDING FILES
-
-#define MPQ_HASH_ENTRY_EMPTY 0xFFFFFFFFL
-#define MPQ_HASH_ENTRY_DELETED 0xFFFFFFFEL
-
-bool FindFileInHashTable(const HashTableEntry *lpHashTable, unsigned long nHashTableSize, const char *lpszFilePath, unsigned short nLang, unsigned char nPlatform, unsigned long &iFileHashEntry)
-{
- assert(lpHashTable);
- assert(nHashTableSize);
- assert(lpszFilePath);
-
- // Find the home entry in the hash table for the file
- unsigned long iInitEntry = HashString(lpszFilePath, MPQ_HASH_TABLE_OFFSET) & (nHashTableSize - 1);
-
- // Is there anything there at all?
- if (lpHashTable[iInitEntry].FileBlockIndex == MPQ_HASH_ENTRY_EMPTY)
- return false;
-
- // Compute the hashes to compare the hash table entry against
- unsigned long nNameHashA = HashString(lpszFilePath, MPQ_HASH_NAME_A),
- nNameHashB = HashString(lpszFilePath, MPQ_HASH_NAME_B),
- iCurEntry = iInitEntry;
-
- // Check each entry in the hash table till a termination point is reached
- do
- {
- if (lpHashTable[iCurEntry].FileBlockIndex != MPQ_HASH_ENTRY_DELETED)
- {
- if (lpHashTable[iCurEntry].FilePathHashA == nNameHashA
- && lpHashTable[iCurEntry].FilePathHashB == nNameHashB
- && lpHashTable[iCurEntry].Language == nLang
- && lpHashTable[iCurEntry].Platform == nPlatform)
- {
- iFileHashEntry = iCurEntry;
-
- return true;
- }
- }
-
- iCurEntry = (iCurEntry + 1) & (nHashTableSize - 1);
- } while (iCurEntry != iInitEntry && lpHashTable[iCurEntry].FileBlockIndex != MPQ_HASH_ENTRY_EMPTY);
-
- return false;
-}
-
-3.4 DELETING FILES
-
-bool DeleteFile(HashTableEntry *lpHashTable, unsigned long nHashTableSize, BlockTableEntry *lpBlockTable, const char *lpszFilePath, unsigned short nLang, unsigned char nPlatform)
-{
- assert(lpHashTable);
- assert(nHashTableSize);
- assert(lpBlockTable);
-
- // Find the file in the hash table
- unsigned long iFileHashEntry;
-
- if (!FindFileInHashTable(lpHashTable, nHashTableSize, lpszFilePath, nLang, nPlatform, iFileHashEntry))
- return false;
-
- // Get the block table index before we nuke the hash table entry
- unsigned long iFileBlockEntry = lpHashTable[iFileHashEntry].FileBlockIndex;
-
- // Delete the file's entry in the hash table
- memset(&lpHashTable[iFileHashEntry], 0xFF, sizeof(HashTableEntry));
-
- // If the next entry is empty, mark this one as empty; otherwise, mark this as deleted.
- if (lpHashTable[(iFileHashEntry + 1) & (nHashTableSize - 1)].FileBlockIndex == MPQ_HASH_ENTRY_EMPTY)
- lpHashTable[iFileHashEntry].FileBlockIndex = MPQ_HASH_ENTRY_EMPTY;
- else
- lpHashTable[iFileHashEntry].FileBlockIndex = MPQ_HASH_ENTRY_DELETED;
-
- // If the block occupies space, mark the block as free space; otherwise, clear the block table entry.
- if (lpBlockTable[iFileBlockEntry].BlockSize > 0)
- {
- lpBlockTable[iFileBlockEntry].FileSize = 0;
- lpBlockTable[iFileBlockEntry].Flags = 0;
- }
- else
- memset(&lpBlockTable[iFileBlockEntry], 0, sizeof(BlockTableEntry);
-
- return true;
-}
-
-3.5 CONVERSION OF FILETIME AND time_t
-This code assumes that the base ("zero") date for time_t is 01/01/1970. This is true on Windows, Unix System V systems, and Mac OS X. It is unknown whether this is true on all other platforms. You'll need to research this yourself, if you plan on porting it somewhere else.
-
-#define EPOCH_OFFSET 116444736000000000ULL // Number of 100 ns units between 01/01/1601 and 01/01/1970
-
-bool GetTimeFromFileTime(const FILETIME &fileTime, time_t &time)
-{
- // The FILETIME represents a 64-bit integer: the number of 100 ns units since January 1, 1601
- unsigned long long nTime = ((unsigned long long)fileTime.dwHighDateTime << 32) + fileTime.dwLowDateTime;
-
- if (nTime < EPOCH_OFFSET)
- return false;
-
- nTime -= EPOCH_OFFSET; // Convert the time base from 01/01/1601 to 01/01/1970
- nTime /= 10000000ULL; // Convert 100 ns to sec
-
- time = (time_t)nTime;
-
- // Test for overflow (FILETIME is 64 bits, time_t is 32 bits)
- if ((nTime - (unsigned long long)time) > 0)
- return false;
-
- return true;
-}
-
-void GetFileTimeFromTime(const time_t &time, FILETIME &fileTime)
-{
- unsigned long long nTime = (unsigned long long)time;
-
- nTime *= 10000000ULL;
- nTime += EPOCH_OFFSET;
-
- fileTime.dwLowDateTime = (DWORD)nTime;
- fileTime.dwHighDateTime = (DWORD)(nTime >> 32);
-}
-
-3.6 FORMING A 64-BIT LARGE ARCHIVE OFFSET FROM 32-BIT AND 16-BIT COMPONENTS
-unsigned long long MakeLargeArchiveOffset(unsigned long nOffsetLow, unsigned short nOffsetHigh)
-{
- return ((unsigned long long)nOffsetHigh << 32) + (unsigned long long)nOffsetLow;
-}
-
-4. REVISION HISTORY
-1.0
- - Updated to include most of the changes found in the Burning Crusade Friends and Family beta
-
-0.91.
- - Updated several structure member descriptions
- - Listed the full set of characters that can separate list file entries
- - Noted that (attributes), (listfile), and (signature) use the default language and platform codes
- - Redid part of the file data specs to clarify the format of sectors
- - Enhanced descriptions of the different kinds of block table entries
- - Added ComputeFileKey, FindFileInHashTable, and DeleteFile source \ No newline at end of file
diff --git a/contrib/vmap_extractor_v2/stormlib/Makefile b/contrib/vmap_extractor_v2/stormlib/Makefile
deleted file mode 100644
index e3b19e36d6f..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-########################################################################
-#
-# Makefile for compiling StormLib under linux
-#
-# Author: Marko Friedemann <marko.friedemann@bmx-chemnitz.de>
-# Created at: Mon Jan 29 18:26:01 CEST 2001
-# Computer: whiplash.flachland-chemnitz.de
-# System: Linux 2.4.0 on i686
-#
-# Copyright (c) 2001 BMX-Chemnitz.DE All rights reserved.
-#
-########################################################################
-
-FILES.cpp = SCommon.cpp SCompression.cpp SFileCompactArchive.cpp \
- SFileCreateArchiveEx.cpp SFileExtractFile.cpp SFileFindFile.cpp \
- SListFile.cpp SFileOpenArchive.cpp SFileOpenFileEx.cpp SFileReadFile.cpp \
- StormPortLinux.cpp wave/wave.cpp huffman/huff.cpp \
- pklib/crc32.cpp pklib/explode.cpp pklib/implode.cpp
-FILES.o = $(FILES.cpp:.cpp=.o)
-
-LIB = libStorm.so
-
-CXX = g++
-CFLAGS = -Wall -s -D__SYS_ZLIB
-I_FLAGS =
-LDFLAGS = -lz -lbz2
-
-all: $(LIB)
-
-$(LIB): $(FILES.o)
- $(LD) -shared $(LDFLAGS) -o $(LIB) $(FILES.o)
-
-%.o: %.cpp
- $(CXX) $(CFLAGS) -c $< -o $@
-
-clean:
- $(RM) $(FILES.o) $(LIB)
-
-new: clean all
-
-mrproper: clean
- $(RM) Makefile.deps
-
-mrnew: mrproper new
-
-install: $(LIB)
- install $(I_FLAGS) $(LIB) /usr/local/lib
- mkdir -p /usr/local/include/StormLib
- cp Storm.h /usr/local/include/StormLib
- cp StormPort.h /usr/local/include/StormLib
- ldconfig
-
-deps:
- $(CXX) -MM $(CFLAGS) $(FILES.cpp) > Makefile.deps
-
--include Makefile.deps
-
-.PHONY: all clean new mrpoper mrnew install deps
diff --git a/contrib/vmap_extractor_v2/stormlib/bzip2/Makefile b/contrib/vmap_extractor_v2/stormlib/bzip2/Makefile
deleted file mode 100644
index eea329a626e..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/bzip2/Makefile
+++ /dev/null
@@ -1,205 +0,0 @@
-
-SHELL=/bin/sh
-
-# To assist in cross-compiling
-CC=gcc
-AR=ar
-RANLIB=ranlib
-LDFLAGS=
-
-BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-Wall -Winline -O -g $(BIGFILES)
-
-# Where you want it installed when you do 'make install'
-PREFIX=/usr
-
-
-OBJS= blocksort.o \
- huffman.o \
- crctable.o \
- randtable.o \
- compress.o \
- decompress.o \
- bzlib.o
-
-all: libbz2.a bzip2 bzip2recover test
-
-bzip2: libbz2.a bzip2.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
-
-bzip2recover: bzip2recover.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
-
-libbz2.a: $(OBJS)
- rm -f libbz2.a
- $(AR) cq libbz2.a $(OBJS)
- @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
- -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \
- echo $(RANLIB) libbz2.a ; \
- $(RANLIB) libbz2.a ; \
- fi
-
-check: test
-test: bzip2
- @cat words1
- ./bzip2 -1 < sample1.ref > sample1.rb2
- ./bzip2 -2 < sample2.ref > sample2.rb2
- ./bzip2 -3 < sample3.ref > sample3.rb2
- ./bzip2 -d < sample1.bz2 > sample1.tst
- ./bzip2 -d < sample2.bz2 > sample2.tst
- ./bzip2 -ds < sample3.bz2 > sample3.tst
- cmp sample1.bz2 sample1.rb2
- cmp sample2.bz2 sample2.rb2
- cmp sample3.bz2 sample3.rb2
- cmp sample1.tst sample1.ref
- cmp sample2.tst sample2.ref
- cmp sample3.tst sample3.ref
- @cat words3
-
-install: bzip2 bzip2recover
- if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
- if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
- cp -f bzip2 $(PREFIX)/bin/bzip2
- cp -f bzip2 $(PREFIX)/bin/bunzip2
- cp -f bzip2 $(PREFIX)/bin/bzcat
- cp -f bzip2recover $(PREFIX)/bin/bzip2recover
- chmod a+x $(PREFIX)/bin/bzip2
- chmod a+x $(PREFIX)/bin/bunzip2
- chmod a+x $(PREFIX)/bin/bzcat
- chmod a+x $(PREFIX)/bin/bzip2recover
- cp -f bzip2.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzip2.1
- cp -f bzlib.h $(PREFIX)/include
- chmod a+r $(PREFIX)/include/bzlib.h
- cp -f libbz2.a $(PREFIX)/lib
- chmod a+r $(PREFIX)/lib/libbz2.a
- cp -f bzgrep $(PREFIX)/bin/bzgrep
- ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
- ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
- chmod a+x $(PREFIX)/bin/bzgrep
- cp -f bzmore $(PREFIX)/bin/bzmore
- ln $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
- chmod a+x $(PREFIX)/bin/bzmore
- cp -f bzdiff $(PREFIX)/bin/bzdiff
- ln $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
- chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
-
-clean:
- rm -f *.o libbz2.a bzip2 bzip2recover \
- sample1.rb2 sample2.rb2 sample3.rb2 \
- sample1.tst sample2.tst sample3.tst
-
-blocksort.o: blocksort.c
- @cat words0
- $(CC) $(CFLAGS) -c blocksort.c
-huffman.o: huffman.c
- $(CC) $(CFLAGS) -c huffman.c
-crctable.o: crctable.c
- $(CC) $(CFLAGS) -c crctable.c
-randtable.o: randtable.c
- $(CC) $(CFLAGS) -c randtable.c
-compress.o: compress.c
- $(CC) $(CFLAGS) -c compress.c
-decompress.o: decompress.c
- $(CC) $(CFLAGS) -c decompress.c
-bzlib.o: bzlib.c
- $(CC) $(CFLAGS) -c bzlib.c
-bzip2.o: bzip2.c
- $(CC) $(CFLAGS) -c bzip2.c
-bzip2recover.o: bzip2recover.c
- $(CC) $(CFLAGS) -c bzip2recover.c
-
-
-distclean: clean
- rm -f manual.ps manual.html manual.pdf
-
-DISTNAME=bzip2-1.0.3
-dist: check manual
- rm -f $(DISTNAME)
- ln -sf . $(DISTNAME)
- tar cvf $(DISTNAME).tar \
- $(DISTNAME)/blocksort.c \
- $(DISTNAME)/huffman.c \
- $(DISTNAME)/crctable.c \
- $(DISTNAME)/randtable.c \
- $(DISTNAME)/compress.c \
- $(DISTNAME)/decompress.c \
- $(DISTNAME)/bzlib.c \
- $(DISTNAME)/bzip2.c \
- $(DISTNAME)/bzip2recover.c \
- $(DISTNAME)/bzlib.h \
- $(DISTNAME)/bzlib_private.h \
- $(DISTNAME)/Makefile \
- $(DISTNAME)/LICENSE \
- $(DISTNAME)/bzip2.1 \
- $(DISTNAME)/bzip2.1.preformatted \
- $(DISTNAME)/bzip2.txt \
- $(DISTNAME)/words0 \
- $(DISTNAME)/words1 \
- $(DISTNAME)/words2 \
- $(DISTNAME)/words3 \
- $(DISTNAME)/sample1.ref \
- $(DISTNAME)/sample2.ref \
- $(DISTNAME)/sample3.ref \
- $(DISTNAME)/sample1.bz2 \
- $(DISTNAME)/sample2.bz2 \
- $(DISTNAME)/sample3.bz2 \
- $(DISTNAME)/dlltest.c \
- $(DISTNAME)/manual.html \
- $(DISTNAME)/manual.pdf \
- $(DISTNAME)/manual.ps \
- $(DISTNAME)/README \
- $(DISTNAME)/README.COMPILATION.PROBLEMS \
- $(DISTNAME)/README.XML.STUFF \
- $(DISTNAME)/CHANGES \
- $(DISTNAME)/libbz2.def \
- $(DISTNAME)/libbz2.dsp \
- $(DISTNAME)/dlltest.dsp \
- $(DISTNAME)/makefile.msc \
- $(DISTNAME)/Y2K_INFO \
- $(DISTNAME)/unzcrash.c \
- $(DISTNAME)/spewG.c \
- $(DISTNAME)/mk251.c \
- $(DISTNAME)/bzdiff \
- $(DISTNAME)/bzdiff.1 \
- $(DISTNAME)/bzmore \
- $(DISTNAME)/bzmore.1 \
- $(DISTNAME)/bzgrep \
- $(DISTNAME)/bzgrep.1 \
- $(DISTNAME)/Makefile-libbz2_so \
- $(DISTNAME)/bz-common.xsl \
- $(DISTNAME)/bz-fo.xsl \
- $(DISTNAME)/bz-html.xsl \
- $(DISTNAME)/bzip.css \
- $(DISTNAME)/entities.xml \
- $(DISTNAME)/manual.xml \
- $(DISTNAME)/format.pl \
- $(DISTNAME)/xmlproc.sh
- gzip -v $(DISTNAME).tar
-
-# For rebuilding the manual from sources on my SuSE 9.1 box
-
-MANUAL_SRCS= bz-common.xsl bz-fo.xsl bz-html.xsl bzip.css \
- entities.xml manual.xml
-
-manual: manual.html manual.ps manual.pdf
-
-manual.ps: $(MANUAL_SRCS)
- ./xmlproc.sh -ps manual.xml
-
-manual.pdf: $(MANUAL_SRCS)
- ./xmlproc.sh -pdf manual.xml
-
-manual.html: $(MANUAL_SRCS)
- ./xmlproc.sh -html manual.xml
diff --git a/contrib/vmap_extractor_v2/stormlib/zlib/Makefile b/contrib/vmap_extractor_v2/stormlib/zlib/Makefile
deleted file mode 100644
index 531562b2ef1..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/zlib/Makefile
+++ /dev/null
@@ -1,175 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2002 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-# ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-# make install
-# To install in $HOME instead of /usr/local, use:
-# make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-# -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=-L. -lz
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-VER=1.1.4
-LIBS=libz.a
-SHAREDLIB=libz.so
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-DISTFILES = README FAQ INDEX ChangeLog configure Make*[a-z0-9] *.[ch] *.mms \
- algorithm.txt zlib.3 zlib.html \
- msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
- nt/Make*[a-z0-9] nt/zlib.dnt amiga/Make*.??? os2/M*.os2 os2/zlib.def \
- contrib/RE*.contrib contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \
- contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/asm[56]86/*.?86 \
- contrib/asm[56]86/*.S contrib/iostream/*.cpp \
- contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \
- contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \
- contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? \
- contrib/delphi*/*.???
-
-all: example minigzip
-
-test: all
- @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- echo hello world | ./minigzip | ./minigzip -d || \
- echo ' *** minigzip test FAILED ***' ; \
- if ./example; then \
- echo ' *** zlib test OK ***'; \
- else \
- echo ' *** zlib test FAILED ***'; \
- fi
-
-libz.a: $(OBJS) $(OBJA)
- $(AR) $@ $(OBJS) $(OBJA)
- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
- $(CPP) match.S > _match.s
- $(CC) -c _match.s
- mv _match.o match.o
- rm -f _match.s
-
-$(SHAREDLIB).$(VER): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
- rm -f $(SHAREDLIB) $(SHAREDLIB).1
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIB).1
-
-example: example.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
- -@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi
- -@if [ ! -d $(libdir) ]; then mkdir $(libdir); fi
- cp zlib.h zconf.h $(includedir)
- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- cp $(LIBS) $(libdir)
- cd $(libdir); chmod 755 $(LIBS)
- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
- cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
- rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
- ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
- ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
- (ldconfig || true) >/dev/null 2>&1; \
- fi
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
- cd $(includedir); \
- v=$(VER); \
- if test -f zlib.h; then \
- v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \
- rm -f zlib.h zconf.h; \
- fi; \
- cd $(libdir); rm -f libz.a; \
- if test -f $(SHAREDLIB).$$v; then \
- rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \
- fi
-
-clean:
- rm -f *.o *~ example minigzip libz.a libz.so* foo.gz so_locations \
- _match.s maketree
-
-distclean: clean
-
-zip:
- mv Makefile Makefile~; cp -p Makefile.in Makefile
- rm -f test.c ztest*.c contrib/minizip/test.zip
- v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
- zip -ul9 zlib$$v $(DISTFILES)
- mv Makefile~ Makefile
-
-dist:
- mv Makefile Makefile~; cp -p Makefile.in Makefile
- rm -f test.c ztest*.c contrib/minizip/test.zip
- d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
- rm -f $$d.tar.gz; \
- if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
- files=""; \
- for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
- cd ..; \
- GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
- if test ! -d $$d; then rm -f $$d; fi
- mv Makefile~ Makefile
-
-tags:
- etags *.[ch]
-
-depend:
- makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
-infcodes.o: zutil.h zlib.h zconf.h
-infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h
-inffast.o: infblock.h infcodes.h infutil.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h infblock.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/contrib/vmap_extractor_v2/stormlib/zlib/Makefile.in b/contrib/vmap_extractor_v2/stormlib/zlib/Makefile.in
deleted file mode 100644
index 531562b2ef1..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/zlib/Makefile.in
+++ /dev/null
@@ -1,175 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2002 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-# ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-# make install
-# To install in $HOME instead of /usr/local, use:
-# make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-# -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=-L. -lz
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-VER=1.1.4
-LIBS=libz.a
-SHAREDLIB=libz.so
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-DISTFILES = README FAQ INDEX ChangeLog configure Make*[a-z0-9] *.[ch] *.mms \
- algorithm.txt zlib.3 zlib.html \
- msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
- nt/Make*[a-z0-9] nt/zlib.dnt amiga/Make*.??? os2/M*.os2 os2/zlib.def \
- contrib/RE*.contrib contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \
- contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/asm[56]86/*.?86 \
- contrib/asm[56]86/*.S contrib/iostream/*.cpp \
- contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \
- contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \
- contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? \
- contrib/delphi*/*.???
-
-all: example minigzip
-
-test: all
- @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- echo hello world | ./minigzip | ./minigzip -d || \
- echo ' *** minigzip test FAILED ***' ; \
- if ./example; then \
- echo ' *** zlib test OK ***'; \
- else \
- echo ' *** zlib test FAILED ***'; \
- fi
-
-libz.a: $(OBJS) $(OBJA)
- $(AR) $@ $(OBJS) $(OBJA)
- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
- $(CPP) match.S > _match.s
- $(CC) -c _match.s
- mv _match.o match.o
- rm -f _match.s
-
-$(SHAREDLIB).$(VER): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
- rm -f $(SHAREDLIB) $(SHAREDLIB).1
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIB).1
-
-example: example.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
- -@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi
- -@if [ ! -d $(libdir) ]; then mkdir $(libdir); fi
- cp zlib.h zconf.h $(includedir)
- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- cp $(LIBS) $(libdir)
- cd $(libdir); chmod 755 $(LIBS)
- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
- cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
- rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
- ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
- ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
- (ldconfig || true) >/dev/null 2>&1; \
- fi
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
- cd $(includedir); \
- v=$(VER); \
- if test -f zlib.h; then \
- v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \
- rm -f zlib.h zconf.h; \
- fi; \
- cd $(libdir); rm -f libz.a; \
- if test -f $(SHAREDLIB).$$v; then \
- rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \
- fi
-
-clean:
- rm -f *.o *~ example minigzip libz.a libz.so* foo.gz so_locations \
- _match.s maketree
-
-distclean: clean
-
-zip:
- mv Makefile Makefile~; cp -p Makefile.in Makefile
- rm -f test.c ztest*.c contrib/minizip/test.zip
- v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
- zip -ul9 zlib$$v $(DISTFILES)
- mv Makefile~ Makefile
-
-dist:
- mv Makefile Makefile~; cp -p Makefile.in Makefile
- rm -f test.c ztest*.c contrib/minizip/test.zip
- d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
- rm -f $$d.tar.gz; \
- if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
- files=""; \
- for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
- cd ..; \
- GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
- if test ! -d $$d; then rm -f $$d; fi
- mv Makefile~ Makefile
-
-tags:
- etags *.[ch]
-
-depend:
- makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
-infcodes.o: zutil.h zlib.h zconf.h
-infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h
-inffast.o: infblock.h infcodes.h infutil.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h infblock.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/contrib/vmap_extractor_v2/stormlib/zlib/configure b/contrib/vmap_extractor_v2/stormlib/zlib/configure
deleted file mode 100644
index e8942359bc1..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/zlib/configure
+++ /dev/null
@@ -1,212 +0,0 @@
-#!/bin/sh
-# configure script for zlib. This script is needed only if
-# you wish to build a shared library and your system supports them,
-# of if you need special compiler, flags or install directory.
-# Otherwise, you can just use directly "make test; make install"
-#
-# To create a shared library, use "configure --shared"; by default a static
-# library is created. If the primitive shared library support provided here
-# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
-#
-# To impose specific compiler or flags or install directory, use for example:
-# prefix=$HOME CC=cc CFLAGS="-O4" ./configure
-# or for csh/tcsh users:
-# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
-# LDSHARED is the command to be used to create a shared library
-
-# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
-# If you have problems, try without defining CC and CFLAGS before reporting
-# an error.
-
-LIBS=libz.a
-SHAREDLIB=libz.so
-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
-AR=${AR-"ar rc"}
-RANLIB=${RANLIB-"ranlib"}
-prefix=${prefix-/usr/local}
-exec_prefix=${exec_prefix-'${prefix}'}
-libdir=${libdir-'${exec_prefix}/lib'}
-includedir=${includedir-'${prefix}/include'}
-shared_ext='.so'
-shared=0
-gcc=0
-old_cc="$CC"
-old_cflags="$CFLAGS"
-
-while test $# -ge 1
-do
-case "$1" in
- -h* | --h*)
- echo 'usage:'
- echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
- echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
- exit 0;;
- -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
- -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
- -p* | --p*) prefix="$2"; shift; shift;;
- -e* | --e*) exec_prefix="$2"; shift; shift;;
- -l* | --l*) libdir="$2"; shift; shift;;
- -i* | --i*) includedir="$2"; shift; shift;;
- -s* | --s*) shared=1; shift;;
- esac
-done
-
-test=ztest$$
-cat > $test.c <<EOF
-extern int getchar();
-int hello() {return getchar();}
-EOF
-
-test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
-cflags=${CFLAGS-"-O3"}
-# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
-case "$cc" in
- *gcc*) gcc=1;;
-esac
-
-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
- CC="$cc"
- SFLAGS=${CFLAGS-"-fPIC -O3"}
- CFLAGS="$cflags"
- case `(uname -s || echo unknown) 2>/dev/null` in
- Linux | linux) LDSHARED=${LDSHARED-"gcc -shared -Wl,-soname,libz.so.1"};;
- *) LDSHARED=${LDSHARED-"gcc -shared"};;
- esac
-else
- # find system name and corresponding cc options
- CC=${CC-cc}
- case `(uname -sr || echo unknown) 2>/dev/null` in
- HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
- CFLAGS=${CFLAGS-"-O"}
-# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
- LDSHARED=${LDSHARED-"ld -b"}
- shared_ext='.sl'
- SHAREDLIB='libz.sl';;
- IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
- CFLAGS=${CFLAGS-"-ansi -O2"}
- LDSHARED=${LDSHARED-"cc -shared"};;
- OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
- CFLAGS=${CFLAGS-"-O -std1"}
- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,$SHAREDLIB -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
- OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
- CFLAGS=${CFLAGS-"-O -std1"}
- LDSHARED=${LDSHARED-"cc -shared"};;
- QNX*) SFLAGS=${CFLAGS-"-4 -O"}
- CFLAGS=${CFLAGS-"-4 -O"}
- LDSHARED=${LDSHARED-"cc"}
- RANLIB=${RANLIB-"true"}
- AR="cc -A";;
- SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
- CFLAGS=${CFLAGS-"-O3"}
- LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
- SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
- CFLAGS=${CFLAGS-"-fast -xcg89"}
- LDSHARED=${LDSHARED-"cc -G"};;
- SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
- CFLAGS=${CFLAGS-"-O2"}
- LDSHARED=${LDSHARED-"ld"};;
- UNIX_System_V\ 4.2.0)
- SFLAGS=${CFLAGS-"-KPIC -O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -G"};;
- UNIX_SV\ 4.2MP)
- SFLAGS=${CFLAGS-"-Kconform_pic -O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -G"};;
- # send working options for other systems to support@gzip.org
- *) SFLAGS=${CFLAGS-"-O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -shared"};;
- esac
-fi
-
-if test $shared -eq 1; then
- echo Checking for shared library support...
- # we must test in two steps (cc then ld), required at least on SunOS 4.x
- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
- CFLAGS="$SFLAGS"
- LIBS="$SHAREDLIB.$VER"
- echo Building shared library $SHAREDLIB.$VER with $CC.
- elif test -z "$old_cc" -a -z "$old_cflags"; then
- echo No shared library suppport.
- shared=0;
- else
- echo 'No shared library suppport; try without defining CC and CFLAGS'
- shared=0;
- fi
-fi
-if test $shared -eq 0; then
- LDSHARED="$CC"
- echo Building static library $LIBS version $VER with $CC.
-fi
-
-cat > $test.c <<EOF
-#include <unistd.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
- echo "Checking for unistd.h... Yes."
-else
- echo "Checking for unistd.h... No."
-fi
-
-cat > $test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for errno.h... Yes."
-else
- echo "Checking for errno.h... No."
- CFLAGS="$CFLAGS -DNO_ERRNO_H"
-fi
-
-cat > $test.c <<EOF
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-caddr_t hello() {
- return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
-}
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- CFLAGS="$CFLAGS -DUSE_MMAP"
- echo Checking for mmap support... Yes.
-else
- echo Checking for mmap support... No.
-fi
-
-CPP=${CPP-"$CC -E"}
-case $CFLAGS in
- *ASMV*)
- if test "`nm $test.o | grep _hello`" = ""; then
- CPP="$CPP -DNO_UNDERLINE"
- echo Checking for underline in external names... No.
- else
- echo Checking for underline in external names... Yes.
- fi;;
-esac
-
-rm -f $test.[co] $test$shared_ext
-
-# udpate Makefile
-sed < Makefile.in "
-/^CC *=/s%=.*%=$CC%
-/^CFLAGS *=/s%=.*%=$CFLAGS%
-/^CPP *=/s%=.*%=$CPP%
-/^LDSHARED *=/s%=.*%=$LDSHARED%
-/^LIBS *=/s%=.*%=$LIBS%
-/^SHAREDLIB *=/s%=.*%=$SHAREDLIB%
-/^AR *=/s%=.*%=$AR%
-/^RANLIB *=/s%=.*%=$RANLIB%
-/^VER *=/s%=.*%=$VER%
-/^prefix *=/s%=.*%=$prefix%
-/^exec_prefix *=/s%=.*%=$exec_prefix%
-/^libdir *=/s%=.*%=$libdir%
-/^includedir *=/s%=.*%=$includedir%
-" > Makefile
diff --git a/contrib/vmap_extractor_v2/stormlib/zlib/contrib/minizip/Makefile b/contrib/vmap_extractor_v2/stormlib/zlib/contrib/minizip/Makefile
deleted file mode 100644
index a1dfc161437..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/zlib/contrib/minizip/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-CC=cc
-CFLAGS=-O -I../..
-
-UNZ_OBJS = miniunz.o unzip.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o ../../libz.a
-
-.c.o:
- $(CC) -c $(CFLAGS) $*.c
-
-all: miniunz minizip
-
-miniunz: $(UNZ_OBJS)
- $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
-
-minizip: $(ZIP_OBJS)
- $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
-
-test: miniunz minizip
- ./minizip test readme.txt
- ./miniunz -l test.zip
- mv readme.txt readme.old
- ./miniunz test.zip
-
-clean:
- /bin/rm -f *.o *~ minizip miniunz
diff --git a/contrib/vmap_extractor_v2/stormlib/zlib/contrib/untgz/Makefile b/contrib/vmap_extractor_v2/stormlib/zlib/contrib/untgz/Makefile
deleted file mode 100644
index 409b4bdeaae..00000000000
--- a/contrib/vmap_extractor_v2/stormlib/zlib/contrib/untgz/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-CC=cc
-CFLAGS=-g
-
-untgz: untgz.o ../../libz.a
- $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz
-
-untgz.o: untgz.c ../../zlib.h
- $(CC) $(CFLAGS) -c -I../.. untgz.c
-
-../../libz.a:
- cd ../..; make
-
-clean:
- rm -f untgz untgz.o *~
diff --git a/dep/include/Makefile.am b/dep/include/Makefile.am
index f9cda557ecb..116b6e901a2 100644
--- a/dep/include/Makefile.am
+++ b/dep/include/Makefile.am
@@ -9,12 +9,12 @@
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
@@ -62,6 +62,7 @@ EXTRA_DIST += \
mysql/config-os2.h \
mysql/config-win.h \
mysql/errmsg.h \
+ mysql/libmysqld.def \
mysql/Libmysql.def \
mysql/m_ctype.h \
mysql/m_string.h \
@@ -167,32 +168,31 @@ EXTRA_DIST += \
# Sockets header files for Win32 builds
EXTRA_DIST += \
- sockets/Base64.h \
- sockets/Exception.h \
- sockets/File.h \
- sockets/IFile.h \
- sockets/Ipv4Address.h \
- sockets/Ipv6Address.h \
- sockets/ISocketHandler.h \
- sockets/ListenSocket.h \
- sockets/Lock.h \
- sockets/Mutex.h \
- sockets/Parse.h \
- sockets/ResolvServer.h \
- sockets/ResolvSocket.h \
- sockets/SctpSocket.h \
- sockets/SocketAddress.h \
- sockets/Socket.h \
- sockets/SocketHandler.h \
- sockets/socket_include.h \
- sockets/sockets-config.h \
- sockets/StdLog.h \
- sockets/StdoutLog.h \
- sockets/StreamSocket.h \
- sockets/TcpSocket.h \
- sockets/Thread.h \
- sockets/UdpSocket.h \
- sockets/Utility.h
+ sockets\Base64.h \
+ sockets\CircularBuffer.h \
+ sockets\IFile.h \
+ sockets\Ipv4Address.h \
+ sockets\Ipv6Address.h \
+ sockets\ISocketHandler.h \
+ sockets\ListenSocket.h \
+ sockets\Mutex.h \
+ sockets\Parse.h \
+ sockets\RandomNumber.h \
+ sockets\ResolvServer.h \
+ sockets\ResolvSocket.h \
+ sockets\SctpSocket.h \
+ sockets\Socket.h \
+ sockets\socket_include.h \
+ sockets\SocketAddress.h \
+ sockets\SocketHandler.h \
+ sockets\sockets-config.h \
+ sockets\StdLog.h \
+ sockets\StdoutLog.h \
+ sockets\TcpSocket.h \
+ sockets\Thread.h \
+ sockets\UdpSocket.h \
+ sockets\Uid.h \
+ sockets\Utility.h
# VLD header files for Win32 builds
EXTRA_DIST += \
diff --git a/dep/lib/Makefile.am b/dep/lib/Makefile.am
index f66fd207239..011e88dc34d 100644
--- a/dep/lib/Makefile.am
+++ b/dep/lib/Makefile.am
@@ -9,12 +9,12 @@
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
@@ -42,13 +42,11 @@ EXTRA_DIST += \
x64_Debug/libeay32.dll \
x64_Debug/libeay32.lib \
x64_Debug/libmySQL.dll \
- x64_Debug/libmysql.lib
+ x64_Debug/libmySQL.lib
# Release libraries for Win64 builds.
EXTRA_DIST += \
x64_release/libeay32.dll \
x64_release/libeay32.lib \
x64_release/libmySQL.dll \
- x64_release/libmysql.lib
-
-
+ x64_release/libmySQL.lib
diff --git a/src/Makefile.am b/src/Makefile.am
index 40787fa17d0..be1fefa8db3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,17 +9,17 @@
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
## Sub-directories to parse
-SUBDIRS = framework shared trinityrealm game bindings trinitycore
+SUBDIRS = tools framework shared realmd game bindings mangosd
## Additional files to include when running 'make dist'
# Nothing yet.
diff --git a/src/shared/Makefile.am b/src/shared/Makefile.am
index 54aef015e46..9c87d7bab40 100644
--- a/src/shared/Makefile.am
+++ b/src/shared/Makefile.am
@@ -18,93 +18,49 @@
## Process this file with automake to produce Makefile.in
-## TODO move vmaps in src dir instead of src/shared
-
## Sub-directories to parse
-SUBDIRS = vmap
+SUBDIRS = Auth Config Database vmap
+
+## CPP flags for includes, defines, etc.
+AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../dep/include -I$(srcdir)/../framework -I$(srcdir)/../shared -I$(srcdir)/../../dep/include/g3dlite -DSYSCONFDIR=\"$(sysconfdir)/\"
+## AM_CPPFLAGS += -I$(srcdir)/../game -I$(srcdir)/../realmd
## Build MaNGOS shared library and its parts as convenience library.
# All libraries will be convenience libraries. Might be changed to shared
# later.
-noinst_LIBRARIES = libshared.a
-
-libshared_a_CPPFLAGS = \
-$(MYSQL_INCLUDES) \
-$(POSTGRE_INCLUDES) \
-$(TRINI_INCLUDES) \
--I$(top_srcdir)/dep/include \
--I$(top_srcdir)/src/framework
+noinst_LIBRARIES = libmangosshared.a
# libmangosshared library will later be reused by ...
-libshared_a_SOURCES = \
-$(srcdir)/Base.cpp \
-$(srcdir)/Base.h \
-$(srcdir)/ByteBuffer.h \
-$(srcdir)/Common.cpp \
-$(srcdir)/Common.h \
-$(srcdir)/Errors.h \
-$(srcdir)/Log.cpp \
-$(srcdir)/Log.h \
-$(srcdir)/Mthread.cpp \
-$(srcdir)/Mthread.h \
-$(srcdir)/ProgressBar.cpp \
-$(srcdir)/ProgressBar.h \
-$(srcdir)/Timer.h \
-$(srcdir)/Util.cpp \
-$(srcdir)/Util.h \
-$(srcdir)/WorldPacket.h \
-$(srcdir)/SystemConfig.h \
-$(srcdir)../game/IRCConf.h \
-$(srcdir)/Auth/AuthCrypt.cpp \
-$(srcdir)/Auth/AuthCrypt.h \
-$(srcdir)/Auth/BigNumber.cpp \
-$(srcdir)/Auth/BigNumber.h \
-$(srcdir)/Auth/Hmac.cpp \
-$(srcdir)/Auth/Hmac.h \
-$(srcdir)/Auth/Sha1.cpp \
-$(srcdir)/Auth/Sha1.h \
-$(srcdir)/Auth/md5.c \
-$(srcdir)/Auth/md5.h \
-$(srcdir)/Config/dotconfpp/dotconfpp.cpp \
-$(srcdir)/Config/dotconfpp/dotconfpp.h \
-$(srcdir)/Config/dotconfpp/mempool.cpp \
-$(srcdir)/Config/dotconfpp/mempool.h \
-$(srcdir)/Config/Config.cpp \
-$(srcdir)/Config/Config.h \
-$(srcdir)/Config/ConfigEnv.h \
-$(srcdir)/Database/DBCStores.cpp \
-$(srcdir)/Database/DBCStores.h \
-$(srcdir)/Database/DBCStructure.h \
-$(srcdir)/Database/DBCfmt.cpp \
-$(srcdir)/Database/Database.cpp \
-$(srcdir)/Database/Database.h \
-$(srcdir)/Database/DatabaseEnv.h \
-$(srcdir)/Database/DatabaseImpl.h \
-$(srcdir)/Database/DatabaseMysql.cpp \
-$(srcdir)/Database/DatabasePostgre.cpp \
-$(srcdir)/Database/DatabaseMysql.h \
-$(srcdir)/Database/DatabasePostgre.h \
-$(srcdir)/Database/DatabaseSqlite.cpp \
-$(srcdir)/Database/DatabaseSqlite.h \
-$(srcdir)/Database/Field.cpp \
-$(srcdir)/Database/Field.h \
-$(srcdir)/Database/MySQLDelayThread.h \
-$(srcdir)/Database/PGSQLDelayThread.h \
-$(srcdir)/Database/QueryResult.h \
-$(srcdir)/Database/QueryResultMysql.cpp \
-$(srcdir)/Database/QueryResultMysql.h \
-$(srcdir)/Database/QueryResultPostgre.cpp \
-$(srcdir)/Database/QueryResultPostgre.h \
-$(srcdir)/Database/QueryResultSqlite.cpp \
-$(srcdir)/Database/QueryResultSqlite.h \
-$(srcdir)/Database/SQLStorage.cpp \
-$(srcdir)/Database/SQLStorage.h \
-$(srcdir)/Database/SqlDelayThread.cpp \
-$(srcdir)/Database/SqlDelayThread.h \
-$(srcdir)/Database/SqlOperations.cpp \
-$(srcdir)/Database/SqlOperations.h \
-$(srcdir)/Database/dbcfile.cpp \
-$(srcdir)/Database/dbcfile.h
+libmangosshared_a_SOURCES = \
+ Base.cpp \
+ Base.h \
+ ByteBuffer.h \
+ Common.cpp \
+ Common.h \
+ Errors.h \
+ Log.cpp \
+ Log.h \
+ MemoryLeaks.cpp \
+ MemoryLeaks.h \
+ ProgressBar.cpp \
+ ProgressBar.h \
+ Timer.h \
+ Util.cpp \
+ Util.h \
+ WorldPacket.h \
+ revision_nr.h \
+ revision.h
+
+# Get revision (git or svn)
+REVISION_FILE = revision.h
+
+BUILT_SOURCES = $(REVISION_FILE)
+CLEANFILES = $(REVISION_FILE)
+
+FORCE:
+
+$(REVISION_FILE) : $(top_builddir)/src/tools/genrevision/genrevision FORCE
+ $(top_builddir)/src/tools/genrevision/genrevision $(top_srcdir)
## Additional files to include when running 'make dist'
# Disabled packet logger
diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in
index 571ff23519e..51209d0454b 100644
--- a/src/shared/SystemConfig.h.in
+++ b/src/shared/SystemConfig.h.in
@@ -11,25 +11,23 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// THIS FILE IS DEPRECATED
-
#ifndef TRINITY_SYSTEMCONFIG_H
#define TRINITY_SYSTEMCONFIG_H
+#ifndef _PACKAGENAME
+#define _PACKAGENAME "Trinity"
+#endif
+
#include "Platform/Define.h"
-<<<<<<< HEAD:src/shared/SystemConfig.h.in
-// THIS IS TEMP :)
-#define _FULLVERSION "Trinity"
-=======
#ifndef _VERSION
#if PLATFORM == PLATFORM_WINDOWS
# define _VERSION(REVD,REVT,REVN,REVH) "0.13.0-DEV" " (" REVD " " REVT " Revision " REVN " - " REVH ")"
@@ -73,7 +71,6 @@
#endif
#define _FULLVERSION(REVD,REVT,REVN,REVH) _PACKAGENAME "/" _VERSION(REVD,REVT,REVN,REVH) " for " _ENDIAN_PLATFORM
->>>>>>> upstream/master:src/shared/SystemConfig.h.in
#define DEFAULT_PLAYER_LIMIT 100
#define DEFAULT_WORLDSERVER_PORT 8085 //8129