- some bugfixes discovered while testing in windows, related to files not found checking

- Fixed debug project settings
This commit is contained in:
Mark Vejvoda 2011-05-25 22:41:19 +00:00
parent 4b47c79af5
commit 3eaabb1b41
3 changed files with 11 additions and 5 deletions

View File

@ -63,7 +63,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib wxjpegd.lib wxmsw28d_adv.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxmsw28d_gl.lib wxmsw28d_html.lib wxmsw28d_media.lib wxmsw28d_qa.lib wxmsw28d_richtext.lib wxmsw28d_xrc.lib wxpngd.lib wxregexd.lib wxtiffd.lib wxzlibd.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib libglest.lib sdl.lib sdlmain.lib dsound.lib dxguid.lib Dbghelp.lib libcurl.lib ws2_32.lib xerces-c_3.lib"
AdditionalDependencies="wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib wxjpegd.lib wxmsw28ud_adv.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxmsw28ud_gl.lib wxmsw28ud_html.lib wxmsw28ud_media.lib wxmsw28ud_qa.lib wxmsw28ud_richtext.lib wxmsw28ud_xrc.lib wxpngd.lib wxregexd.lib wxtiffd.lib wxzlibd.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib libglest.lib sdl.lib sdlmain.lib dsound.lib dxguid.lib Dbghelp.lib libcurl.lib ws2_32.lib xerces-c_3.lib"
OutputFile="$(OutDir)\megaglest_configurator.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;../../build/$(ConfigurationName)/libglest&quot;;../../source/win32_deps/lib"

View File

@ -41,10 +41,11 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\libxml2-2.7.7\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
@ -60,7 +61,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib libxml2_a.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;..\..\source\win32_deps\libxml2-2.7.7\win32\bin.msvc&quot;"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"

View File

@ -47,14 +47,15 @@ void Properties::load(const string &path, bool clearCurrentProperties) {
this->path= path;
#if defined(WIN32) && !defined(__MINGW32__)
FILE *fp = _wfopen(utf8_decode(path).c_str(), L"r");
wstring wstr = utf8_decode(path);
FILE *fp = _wfopen(wstr.c_str(), L"r");
ifstream fileStream(fp);
#else
ifstream fileStream;
fileStream.open(path.c_str(), ios_base::in);
#endif
if(fileStream.fail()){
if(fileStream.is_open() == false){
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
throw runtime_error("Can't open propertyMap file: " + path);
}
@ -111,7 +112,9 @@ void Properties::load(const string &path, bool clearCurrentProperties) {
fileStream.close();
#if defined(WIN32) && !defined(__MINGW32__)
fclose(fp);
if(fp) {
fclose(fp);
}
#endif
}