mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 03:51:32 +00:00
Misc compile fixes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6166 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
64b471c2d9
commit
2ed3378a75
8 changed files with 26 additions and 19 deletions
|
@ -685,7 +685,7 @@ endif
|
|||
PKGCONFIG?=$(ARCH)-pkg-config
|
||||
ifeq ($(shell which $(PKGCONFIG) 2> /dev/null),)
|
||||
FFS:=$(shell echo $(PKGCONFIG) not found 1>&2 )
|
||||
PKGCONFIG=/bin/true #don't end up using eg /usr/include when cross-compiling. makelibs is a valid workaround.
|
||||
PKGCONFIG=/bin/false #don't end up using eg /usr/include when cross-compiling. makelibs is a valid workaround.
|
||||
endif
|
||||
#try to statically link
|
||||
ifeq ($(COMPILE_SYS),Darwin)
|
||||
|
|
|
@ -350,6 +350,15 @@ char soundlist_name[] =
|
|||
{ 's'^0xff, 'o'^0xff, 'u'^0xff, 'n'^0xff, 'd'^0xff, 'l'^0xff, 'i'^0xff, 's'^0xff, 't'^0xff,
|
||||
' '^0xff, '%'^0xff, 'i'^0xff, ' '^0xff, '%'^0xff, 'i'^0xff, 0 };
|
||||
|
||||
vrui_t vrui;
|
||||
void VRUI_SnapAngle(void)
|
||||
{
|
||||
// VectorCopy(cl.playerview[0].viewangles, vrui.angles);
|
||||
vrui.angles[0] = 0;
|
||||
vrui.angles[1] = cl.playerview[0].aimangles[1];
|
||||
vrui.angles[2] = 0;
|
||||
}
|
||||
|
||||
void CL_UpdateWindowTitle(void)
|
||||
{
|
||||
if (VID_SetWindowCaption)
|
||||
|
|
|
@ -4769,6 +4769,7 @@ static void CL_ParseBaseline (entity_state_t *es, int baselinetype2)
|
|||
}
|
||||
|
||||
es->trans = (bits & FITZ_B_ALPHA) ? MSG_ReadByte() : 255;
|
||||
#ifdef NQPROT
|
||||
if (cls.qex)
|
||||
{
|
||||
if (bits & QEX_B_SOLID)
|
||||
|
@ -4783,6 +4784,7 @@ static void CL_ParseBaseline (entity_state_t *es, int baselinetype2)
|
|||
Con_Printf(CON_WARNING"QEX_B_UNKNOWN7: %x\n", MSG_ReadByte());
|
||||
}
|
||||
else
|
||||
#endif
|
||||
es->scale = (bits & RMQFITZ_B_SCALE) ? MSG_ReadByte() : 16;
|
||||
}
|
||||
static void CL_ParseBaselineDelta (void)
|
||||
|
|
|
@ -632,7 +632,7 @@ static void IPLog_Merge_f(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CLIENT //requires UI prompts
|
||||
#if defined(HAVE_DTLS) && defined(HAVE_CLIENT) //requires UI prompts
|
||||
struct certlog_s
|
||||
{
|
||||
link_t l;
|
||||
|
@ -1075,7 +1075,7 @@ void Log_Init(void)
|
|||
if (COM_CheckParm("-condebug"))
|
||||
Cvar_ForceSet(&log_enable[LOG_CONSOLE], "1");
|
||||
|
||||
#ifdef HAVE_CLIENT
|
||||
#if defined(HAVE_DTLS) && defined(HAVE_CLIENT)
|
||||
ClearLink(&certlog);
|
||||
Cmd_AddCommand("dtls_untrustall", CertLog_UntrustAll_f);
|
||||
Cmd_AddCommand("dtls_importtrust", CertLog_Import_f);
|
||||
|
|
|
@ -151,7 +151,8 @@ cvar_t net_enable_websockets = CVARD("net_enable_websockets", "1", "If enabled,
|
|||
#endif
|
||||
#endif
|
||||
extern cvar_t net_ice_exchangeprivateips;
|
||||
#if defined(HAVE_DTLS) && defined(HAVE_SERVER)
|
||||
#if defined(HAVE_DTLS)
|
||||
#if defined(HAVE_SERVER)
|
||||
static void QDECL NET_Enable_DTLS_Changed(struct cvar_s *var, char *oldvalue)
|
||||
{
|
||||
var->ival = var->value;
|
||||
|
@ -173,7 +174,6 @@ static void QDECL NET_Enable_DTLS_Changed(struct cvar_s *var, char *oldvalue)
|
|||
}
|
||||
cvar_t net_enable_dtls = CVARAFCD("net_enable_dtls", "", "sv_listen_dtls", 0, NET_Enable_DTLS_Changed, "Controls serverside dtls support.\n0: dtls blocked, not advertised.\n1: clientside choice.\n2: used where possible (recommended setting).\n3: disallow non-dtls clients (sv_port_tcp should be eg tls://[::]:27500 to also disallow unencrypted tcp connections).");
|
||||
#endif
|
||||
#if defined(HAVE_DTLS)
|
||||
cvar_t dtls_psk_hint = CVARFD("dtls_psk_hint", "", CVAR_NOUNSAFEEXPAND, "For DTLS-PSK handshakes. This specifies the public server identity.");
|
||||
cvar_t dtls_psk_user = CVARFD("dtls_psk_user", "", CVAR_NOUNSAFEEXPAND, "For DTLS-PSK handshakes. This specifies the username to use when the client+server's hints match.");
|
||||
cvar_t dtls_psk_key = CVARFD("dtls_psk_key", "", CVAR_NOUNSAFEEXPAND, "For DTLS-PSK handshakes. This specifies the hexadecimal key which must match between client+server. Will only be used when client+server's hint settings match.");
|
||||
|
@ -8028,6 +8028,7 @@ qboolean NET_EnsureRoute(ftenet_connections_t *collection, char *routename, char
|
|||
return false;
|
||||
break;
|
||||
case NP_DTLS:
|
||||
#ifdef HAVE_DTLS
|
||||
adr->prot = NP_DGRAM;
|
||||
if (NET_EnsureRoute(collection, routename, host, adr))
|
||||
if (NET_DTLS_Create(collection, adr, host))
|
||||
|
@ -8036,6 +8037,7 @@ qboolean NET_EnsureRoute(ftenet_connections_t *collection, char *routename, char
|
|||
return true;
|
||||
}
|
||||
adr->prot = NP_DTLS;
|
||||
#endif
|
||||
return false;
|
||||
case NP_WS:
|
||||
case NP_WSS:
|
||||
|
|
|
@ -1898,8 +1898,12 @@ static void *QDECL PlugBI_GetEngineInterface(const char *interfacename, size_t s
|
|||
Plug_Net_GetTLSBinding,
|
||||
|
||||
Sys_RandomBytes,
|
||||
#ifdef HAVE_DTLS
|
||||
TLS_GetKnownCertificate,
|
||||
#ifdef HAVE_CLIENT
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
#if defined(HAVE_DTLS) && defined(HAVE_CLIENT)
|
||||
CertLog_ConnectOkay,
|
||||
#else
|
||||
NULL,
|
||||
|
|
|
@ -45,16 +45,6 @@ extern cvar_t vid_conautoscale;
|
|||
extern qboolean scr_con_forcedraw;
|
||||
extern qboolean depthcleared;
|
||||
|
||||
vrui_t vrui;
|
||||
|
||||
void VRUI_SnapAngle(void)
|
||||
{
|
||||
// VectorCopy(cl.playerview[0].viewangles, vrui.angles);
|
||||
vrui.angles[0] = 0;
|
||||
vrui.angles[1] = cl.playerview[0].aimangles[1];
|
||||
vrui.angles[2] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
SCR_UpdateScreen
|
||||
|
|
|
@ -425,7 +425,7 @@ $(PLUG_PREFIX)models$(PLUG_NATIVE_EXT): models/gltf.c models/exportiqm.c models/
|
|||
#Openssl crypto plugin, to replace microsoft's shoddy dtls implementation. could also be useful on the BSDs, yay system components?
|
||||
|
||||
ifeq ($(FTE_TARGET),win32)
|
||||
OSSL_ARCH=mingw32
|
||||
OSSL_ARCH=mingw
|
||||
endif
|
||||
ifeq ($(FTE_TARGET),win64)
|
||||
OSSL_ARCH=mingw64
|
||||
|
@ -437,10 +437,10 @@ ARCHLIBS=../engine/libs-$(ARCH)
|
|||
#../engine/libs-$(ARCH)/openssl-$(OSSL_VERSION).tar.gz:
|
||||
../engine/openssl-$(OSSL_VERSION).tar.gz:
|
||||
wget -O $@ -N https://github.com/openssl/openssl/archive/refs/tags/openssl-$(OSSL_VERSION).tar.gz
|
||||
$(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libssl.a: ../engine/openssl-$(OSSL_VERSION).tar.gz
|
||||
$(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libssl.a $(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libcrypto.a: ../engine/openssl-$(OSSL_VERSION).tar.gz
|
||||
(cd $(ARCHLIBS) && tar xvfz ../openssl-$(OSSL_VERSION).tar.gz)
|
||||
(cd $(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION) && CFLAGS=-Os ./Configure --release no-filenames no-legacy no-shared no-stdio no-asm $(OSSL_ARCH) --cross-compile-prefix=$(ARCH)- && $(MAKE))
|
||||
net_ssl_openssl.c: $(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libssl.a $(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libcrypt.a
|
||||
$(PLUG_PREFIX)openssl$(PLUG_NATIVE_EXT): $(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libssl.a $(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/libcrypto.a
|
||||
|
||||
#we should be using openssl's no-sock option, but that also disables core dtls functionality (despite us using our own BIOs).
|
||||
OPENSSL_LDCFLAGS=-I$(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION)/include -L$(ARCHLIBS)/openssl-openssl-$(OSSL_VERSION) -lssl -lcrypto -lws2_32
|
||||
|
|
Loading…
Reference in a new issue