From cc2b61af7d99169a382f322020eb81bd9b7d008e Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 1 Jul 2020 20:55:56 -0700 Subject: [PATCH] tweaks for byod --- xwords4/dawg/English/Makefile.CollegeEng | 7 ++++--- xwords4/dawg/Hungarian/info.txt | 2 ++ xwords4/dawg/Makefile.langcommon | 10 ++++++---- xwords4/linux/scripts/discon_ok2.py | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/xwords4/dawg/English/Makefile.CollegeEng b/xwords4/dawg/English/Makefile.CollegeEng index 2f360bead..7547a7cbb 100644 --- a/xwords4/dawg/English/Makefile.CollegeEng +++ b/xwords4/dawg/English/Makefile.CollegeEng @@ -1,5 +1,6 @@ # -*- mode: makefile; compile-command: "make -f Makefile.CollegeEng"; -*- -# Copyright 2002 by Eric House (xwords@eehouse.org). All rights reserved. +# Copyright 2002 - 2020 by Eric House (xwords@eehouse.org). All +# rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -22,10 +23,10 @@ DICTNOTE = "From the old PalmOS app Niggle" include ../Makefile.langcommon -SOURCEDICT ?= $(XWDICTPATH)/English/CollegeEng.dict.gz +SOURCEDICT ?= $(XWDICTPATH)/English/CollegeEng.dict $(XWLANG)Main.dict.gz: $(SOURCEDICT) Makefile - zcat $< | tr -d '\r' | tr [a-z] [A-Z] | grep -e "^[A-Z]\{2,15\}$$" | \ + cat $< | tr -d '\r' | tr [a-z] [A-Z] | grep -e "^[A-Z]\{2,15\}$$" | \ gzip -c > $@ # Everything but creating of the Main.dict file is inherited from the diff --git a/xwords4/dawg/Hungarian/info.txt b/xwords4/dawg/Hungarian/info.txt index 3768603a9..6ef10c62a 100644 --- a/xwords4/dawg/Hungarian/info.txt +++ b/xwords4/dawg/Hungarian/info.txt @@ -3,6 +3,8 @@ LANGCODE:hu_HU CHARSET: utf-8 +BUILD_FLAGS:ALLOWS_DUPLICATES + # High bit means "official". Next 7 bits are an enum where # Hungarian==0x14. Low byte is padding XLOC_HEADER:0x9400 diff --git a/xwords4/dawg/Makefile.langcommon b/xwords4/dawg/Makefile.langcommon index 7a89557d3..da54cc32e 100644 --- a/xwords4/dawg/Makefile.langcommon +++ b/xwords4/dawg/Makefile.langcommon @@ -193,6 +193,8 @@ byodbins: table.bin values.bin frankspecials.bin info.txt else ifeq ($(TARGET_TYPE),WINCE) +byodbins: table.bin charcount.bin values.bin frankspecials.bin info.txt + ### WINCE section here ### all: $(XWLANG)2to8.xwd $(XWLANG)2to9.xwd $(XWLANG)2to15.xwd ../mkxwdcab.pl -f $< @@ -216,8 +218,8 @@ endif frankspecials.bin: ../frank_mkspecials.py $(BMPFILES) $< $(BLANK_INFO) $(LANG_SPECIAL_INFO) > $@ -$(XWLANG)%.$(FRANK_EXT): dawg$(XWLANG)%.stamp $(XWLANG)%_flags.bin $(XWLANG)%_newheader.bin $(XWLANG)_charcount.bin table.bin values.bin frankspecials.bin - cat $(XWLANG)$*_flags.bin $(XWLANG)$*_newheader.bin $(XWLANG)_charcount.bin table.bin values.bin \ +$(XWLANG)%.$(FRANK_EXT): dawg$(XWLANG)%.stamp $(XWLANG)%_flags.bin $(XWLANG)%_newheader.bin charcount.bin table.bin values.bin frankspecials.bin + cat $(XWLANG)$*_flags.bin $(XWLANG)$*_newheader.bin charcount.bin table.bin values.bin \ frankspecials.bin $(XWLANG)StartLoc.bin \ $$(ls dawg$(XWLANG)$*_*.bin) > $@ cp $@ saveme.bin @@ -254,7 +256,7 @@ dawg$(XWLANG)%.stamp: $(XWLANG)Main.dict.gz $(DICT2DAWG) table.bin ../Makefile.l start=$$(echo $@ | sed -e 's/dawg$(XWLANG)\([0-9]*\)to[0-9]*.stamp/\1/'); \ end=$$(echo $@ | sed -e 's/dawg$(XWLANG)[0-9]*to\([0-9]*\).stamp/\1/'); \ echo $${start} and $${end}; \ - zcat $< | $(BOWDLERIZER) | $(DICT2DAWG) $(DICT2DAWGARGS) $(TABLE_ARG) table.bin -b 28000 \ + zcat $< | $(BOWDLERIZER) | $(DICT2DAWG) $(DICT2DAWGARGS) $(TABLE_ARG) table.bin \ -ob dawg$(XWLANG)$* $(ENCP) \ -sn $(XWLANG)StartLoc.bin -min $${start} -max $${end} \ -wc $(XWLANG)$*_wordcount.bin $(FORCE_4) -ns $(XWLANG)$*_nodesize.bin @@ -282,7 +284,7 @@ values.bin: ../xloc.py # a binary file, two bytes, one giving the size of tiles data and the # other the number of tiles in the dict. Tiles data is utf-8 and so # number is not derivable from size. -$(XWLANG)_charcount.bin: table.bin ../xloc.py +charcount.bin: table.bin ../xloc.py SIZ=$$(ls -l $< | awk '{print $$5}'); \ perl -e "print pack(\"c\",$$SIZ)" > $@ TMP=/tmp/tmp$$$$; \ diff --git a/xwords4/linux/scripts/discon_ok2.py b/xwords4/linux/scripts/discon_ok2.py index 370a8be80..b2703faae 100755 --- a/xwords4/linux/scripts/discon_ok2.py +++ b/xwords4/linux/scripts/discon_ok2.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import re, os, sys, getopt, shutil, threading, requests, json, glob +import re, os, sys, shutil, threading, requests, json, glob import argparse, datetime, random, signal, subprocess, time from shutil import rmtree