diff options
author | Alexey Shchepin <alexey@process-one.net> | 2004-08-22 21:54:14 +0000 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2004-08-22 21:54:14 +0000 |
commit | 4103f30812ed99c984a2fdb16aabca139c9255d7 (patch) | |
tree | 449c3946ebd1e8c040656e119c4276e2d2d9cb00 /src/win32 | |
parent | * src/msgs/nl.msg: Updated (thanks to Sander Devrieze) (diff) |
* src/mod_offline.erl: Added entire table locking on large message
queue
* src/ejabberd_sm.erl: Added offline_subscription_hook
* src/mod_offline.erl: Use offline_subscription_hook
* src/configure.erl: Updated (thanks to Sergei Golovan)
* src/Makefile.win32: Likewise
* src/tls/Makefile.win32: Likewise
* src/win32/: Likewise
* src/mod_announce.erl: Added announce to all users (thanks to
Sergei Golovan)
* doc/guide.tex: Updated (thanks to Sergei Golovan)
SVN Revision: 259
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/CheckReqs.ini | 15 | ||||
-rw-r--r-- | src/win32/CheckReqs1.ini | 28 | ||||
-rw-r--r-- | src/win32/CheckReqs1H.ini | 29 | ||||
-rw-r--r-- | src/win32/CheckUserH.ini | 2 | ||||
-rw-r--r-- | src/win32/ejabberd.cfg | 26 | ||||
-rw-r--r-- | src/win32/ejabberd.nsi | 116 |
6 files changed, 206 insertions, 10 deletions
diff --git a/src/win32/CheckReqs.ini b/src/win32/CheckReqs.ini index 0b573c82..74b193de 100644 --- a/src/win32/CheckReqs.ini +++ b/src/win32/CheckReqs.ini @@ -1,11 +1,20 @@ [Settings] -NumFields=1 +NumFields=2 [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." +Bottom=70 +Text="Erlang OTP R9C-1 (version 5.3.6.2) or newer is required to install Ejabberd.\r\n\r\nIt is not found on your computer.\r\n\r\nPlease install Erlang OTP R9C-1 or newer before installing Ejabberd.\r\n\r\nIt can be downloaded from" + +[Field 2] +Type=link +Left=0 +Right=-1 +Top=74 +Bottom=88 +State=http://www.erlang.org/download.html +Text=http://www.erlang.org/download.html diff --git a/src/win32/CheckReqs1.ini b/src/win32/CheckReqs1.ini new file mode 100644 index 00000000..d475ede3 --- /dev/null +++ b/src/win32/CheckReqs1.ini @@ -0,0 +1,28 @@ +[Settings] +NumFields=3 + +[Field 1] +Type=label +Left=0 +Right=-1 +Top=10 +Bottom=70 +Text="OpenSLL 0.9.7c or newer is not found on your computer.\r\n\r\nEjabberd includes required SSL libraries but if you don't have SSL certificate then without installed OpenSSL you will not be able to create your own SSL certificate and use SSL-enabled connections.\r\n\r\nOpenSLL can be downloaded from" + +[Field 2] +Type=link +Left=0 +Right=-1 +Top=74 +Bottom=88 +State=http://www.slproweb.com/products/Win32OpenSSL.html +Text=http://www.slproweb.com/products/Win32OpenSSL.html + +[Field 3] +Type=label +Left=0 +Right=-1 +Top=93 +Bottom=-10 +Text="If you want to continue installation anyway, click Next." + diff --git a/src/win32/CheckReqs1H.ini b/src/win32/CheckReqs1H.ini new file mode 100644 index 00000000..15c4ecf7 --- /dev/null +++ b/src/win32/CheckReqs1H.ini @@ -0,0 +1,29 @@ +[Settings] +NumFields=3 + +[Field 1] +Type=label +Left=0 +Right=-1 +Top=10 +Bottom=70 +Text="OpenSLL 0.9.7c or newer is not found on your computer.\r\n\r\nEjabberd includes required SSL libraries but if you don't have SSL certificate then without installed OpenSSL you will not be able to create your own SSL certificate and use SSL-enabled connections.\r\n\r\nOpenSLL can be downloaded from" + +[Field 2] +Type=link +Left=0 +Right=-1 +Top=74 +Bottom=88 +State=http://www.slproweb.com/products/Win32OpenSSL.html +Text=http://www.slproweb.com/products/Win32OpenSSL.html + +[Field 3] +Type=checkbox +Left=0 +Right=-1 +Top=93 +Bottom=105 +Text="Proceed with install" +State=0 +Flags=NOTIFY diff --git a/src/win32/CheckUserH.ini b/src/win32/CheckUserH.ini index 63b2589b..8cd9ffc4 100644 --- a/src/win32/CheckUserH.ini +++ b/src/win32/CheckUserH.ini @@ -14,7 +14,7 @@ Type=checkbox Left=0 Right=-1 Top=50 -Bottom=-10 +Bottom=62 Text="Proceed with install" State=0 Flags=NOTIFY diff --git a/src/win32/ejabberd.cfg b/src/win32/ejabberd.cfg index b4fdeb0d..237761e5 100644 --- a/src/win32/ejabberd.cfg +++ b/src/win32/ejabberd.cfg @@ -85,14 +85,35 @@ % Host name: {host, "localhost"}. +% Default language: +{language, "en"}. % Listened ports: {listen, - [{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]}, -% {5223, ejabberd_c2s, [{access, c2s}, ssl, {certfile, "./ssl.pem"}]}, + [ + {5222, ejabberd_c2s, [{access, c2s}, + {shaper, c2s_shaper}]}, + +% To create selfsigned certificate run the following command form the +% command prompt: +% +% openssl req -new -x509 -days 365 -nodes -out ejabberd.pem -keyout ejabberd.pem +% +% and answer the questions. +% {5222, ejabberd_c2s, [{access, c2s}, +% starttls, {certfile, "./ejabberd.pem"} +% {shaper, c2s_shaper}]}, + +% When using SSL/TLS ssl option is not recommended (it requires patching +% erlang ssl application). Use tls option instead (as shown below). +% {5223, ejabberd_c2s, [{access, c2s}, +% tls, {certfile, "./ejabberd.pem"}]}, + {5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]}, + % {5555, ejabberd_service, [{access, all}, % {host, "icq.localhost", [{password, "secret"}]}]}, + {5280, ejabberd_http, [http_poll, web_admin]} ]}. @@ -111,6 +132,7 @@ {mod_stats, []}, {mod_vcard, []}, {mod_offline, []}, + {mod_announce, [{access, announce}]}, {mod_private, []}, {mod_irc, []}, {mod_muc, []}, diff --git a/src/win32/ejabberd.nsi b/src/win32/ejabberd.nsi index e0b23c97..8c7d3fe5 100644 --- a/src/win32/ejabberd.nsi +++ b/src/win32/ejabberd.nsi @@ -30,8 +30,10 @@ !ifdef HACKED_INSTALLOPTIONS ReserveFile "CheckUserH.ini" + ReserveFile "CheckReqs1H.ini" !else ReserveFile "CheckUser.ini" + ReserveFile "CheckReqs1.ini" !endif ReserveFile "CheckReqs.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS @@ -45,6 +47,9 @@ Var ERLANG_PATH Var ERLANG_VERSION Var REQUIRED_ERLANG_VERSION + Var OPENSSL_PATH + Var OPENSSL_VERSION + Var REQUIRED_OPENSSL_VERSION Var ERLSRV ;---------------------------------------------------------- @@ -52,7 +57,8 @@ Function .onInit - StrCpy $REQUIRED_ERLANG_VERSION "5.3" + StrCpy $REQUIRED_ERLANG_VERSION "5.3.6.2" + StrCpy $REQUIRED_OPENSSL_VERSION "0.9.7c" ;Default installation folder StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCT}" @@ -70,8 +76,10 @@ Function .onInit ;Extract InstallOptions INI files !ifdef HACKED_INSTALLOPTIONS !insertmacro MUI_INSTALLOPTIONS_EXTRACT "CheckUserH.ini" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "CheckReqs1H.ini" !else !insertmacro MUI_INSTALLOPTIONS_EXTRACT "CheckUser.ini" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "CheckReqs1.ini" !endif !insertmacro MUI_INSTALLOPTIONS_EXTRACT "CheckReqs.ini" @@ -106,6 +114,7 @@ FunctionEnd Page custom CheckUser LeaveCheckUser !insertmacro MUI_PAGE_LICENSE "..\..\COPYING" Page custom CheckReqs LeaveCheckReqs + Page custom CheckReqs1 LeaveCheckReqs1 ;!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY @@ -142,6 +151,7 @@ SectionIn 1 RO File /r "${TESTDIR}\win32" File "${TESTDIR}\libeay32.dll" File "${TESTDIR}\ssleay32.dll" + File /oname=ejabberd.cfg.example "${TESTDIR}\ejabberd.cfg" SetOverwrite off File "${TESTDIR}\ejabberd.cfg" SetOverwrite on @@ -155,10 +165,11 @@ SectionIn 1 RO StrCpy $0 "$SMPROGRAMS\$STARTMENU_FOLDER" CreateDirectory "$0" CreateShortCut "$0\Start Ejabberd.lnk" "$ERLANG_PATH\bin\werl.exe" \ - '-sname ejabberd -pa ebin -pa win32/$ERLANG_VERSION \ + '-sname ejabberd -pa ebin \ -env EJABBERD_SO_PATH priv/lib -env EJABBERD_MSGS_PATH msgs \ -env EJABBERD_LOG_PATH log/ejabberd.log \ - -s ejabberd -ejabberd config \"ejabberd.cfg\" -mnesia dir \"spool\"' \ + -s ejabberd -ejabberd config \"ejabberd.cfg\" -mnesia dir \"spool\" \ + -sasl sasl_error_logger {file,\"log/sasl.log\"}' \ $INSTDIR\win32\ejabberd.ico CreateShortCut "$0\Edit Config.lnk" "%SystemRoot%\system32\notepad.exe" \ "$INSTDIR\ejabberd.cfg" @@ -190,7 +201,7 @@ SectionIn 1 RO installsrv: nsExec::ExecToLog '"$ERLSRV" add ejabberd -stopaction "init:stop()." \ -onfail reboot -workdir "$INSTDIR" \ - -args "-s ejabberd -pa ebin -pa win32/$ERLANG_VERSION \ + -args "-s ejabberd -pa ebin \ -ejabberd config \\\"ejabberd.cfg\\\" \ -env EJABBERD_SO_PATH priv/lib -env EJABBERD_MSGS_PATH msgs \ -env EJABBERD_LOG_PATH log/ejabberd.log \ @@ -394,6 +405,56 @@ Function LeaveCheckReqs FunctionEnd +Function CheckReqs1 + + Push "HKLM" + Call FindOpenSSL + Pop $OPENSSL_PATH + Pop $OPENSSL_VERSION + StrCmp $OPENSSL_PATH "" 0 abort + Push "HKCU" + Call FindOpenSSL + Pop $OPENSSL_PATH + Pop $OPENSSL_VERSION + StrCmp $OPENSSL_PATH "" 0 abort + + !insertmacro MUI_HEADER_TEXT $(TEXT_CR_TITLE) $(TEXT_CR_SUBTITLE) + + !ifdef HACKED_INSTALLOPTIONS + !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "CheckReqs1H.ini" + !insertmacro MUI_INSTALLOPTIONS_READ $0 "CheckReqs1H.ini" "Field 3" "State" + GetDlgItem $1 $HWNDPARENT 1 + EnableWindow $1 $0 + !else + !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "CheckReqs1.ini" + !endif + + !insertmacro MUI_INSTALLOPTIONS_SHOW + + abort: + Abort + +FunctionEnd + +Function LeaveCheckReqs1 + + !ifdef HACKED_INSTALLOPTIONS + !insertmacro MUI_INSTALLOPTIONS_READ $0 "CheckReqs1H.ini" "Settings" "State" + StrCmp $0 0 validate ;Next button? + StrCmp $0 3 checkbox ;checkbox? + Abort ;Return to the page + + checkbox: + !insertmacro MUI_INSTALLOPTIONS_READ $0 "CheckReqs1H.ini" "Field 3" "State" + GetDlgItem $1 $HWNDPARENT 1 + EnableWindow $1 $0 + Abort + + validate: + !endif + +FunctionEnd + Function FindErlang Exch $R0 @@ -447,6 +508,53 @@ Function FindErlang FunctionEnd +Function FindOpenSSL + + Exch $R0 + Push $R1 + Push $R2 + Push $R3 + Push $R4 + Push $R5 + + StrCpy $R1 0 + StrCpy $R2 "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenSSL_is1" + + StrCmp $R0 HKLM h1 + ReadRegStr $R3 HKCU "$R2" "DisplayName" + ReadRegStr $R4 HKCU "$R2" "Inno Setup: App Path" + Goto l1 + h1: + ReadRegStr $R3 HKLM "$R2" "DisplayName" + ReadRegStr $R4 HKLM "$R2" "Inno Setup: App Path" + l1: + + IfFileExists "$R4\bin\openssl.exe" 0 notfound + Goto get + ; TODO check version + ;Push $REQUIRED_OPENSSL_VERSION + ;Push $R3 + ;Call CompareVersions + ;Pop $R5 + ;StrCmp $R5 1 get + + notfound: + StrCpy $R4 "" + + get: + StrCpy $R0 $R4 + StrCpy $R1 $R3 + + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Exch $R1 + Exch + Exch $R0 + +FunctionEnd + ;---------------------------------------------------------------------- ; CompareVersions ; input: |