Skip to content

Commit

Permalink
Fix lots of issues with the Windows builds, including working around a…
Browse files Browse the repository at this point in the history
  • Loading branch information
TinoDidriksen committed Jan 24, 2020
1 parent 1d88e1a commit 210d729
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions tools/apertium-lex-tools/win32/apertium-lex-tools.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
patch_all
install_dep lttoolbox
install_dep apertium
autoreconf -fi
Expand Down
22 changes: 22 additions & 0 deletions tools/apertium-lex-tools/win32/weof.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/lrx_processor.cc b/src/lrx_processor.cc
index 50a11ff..5da6523 100644
--- a/src/lrx_processor.cc
+++ b/src/lrx_processor.cc
@@ -794,7 +794,7 @@ LRXProcessor::processME(FILE *input, FILE *output)
alive_states.push_back(new State(*initial_state));

int val = 0;
- while((val = fgetwc_unlocked(input)) != EOF)
+ while((val = fgetwc_unlocked(input)) != WEOF)
{

if(nullFlush && val == L'\0')
@@ -824,7 +824,7 @@ LRXProcessor::processME(FILE *input, FILE *output)
// Read in target equivalences
wstring trad = L"";
val = fgetwc_unlocked(input);
- while(val != L'$' && val != EOF)
+ while(val != L'$' && val != WEOF)
{
if(val != L'$')
{
2 changes: 1 addition & 1 deletion tools/cg3ide/win32/cg3ide.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
install_dep cg3
/opt/mxe/usr/$BITWIDTH-w64-mingw32.shared/qt5/bin/qmake cg3ide.pro PREFIX=/opt/win32
export EXTRA_INST="release/cg3ide.exe release/cg3processor.exe"
export EXTRA_INST="cg3ide.exe cg3processor.exe"

mkdir -pv /opt/$WINX-pkg/$PKG_NAME/opt/win32/bin
rsync -av /opt/win32/bin /opt/$WINX-pkg/$PKG_NAME/opt/win32/
Expand Down
1 change: 1 addition & 0 deletions tools/hfst/win32/hfst.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
patch_all
export ICU_CONFIG=no
autoreconf -fi
./configure --disable-static --enable-all-tools --with-unicode-handler=icu --host=$BITWIDTH-w64-mingw32.shared --prefix=/opt/win32
2 changes: 1 addition & 1 deletion win32-post.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
make clean
make -j4 || make -j4 || make -j4 || make -j4 || make
make -j4 || make
make install DESTDIR=/opt/$WINX-pkg/$PKG_NAME
for INST in $EXTRA_INST
do
Expand Down
2 changes: 1 addition & 1 deletion win32-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rm -rf /opt/$WINX-pkg/$PKG_NAME

if [[ "$BUILD_VCS" == "git" ]]; then
rm -rf /opt/win32-build/$PKG_NAME
cp -a /opt/autopkg/tmp/git/$PKG_NAME.git /opt/win32-build/$PKG_NAME
cp -a --reflink=auto /opt/autopkg/tmp/git/$PKG_NAME.git /opt/win32-build/$PKG_NAME || git clone --shallow-submodules /opt/autopkg/repos/$PKG_NAME.git /opt/win32-build/$PKG_NAME
cd /opt/win32-build/$PKG_NAME
else
cd /opt/win32-build/$PKG_NAME
Expand Down

0 comments on commit 210d729

Please sign in to comment.