Tweaks for windows

This commit is contained in:
Kayne Ruse
2015-08-23 19:41:01 +10:00
parent c36c5210ab
commit dfa8683c47
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ INCLUDES+=. client_utilities entities gameplay_scenes menu_scenes ../common/debu
#libraries
#the order of the $(LIBS) is important, at least for MinGW
LIBS+=client.a ../common/libcommon.a -lSDL_net
LIBS+=client.a ../common/libcommon.a -lSDL2_net
ifeq ($(OS),Windows_NT)
LIBS+=-lwsock32 -liphlpapi -lmingw32
endif
+2 -1
View File
@@ -23,6 +23,7 @@
#include "channels.hpp"
#include <cstring>
#include <stdexcept>
#include <sstream>
@@ -307,7 +308,7 @@ void LobbyMenu::SendLoginRequest() {
ClientPacket packet;
packet.type = SerialPacketType::LOGIN_REQUEST;
packet.clientIndex = clientIndex;
strncpy(packet.username, config["client.username"].c_str(), PACKET_STRING_SIZE);
strncpy(packet.username, config["client.username"].c_str(), PACKET_STRING_SIZE+1);
network.SendTo(Channels::SERVER, &packet);
}
+3 -3
View File
@@ -1,13 +1,13 @@
#include directories
INCLUDES+=SDL . accounts characters clients entities rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
INCLUDES+=. accounts characters clients entities rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
#libraries
#the order of the $(LIBS) is important, at least for MinGW
LIBS+=server.a ../common/libcommon.a -lSDL_net
LIBS+=server.a ../common/libcommon.a -lSDL2_net
ifeq ($(OS),Windows_NT)
LIBS+=-lwsock32 -liphlpapi -lmingw32
endif
LIBS+=-lSDLmain -lSDL -llua -lsqlite3
LIBS+=-lSDL2main -lSDL2 -llua -lsqlite3
ifeq ($(shell uname), Linux)
#I don't know what this does, but Ubuntu needs it (dynamic linking for lua)
LIBS+=-ldl