Skip to content

Commit

Permalink
Switch to building 64bit binaries
Browse files Browse the repository at this point in the history
Use the x86_64 compiler instead of i686 and use the version that uses
UCRT runtime. This is available by default on Windows 10 or newer and
can be installed on older OSes too.
  • Loading branch information
vslavik committed Jan 4, 2024
1 parent fc76119 commit b3d9697
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
msystem: MINGW32
update: true
install: mingw-w64-i686-gcc automake autoconf pkg-config make zip patch tar
install: mingw-w64-ucrt-x86_64-gcc automake autoconf pkg-config make zip patch tar

- name: Build binaries
run: make -j2 MAKE="make -j2"
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ NUGET_VERSION = $(GETTEXT_VERSION)
MSYS_PREFIX = c:/usr/local
UNIX_PREFIX = /usr/local

RUNTIME_DIR = /ucrt64/bin

LIBICONV_FLAGS = --prefix=$(MSYS_PREFIX) \
--disable-static \
--disable-dependency-tracking \
Expand All @@ -32,7 +34,7 @@ GETTEXT_FLAGS = --prefix=$(MSYS_PREFIX) \
--enable-relocatable

CFLAGS := -O2
LDFLAGS := -Wl,--dynamicbase -Wl,--nxcompat -Wl,--no-seh
LDFLAGS := -Wl,--dynamicbase -Wl,--nxcompat
NUGET ?= nuget

PATCHESDIR = $(CURDIR)/patches
Expand Down Expand Up @@ -120,10 +122,10 @@ dist: stage
cp -a $(USR_LOCAL)/bin/recode-sr-latin.exe $(DISTDIR)/bin/
cp -a $(USR_LOCAL)/bin/xgettext.exe $(DISTDIR)/bin/
cp -a $(USR_LOCAL)/bin/*.dll $(DISTDIR)/bin/
cp -a /mingw32/bin/libgcc_s_dw*.dll $(DISTDIR)/bin
cp -a /mingw32/bin/libstdc++*.dll $(DISTDIR)/bin
cp -a /mingw32/bin/libgomp*.dll $(DISTDIR)/bin
cp -a /mingw32/bin/libwinpthread*.dll $(DISTDIR)/bin
cp -a $(RUNTIME_DIR)/libgcc_s_seh*.dll $(DISTDIR)/bin
cp -a $(RUNTIME_DIR)/libstdc++*.dll $(DISTDIR)/bin
cp -a $(RUNTIME_DIR)/libgomp*.dll $(DISTDIR)/bin
cp -a $(RUNTIME_DIR)/libwinpthread*.dll $(DISTDIR)/bin
cp -a $(USR_LOCAL)/lib/gettext/cldr-plurals.exe $(DISTDIR)/lib/gettext
cp -a $(USR_LOCAL)/share/gettext-$(GETTEXT_VERSION) $(DISTDIR)/share/gettext
cp -a $(USR_LOCAL)/share/gettext/styles $(DISTDIR)/share/gettext/
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you prefer to build it yourself, it's simple enough:
https://www.msys2.org; run all subsequent commands within a MinGW 32 shell.
2. Install required packages:
```
pacman -S mingw-w64-i686-gcc automake autoconf pkg-config make zip patch tar
pacman -S mingw-w64-i686-gcc automake autoconf pkg-config make zip patch tar
```
3. Run `make dist` or `make archive` to build everything.
Expand All @@ -36,10 +36,3 @@ License
The LICENSE file in this directory applies to GNU gettext itself, which is
licensed under GPLv3. The makefiles and scripts for building it on Windows are
in the public domain.
---
I'm @vslavik on Twitter.
https://github.com/vslavik/gettext-tools-windows

0 comments on commit b3d9697

Please sign in to comment.