summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--NEWS5
-rwxr-xr-xconfigure.ac6
-rw-r--r--src/gui/updatewindow.cpp11
-rw-r--r--src/net/beinghandler.cpp2
-rw-r--r--src/net/network.cpp8
6 files changed, 25 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 67b6a585..662d0b5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/updatewindow.cpp: Fixed updating on Windows.
+ * src/net/beinghandler.cpp, src/net/network.cpp, configure.ac: Fixed
+ Linux compiling issues.
+
2006-07-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/main.cpp: Fixed the loading of updates and made skipping the
diff --git a/NEWS b/NEWS
index b1d48891..ad78fc4f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,7 @@
-0.0.20 (23 July 2006)
+0.0.20.1 (25 July 2006)
+- Fixed updating system on Windows
+
+0.0.20 (24 July 2006)
- Added new hairstyle, and some fixes to the old ones
- Added slider to set FPS limit
- Added visible equipments
diff --git a/configure.ac b/configure.ac
index a4a3eef6..ce30607f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.59)
-AC_INIT([The Mana World], [0.0.20], [elvenprogrammer@gmail.com], [tmw])
+AC_INIT([The Mana World], [0.1.0], [elvenprogrammer@gmail.com], [tmw])
AC_CONFIG_HEADERS([config.h:config.h.in])
AC_LANG_CPLUSPLUS
@@ -43,8 +43,8 @@ AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, ,
AC_MSG_ERROR([ *** Unable to find SDL_mixer library
(http://www.libsdl.org/projects/SDL_mixer/)]))
-AC_CHECK_LIB(SDL_net, SDLNet_Init, ,
-AC_MSG_ERROR([ *** Unable to find SDL_net library]))
+AC_CHECK_LIB([enet], [enet_initialize], ,
+AC_MSG_ERROR([ *** Unable to find enet library (enet.bespin.org)]))
AC_CHECK_LIB(png, png_write_info, ,
AC_MSG_ERROR([ *** Unable to find png library]))
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 8f43903f..3f5fe7bb 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -106,8 +106,7 @@ UpdaterWindow::~UpdaterWindow()
free(mMemoryBuffer);
}
- // Remove downloaded files
- remove((mBasePath + "/updates/news.txt").c_str());
+ // Remove possibly leftover temporary download
remove((mBasePath + "/updates/download.temp").c_str());
delete[] mCurlError;
@@ -293,10 +292,14 @@ int UpdaterWindow::downloadThread(void *ptr)
if (!uw->mStoreInMemory)
{
fclose(outfile);
- // If the download was successful give the file the proper name
- // else it will be deleted later
+
+ // Give the file the proper name
std::string newName(uw->mBasePath + "/updates/" +
uw->mCurrentFile.c_str());
+
+ // Any existing file with this name is deleted first, otherwise the
+ // rename will fail on Windows.
+ remove(newName.c_str());
rename(outFilename.c_str(), newName.c_str());
}
}
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index 68a46650..7730e9be 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -368,7 +368,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
case 0x0119:
// Change in players look
- printf("0x0119 %i %i %i %x %i\n", msg->readLong(),
+ printf("0x0119 %li %i %i %x %i\n", msg->readLong(),
msg->readShort(), msg->readShort(), msg->readShort(),
msg->readByte());
break;
diff --git a/src/net/network.cpp b/src/net/network.cpp
index 8278e266..aa18e888 100644
--- a/src/net/network.cpp
+++ b/src/net/network.cpp
@@ -40,13 +40,13 @@ Network::~Network()
{
clearHandlers();
- if (mState != IDLE && mState != ERROR)
+ if (mState != IDLE && mState != NET_ERROR)
disconnect();
}
bool Network::connect(const std::string &address, short port)
{
- if (mState != IDLE && mState != ERROR)
+ if (mState != IDLE && mState != NET_ERROR)
{
logger->log("Tried to connect an already connected socket!");
return false;
@@ -55,7 +55,7 @@ bool Network::connect(const std::string &address, short port)
if (address.empty())
{
logger->log("Empty address given to Network::connect()!");
- mState = ERROR;
+ mState = NET_ERROR;
return false;
}
@@ -84,7 +84,7 @@ bool Network::connect(const std::string &address, short port)
if (mServer == 0)
{
logger->log("Unable to initiate connection to the server.");
- mState = ERROR;
+ mState = NET_ERROR;
return false;
}