$Log$
+ Revision 606.9 2003/06/04 21:39:27 error
+ * Numerous fixups needed for Windows port:
+ * cmd_mesg() rewritten to use the stat() syscall to find files
+ * really_do_keepalive() does not try to send if we are not connected
+ * Misc. fixups; added Windows readme file
+
Revision 606.8 2003/06/04 21:30:39 error
* messages.c: When file attachment has no name, use message subject as name
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
prefix=@prefix@
srcdir=@srcdir@
+ACLOCAL=@ACLOCAL@
AUTH=@AUTH@
-DEFS=@DEFS@
-CPPFLAGS=@CPPFLAGS@ -I.
-CFLAGS=@CFLAGS@
+AUTOCONF=@AUTOCONF@
+chkpwd_LIBS=@chkpwd_LIBS@
CC=@CC@
-RESOLV=@RESOLV@
-LIBS=@LIBS@
+CFLAGS=@CFLAGS@
+CPPFLAGS=@CPPFLAGS@ -I.
+DATABASE=@DATABASE@
+DEFS=@DEFS@
LDFLAGS=@LDFLAGS@
-chkpwd_LIBS=@chkpwd_LIBS@
+LIBS=@LIBS@
LIBOBJS=@LIBOBJS@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
+RESOLV=@RESOLV@
SHELL=/bin/sh
-AUTOCONF=@AUTOCONF@
-ACLOCAL=@ACLOCAL@
+SERVER_LDFLAGS=@SERVER_LDFLAGS@
YACC=@YACC@
-DATABASE=@DATABASE@
# End configuration section
clientsocket.o $(AUTH) $(SERV_MODULES)
citserver: $(SERV_OBJS)
- $(CC) $(SERV_OBJS) $(LDFLAGS) $(LIBS) $(RESOLV) -o citserver
+ $(CC) $(SERV_OBJS) $(LDFLAGS) $(SERVER_LDFLAGS) $(LIBS) $(RESOLV) -o citserver
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
screen_new();
+ newprompt("Connect to (return for local server): ", hostbuf, 64);
+
sln_printf("Attaching to server... \r");
sln_flush();
ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
OutFile "citadel-6.06.exe"
BGGradient off
-LangString $DESC_Citadel ${LANG_ENGLISH} "Citadel/UX client and core libraries (required)"
-LangString $DESC_CitadelServer ${LANG_ENGLISH} "Citadel/UX server"
-LangString $DESC_CitadelUtils ${LANG_ENGLISH} "Citadel/UX utilities"
+LangString DESC_Citadel ${LANG_ENGLISH} "Citadel/UX client and core libraries (required)"
+LangString DESC_CitadelServer ${LANG_ENGLISH} "Citadel/UX server"
+LangString DESC_CitadelUtils ${LANG_ENGLISH} "Citadel/UX utilities"
SetCompress auto
SetDatablockOptimize on
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Citadel\Citadel\CurrentVersion" "InstallDir"
DirShow show
-Section "Citadel/UX client and core libraries (required)" Citadel ; (default section)
+Section "Citadel/UX Client and core libraries (required)" Citadel ; (default section)
SetShellVarContext all
SetOutPath "$INSTDIR"
File C:\cygwin\home\error\cvs\citadel\citadel.exe
Section "Citadel/UX Server" CitadelServer
SetOutPath "$INSTDIR"
File C:\cygwin\home\error\cvs\citadel\citserver.exe
+File C:\cygwin\bin\cygz.dll
File C:\cygwin\home\error\cvs\citadel\base64.exe
File C:\cygwin\home\error\cvs\citadel\weekly
File C:\cygwin\home\error\cvs\citadel\setup.exe
-File /r C:\cygwin\home\error\cvs\citadel\bitbucket
+File C:\cygwin\home\error\cvs\citadel\sendcommand.exe
+File C:\cygwin\home\error\cvs\citadel\docs\citadel.html
+File /oname=README.TXT C:\cygwin\home\error\cvs\citadel\docs\windows-readme.txt
+SetOverwrite off
File /r C:\cygwin\home\error\cvs\citadel\help
File /r C:\cygwin\home\error\cvs\citadel\messages
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "Citadel" '"$INSTDIR\citserver.exe" -x9 -t"$INSTDIR\citadel-debug.txt" -h"$INSTDIR"'
+SetOverwrite on
+CreateShortcut "$SMPROGRAMS\Citadel\Server Setup Utility.lnk" \
+ "$INSTDIR\rxvt.exe" "-fg white -bg black -sl 1000 -sr -fn 8x16 -e ./setup.exe" \
+ "shell32.dll" "65"
+CreateShortcut "$SMPROGRAMS\Citadel\README.lnk" \
+ "$INSTDIR\README.TXT"
+CreateShortcut "$SMPROGRAMS\Citadel\Citadel Documentation.lnk" \
+ "$INSTDIR\citadel.html"
+WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "Citadel" "$INSTDIR\citserver.exe -x9 -tcitadel-debug.txt"
SectionEnd
Section "Citadel/UX Utilities" CitadelUtils
File C:\cygwin\home\error\cvs\citadel\citmail.exe
File C:\cygwin\home\error\cvs\citadel\migratenet.exe
File C:\cygwin\home\error\cvs\citadel\msgform.exe
-File C:\cygwin\home\error\cvs\citadel\sendcommand.exe
File C:\cygwin\home\error\cvs\citadel\userlist.exe
File C:\cygwin\home\error\cvs\citadel\whobbs.exe
SectionEnd
!insertmacro MUI_SECTIONS_FINISHHEADER
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${Citadel} ${DESC_Citadel}
- !insertmacro MUI_DESCRIPTION_TEXT ${CitadelServer} ${DESC_CitadelServer}
- !insertmacro MUI_DESCRIPTION_TEXT ${CitadelFiles} $(DESC_CitadelFiles}
- !insertmacro MUI_DESCRIPTION_TEXT ${CitadelUtils} $(DESC_CitadelUtils}
+ !insertmacro MUI_DESCRIPTION_TEXT ${Citadel} $(DESC_Citadel)
+ !insertmacro MUI_DESCRIPTION_TEXT ${CitadelServer} $(DESC_CitadelServer)
+ !insertmacro MUI_DESCRIPTION_TEXT ${CitadelUtils} $(DESC_CitadelUtils)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
; begin uninstall settings/section
RMDir /r "$INSTDIR\bitbucket"
RMDir "$INSTDIR"
+Delete "$SMPROGRAMS\Citadel\README.lnk"
+Delete "$SMPROGRAMS\Citadel\Citadel Documentation.lnk"
+Delete "$SMPROGRAMS\Citadel\Server Setup Utility.lnk"
Delete "$SMPROGRAMS\Citadel\Citadel.lnk"
RMDir "$SMPROGRAMS\Citadel"
Delete "$DESKTOP\Citadel.lnk"
/* $Id$ */
#define UDS "_UDS_"
+#ifdef __CYGWIN__
+#define DEFAULT_HOST "localhost"
+#else
#define DEFAULT_HOST UDS
+#endif
#define DEFAULT_PORT "citadel"
#include "sysdep.h"
strcpy(cithost, DEFAULT_HOST); /* default host */
strcpy(citport, DEFAULT_PORT); /* default port */
+ /* Allow caller to supply our values (Windows) */
+ if (hostbuf && strlen(hostbuf) > 0)
+ strcpy(cithost, hostbuf);
+ if (portbuf && strlen(portbuf) > 0)
+ strcpy(citport, portbuf);
+
+ /* Read host/port from command line if present */
for (a = 0; a < argc; ++a) {
if (a == 0) {
/* do nothing */
time(&idlet);
+ /* This may sometimes get called before we are actually connected
+ * to the server. Don't do anything if we aren't connected. -IO
+ */
+ if (!ipc_for_signal_handlers)
+ return;
+
/* If full keepalives are enabled, send a NOOP to the server and
* wait for a response.
*/
*-*-solaris*)
PTHREAD_DEFS="-D_REENTRANT -D_PTHREADS"
;;
+ *-*-cygwin*)
+ SERVER_LDFLAGS="-Wl,-subsystem,windows"
+ ;;
esac
DEFS="$DEFS $PTHREAD_DEFS"
AC_SUBST(chkpwd_LIBS)
AC_SUBST(TARGETS)
AC_SUBST(DATABASE)
+AC_SUBST(SERVER_LDFLAGS)
AC_CONFIG_HEADER(sysdep.h)
AC_CONFIG_FILES([Makefile weekly])
AC_OUTPUT
--- /dev/null
+README for Windows distribution
+-------------------------------
+
+Installation:
+
+ To install Citadel/UX for Windows, run the citadel-X.XX.exe file. It is
+ recommended that you do not change the installation folder. Unlike the
+ Unix version, you do NOT need to run Citadel's setup utility before
+ starting the server. However, the system operator will be set to the
+ first user who creates an account on the server, so you need to login
+ immediately.
+
+ Setup will fail if the Citadel server is running when you install/upgrade.
+ You will need to login to your Citadel server and issue the <.A>ide
+ <T>erminate <N>ow command to stop the server before upgrading Citadel.
+ This will be fixed in a future release.
+
+ At the present time you must restart your computer to start the Citadel
+ server. This will be fixed in a future release.
+
+Removal:
+
+ To remove Citadel/UX for Windows, go to Start > Control Panel > Add/Remove
+ Programs, click Citadel, then click Add/Remove (or Change/Remove). Your
+ server data (users, messages, etc.) will NOT be removed. To remove these
+ files, delete the C:\Program Files\Citadel\data directory.
+
+Known Issues in Citadel/UX for Windows:
+
+* Calendaring support is not included. Status: TO_BE_FIXED
+
+* Citadel may not run properly if the installation directory is changed from
+ C:\Program Files\Citadel. It is strongly recommended that you do not
+ change the installation directory. Status: TO_BE_FIXED
+
+* The "weekly" maintenance script does not run. Since it is a Unix script,
+ there is no way to run it in Windows. The main effect you will see is that
+ no server objects expire. If you wish you can expire them manually. To do
+ this, enter the following server commands (using the @ key in the text
+ client or the appropriate advanced command in WebCit): Status: TO_BE_FIXED
+
+ EXPI users
+ EXPI rooms
+ EXPI messages
+ EXPI visits
+ EXPI usetable
+
+* Sessions can be disconnected if you read the citadel-debug.txt using a
+ Cygwin program while the server is running. In addition, the file is
+ written in Unix text format. To view this file, use a Windows editor
+ which understands Unix text files, such as WordPad. (Notepad won't work.)
+ Status: RELNOTE
{
#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
if (myscreen) {
- endwin();
+ if (!isendwin()) endwin();
return 1;
}
#endif /* HAVE_CURSES_H */
{"sendcommand", NULL};
int r;
+ strcpy(hostbuf, "localhost");
+ strcpy(portbuf, "citadel");
fprintf(stderr, "Attaching to server...\n");
ipc = CtdlIPC_new(1, args, hostbuf, portbuf);
CtdlIPC_getline(ipc, buf);
break;
case 2:
+#ifdef __CYGWIN__
+ config.c_bbsuid = 0; /* XXX Windows hack, prob. insecure */
+#else
i = config.c_bbsuid;
pw = getpwuid(i);
if (pw == NULL) {
config.c_bbsuid = atoi(bbsuidname);
}
}
+#endif
break;
case 3:
unlink("citadel.log");
check_services_entry(); /* Check /etc/services */
+#ifndef __CYGWIN__
check_inittab_entry(); /* Check /etc/inittab */
+#endif
if ((pw = getpwuid(config.c_bbsuid)) == NULL)
gid = getgid();
#include "sysdep.h"
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <ctype.h>
#include <stdio.h>
{
int a;
char buf[SIZ];
+ struct stat test;
FILE *ls;
for (a=0; a<numdirs; ++a) {
- snprintf(buf, sizeof buf, "cd %s; exec ls",dirs[a]);
- ls = (FILE *) popen(buf,"r");
- if (ls != NULL) {
- while(fgets(buf,sizeof buf,ls)!=NULL) {
- while (isspace(buf[strlen(buf)-1]))
- buf[strlen(buf)-1] = 0;
- if (!strcasecmp(buf,searchfor)) {
- pclose(ls);
- snprintf(targ,n,"%s/%s",dirs[a],buf);
- return;
- }
- }
- pclose(ls);
- }
+ snprintf(buf, sizeof buf, "%s/%s", dirs[a], searchfor);
+ if (!stat(buf, &test)) {
+ snprintf(targ,n,"%s/%s", dirs[a], searchfor);
+ return;
}
- strcpy(targ,"");
}
+ strcpy(targ,"");
+}
#ifndef HAVE_STRERROR