mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
Win-specific: Tune code for compilation with MS Visual Studio
This commit is contained in:
parent
81a7ea2983
commit
032f5c8337
11
README.md
11
README.md
|
@ -86,6 +86,17 @@ Then, invoke `make clean` before `make` because the setting change:
|
||||||
|
|
||||||
make clean && make
|
make clean && make
|
||||||
|
|
||||||
|
### Building under Windows with MS Visual Studio
|
||||||
|
|
||||||
|
To build GoldenDict with Visual Studio take one of next library packs and unpack it to `"winlibs/lib/msvc"` folder in GoldenDict sources folder.
|
||||||
|
[GoldenDict_libs_VS2013_x86.7z](http://www.mediafire.com/download/d3jrbsnco6ox4d8/GoldenDict_libs_VS2013_x86.7z) - for MS Visual Studio 2013, 32 bit
|
||||||
|
[GoldenDict_libs_VS2013_x64.7z](http://www.mediafire.com/download/21lun6uj51hnk3s/GoldenDict_libs_VS2013_x64.7z) - for MS Visual Studio 2013, 64 bit
|
||||||
|
|
||||||
|
To create project files for Visual Studio you can pass `"-tp vc"` option to `qmake`.
|
||||||
|
|
||||||
|
Note: In Qt 5.6.0 and later the `Webkit` module was removed from official release builds. You should to build it from sources to compile GoldenDict.
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Installation is an optional step since the built binary can be used as-is without installation. But you can properly install via:
|
Installation is an optional step since the built binary can be used as-is without installation. But you can properly install via:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
#include <stdint_msvc.h>
|
#include <stdint_msvc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <qglobal.h>
|
#include <qglobal.h>
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
#include <stdint_msvc.h>
|
#include <stdint_msvc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
#include <stdint_msvc.h>
|
#include <stdint_msvc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <stdint_msvc.h>
|
|
||||||
#else
|
|
||||||
#include <stdint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace ChunkedStorage {
|
namespace ChunkedStorage {
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "file.hh"
|
#include "file.hh"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
#include <stdint_msvc.h>
|
#include <stdint_msvc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QtXml>
|
#include <QtXml>
|
||||||
#include "gddebug.hh"
|
#include "gddebug.hh"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
#include <stdint_msvc.h>
|
#include <stdint_msvc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <stub_msvc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <eb/eb.h>
|
#include <eb/eb.h>
|
||||||
|
|
||||||
namespace Epwing {
|
namespace Epwing {
|
||||||
|
|
|
@ -44,14 +44,14 @@ win32 {
|
||||||
DEFINES += __WIN32 _CRT_SECURE_NO_WARNINGS
|
DEFINES += __WIN32 _CRT_SECURE_NO_WARNINGS
|
||||||
contains(QMAKE_TARGET.arch, x86_64) {
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
DEFINES += NOMINMAX __WIN64
|
DEFINES += NOMINMAX __WIN64
|
||||||
LIBS += -L$${PWD}/winlibs/lib/msvc/x64
|
|
||||||
} else {
|
|
||||||
LIBS += -L$${PWD}/winlibs/lib/msvc
|
|
||||||
}
|
}
|
||||||
|
LIBS += -L$${PWD}/winlibs/lib/msvc
|
||||||
QMAKE_CXXFLAGS += /wd4290 # silence the warning C4290: C++ exception specification ignored
|
QMAKE_CXXFLAGS += /wd4290 # silence the warning C4290: C++ exception specification ignored
|
||||||
QMAKE_LFLAGS_RELEASE += /LTCG /OPT:REF /OPT:ICF
|
QMAKE_LFLAGS_RELEASE += /OPT:REF /OPT:ICF
|
||||||
# QMAKE_CXXFLAGS_RELEASE += /GL # slows down the linking significantly
|
# QMAKE_CXXFLAGS_RELEASE += /GL # slows down the linking significantly
|
||||||
LIBS += -lshell32 -luser32 -lsapi -lole32 -lhunspell
|
LIBS += -lshell32 -luser32 -lsapi -lole32
|
||||||
|
Debug: LIBS+= -lhunspelld
|
||||||
|
Release: LIBS+= -lhunspell
|
||||||
HUNSPELL_LIB = hunspell
|
HUNSPELL_LIB = hunspell
|
||||||
} else {
|
} else {
|
||||||
LIBS += -lhunspell-1.3.2
|
LIBS += -lhunspell-1.3.2
|
||||||
|
@ -483,7 +483,12 @@ CONFIG( chinese_conversion_support ) {
|
||||||
chineseconversion.hh
|
chineseconversion.hh
|
||||||
SOURCES += chinese.cc \
|
SOURCES += chinese.cc \
|
||||||
chineseconversion.cc
|
chineseconversion.cc
|
||||||
LIBS += -lopencc
|
win32-msvc* {
|
||||||
|
Debug: LIBS += -lopenccd
|
||||||
|
Release: LIBS += -lopencc
|
||||||
|
} else {
|
||||||
|
LIBS += -lopencc
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RESOURCES += resources.qrc \
|
RESOURCES += resources.qrc \
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#ifndef __HUNSPELL_HH_INCLUDED__
|
#ifndef __HUNSPELL_HH_INCLUDED__
|
||||||
#define __HUNSPELL_HH_INCLUDED__
|
#define __HUNSPELL_HH_INCLUDED__
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define HUNSPELL_STATIC
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "dictionary.hh"
|
#include "dictionary.hh"
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
#include "langcoder.hh"
|
#include "langcoder.hh"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#ifdef _MSC_VER
|
|
||||||
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
#include <stdint_msvc.h>
|
#include <stdint_msvc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -19,9 +19,13 @@
|
||||||
#ifndef __RIPEMD_HH_INCLUDED__
|
#ifndef __RIPEMD_HH_INCLUDED__
|
||||||
#define __RIPEMD_HH_INCLUDED__
|
#define __RIPEMD_HH_INCLUDED__
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#if defined( _MSC_VER ) && _MSC_VER < 1800 // VS2012 and older
|
||||||
|
#include <stdint_msvc.h>
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class RIPEMD128
|
class RIPEMD128
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue