Permalink
Browse files

* src/translate.erl: Search translations directory in priv_dir

instead of lib_dir (thanks to Sergei Golovan)

* src/**/Makefile.in: Updated (thanks to Sergei Golovan)

* src/win32/: Win32 installer stuff (thanks to Sergei Golovan)

* src/**/Makefile.win32: Updated (thanks to Sergei Golovan)
* src/configure.bat: Likewise
* src/configure.erl: Likewise

* doc/guide.tex: Updated (thanks to Sergei Golovan)

SVN Revision: 226
  • Loading branch information...
1 parent aaccaa5 commit 13f650037ef18c1e864f858492c98fc42e450303 @alexeyshch alexeyshch committed Apr 27, 2004
View
@@ -1,3 +1,18 @@
+2004-04-27 Alexey Shchepin <alexey@sevcom.net>
+
+ * src/translate.erl: Search translations directory in priv_dir
+ instead of lib_dir (thanks to Sergei Golovan)
+
+ * src/**/Makefile.in: Updated (thanks to Sergei Golovan)
+
+ * src/win32/: Win32 installer stuff (thanks to Sergei Golovan)
+
+ * src/**/Makefile.win32: Updated (thanks to Sergei Golovan)
+ * src/configure.bat: Likewise
+ * src/configure.erl: Likewise
+
+ * doc/guide.tex: Updated (thanks to Sergei Golovan)
+
2004-04-26 Alexey Shchepin <alexey@sevcom.net>
* src/web/ejabberd_web_admin.erl: Better design for administration
View
@@ -130,11 +130,10 @@ \subsubsection{Windows}
\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_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
-\footahref{http://prdownloads.sourceforge.net/gnuwin32/libiconv-1.8-1-lib.exe?download}{Iconv~1.8
-development libraries}
+\footahref{http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.1.tar.gz}{Iconv~1.9.1}
(optional)
+\item \footahref{http://www.slproweb.com/download/Win32OpenSSL-v0.9.7d.exe}{Shining Light OpenSSL}
+(to enable SSL connections)
\end{itemize}
@@ -169,46 +168,32 @@ \subsubsection{Windows}
\label{sec:compilationwin}
\begin{enumerate}
-\item Install Erlang emulator (for example, into \verb|C:\Program Files\erl5.1.2|).
-\item Install Expat library into \verb|C:\Program Files\Expat-1.95.6|
- directory. Copy file \verb|C:\Program Files\Expat-1.95.6\Libs\libexpat.dll|
+\item Install Erlang emulator (for example, into \verb|C:\Program Files\erl5.3|).
+\item Install Expat library into \verb|C:\Program Files\Expat-1.95.7|
+ directory. Copy file \verb|C:\Program Files\Expat-1.95.7\Libs\libexpat.dll|
to your Windows system directory (for example, \verb|C:\WINNT| or
\verb|C:\WINNT\System32|)
-\item Install Iconv library into \verb|C:\Program Files\GnuWin32| directory.
- Copy file \verb|C:\Program Files\GnuWin32\bin\libiconv-2.dll| to your
+\item Build and install Iconv library into \verb|C:\Program Files\iconv-1.9.1| directory.
+ Copy file \verb|C:\Program Files\iconv-1.9.1\bin\iconv.dll| to your
Windows system directory.
- Note: Instead of copying libexpat.dll and libiconv-2.dll to Windows
+ Note: Instead of copying libexpat.dll and iconv.dll to Windows
directory, you can add directories
- \verb|C:\Program Files\Expat-1.95.6\Libs| and
- \verb|C:\Program Files\GnuWin32\bin| to \verb|PATH| environment
+ \verb|C:\Program Files\Expat-1.95.7\Libs| and
+ \verb|C:\Program Files\iconv-1.9.1\bin| to \verb|PATH| environment
variable.
\item Being in \verb|ejabberd\src| directory run:
\begin{verbatim}
configure
nmake -f Makefile.win32
\end{verbatim}
-\item To build MUC, IRC and pub/sub modules run
-\begin{verbatim}
-nmake -f Makefile.win32
-\end{verbatim}
- in \verb|ejabberd\src\mod_muc|, \verb|ejabberd\src\mod_muc| and
- \verb|ejabberd\src\mod_pubsub| directories
\item Edit file \verb|ejabberd\src\ejabberd.cfg| and run
\begin{verbatim}
werl -s ejabberd -name ejabberd
\end{verbatim}
\item Enjoy!
\end{enumerate}
-Some recent versions of Erlang distribution it seems have bug in crypto
-application, so ejabberd could be built but users can't use digest
-authentication (only plain-text). Also it seems SSL support is broken in
-Windows distribution of Erlang emulator.
-
-
-
-
%\subsection{Initial Configuration}
%\label{sec:initconfig}
View
@@ -1,8 +1,6 @@
include Makefile.inc
-EXPAT_DIR="c:\progra~1\expat-1.95.7"
-
ALL : build
REL=..\release
@@ -12,8 +10,20 @@ MSGS_DIR=$(EREL)\msgs
SRC_DIR=$(EREL)\src
PRIV_DIR=$(EREL)\priv
SO_DIR=$(PRIV_DIR)\lib
+WIN32_DIR=$(EREL)\win32
DOC_DIR=$(EREL)\doc
+NSIS_SCRIPT=win32\ejabberd.nsi
+NSIS_HEADER=win32\ejabberd.nsh
+
+installer : $(NSIS_SCRIPT) $(NSIS_HEADER)
+ makensis $(NSIS_SCRIPT)
+
+$(NSIS_HEADER) : Makefile.inc
+ echo !define OUTFILEDIR "..\$(REL)" >$(NSIS_HEADER)
+ echo !define TESTDIR "..\$(REL)\ejabberd-$(EJABBERD_VERSION)" >>$(NSIS_HEADER)
+ echo !define VERSION "$(EJABBERD_VERSION)" >>$(NSIS_HEADER)
+
release_clean :
if exist $(REL) rd /s /q $(REL)
@@ -29,6 +39,11 @@ release : build release_clean
copy *.dll $(SO_DIR)
mkdir $(MSGS_DIR)
copy msgs\*.msg $(MSGS_DIR)
+ mkdir $(WIN32_DIR)
+ copy win32\ejabberd.cfg $(EREL)
+ copy win32\ejabberd.ico $(WIN32_DIR)
+ mkdir $(WIN32_DIR)\5.3
+ copy win32\5.3\*.beam $(WIN32_DIR)\5.3
mkdir $(SRC_DIR)
copy *.app $(SRC_DIR)
copy *.erl $(SRC_DIR)
@@ -50,6 +65,9 @@ release : build release_clean
copy stringprep\*.tcl $(SRC_DIR)\stringprep
mkdir $(SRC_DIR)\web
copy web\*.erl $(SRC_DIR)\web
+ mkdir $(SRC_DIR)\win32
+ mkdir $(SRC_DIR)\win32\5.3
+ copy win32\5.3\*.erl $(SRC_DIR)\win32\5.3
mkdir $(DOC_DIR)
copy ..\doc\*.html $(DOC_DIR)
copy ..\doc\*.png $(DOC_DIR)
@@ -73,7 +91,9 @@ all-recursive :
nmake -nologo -f Makefile.win32
cd ..\web
nmake -nologo -f Makefile.win32
- cd ..
+ cd ..\win32\5.3
+ nmake -nologo -f Makefile.win32
+ cd ..\..
compile-beam :
erl -s make all report -noinput -s erlang halt
@@ -100,16 +120,18 @@ clean-recursive :
nmake -nologo -f Makefile.win32 clean
cd ..\web
nmake -nologo -f Makefile.win32 clean
- cd ..
+ cd ..\win32\5.3
+ nmake -nologo -f Makefile.win32 clean
+ cd ..\..
distclean : release_clean clean
-@erase Makefile.inc
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"
+CC_FLAGS=-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT $(EXPAT_FLAG) -MD -Ox -I"$(ERLANG_DIR)\usr\include" -I"$(EI_DIR)\include" -I"$(EXPAT_DIR)\source\lib"
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
+LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(EXPAT_LIB)" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
$(DLL) : $(OBJECT)
$(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT)
View
@@ -1,4 +1,20 @@
+@if "x%1"=="x--help" goto usage
+
+@set arg=dynamic
+@if "x%1"=="x--static" set arg=static
+
+@echo Configuring for %arg% build...
+
erlc configure.erl
-erl -s configure -noshell
+erl -s configure -env arg %arg% -noshell
+
+@goto end
+
+:usage
+@echo Usage: configure.bat
+@echo or configure.bat --static
+@echo or configure.bat --help
+
+:end
View
@@ -15,11 +15,46 @@
-include("ejabberd.hrl").
start() ->
- EIDirS = "EI_DIR = " ++ code:lib_dir("erl_interface") ++ "\n",
+ Static = case os:getenv("arg") of
+ false ->
+ false;
+ "static" ->
+ true;
+ _ ->
+ false
+ end,
+ case Static of
+ true ->
+ ExpatLib = "EXPAT_LIB = $(EXPAT_DIR)\\StaticLibs\\libexpatMT.lib\n",
+ ExpatFlag = "EXPAT_FLAG = -DXML_STATIC\n",
+ IconvDir = "ICONV_DIR = c:\\progra~1\\libiconv-1.9.1-static\n",
+ IconvLib = "ICONV_LIB = $(ICONV_DIR)\\lib\\iconv.lib\n";
+ false ->
+ ExpatLib = "EXPAT_LIB = $(EXPAT_DIR)\\Libs\\libexpat.lib\n",
+ ExpatFlag = "",
+ IconvDir = "ICONV_DIR = c:\\progra~1\\libiconv-1.9.1\n",
+ IconvLib = "ICONV_LIB = $(ICONV_DIR)\\lib\\iconv.lib\n"
+ end,
+
+ EIDirS = "EI_DIR = " ++ code:lib_dir("erl_interface") ++ "\n",
RootDirS = "ERLANG_DIR = " ++ code:root_dir() ++ "\n",
- Version = "EJABBERD_VERSION = " ++ ?VERSION ++ "\n",
+ Version = "EJABBERD_VERSION = " ++ ?VERSION ++ "\n",
+ ExpatDir = "EXPAT_DIR = c:\\progra~1\\expat-1.95.7\n",
+
+ SSLDir = "SSLDIR = " ++ code:lib_dir("ssl") ++ "\n",
+ StdLibDir = "STDLIBDIR = " ++ code:lib_dir("stdlib") ++ "\n",
+
file:write_file("Makefile.inc",
- list_to_binary(EIDirS ++ RootDirS ++ Version)),
+ list_to_binary(EIDirS ++
+ RootDirS ++
+ Version ++
+ SSLDir ++
+ StdLibDir ++
+ ExpatDir ++
+ ExpatLib ++
+ ExpatFlag ++
+ IconvDir ++
+ IconvLib)),
halt().
@@ -1,8 +1,6 @@
include ..\Makefile.inc
-GNUWIN_DIR="c:\progra~1\gnuwin32"
-
OUTDIR = ..
EFLAGS = -I .. -pz ..
@@ -34,10 +32,10 @@ $(OUTDIR)\mod_irc_connection.beam : mod_irc_connection.erl
erlc -W $(EFLAGS) -o $(OUTDIR) mod_irc_connection.erl
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"
+CC_FLAGS=-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT -MD -Ox -I"$(ERLANG_DIR)\usr\include" -I"$(EI_DIR)\include" -I"$(ICONV_DIR)\include"
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
+LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(ICONV_LIB)" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
$(DLL) : $(OBJECT)
$(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT)
@@ -0,0 +1,11 @@
+[Settings]
+NumFields=1
+
+[Field 1]
+Type=label
+Left=0
+Right=-1
+Top=10
+Bottom=-10
+Text="Erlang OTP R9C (version 5.3) is required to install Ejabberd.\r\n\r\nIt is not found on your computer.\r\n\r\nPlease install Erlang OTP R9C before installing Ejabberd.\r\n\r\nIt can be downloaded from http://www.erlang.org/download/otp_win32_R9C-0.exe."
+
@@ -0,0 +1,11 @@
+[Settings]
+NumFields=1
+
+[Field 1]
+Type=label
+Left=0
+Right=-1
+Top=10
+Bottom=-10
+Text="Administrator privileges are recommended for Ejabberd install.\r\n\r\nOtherwise installing Ejabberd as a service will be impossible.\r\n\r\nIf you want to continue installation anyway, click Next."
+
Oops, something went wrong.

0 comments on commit 13f6500

Please sign in to comment.