|
From: <hp...@us...> - 2014-08-26 23:50:33
|
Revision: 1450
http://sourceforge.net/p/scidavis/svn/1450
Author: hpcoder
Date: 2014-08-26 23:50:25 +0000 (Tue, 26 Aug 2014)
Log Message:
-----------
Fixes to the liborigin vendor branch to allow it to compile under MXE
Disable python on MXE build
Modified Paths:
--------------
branches/development/3rdparty/liborigin/Origin750Parser.h
branches/development/3rdparty/liborigin/opj2dat.cpp
branches/development/config.pri
branches/development/scidavis.pro
Modified: branches/development/3rdparty/liborigin/Origin750Parser.h
===================================================================
--- branches/development/3rdparty/liborigin/Origin750Parser.h 2014-07-23 07:16:21 UTC (rev 1449)
+++ branches/development/3rdparty/liborigin/Origin750Parser.h 2014-08-26 23:50:25 UTC (rev 1450)
@@ -35,6 +35,7 @@
#include "endianfstream.hh"
#include <string>
#include <cmath> // for floor()
+#include <stdlib.h>
using namespace std;
using namespace Origin;
Modified: branches/development/3rdparty/liborigin/opj2dat.cpp
===================================================================
--- branches/development/3rdparty/liborigin/opj2dat.cpp 2014-07-23 07:16:21 UTC (rev 1449)
+++ branches/development/3rdparty/liborigin/opj2dat.cpp 2014-08-26 23:50:25 UTC (rev 1450)
@@ -30,6 +30,7 @@
#include <cstdio>
#include <cmath>
#include <cstring>
+#include <sstream>
#include <string.h>
int main(int argc, char *argv[]) {
@@ -66,16 +67,20 @@
j+1,column.name.c_str(),column.type,spread.maxRows);
}
FILE *out;
- char * filename;
+ // char * filename;
int ioret;
-#ifndef WIN32
- ioret=asprintf(&filename,"%s.%d.dat",argv[1],s+1);
-#else
- ioret=asprintf(&filename,"%s.%d.dat",basename(argv[1]),s+1);
-#endif
- printf("saved to %s\n",filename);
- if((out=fopen(filename,"w")) == NULL ) {
- printf("Could not open %s",filename);
+ // RKS - why the different behaviour on Windows to unix?
+ // RKS - also previous code leaks
+//#ifndef WIN32
+// ioret=asprintf(&filename,"%s.%d.dat",argv[1],s+1);
+//#else
+// ioret=asprintf(&filename,"%s.%d.dat",basename(argv[1]),s+1);
+//#endif
+ std::ostringstream os;
+ os<<argv[1]<<"."<<s+1<<".dat";
+ printf("saved to %s\n",os.str().c_str());
+ if((out=fopen(os.str().c_str(),"w")) == NULL ) {
+ printf("Could not open %s",os.str().c_str());
return -1;
}
// header
Modified: branches/development/config.pri
===================================================================
--- branches/development/config.pri 2014-07-23 07:16:21 UTC (rev 1449)
+++ branches/development/config.pri 2014-08-26 23:50:25 UTC (rev 1450)
@@ -187,7 +187,9 @@
### building without muParser does not work yet (but will in a future version)
include( ../scidavis/muparser.pri )
### comment out the following line to deactivate Python scripting support
+!mxe {
include( ../scidavis/python.pri )
+}
### support for Origin OPJ import using liborigin2
DEFINES += ORIGIN_IMPORT
Modified: branches/development/scidavis.pro
===================================================================
--- branches/development/scidavis.pro 2014-07-23 07:16:21 UTC (rev 1449)
+++ branches/development/scidavis.pro 2014-08-26 23:50:25 UTC (rev 1450)
@@ -11,7 +11,12 @@
CONFIG+=ordered
# Overwrite the qmake generated Makefile by the cmake one
-system("cd 3rdparty/liborigin; rm CMakeCache.txt; cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_FLAGS:STRING=-DNO_CODE_GENERATION_FOR_LOG .")
+mxe {
+# urrgh! - maybe adding a qmake.pro file for liborigin might be better...
+ system("cd 3rdparty/liborigin; rm CMakeCache.txt; cmake -DCMAKE_TOOLCHAIN_FILE=/scratch/rks/github/mxe/usr/i686-pc-mingw32.static/share/cmake/mxe-conf.cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_FLAGS:STRING=-DNO_CODE_GENERATION_FOR_LOG .")
+} else {
+ system("cd 3rdparty/liborigin; rm CMakeCache.txt; cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_FLAGS:STRING=-DNO_CODE_GENERATION_FOR_LOG .")
+}
!mxe {
# optional fit plugins
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|