mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 22:19:07 +00:00
Fix build on linux
This commit is contained in:
parent
ab752e1156
commit
373ccff7e4
2 changed files with 8 additions and 10 deletions
|
@ -8,10 +8,6 @@
|
||||||
#include "Network.h"
|
#include "Network.h"
|
||||||
#include "tinyxml.h"
|
#include "tinyxml.h"
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_UNIX
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using Network::NetEvent;
|
using Network::NetEvent;
|
||||||
using Network::NE_ABORT;
|
using Network::NE_ABORT;
|
||||||
using Network::NE_FINISH;
|
using Network::NE_FINISH;
|
||||||
|
@ -146,7 +142,7 @@ void ModDL::GetModlist(const std::string& url, bool allowChaining, bool first)
|
||||||
{
|
{
|
||||||
if(first)
|
if(first)
|
||||||
knownServers.clear();
|
knownServers.clear();
|
||||||
|
|
||||||
// Prevent recursion, self-linking, or cycle linking.
|
// Prevent recursion, self-linking, or cycle linking.
|
||||||
// In theory, this allows setting up a server network
|
// In theory, this allows setting up a server network
|
||||||
// where each server links to any servers it knows,
|
// where each server links to any servers it knows,
|
||||||
|
@ -174,7 +170,7 @@ void ModDL::GetModlist(const std::string& url, bool allowChaining, bool first)
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << "Fetching mods list [" << url << "], chain: " << allowChaining;
|
os << "Fetching mods list [" << url << "], chain: " << allowChaining;
|
||||||
debugLog(os.str());
|
debugLog(os.str());
|
||||||
|
|
||||||
std::string localName = remoteToLocalName(url);
|
std::string localName = remoteToLocalName(url);
|
||||||
|
|
||||||
debugLog("... to: " + localName);
|
debugLog("... to: " + localName);
|
||||||
|
@ -230,7 +226,7 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(scr)
|
if(scr)
|
||||||
{
|
{
|
||||||
scr->globeIcon->alpha.stop();
|
scr->globeIcon->alpha.stop();
|
||||||
|
@ -279,7 +275,7 @@ bool ModDL::ParseModXML(const std::string& fn, bool allowChaining)
|
||||||
<Properties type="patch" /> //-- optional tag, if not given, "mod" is assumed. Can be "mod", "patch", or "weblink".
|
<Properties type="patch" /> //-- optional tag, if not given, "mod" is assumed. Can be "mod", "patch", or "weblink".
|
||||||
// if type=="weblink", <Package url> will be opened with the default web browser.
|
// if type=="weblink", <Package url> will be opened with the default web browser.
|
||||||
</AquariaMod>
|
</AquariaMod>
|
||||||
|
|
||||||
<AquariaMod>
|
<AquariaMod>
|
||||||
...
|
...
|
||||||
</AquariaMod>
|
</AquariaMod>
|
||||||
|
@ -527,7 +523,7 @@ void ModDL::NotifyMod(ModRequest *rq, NetEvent ev, size_t recvd, size_t total)
|
||||||
// Dir already exists, just remount everything
|
// Dir already exists, just remount everything
|
||||||
vfs.Reload();
|
vfs.Reload();
|
||||||
}
|
}
|
||||||
else if(!dsq->mountModPackage(archiveFile))
|
else if(!dsq->mountModPackage(archiveFile))
|
||||||
{
|
{
|
||||||
// make package readable (so that the icon can be shown)
|
// make package readable (so that the icon can be shown)
|
||||||
// But only if it wasn't mounted before!
|
// But only if it wasn't mounted before!
|
||||||
|
|
|
@ -33,6 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#if defined(BBGE_BUILD_UNIX)
|
#if defined(BBGE_BUILD_UNIX)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BBGE_BUILD_MACOSX)
|
#if defined(BBGE_BUILD_MACOSX)
|
||||||
|
@ -105,7 +107,7 @@ Direction getNextDirClockwise(Direction dir)
|
||||||
void sizePowerOf2Texture(int &v)
|
void sizePowerOf2Texture(int &v)
|
||||||
{
|
{
|
||||||
int p = 8, use=0;
|
int p = 8, use=0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
use = 1 << p;
|
use = 1 << p;
|
||||||
p++;
|
p++;
|
||||||
|
|
Loading…
Reference in a new issue