Skip to content

Commit

Permalink
Window 64 bits compilation without Bpm
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-petitdemange committed Jul 30, 2013
1 parent df3a3f6 commit 0680cb0
Show file tree
Hide file tree
Showing 13 changed files with 283 additions and 45 deletions.
14 changes: 14 additions & 0 deletions build/msvc/9.0/LimaCore/LimaCore.sln
Expand Up @@ -14,21 +14,35 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|Win32.ActiveCfg = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|Win32.Build.0 = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|x64.ActiveCfg = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|x64.Build.0 = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|Win32.ActiveCfg = Release|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|Win32.Build.0 = Release|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|x64.ActiveCfg = Release|x64
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|x64.Build.0 = Release|x64
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|Win32.ActiveCfg = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|Win32.Build.0 = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|x64.ActiveCfg = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|x64.Build.0 = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.ActiveCfg = Release|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.Build.0 = Release|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|x64.ActiveCfg = Release|x64
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|x64.Build.0 = Release|x64
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.ActiveCfg = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.Build.0 = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|x64.ActiveCfg = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|x64.Build.0 = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.ActiveCfg = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.Build.0 = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|x64.ActiveCfg = Release|x64
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
183 changes: 183 additions & 0 deletions build/msvc/9.0/LimaCore/LimaCore.vcproj
Expand Up @@ -12,6 +12,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
Expand Down Expand Up @@ -95,6 +98,86 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
AdditionalDependencies=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\control\src;&quot;..\..\..\..\third-party\Processlib\tasks\include&quot;;&quot;..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;&quot;..\..\..\..\third-party\Processlib\core\include&quot;;..\..\..\..\control\software_operation\include;..\..\..\..\control\include;..\..\..\..\hardware\include;..\..\..\..\common\include;&quot;..\..\..\..\third-party\libconfig\lib&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIMACORE_EXPORTS;WITH_CONFIG;WITHOUT_GSL"
MinimalRebuild="true"
BasicRuntimeChecks="0"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
DefaultCharIsUnsigned="false"
TreatWChar_tAsBuiltInType="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(InputDir)..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\x64\Debug\libprocesslib.lib $(InputDir)..\..\..\..\third-party\libconfig\lib\libconfig++.Debug\libconfig++_d.lib"
OutputFile="$(InputDir)$(IntDir)\$(ProjectName).dll"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\Debug&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
Expand Down Expand Up @@ -179,6 +262,91 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
AdditionalDependencies=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\..\..\control\src;&quot;..\..\..\..\third-party\Processlib\tasks\include&quot;;&quot;..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;&quot;..\..\..\..\third-party\Processlib\core\include&quot;;..\..\..\..\control\software_operation\include;..\..\..\..\control\include;..\..\..\..\hardware\include;..\..\..\..\common\include;&quot;..\..\..\..\third-party\libconfig\lib&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIMACORE_EXPORTS;WITH_CONFIG;WITHOUT_GSL"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
ExpandAttributedSource="false"
AssemblerOutput="0"
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(InputDir)..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\$(IntDir)\libprocesslib.lib $(InputDir)..\..\..\..\third-party\libconfig\lib\$(IntDir)\libconfig++.lib"
OutputFile="$(InputDir)$(IntDir)\$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\Release&quot;;&quot;..\..\..\..\third-party\libconfig\lib\x64\Release\&quot;"
GenerateDebugInformation="true"
GenerateMapFile="true"
MapExports="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_Win7_Sync|Win32"
OutputDirectory="$(SolutionDir)Release"
Expand Down Expand Up @@ -388,6 +556,10 @@
RelativePath="..\..\..\..\hardware\src\HwMaxImageSizeCallback.cpp"
>
</File>
<File
RelativePath="..\..\..\..\hardware\src\HwReconstructionCtrlObj.cpp"
>
</File>
<File
RelativePath="..\..\..\..\hardware\src\HwRoiCtrlObj.cpp"
>
Expand Down Expand Up @@ -418,6 +590,17 @@
CompileAsManaged="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
EnableIntrinsicFunctions="true"
IgnoreStandardIncludePath="false"
DefaultCharIsUnsigned="false"
CompileAsManaged="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\..\hardware\src\HwVideoCtrlObj.cpp"
Expand Down
2 changes: 2 additions & 0 deletions compilation-env-python27-64bit.bat
@@ -0,0 +1,2 @@
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat"
3 changes: 2 additions & 1 deletion control/software_operation/sip/SoftOpId.sip
Expand Up @@ -307,9 +307,10 @@ using namespace lima;
public:
SoftOpBpm();
virtual ~SoftOpBpm();
%If(!WIN64_PLATFORM)
Tasks::BpmTask* getTask();
Tasks::BpmManager* getManager();
%End
};

class SoftOpFlatfieldCorrection
Expand Down
12 changes: 12 additions & 0 deletions control/software_operation/src/SoftOpId.cpp
Expand Up @@ -82,25 +82,37 @@ void SoftOpBinning::addTo(TaskMgr &aMgr,int stage)
SoftOpBpm::SoftOpBpm() :
SoftOpBaseClass()
{
#ifndef WITHOUT_GSL
m_manager = new Tasks::BpmManager(DEFAULT_HISTORY_SIZE);
m_task = new Tasks::BpmTask(*m_manager);
#else
throw Exception(Control,Error, "Bpm not available because it wasn't compiled with gsl support ",
__FILE__, __FUNCTION__, __LINE__,NULL);
#endif

}

SoftOpBpm::~SoftOpBpm()
{
#ifndef WITHOUT_GSL
m_task->unref();
m_manager->unref();
#endif
}


void SoftOpBpm::addTo(TaskMgr &aMgr,int stage)
{
#ifndef WITHOUT_GSL
aMgr.addSinkTask(stage,m_task);
#endif
}

void SoftOpBpm::prepare()
{
#ifndef WITHOUT_GSL
m_manager->resetHistory();
#endif
}

//-------------------- FLATFIELDCORRECTION --------------------
Expand Down
2 changes: 1 addition & 1 deletion hardware/sip/HwBufferMgr.sip
Expand Up @@ -152,7 +152,7 @@ using namespace lima;
void getFrameDim( FrameDim& frame_dim /Out/);

void setNbConcatFrames(int nb_concat_frames);
void getNbConcatFrames(int& nb_concat_frames /out/);
void getNbConcatFrames(int& nb_concat_frames /Out/);

void setNbBuffers(int nb_buffers);
void getNbBuffers(int& nb_buffers /Out/);
Expand Down
5 changes: 3 additions & 2 deletions hardware/sip/HwFrameInfo.sip
Expand Up @@ -33,7 +33,8 @@ using namespace lima;

int acq_frame_nb;

void *frame_data;
void *frame_data
{
%GetCode
if(!sipCpp->frame_ptr || !sipCpp->frame_dim.isValid())
Py_RETURN_NONE;
Expand Down Expand Up @@ -95,7 +96,7 @@ if(!sipErr)
}
Py_DECREF(tmpObject);
%End

};
Timestamp frame_timestamp;
int valid_pixels;
HwFrameInfoType::OwnerShip buffer_owner_ship;
Expand Down
16 changes: 11 additions & 5 deletions sip/configure.py
Expand Up @@ -205,7 +205,10 @@ def main():
# Run SIP to generate the code.
# module's specification files using the -I flag.
if platform.system() == 'Windows':
plat = 'WIN32_PLATFORM'
if platform.machine() == 'AMD64':
plat = 'WIN64_PLATFORM'
else:
plat = 'WIN32_PLATFORM'
else:
plat = 'POSIX_PLATFORM'
cmd = " ".join([config.sip_bin,"-g", "-e","-c", '.','-t',plat,
Expand Down Expand Up @@ -250,14 +253,17 @@ def main():
if modName != 'core' :
makefile.extra_libs += ['liblimacore']
makefile.extra_cxxflags = ['/EHsc','/DWITH_CONFIG'] + extra_cxxflags
#libpath = 'build\msvc\9.0\*\Debug'
libpath = 'build\msvc\9.0\*\Release'
#makefile.extra_lib_dirs = glob.glob(os.path.join(rootName('build'),'msvc','9.0','*','Release'))
if platform.machine() == 'AMD64':
libpath = 'build\msvc\9.0\*\\x64\Release'
makefile.extra_cxxflags.append('/DWITHOUT_GSL')
else:
libpath = 'build\msvc\9.0\*\Release'

makefile.extra_lib_dirs += glob.glob(os.path.join(rootName(''),libpath))
makefile.extra_lib_dirs += glob.glob(os.path.join(rootName('third-party\Processlib'), libpath))
makefile.extra_lib_dirs += glob.glob(os.path.join(rootName('camera'),modName, libpath))
makefile.extra_lib_dirs += [os.path.join(rootName('third-party\libconfig'),'lib','libconfig++.Release')]
makefile.extra_lib_dirs += glob.glob(os.path.join(rootName('third-party\libconfig'),'lib','libconfig++.Release'))
makefile.extra_lib_dirs += glob.glob(os.path.join(rootName('third-party\libconfig'),'lib','x64','Release'))

if(modName == 'basler') :
makefile.extra_lib_dirs += ['%s\library\cpp\lib\win32_i86' % os.environ['PYLON_GENICAM_ROOT']]
Expand Down
4 changes: 2 additions & 2 deletions sip/core/limacore.sip
Expand Up @@ -19,9 +19,9 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//###########################################################################
%Module limacore 0
%Module(name=limacore,version=0)

%Platforms {WIN32_PLATFORM POSIX_PLATFORM}
%Platforms {WIN32_PLATFORM WIN64_PLATFORM POSIX_PLATFORM}

%ModuleHeaderCode
#include <SoftOpId.h>
Expand Down
2 changes: 1 addition & 1 deletion sip/limamodules.sip.in
@@ -1,4 +1,4 @@
%Module lima%NAME 0
%Module(name=lima%NAME,version=0)

%ModuleHeaderCode
extern "C" { void lima_import_array();}
Expand Down
2 changes: 1 addition & 1 deletion third-party/Processlib
Submodule Processlib updated from 0ddbe1 to 39fa71
2 changes: 1 addition & 1 deletion third-party/libconfig
Submodule libconfig updated 2 files
+1 −0 .gitignore
+145 −0 lib/libconfig++.vcproj

0 comments on commit 0680cb0

Please sign in to comment.