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