Fixed compilation on Visual C++.
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1351 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
35523c6cf4
commit
a537d60571
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="_sgpem"
|
||||
ProjectGUID="{8B810FB6-B138-45B0-AB81-228076316780}"
|
||||
RootNamespace="_sgpem"
|
||||
|
@ -68,7 +68,7 @@
|
|||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="
"
|
||||
AdditionalDependencies="python24.lib backend.lib"
|
||||
AdditionalDependencies="python27.lib backend.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -98,6 +98,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="move "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.dll" "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.pyd""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -135,6 +136,7 @@
|
|||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4275;4290;4661;4251;4297"
|
||||
ForcedIncludeFiles="config.h"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -148,7 +150,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="python24.lib backend.lib"
|
||||
AdditionalDependencies="python27.lib backend.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -180,6 +182,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="move "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.dll" "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.pyd""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="backend"
|
||||
ProjectGUID="{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}"
|
||||
RootNamespace="backend"
|
||||
|
@ -127,7 +127,7 @@
|
|||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4275;4290"
|
||||
DisableSpecificWarnings="4275;4290;4661;4251"
|
||||
ForcedIncludeFiles="config.h"
|
||||
/>
|
||||
<Tool
|
||||
|
|
|
@ -19,5 +19,5 @@
|
|||
#endif
|
||||
|
||||
#ifndef SHAREDIR
|
||||
#define SHAREDIR ".\\plugins\\extras\\pyloader"
|
||||
#define SHAREDIR "\\plugins\\extras\\pyloader"
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="pyloader"
|
||||
ProjectGUID="{4054CAB1-7F6D-4FC7-884D-9B823F996679}"
|
||||
RootNamespace="pyloader"
|
||||
|
@ -66,7 +66,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="backend.lib python24.lib"
|
||||
AdditionalDependencies="backend.lib python27.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -133,6 +133,7 @@
|
|||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4275;4290;4661;4251"
|
||||
ForcedIncludeFiles="config.h"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -146,7 +147,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="backend.lib python24.lib"
|
||||
AdditionalDependencies="backend.lib python27.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
||||
GenerateDebugInformation="true"
|
||||
|
|
|
@ -29,24 +29,24 @@ Global
|
|||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Debug|Win32.Build.0 = Release|Win32
|
||||
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Release|Win32.Build.0 = Release|Win32
|
||||
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Debug|Win32.Build.0 = Release|Win32
|
||||
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Release|Win32.Build.0 = Release|Win32
|
||||
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Debug|Win32.Build.0 = Release|Win32
|
||||
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Release|Win32.Build.0 = Release|Win32
|
||||
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Debug|Win32.Build.0 = Release|Win32
|
||||
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Release|Win32.Build.0 = Release|Win32
|
||||
{8B810FB6-B138-45B0-AB81-228076316780}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{8B810FB6-B138-45B0-AB81-228076316780}.Debug|Win32.Build.0 = Release|Win32
|
||||
{8B810FB6-B138-45B0-AB81-228076316780}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8B810FB6-B138-45B0-AB81-228076316780}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8B810FB6-B138-45B0-AB81-228076316780}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8B810FB6-B138-45B0-AB81-228076316780}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="sgpemv2"
|
||||
ProjectGUID="{C0BAA36E-0699-4885-8123-9906CC7845E5}"
|
||||
RootNamespace="sgpemv2"
|
||||
|
@ -25,8 +25,8 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Copy glade stuff"
|
||||
CommandLine="copy "$(SolutionDir)..\..\glade\*.glade" "$(SolutionDir)$(ConfigurationName)\glade"
copy "$(SolutionDir)..\..\data\logo.png" "$(SolutionDir)$(ConfigurationName)\glade"
"
|
||||
Description="Copy stuff"
|
||||
CommandLine="copy "$(SolutionDir)..\..\ui\*.ui" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\data\logo.png" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\src\testsuite\scheduling-wizards\environments" "$(SolutionDir)$(ConfigurationName)\examples"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -43,8 +43,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..";"$(GTKMM_BASEPATH)\lib\cairomm-1.0\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH;UIDIR=""./ui"";EXAMPLESDIR=""./examples"""
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -109,8 +109,8 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Copy glade stuff"
|
||||
CommandLine="copy "$(SolutionDir)..\..\glade\*.glade" "$(SolutionDir)$(ConfigurationName)\glade"
copy "$(SolutionDir)..\..\data\logo.png" "$(SolutionDir)$(ConfigurationName)\glade"
"
|
||||
Description="Copy stuff"
|
||||
CommandLine="copy "$(SolutionDir)..\..\ui\*.ui" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\data\logo.png" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\src\testsuite\scheduling-wizards\environments" "$(SolutionDir)$(ConfigurationName)\examples"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
@ -126,13 +126,14 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..";"$(GTKMM_BASEPATH)\lib\cairomm-1.0\include""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH;UIDIR=""./ui"";EXAMPLESDIR=""./examples"""
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4275;4290;4661;4251;4267;4996;4181"
|
||||
ForcedIncludeFiles="config.h"
|
||||
/>
|
||||
<Tool
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="xmlsave"
|
||||
ProjectGUID="{7B477FAB-6E10-4347-9244-AC15D3A36670}"
|
||||
RootNamespace="xmlsave"
|
||||
|
@ -129,6 +129,7 @@
|
|||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4275;4290;4661;4251"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include <glibmm/fileutils.h>
|
||||
#include <glibmm/pattern.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <glibmm/miscutils.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
@ -71,11 +75,24 @@ PythonCPUPolicyManager::PythonCPUPolicyManager()
|
|||
|
||||
GlobalPreferences& prefs = GlobalPreferences::get_instance();
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Ensure relocation is possible on WIN32, relative paths don't appear
|
||||
// to work anymore
|
||||
Glib::ustring wdir = Glib::get_current_dir();
|
||||
#endif
|
||||
|
||||
Glib::ustring importdirs = "import sys; sys.path[:0] = [ ";
|
||||
for_each(prefs.get_policy_dirs().begin(),
|
||||
prefs.get_policy_dirs().end(),
|
||||
pol_dirs_concat(importdirs));
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Ensure relocation is possible on WIN32, relative paths don't appear
|
||||
// to work anymore
|
||||
importdirs += Glib::ustring(" '") + wdir + SHAREDIR + "' ]\n";
|
||||
#else
|
||||
importdirs += " '" SHAREDIR "' ]\n";
|
||||
#endif
|
||||
|
||||
PyRun_SimpleString(importdirs.c_str());
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#ifndef DOWN_CAST_TCC
|
||||
#define DOWN_CAST_TCC 1
|
||||
|
||||
#if not defined(NDEBUG) && not defined(_MSC_VER)
|
||||
#if !defined(NDEBUG) && !defined(_MSC_VER)
|
||||
#include <sys/types.h>
|
||||
#include <typeinfo>
|
||||
#include <iostream>
|
||||
|
@ -115,7 +115,7 @@ namespace sgpem
|
|||
template<typename From>
|
||||
inline To* operator()(From* obj) const
|
||||
{
|
||||
#if not defined(NDEBUG) && not defined(_MSC_VER)
|
||||
#if !defined(NDEBUG) && !defined(_MSC_VER)
|
||||
To* check_ptr = dynamic_cast<To*>(obj);
|
||||
if(check_ptr == NULL)
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ ConfigurePolicyDialog::ConfigurePolicyDialog(const Glib::ustring& title,
|
|||
|
||||
// Add final buttons, and we're done.
|
||||
add_button(Stock::CANCEL, RESPONSE_CANCEL);
|
||||
HButtonBox& bbox = *get_action_area();
|
||||
ButtonBox& bbox = *get_action_area();
|
||||
Button& okay_bt = *manage(new Button(Stock::OK));
|
||||
okay_bt.set_flags(CAN_DEFAULT);
|
||||
set_default(okay_bt);
|
||||
|
|
|
@ -213,11 +213,18 @@ SimulationController::run_simulation_adaptor()
|
|||
}
|
||||
catch(const CPUPolicyException& cpe)
|
||||
{
|
||||
#ifndef _MSC_VER
|
||||
// Fatal error. We should never get here.
|
||||
// Won't compile on Visual C++, what an idiotic compiler. Apparently he can't symphatize with the way
|
||||
// Glib::ustring::compose() is written...
|
||||
std::cerr << Glib::ustring::compose(
|
||||
_(" [EE] Fatal error. Impossible to deactivate the policy in file %1:%2"), __FILE__, __LINE__)
|
||||
<< std::endl << _(" [EE] ") << cpe.what() << std::endl;
|
||||
;
|
||||
#else
|
||||
// Fatal error. We should never get here.
|
||||
std::cerr << _(" [EE] Fatal error. Impossible to deactivate the policy in file ") << __FILE__ << ":" << __LINE__
|
||||
<< std::endl << _(" [EE] ") << cpe.what() << std::endl;
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue