Added new VS configuration 'curl-debug' which adds support for libfribidi,
curl (and pthreads). Several functions could not be compiled under VS, for now I have commented out the appropriate sections and added "FIXME_ADDON" #ifdefs or comments. NOTE: This will most likely break the addon manager on platforms on which it is currently working!!!! It's mainly meant to show which parts of the code need to be improved!!! Please grep for FIXME_ADDON, and if no easy fix exists, just add #ifndef WIN32 for now. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5609 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -30,8 +30,10 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#ifndef WIN32
|
||||
# include <unistd.h>
|
||||
# include <dirent.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sstream>
|
||||
#include "io/file_manager.hpp"
|
||||
@@ -180,7 +182,7 @@ void Addons::GetInstalledAddons()
|
||||
// ----------------------------------------------------------------------------
|
||||
bool Addons::Next()
|
||||
{
|
||||
if(this->index + 1 < this->m_addons_list.size())
|
||||
if(this->index + 1 < (int)this->m_addons_list.size())
|
||||
{
|
||||
this->index ++;
|
||||
return true;
|
||||
@@ -319,12 +321,14 @@ void Addons::Install()
|
||||
this->m_addons_list[this->index].name);
|
||||
|
||||
//creating of the data folders
|
||||
#ifdef FIXME_ADDON
|
||||
// mkdir does no not exist in windows, see filemanager checkandcreatedir
|
||||
mkdir(std::string(file_manager->getAddonsDir() + "/" + "data").c_str(), 0777);
|
||||
|
||||
mkdir(dest_file.c_str(), 0777);
|
||||
|
||||
mkdir(std::string(dest_file + this->m_addons_list[this->index].name).c_str(), 0777);
|
||||
|
||||
#endif
|
||||
//extract the zip in the addons folder called like the addons name
|
||||
extract_zip(file_manager->getConfigDir() + "/" + this->m_addons_list[this->index].name,
|
||||
dest_file + this->m_addons_list[this->index].name + "/");
|
||||
@@ -383,6 +387,11 @@ void Addons::UnInstall()
|
||||
/*FIXME: This function is an ugly copy-paste*/
|
||||
int Addons::RemoveDirectory(char const *name)
|
||||
{
|
||||
#ifdef FIXME_ADDON
|
||||
// DIR etc. do not exist like this in windows,
|
||||
// file system specific calls should be moved into
|
||||
// the file manager!!
|
||||
|
||||
DIR *directory;
|
||||
struct dirent *entry;
|
||||
struct stat file_stat;
|
||||
@@ -422,7 +431,7 @@ int Addons::RemoveDirectory(char const *name)
|
||||
closedir(directory);
|
||||
|
||||
remove(name);
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ class Addons
|
||||
int GetVersion(){ return this->m_addons_list[this->index].version; };
|
||||
|
||||
/** Get the path of the addon icon. */
|
||||
std::string GetIcon(){ return this->m_addons_list[this->index].icon; };
|
||||
std::string GetIcon() { return this->m_addons_list[this->index].icon; };
|
||||
|
||||
/** Get the version of the selected addon as a string. */
|
||||
std::string GetVersionAsStr();
|
||||
|
||||
@@ -145,6 +145,71 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="curl-debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\bullet\src;"$(STK_INCLUDE)""
|
||||
PreprocessorDefinitions="WIN32;BT_NO_PROFILE;HAVE_GLUT"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
FloatingPointExceptions="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<AssemblyReference
|
||||
|
||||
@@ -142,6 +142,70 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="curl-debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
WholeProgramOptimization="false"
|
||||
AdditionalIncludeDirectories="../../enet/include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
||||
@@ -13,18 +13,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "enet", "enet.vcproj", "{B0E
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
curl-debug|Win32 = curl-debug|Win32
|
||||
debug|Win32 = debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.curl-debug|Win32.ActiveCfg = curl-debug|Win32
|
||||
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.curl-debug|Win32.Build.0 = curl-debug|Win32
|
||||
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.debug|Win32.Build.0 = Debug|Win32
|
||||
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.Release|Win32.Build.0 = Release|Win32
|
||||
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.curl-debug|Win32.ActiveCfg = curl-debug|Win32
|
||||
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.curl-debug|Win32.Build.0 = curl-debug|Win32
|
||||
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.debug|Win32.ActiveCfg = Debug|Win32
|
||||
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.debug|Win32.Build.0 = Debug|Win32
|
||||
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.Release|Win32.Build.0 = Release|Win32
|
||||
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.curl-debug|Win32.ActiveCfg = curl-debug|Win32
|
||||
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.curl-debug|Win32.Build.0 = curl-debug|Win32
|
||||
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.debug|Win32.ActiveCfg = Release|Win32
|
||||
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.debug|Win32.Build.0 = Release|Win32
|
||||
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
Optimization="0"
|
||||
WholeProgramOptimization="false"
|
||||
AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;../../../src/enet/include;../../../dependencies/include;../../../dependencies/include/irrlicht"
|
||||
PreprocessorDefinitions="BT_NO_PROFILE;HAVE_OPENAL;HAVE_OGGVORBIS;_DEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\"SVN\";_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;PACKAGE=\"supertuxkart\";HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT;HAVE_IRRLICHT;_CRTDBG_MAP_ALLOC;IRR_SVN"
|
||||
PreprocessorDefinitions="BT_NO_PROFILE;HAVE_OPENAL;HAVE_OGGVORBIS;_DEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\"SVN\";_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;PACKAGE=\"supertuxkart\";HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT;_CRTDBG_MAP_ALLOC"
|
||||
GeneratePreprocessedFile="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -184,6 +184,94 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="curl-debug|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
WholeProgramOptimization="false"
|
||||
AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;../../../src/enet/include;../../../dependencies/include;../../../dependencies/include/irrlicht"
|
||||
PreprocessorDefinitions="BT_NO_PROFILE;HAVE_OPENAL;HAVE_OGGVORBIS;_DEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\"SVN\";_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;PACKAGE=\"supertuxkart\";HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT;_CRTDBG_MAP_ALLOC;ENABLE_BIDI;ADDONS_MANAGER"
|
||||
GeneratePreprocessedFile="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
FloatingPointExceptions="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib intl.lib Irrlicht.lib ws2_32.lib fribidi.lib pthreadVC2.lib libcurld_imp.lib"
|
||||
OutputFile="./../../../$(ProjectName)_curl_d.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../../../dependencies/lib"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames="libcmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="false"
|
||||
MapFileName=""
|
||||
MapExports="false"
|
||||
SubSystem="1"
|
||||
LinkTimeCodeGeneration="0"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
Profile="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
@@ -232,6 +320,15 @@
|
||||
KeepComments="false"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="curl-debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
GeneratePreprocessedFile="0"
|
||||
KeepComments="false"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\guiengine\modaldialog.cpp"
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "guiengine/screen.hpp"
|
||||
|
||||
class Addons;
|
||||
class AddonsLoading;
|
||||
|
||||
namespace GUIEngine { class Widget; }
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,17 +18,20 @@
|
||||
|
||||
#ifdef ADDONS_MANAGER
|
||||
|
||||
#include "states_screens/dialogs/addons_loading.hpp"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/widgets.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
#include "states_screens/dialogs/addons_loading.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
#include "addons/addons.hpp"
|
||||
#include "addons/network.hpp"
|
||||
#include "states_screens/addons_screen.hpp"
|
||||
#include <pthread.h>
|
||||
#include "utils/string_utils.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
|
||||
using namespace GUIEngine;
|
||||
using namespace irr::gui;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user