Fix Windows gcc build. Needs some def to get w7+ windows api
This commit is contained in:
parent
07e3387fc1
commit
2f794be314
@ -23,6 +23,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include "mime.h"
|
#include "mime.h"
|
||||||
#include "mime-utils.h"
|
#include "mime-utils.h"
|
||||||
#include "mime-inputsource.h"
|
#include "mime-inputsource.h"
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include "mime.h"
|
#include "mime.h"
|
||||||
#include "mime-utils.h"
|
#include "mime-utils.h"
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "safewindows.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
#include "safewindows.h"
|
||||||
// gmtime is supposedly thread-safe on windows
|
// gmtime is supposedly thread-safe on windows
|
||||||
#define gmtime_r(A, B) gmtime(A)
|
#define gmtime_r(A, B) gmtime(A)
|
||||||
#define localtime_r(A,B) localtime(A)
|
#define localtime_r(A,B) localtime(A)
|
||||||
@ -19,6 +19,12 @@ typedef int mode_t;
|
|||||||
|
|
||||||
#else // End _MSC_VER -> Gminw
|
#else // End _MSC_VER -> Gminw
|
||||||
|
|
||||||
|
// Allow use of features specific to Windows 7 or later.
|
||||||
|
#define WINVER 0x0601
|
||||||
|
#define _WIN32_WINNT 0x0601
|
||||||
|
#define LOGFONTW void
|
||||||
|
#include "safewindows.h"
|
||||||
|
|
||||||
#undef RCL_ICONV_INBUF_CONST
|
#undef RCL_ICONV_INBUF_CONST
|
||||||
#define timegm portable_timegm
|
#define timegm portable_timegm
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include "idxstatus.h"
|
#include "idxstatus.h"
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,8 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include "cstr.h"
|
#include "cstr.h"
|
||||||
#include "mimehandler.h"
|
#include "mimehandler.h"
|
||||||
|
|||||||
@ -14,6 +14,8 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include "docseqhist.h"
|
#include "docseqhist.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "filtseq.h"
|
#include "filtseq.h"
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
// Takes a query and run it, no gui, results to stdout
|
// Takes a query and run it, no gui, results to stdout
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@ -14,10 +14,13 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
#include "autoconfig.h"
|
||||||
|
|
||||||
|
#include "sortseq.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "sortseq.h"
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|||||||
@ -1701,7 +1701,7 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi, Doc &doc)
|
|||||||
// won't work).
|
// won't work).
|
||||||
time_t mtime = atoll(doc.dmtime.empty() ? doc.fmtime.c_str() :
|
time_t mtime = atoll(doc.dmtime.empty() ? doc.fmtime.c_str() :
|
||||||
doc.dmtime.c_str());
|
doc.dmtime.c_str());
|
||||||
struct tm tmb{0};
|
struct tm tmb{0,0,0,0,0,0,0,0,0};
|
||||||
localtime_r(&mtime, &tmb);
|
localtime_r(&mtime, &tmb);
|
||||||
char buf[50]; // It's actually 9, but use 50 to suppress warnings.
|
char buf[50]; // It's actually 9, but use 50 to suppress warnings.
|
||||||
snprintf(buf, 50, "%04d%02d%02d",
|
snprintf(buf, 50, "%04d%02d%02d",
|
||||||
|
|||||||
@ -119,7 +119,9 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <shlobj_core.h>
|
//#include <shlobj_core.h>
|
||||||
|
#include <Shlobj.h>
|
||||||
|
|
||||||
/// Convert \ separators to /
|
/// Convert \ separators to /
|
||||||
void path_slashize(string& s)
|
void path_slashize(string& s)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -22,8 +22,8 @@ test -d $DESTDIR || mkdir $DESTDIR || fatal cant create $DESTDIR
|
|||||||
################################
|
################################
|
||||||
# Local values (to be adjusted)
|
# Local values (to be adjusted)
|
||||||
|
|
||||||
BUILD=MSVC
|
#BUILD=MSVC
|
||||||
#BUILD=MINGW
|
BUILD=MINGW
|
||||||
|
|
||||||
if test $BUILD = MSVC ; then
|
if test $BUILD = MSVC ; then
|
||||||
# Recoll src tree
|
# Recoll src tree
|
||||||
@ -40,14 +40,14 @@ if test $BUILD = MSVC ; then
|
|||||||
PYRECOLL=${RCL}/python/recoll/
|
PYRECOLL=${RCL}/python/recoll/
|
||||||
else
|
else
|
||||||
# Recoll src tree
|
# Recoll src tree
|
||||||
RCL=c:/recoll/src/
|
RCL=/c/recoll/src/
|
||||||
# Recoll dependancies
|
# Recoll dependancies
|
||||||
RCLDEPS=c:/recolldeps/
|
RCLDEPS=/c/recolldeps/
|
||||||
QTA=Desktop_Qt_5_8_0_MinGW_32bit-Release/release
|
QTA=Desktop_Qt_5_8_0_MinGW_32bit-Release/release/
|
||||||
LIBXAPIAN=${RCLDEPS}/mingw/xapian-core-1.4.11/.libs/libxapian-30.dll
|
LIBXAPIAN=${RCLDEPS}/mingw/xapian-core-1.4.11/.libs/libxapian-30.dll
|
||||||
ZLIB=${RCLDEPS}/mingw/zlib-1.2.8
|
ZLIB=${RCLDEPS}/mingw/zlib-1.2.8
|
||||||
QTGCCBIN=C:/qt/Qt5.8.0/Tools/mingw530_32/bin/
|
QTGCCBIN=C:/qt/Qt5.8.0/Tools/mingw530_32/bin/
|
||||||
QTBIN=C:/Qt/Qt5.8.0/5.8/mingw53_32/bin
|
QTBIN=C:/Qt/Qt5.8.0/5.8/mingw53_32/bin/
|
||||||
MINGWBIN=$QTBIN
|
MINGWBIN=$QTBIN
|
||||||
PATH=$MINGWBIN:$QTGCCBIN:$PATH
|
PATH=$MINGWBIN:$QTGCCBIN:$PATH
|
||||||
export PATH
|
export PATH
|
||||||
@ -132,8 +132,9 @@ copyqt()
|
|||||||
|
|
||||||
copypython()
|
copypython()
|
||||||
{
|
{
|
||||||
mkdir -p $DESTDIR/Share/filters/python
|
set -x
|
||||||
rsync -av $PYTHON/* $DESTDIR/Share/filters/python
|
mkdir -p ${DESTDIR}Share/filters/python
|
||||||
|
rsync -av $PYTHON/ ${DESTDIR}Share/filters/python || exit 1
|
||||||
chkcp $PYTHON/python.exe $DESTDIR/Share/filters/python/python.exe
|
chkcp $PYTHON/python.exe $DESTDIR/Share/filters/python/python.exe
|
||||||
chkcp $MISC/hwp5html $FILTERS
|
chkcp $MISC/hwp5html $FILTERS
|
||||||
}
|
}
|
||||||
@ -158,7 +159,7 @@ copyrecoll()
|
|||||||
chkcp $RCL/doc/user/usermanual.html $DESTDIR/Share/doc
|
chkcp $RCL/doc/user/usermanual.html $DESTDIR/Share/doc
|
||||||
chkcp $RCL/doc/user/docbook-xsl.css $DESTDIR/Share/doc
|
chkcp $RCL/doc/user/docbook-xsl.css $DESTDIR/Share/doc
|
||||||
mkdir -p $DESTDIR/Share/doc/webhelp
|
mkdir -p $DESTDIR/Share/doc/webhelp
|
||||||
rsync -av $RCL/doc/user/webhelp/docs/* $DESTDIR/Share/doc/webhelp
|
rsync -av $RCL/doc/user/webhelp/docs/* $DESTDIR/Share/doc/webhelp || exit 1
|
||||||
chkcp $RCL/sampleconf/fields $DESTDIR/Share/examples
|
chkcp $RCL/sampleconf/fields $DESTDIR/Share/examples
|
||||||
chkcp $RCL/sampleconf/fragbuts.xml $DESTDIR/Share/examples
|
chkcp $RCL/sampleconf/fragbuts.xml $DESTDIR/Share/examples
|
||||||
chkcp $RCL/windows/mimeconf $DESTDIR/Share/examples
|
chkcp $RCL/windows/mimeconf $DESTDIR/Share/examples
|
||||||
@ -184,7 +185,7 @@ copyantiword()
|
|||||||
bindir=$ANTIWORD/
|
bindir=$ANTIWORD/
|
||||||
test -d $Filters/Resources || mkdir -p $FILTERS/Resources || exit 1
|
test -d $Filters/Resources || mkdir -p $FILTERS/Resources || exit 1
|
||||||
chkcp $bindir/antiword.exe $FILTERS
|
chkcp $bindir/antiword.exe $FILTERS
|
||||||
rsync -av $ANTIWORD/Resources/* $FILTERS/Resources
|
rsync -av $ANTIWORD/Resources/* $FILTERS/Resources || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
copyunrtf()
|
copyunrtf()
|
||||||
|
|||||||
@ -143,7 +143,7 @@ windows {
|
|||||||
$$RECOLLDEPS/mingw/libxml2/libxml2-2.9.4+dfsg1/win32/bin.mingw/libxml2.a \
|
$$RECOLLDEPS/mingw/libxml2/libxml2-2.9.4+dfsg1/win32/bin.mingw/libxml2.a \
|
||||||
$$RECOLLDEPS/mingw/xapian-core-1.4.11/.libs/libxapian-30.dll \
|
$$RECOLLDEPS/mingw/xapian-core-1.4.11/.libs/libxapian-30.dll \
|
||||||
$$RECOLLDEPS/mingw/zlib-1.2.8/zlib1.dll \
|
$$RECOLLDEPS/mingw/zlib-1.2.8/zlib1.dll \
|
||||||
-lshell32 -liconv -lshlwapi -lpsapi -lkernel32
|
-luuid -luser32 -lshell32 -liconv -lshlwapi -lpsapi -lkernel32
|
||||||
INCLUDEPATH += ../../windows \
|
INCLUDEPATH += ../../windows \
|
||||||
$$RECOLLDEPS/mingw/xapian-core-1.4.11/include \
|
$$RECOLLDEPS/mingw/xapian-core-1.4.11/include \
|
||||||
$$RECOLLDEPS/mingw/libxslt/libxslt-1.1.29/ \
|
$$RECOLLDEPS/mingw/libxslt/libxslt-1.1.29/ \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user