Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

Added support for MinGW #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/MdCharm/MdCharm.pro
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,23 @@ win32 {
RC_FILE = $$PWD/../res/mdcharm.rc
}

win32-g++ {
CONFIG += link_pkgconfig
PKGCONFIG += zlib hunspell breakpad-client
}

win32-msvc*:QMAKE_CXXFLAGS_RELEASE += -Zi
win32-msvc*:QMAKE_CFLAGS_RELEASE += -Zi
win32-msvc*:QMAKE_LFLAGS_RELEASE += /DEBUG /OPT:REF /OPT:ICF

INCLUDEPATH += ../lib/core ../lib/markdown/html \
../lib/markdown/src ../lib/crashdump \
../lib/zlib/zlib ../lib/pcre \
../lib/rapidxml

!win32-g++ {
INCLUDEPATH += ../lib/zlib/zlib ../lib/pcre
}

version_h.target = version.h

win32:version_h.commands = python.exe ../../src/MdCharm/version_h.py release
Expand Down Expand Up @@ -87,7 +95,6 @@ SOURCES += \
conf/configuredialog.cpp \
configuration.cpp \
conf/pages.cpp \
util/test/qregularexpression.cpp \
baseeditor/baseeditor.cpp \
about/aboutmdcharmdialog.cpp \
util/gui/findandreplace.cpp \
Expand Down
24 changes: 18 additions & 6 deletions src/MdCharm/util/zip/zipwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,24 @@
# ifndef S_IXUSR
# define S_IXUSR 0100
# endif
# define S_IRGRP 0040
# define S_IWGRP 0020
# define S_IXGRP 0010
# define S_IROTH 0004
# define S_IWOTH 0002
# define S_IXOTH 0001
# ifndef S_IRGRP
# define S_IRGRP 0040
# endif
# ifndef S_IWGRP
# define S_IWGRP 0020
# endif
# ifndef S_IXGRP
# define S_IXGRP 0010
# endif
# ifndef S_IROTH
# define S_IROTH 0004
# endif
# ifndef S_IWOTH
# define S_IWOTH 0002
# endif
# ifndef S_IXOTH
# define S_IXOTH 0001
# endif
#endif

static inline uint readUInt(const uchar *data)
Expand Down
9 changes: 7 additions & 2 deletions src/lib/core.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ TEMPLATE = lib

TARGET = core

win32: DEFINES == _EXPORTING
win32: DEFINES = _EXPORTING

CONFIG += warn_off

unix: CONFIG += static

markdown_parser_c.target = $$PWD/multimarkdown/src/markdown_parser.c
win32-msvc*: markdown_parser_c.commands = cmd /c $$PWD/multimarkdown/src/markdown_parser.bat
win32: markdown_parser_c.commands = cmd /c $$PWD/multimarkdown/src/markdown_parser.bat
unix: markdown_parser_c.commands = $$PWD/multimarkdown/src/markdown_parser.sh
markdown_parser_c.depends = markdown_parser_c_nonexist
markdown_parser_c.CONFIG += recursive
Expand All @@ -19,13 +19,18 @@ QMAKE_EXTRA_TARGETS += markdown_parser_c markdown_parser_c_nonexist
PRE_TARGETDEPS += $$PWD/multimarkdown/src/markdown_parser.c

#For pcre
!win32-g++: {
INCLUDEPATH += $$PWD/pcre
CONFIG(debug, debug|release){
LIBS += -L../debug -lmdcharm_pcre
} else {
LIBS += -L../release -lmdcharm_pcre
}
}

win32-g++: {
PKGCONFIG += libpcre16
}
#end pcre

CONFIG(release, debug|release){
Expand Down
1 change: 1 addition & 0 deletions src/lib/core/markdowntohtml.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DECLSPEC MarkdownToHtml
public:
const static int OUTPUT_UNIT = 512;
enum MarkdownToHtmlResult {
#undef ERROR
ERROR = -1,
NOTHING,
SUCCESS
Expand Down
10 changes: 9 additions & 1 deletion src/lib/crashdump/crashdump.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,12 @@ INCLUDEPATH += $$PWD
HEADERS += $$PWD/BreakpadHandler.h
SOURCES += $$PWD/BreakpadHandler.cpp

include($$PWD/gbreakpad/gbreakpad.pri)
!win32-g++ {
include($$PWD/gbreakpad/gbreakpad.pri)
}

win32-g++ {
CONFIG += link_pkgconfig
PKGCONFIG += breakpad-client
}

2 changes: 1 addition & 1 deletion src/lib/hunspell/hunspell.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ win32:DEPENDPATH += .

DEFINES -= HUNSPELL_WARNING_ON
DEFINES -= HUNSPELL_EXPERIMENTAL
win32-msvc*:DEFINES += BUILDING_LIBHUNSPELL
win32:DEFINES += BUILDING_LIBHUNSPELL

CONFIG(debug, debug|release){
TARGET = hunspell_d
Expand Down
3 changes: 1 addition & 2 deletions src/lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ CONFIG += ordered

SUBDIRS += crashdump
#SUBDIRS += markdown
SUBDIRS += hunspell
!win32-g++: SUBDIRS += hunspell pcre
SUBDIRS += multimarkdown/peg/leg.pro
SUBDIRS += pcre
SUBDIRS += core.pro

#SUBDIRS += zlib
Expand Down