mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
* src/ejabberd.erl: Added searching of files in code:priv_lib
(thanks to Sergei Golovan) * src/translate.erl: Likewise * src/ejabberd_app.erl: Added "log_path" configuration parameter (thanks to Sergei Golovan) * src/**/Makefile.win32: Updated (thanks to Sergei Golovan) * src/**/*.c: Updated (thanks to Sergei Golovan) * src/configure.erl: Added writing of version to Makefile.inc (thanks to Sergei Golovan) * doc/guide.tex: Updated link to expat (thanks to Sergei Golovan) SVN Revision: 223
This commit is contained in:
parent
6f600f1a37
commit
b542249f11
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
2004-04-15 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd.erl: Added searching of files in code:priv_lib
|
||||
(thanks to Sergei Golovan)
|
||||
* src/translate.erl: Likewise
|
||||
|
||||
* src/ejabberd_app.erl: Added "log_path" configuration parameter
|
||||
(thanks to Sergei Golovan)
|
||||
|
||||
* src/**/Makefile.win32: Updated (thanks to Sergei Golovan)
|
||||
|
||||
* src/**/*.c: Updated (thanks to Sergei Golovan)
|
||||
|
||||
* src/configure.erl: Added writing of version to Makefile.inc
|
||||
(thanks to Sergei Golovan)
|
||||
|
||||
* doc/guide.tex: Updated link to expat (thanks to Sergei Golovan)
|
||||
|
||||
2004-04-10 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/idna.erl: Support for IDNA (RFC3490)
|
||||
|
@ -128,7 +128,7 @@ packages:
|
||||
\begin{itemize}
|
||||
\item MS Visual C++~6.0 Compiler
|
||||
\item \footahref{http://www.erlang.org/download/otp_win32_R9C-0.exe}{Erlang emulator version~5.3}
|
||||
\item \footahref{http://prdownloads.sourceforge.net/expat/expat_win32bin_1_95_6.exe?download}{Expat~1.95.6}
|
||||
\item \footahref{http://prdownloads.sourceforge.net/expat/expat_win32bin_1_95_7.exe?download}{Expat~1.95.7}
|
||||
\item
|
||||
\footahref{http://prdownloads.sourceforge.net/gnuwin32/libiconv-1.8-1-bin.exe?download}{Iconv~1.8
|
||||
binaries} and
|
||||
|
@ -1,9 +1,64 @@
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
EXPAT_DIR="c:\progra~1\expat-1.95.6"
|
||||
EXPAT_DIR="c:\progra~1\expat-1.95.7"
|
||||
|
||||
ALL : expat_erl.dll compile-beam all-recursive
|
||||
ALL : build
|
||||
|
||||
REL=..\release
|
||||
EREL=$(REL)\ejabberd-$(EJABBERD_VERSION)
|
||||
EBIN_DIR=$(EREL)\ebin
|
||||
MSGS_DIR=$(EREL)\msgs
|
||||
SRC_DIR=$(EREL)\src
|
||||
PRIV_DIR=$(EREL)\priv
|
||||
SO_DIR=$(PRIV_DIR)\lib
|
||||
DOC_DIR=$(EREL)\doc
|
||||
|
||||
release_clean :
|
||||
if exist $(REL) rd /s /q $(REL)
|
||||
|
||||
|
||||
release : build release_clean
|
||||
mkdir $(REL)
|
||||
mkdir $(EREL)
|
||||
mkdir $(EBIN_DIR)
|
||||
copy *.beam $(EBIN_DIR)
|
||||
copy *.app $(EBIN_DIR)
|
||||
mkdir $(PRIV_DIR)
|
||||
mkdir $(SO_DIR)
|
||||
copy *.dll $(SO_DIR)
|
||||
mkdir $(MSGS_DIR)
|
||||
copy msgs\*.msg $(MSGS_DIR)
|
||||
mkdir $(SRC_DIR)
|
||||
copy *.app $(SRC_DIR)
|
||||
copy *.erl $(SRC_DIR)
|
||||
copy *.hrl $(SRC_DIR)
|
||||
copy *.c $(SRC_DIR)
|
||||
mkdir $(SRC_DIR)\eldap
|
||||
copy eldap\eldap.* $(SRC_DIR)\eldap
|
||||
copy eldap\ELDAPv3.asn $(SRC_DIR)\eldap
|
||||
mkdir $(SRC_DIR)\mod_irc
|
||||
copy mod_irc\*.erl $(SRC_DIR)\mod_irc
|
||||
copy mod_irc\*.c $(SRC_DIR)\mod_irc
|
||||
mkdir $(SRC_DIR)\mod_muc
|
||||
copy mod_muc\*.erl $(SRC_DIR)\mod_muc
|
||||
mkdir $(SRC_DIR)\mod_pubsub
|
||||
copy mod_pubsub\*.erl $(SRC_DIR)\mod_pubsub
|
||||
mkdir $(SRC_DIR)\stringprep
|
||||
copy stringprep\*.erl $(SRC_DIR)\stringprep
|
||||
copy stringprep\*.c $(SRC_DIR)\stringprep
|
||||
copy stringprep\*.tcl $(SRC_DIR)\stringprep
|
||||
mkdir $(SRC_DIR)\web
|
||||
copy web\*.erl $(SRC_DIR)\web
|
||||
mkdir $(DOC_DIR)
|
||||
copy ..\doc\*.html $(DOC_DIR)
|
||||
copy ..\doc\*.png $(DOC_DIR)
|
||||
|
||||
SOURCE = expat_erl.c
|
||||
OBJECT = expat_erl.o
|
||||
DLL = expat_erl.dll
|
||||
|
||||
build : $(DLL) compile-beam all-recursive
|
||||
|
||||
all-recursive :
|
||||
cd eldap
|
||||
@ -26,12 +81,10 @@ compile-beam :
|
||||
CLEAN : clean-recursive clean-local
|
||||
|
||||
clean-local :
|
||||
-@erase expat_erl.obj
|
||||
-@erase vc60.idb
|
||||
-@erase expat_erl.dll
|
||||
-@erase $(OBJECT)
|
||||
-@erase $(DLL)
|
||||
-@erase expat_erl.exp
|
||||
-@erase expat_erl.lib
|
||||
-@erase expat_erl.pch
|
||||
-@erase *.beam
|
||||
|
||||
clean-recursive :
|
||||
@ -49,24 +102,18 @@ clean-recursive :
|
||||
nmake -nologo -f Makefile.win32 clean
|
||||
cd ..
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(ERLANG_DIR)\usr\include" /I "$(EI_DIR)\include" /I "$(EXPAT_DIR)\source\lib" /D "__WIN32__" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "_MBCS" /Fpexpat_erl.pch /YX /FD /c
|
||||
distclean : release_clean clean
|
||||
-@erase Makefile.inc
|
||||
|
||||
.c.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
CC=cl.exe
|
||||
CC_FLAGS=-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT -MD -Ox -I"$(ERLANG_DIR)\usr\include" -I"$(EI_DIR)\include" -I"$(EXPAT_DIR)\source\lib"
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib "$(EI_DIR)\lib\ei.lib" "$(EI_DIR)\lib\erl_interface.lib" "$(EXPAT_DIR)\libs\libexpat.lib" /nologo /subsystem:console /dll /pdb:none /machine:I386 /out:expat_erl.dll /nodefaultlib:libcmt
|
||||
LINK32_OBJS=expat_erl.obj
|
||||
LD=link.exe
|
||||
LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(EXPAT_DIR)\libs\libexpat.lib" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
|
||||
|
||||
expat_erl.dll : $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
$(DLL) : $(OBJECT)
|
||||
$(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT)
|
||||
|
||||
SOURCE=expat_erl.c
|
||||
|
||||
expat_erl.obj : $(SOURCE)
|
||||
$(OBJECT) : $(SOURCE)
|
||||
$(CC) $(CC_FLAGS) -c -Fo$(OBJECT) $(SOURCE)
|
||||
|
||||
|
@ -12,10 +12,14 @@
|
||||
|
||||
-export([start/0]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
|
||||
start() ->
|
||||
EIDirS = "EI_DIR = " ++ code:lib_dir("erl_interface") ++ "\n",
|
||||
RootDirS = "ERLANG_DIR = " ++ code:root_dir() ++ "\n",
|
||||
file:write_file("Makefile.inc", list_to_binary(EIDirS ++ RootDirS)),
|
||||
Version = "EJABBERD_VERSION = " ++ ?VERSION ++ "\n",
|
||||
file:write_file("Makefile.inc",
|
||||
list_to_binary(EIDirS ++ RootDirS ++ Version)),
|
||||
halt().
|
||||
|
||||
|
||||
|
@ -23,7 +23,12 @@ stop() ->
|
||||
get_so_path() ->
|
||||
case os:getenv("EJABBERD_SO_PATH") of
|
||||
false ->
|
||||
".";
|
||||
case code:priv_dir(ejabberd) of
|
||||
{error, _} ->
|
||||
".";
|
||||
Path ->
|
||||
filename:join([Path, "lib"])
|
||||
end;
|
||||
Path ->
|
||||
Path
|
||||
end.
|
||||
|
@ -51,12 +51,18 @@ init() ->
|
||||
register(ejabberd, self()),
|
||||
%erlang:system_flag(fullsweep_after, 0),
|
||||
%error_logger:logfile({open, ?LOG_PATH}),
|
||||
LogPath = case os:getenv("EJABBERD_LOG_PATH") of
|
||||
false ->
|
||||
?LOG_PATH;
|
||||
Path ->
|
||||
Path
|
||||
end,
|
||||
LogPath =
|
||||
case application:get_env(log_path) of
|
||||
{ok, Path} ->
|
||||
Path;
|
||||
undefined ->
|
||||
case os:getenv("EJABBERD_LOG_PATH") of
|
||||
false ->
|
||||
?LOG_PATH;
|
||||
Path ->
|
||||
Path
|
||||
end
|
||||
end,
|
||||
error_logger:add_report_handler(ejabberd_logger_h, LogPath),
|
||||
%timer:apply_interval(3600000, ?MODULE, dump_ports, []),
|
||||
ok = erl_ddll:load_driver(ejabberd:get_so_path(), expat_erl),
|
||||
|
@ -11,7 +11,10 @@ OBJS = \
|
||||
ALL : $(OBJS)
|
||||
|
||||
CLEAN :
|
||||
-@erase ELDAPv3.asn1db ELDAPv3.erl ELDAPv3.hrl
|
||||
-@erase ELDAPv3.asn1db
|
||||
-@erase ELDAPv3.erl
|
||||
-@erase ELDAPv3.hrl
|
||||
-@erase ELDAPv3.beam
|
||||
-@erase $(OBJS)
|
||||
|
||||
ELDAPv3.erl : ELDAPv3.asn
|
||||
|
@ -243,12 +243,9 @@ ErlDrvEntry expat_driver_entry = {
|
||||
NULL /* F_PTR outputv, reserved */
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
DRIVER_INIT(expat_erl) /* must match name in driver_entry */
|
||||
{
|
||||
return &expat_driver_entry;
|
||||
return &expat_driver_entry;
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,15 +11,17 @@ OBJS = \
|
||||
$(OUTDIR)\mod_irc.beam \
|
||||
$(OUTDIR)\mod_irc_connection.beam
|
||||
|
||||
ALL : $(OUTDIR)\iconv_erl.dll $(OBJS)
|
||||
SOURCE = iconv_erl.c
|
||||
OBJECT = iconv_erl.o
|
||||
DLL = $(OUTDIR)\iconv_erl.dll
|
||||
|
||||
ALL : $(DLL) $(OBJS)
|
||||
|
||||
CLEAN :
|
||||
-@erase $(OUTDIR)\iconv_erl.dll
|
||||
-@erase $(DLL)
|
||||
-@erase $(OUTDIR)\iconv_erl.exp
|
||||
-@erase $(OUTDIR)\iconv_erl.lib
|
||||
-@erase iconv_erl.obj
|
||||
-@erase iconv_erl.pch
|
||||
-@erase vc60.idb
|
||||
-@erase $(OBJECT)
|
||||
-@erase $(OBJS)
|
||||
|
||||
$(OUTDIR)\iconv.beam : iconv.erl
|
||||
@ -31,22 +33,15 @@ $(OUTDIR)\mod_irc.beam : mod_irc.erl
|
||||
$(OUTDIR)\mod_irc_connection.beam : mod_irc_connection.erl
|
||||
erlc -W $(EFLAGS) -o $(OUTDIR) mod_irc_connection.erl
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(ERLANG_DIR)\usr\include" /I "$(EI_DIR)\include" /I "$(GNUWIN_DIR)\include" /D "__WIN32__" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "_MBCS" /Fpiconv_erl.pch /YX /FD /c
|
||||
CC=cl.exe
|
||||
CC_FLAGS=-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT -MD -Ox -I"$(ERLANG_DIR)\usr\include" -I"$(EI_DIR)\include" -I"$(GNUWIN_DIR)\include"
|
||||
|
||||
.c.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
LD=link.exe
|
||||
LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(GNUWIN_DIR)\lib\libiconv.lib" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib "$(EI_DIR)\lib\ei.lib" "$(EI_DIR)\lib\erl_interface.lib" "$(GNUWIN_DIR)\lib\libiconv.lib" /nologo /subsystem:console /dll /pdb:none /machine:I386 /out:$(OUTDIR)\iconv_erl.dll /nodefaultlib:libcmt
|
||||
LINK32_OBJS=iconv_erl.obj
|
||||
$(DLL) : $(OBJECT)
|
||||
$(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT)
|
||||
|
||||
$(OUTDIR)\iconv_erl.dll : $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
iconv_erl.obj : iconv_erl.c
|
||||
$(OBJECT) : $(SOURCE)
|
||||
$(CC) $(CC_FLAGS) -c -Fo$(OBJECT) $(SOURCE)
|
||||
|
||||
|
@ -105,12 +105,9 @@ ErlDrvEntry iconv_driver_entry = {
|
||||
NULL /* F_PTR outputv, reserved */
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
DRIVER_INIT(iconv_erl) /* must match name in driver_entry */
|
||||
{
|
||||
return &iconv_driver_entry;
|
||||
return &iconv_driver_entry;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,37 +4,32 @@ include ..\Makefile.inc
|
||||
OUTDIR = ..
|
||||
EFLAGS = -I .. -pz ..
|
||||
|
||||
ALL : $(OUTDIR)\stringprep_drv.dll $(OUTDIR)\stringprep.beam
|
||||
SOURCE = stringprep_drv.c
|
||||
AUXIL = uni_data.c uni_norm.c
|
||||
OBJECT = stringprep_drv.o
|
||||
DLL = $(OUTDIR)\stringprep_drv.dll
|
||||
|
||||
ALL : $(DLL) $(OUTDIR)\stringprep.beam
|
||||
|
||||
CLEAN :
|
||||
-@erase $(OUTDIR)\stringprep_drv.dll
|
||||
-@erase $(DLL)
|
||||
-@erase $(OUTDIR)\stringprep_drv.exp
|
||||
-@erase $(OUTDIR)\stringprep_drv.lib
|
||||
-@erase stringprep_drv.obj
|
||||
-@erase stringprep_drv.pch
|
||||
-@erase vc60.idb
|
||||
-@erase $(OBJECT)
|
||||
-@erase $(OUTDIR)\stringprep.beam
|
||||
|
||||
$(OUTDIR)\stringprep.beam : stringprep.erl
|
||||
erlc -W $(EFLAGS) -o $(OUTDIR) stringprep.erl
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(ERLANG_DIR)\usr\include" /I "$(EI_DIR)\include" /D "__WIN32__" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "_MBCS" /Fpstringprep_drv.pch /YX /FD /c
|
||||
CC=cl.exe
|
||||
CC_FLAGS=-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT -MD -Ox -I"$(ERLANG_DIR)\usr\include" -I"$(EI_DIR)\include"
|
||||
|
||||
.c.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
LD=link.exe
|
||||
LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib "$(EI_DIR)\lib\ei.lib" "$(EI_DIR)\lib\erl_interface.lib" /nologo /subsystem:console /dll /pdb:none /machine:I386 /out:$(OUTDIR)\stringprep_drv.dll /nodefaultlib:libcmt
|
||||
$(DLL) : $(OBJECT)
|
||||
$(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT)
|
||||
|
||||
LINK32_OBJS=stringprep_drv.obj
|
||||
|
||||
$(OUTDIR)\stringprep_drv.dll : $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
stringprep_drv.obj : stringprep_drv.c
|
||||
$(OBJECT) : $(SOURCE) $(AUXIL)
|
||||
$(CC) $(CC_FLAGS) -c -Fo$(OBJECT) $(SOURCE)
|
||||
|
||||
|
@ -325,11 +325,8 @@ ErlDrvEntry stringprep_driver_entry = {
|
||||
NULL /* F_PTR outputv, reserved */
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
DRIVER_INIT(stringprep_erl) /* must match name in driver_entry */
|
||||
{
|
||||
return &stringprep_driver_entry;
|
||||
return &stringprep_driver_entry;
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,18 @@
|
||||
|
||||
start() ->
|
||||
ets:new(translations, [named_table, public]),
|
||||
Dir = case os:getenv("EJABBERD_MSGS_PATH") of
|
||||
false ->
|
||||
?MSGS_DIR;
|
||||
Path ->
|
||||
Path
|
||||
end,
|
||||
Dir =
|
||||
case os:getenv("EJABBERD_MSGS_PATH") of
|
||||
false ->
|
||||
case code:lib_dir(ejabberd) of
|
||||
{error, _} ->
|
||||
?MSGS_DIR;
|
||||
Path ->
|
||||
filename:join([Path, "msgs"])
|
||||
end;
|
||||
Path ->
|
||||
Path
|
||||
end,
|
||||
load_dir(Dir),
|
||||
ok.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user