Skip to content

Commit d18ee7e

Browse files
committed
Use Automake to build on Windows
Remove the old Makefile.mingw makefile and use the normal Unix makefile, running the build under MSYS2 environment. Update the README file accordingly. This is possible now that MSYS2 matured significantly and includes all dependencies in their repository.
1 parent 213c98e commit d18ee7e

File tree

5 files changed

+61
-320
lines changed

5 files changed

+61
-320
lines changed

Makefile.am

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,15 @@ diff_pdf_SOURCES = \
1111
diff_pdf_CXXFLAGS = $(POPPLER_CFLAGS) $(WX_CXXFLAGS)
1212
diff_pdf_LDADD = $(POPPLER_LIBS) $(WX_LIBS)
1313

14-
EXTRA_DIST = gtk-zoom-in.xpm gtk-zoom-out.xpm
14+
EXTRA_DIST = gtk-zoom-in.xpm gtk-zoom-out.xpm win32/fonts.conf win32/collect-dlls.sh
15+
16+
windows-dist: diff-pdf-$(VERSION).zip
17+
18+
diff-pdf-$(VERSION).zip: all
19+
rm -rf $@ windist
20+
$(srcdir)/win32/collect-dlls.sh windist diff-pdf.exe
21+
mkdir -p windist/fonts && cp -a $(srcdir)/win32/fonts.conf windist/fonts/
22+
(cd windist && zip -9r ../$@ .)
23+
rm -rf windist
24+
25+
.PHONY: windows-dist

Makefile.mingw

Lines changed: 0 additions & 293 deletions
This file was deleted.

README.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ See the output of `$ diff-pdf --help` for complete list of options.
3434

3535
## Obtaining the binaries
3636

37-
Precompiled version of the tool for Windows is available from our
38-
[downloads](http://www.tt-solutions.com/downloads/diff-pdf-2012-02-28.zip)
39-
section -- the ZIP archive contains everything you need to run diff-pdf. It will
37+
Precompiled version of the tool for Windows is available as part of
38+
[the latest release](https://github.com/vslavik/diff-pdf/releases/tag/v0.3)
39+
as a ZIP archive, which contains everything you need to run diff-pdf. It will
4040
work from any place you unpack it to.
4141

4242
On Mac, if you use [Homebrew](https://brew.sh), you can use it to install diff-pdf with it:
@@ -84,7 +84,7 @@ $ sudo apt-get install make automake g++
8484
$ sudo apt-get install libpoppler-glib-dev poppler-utils wxgtk3.0-dev
8585
```
8686

87-
#### OSX:
87+
#### macOS:
8888
Install Command Line Tools for Xcode:
8989

9090
```
@@ -108,40 +108,37 @@ libraries Cairo and Poppler use are normally available. At the time of writing,
108108
transitive cover of the above dependencies included fontconfig, freetype, glib,
109109
libpng, pixman, gettext, libiconv, libjpeg and zlib.
110110

111-
Precompiled version of the dependencies for Windows, built with MinGW, are
112-
available from our [downlods](http://github.com/vslavik/diff-pdf/downloads)
113-
section (wxWidgets is not included, as it supports MinGW well).
114111

112+
### Compiling on Windows using MSYS + MinGW
115113

116-
### Compiling on Windows using MinGW
114+
1. First of all, you will need working MinGW installation with MSYS2 environment
115+
and C++ compiler. Install MSYS2 by following [their instructions](https://www.msys2.org).
117116

118-
1. First of all, you will need working MinGW installation with MSYS environment
119-
and C++ compiler. The instructions on installing MinGW can be found in the
120-
[MinGW website](http://www.mingw.org/wiki/Getting_Started):
121-
122-
1. Once installed, launch the MinGW Shell tool. It will open a terminal window;
123-
type `$ cd /c/directory/with/diff-pdf` to do to the directory with diff-pdf
117+
1. Once installed, launch the MSYS2 MinGW shell. It will open a terminal window;
118+
type `cd /c/directory/with/diff-pdf` to go to the directory with diff-pdf
124119
sources.
125120

126-
1. You will need to install additional MinGW components that are not normally
127-
included with MinGW, using these commands:
121+
1. You will need to install additional MSYS components that are not normally
122+
included with MSYS, using these commands:
128123

129124
```
130-
$ mingw-get install msys-wget
131-
$ mingw-get install msys-unzip
132-
$ mingw-get install msys-perl
125+
$ pacman -Syu
126+
$ pacman -S automake autoconf pkg-config make zip
127+
$ pacman -S pacman -S mingw-w64-i686-{gcc,poppler,wxWidgets}
133128
```
134129

135-
1. It's time to build the software now and give it some time to finish (Note
136-
that this step requires Internet connectivity, as it downloads some dependencies
137-
packages):
130+
1. Build diff-pdf in the same way as in the instructions for Unix above:
138131

139132
```
140-
$ make -f Makefile.mingw
133+
$ ./bootstrap # only if building from git repository
134+
$ ./configure
135+
$ make
141136
```
142137
143-
1. If everything went well, diff-pdf is now in the `mingw\Products\`
144-
directory.
138+
1. To build a ZIP archive will all DLLs, run
139+
```
140+
$ make windows-dist
141+
```
145142
146143
147144
## Installing
@@ -150,4 +147,4 @@ On Unix, the usual `make install` is sufficient.
150147
151148
On Windows, installation is not necessary, just copy the files somewhere. If
152149
you built it following the instructions above, all the necessary files will be
153-
in the `mingw\Products\` directory.
150+
in the created ZIP archive.

0 commit comments

Comments
 (0)