portable mode enabled in runtime

This commit is contained in:
berkeviktor@aol.com
2010-08-18 23:20:18 +02:00
parent bb33a3c4c4
commit ca904e4334
4 changed files with 72 additions and 37 deletions

14
src/common/portable.c Normal file
View File

@@ -0,0 +1,14 @@
#include <io.h>
int
portable_mode ()
{
if ((_access( "portable-mode", 0 )) != -1)
{
return 1;
}
else
{
return 0;
}
}

1
src/common/portable.h Normal file
View File

@@ -0,0 +1 @@
int portable_mode ();

View File

@@ -1,5 +1,4 @@
#X64 = YES
#PORTABLE = YES
IPV6 = YES
CC = cl
@@ -65,10 +64,6 @@ PYTHONOUTPUT = xcpython.dll
TCLLIB = tcl85
TCLOUTPUT = xctcl.dll
!ifdef PORTABLE
CFLAGS = $(CFLAGS) -DPORTABLE_BUILD
!endif
!ifdef IPV6
CFLAGS = $(CFLAGS) -DUSE_IPV6
LIBS = $(LIBS) ws2_32.lib
@@ -90,6 +85,7 @@ notify.obj \
outbound.obj \
plugin.obj \
plugin-timer.obj \
portable.obj \
proto-irc.obj \
server.obj \
servlist.obj \