tweaks for byod

This commit is contained in:
Eric House 2020-07-01 20:55:56 -07:00
parent 41a600d2f1
commit cc2b61af7d
4 changed files with 13 additions and 8 deletions

View file

@ -1,5 +1,6 @@
# -*- mode: makefile; compile-command: "make -f Makefile.CollegeEng"; -*- # -*- 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # 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 include ../Makefile.langcommon
SOURCEDICT ?= $(XWDICTPATH)/English/CollegeEng.dict.gz SOURCEDICT ?= $(XWDICTPATH)/English/CollegeEng.dict
$(XWLANG)Main.dict.gz: $(SOURCEDICT) Makefile $(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 > $@ gzip -c > $@
# Everything but creating of the Main.dict file is inherited from the # Everything but creating of the Main.dict file is inherited from the

View file

@ -3,6 +3,8 @@
LANGCODE:hu_HU LANGCODE:hu_HU
CHARSET: utf-8 CHARSET: utf-8
BUILD_FLAGS:ALLOWS_DUPLICATES
# High bit means "official". Next 7 bits are an enum where # High bit means "official". Next 7 bits are an enum where
# Hungarian==0x14. Low byte is padding # Hungarian==0x14. Low byte is padding
XLOC_HEADER:0x9400 XLOC_HEADER:0x9400

View file

@ -193,6 +193,8 @@ byodbins: table.bin values.bin frankspecials.bin info.txt
else else
ifeq ($(TARGET_TYPE),WINCE) ifeq ($(TARGET_TYPE),WINCE)
byodbins: table.bin charcount.bin values.bin frankspecials.bin info.txt
### WINCE section here ### ### WINCE section here ###
all: $(XWLANG)2to8.xwd $(XWLANG)2to9.xwd $(XWLANG)2to15.xwd all: $(XWLANG)2to8.xwd $(XWLANG)2to9.xwd $(XWLANG)2to15.xwd
../mkxwdcab.pl -f $< ../mkxwdcab.pl -f $<
@ -216,8 +218,8 @@ endif
frankspecials.bin: ../frank_mkspecials.py $(BMPFILES) frankspecials.bin: ../frank_mkspecials.py $(BMPFILES)
$< $(BLANK_INFO) $(LANG_SPECIAL_INFO) > $@ $< $(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 $(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 $(XWLANG)_charcount.bin table.bin values.bin \ cat $(XWLANG)$*_flags.bin $(XWLANG)$*_newheader.bin charcount.bin table.bin values.bin \
frankspecials.bin $(XWLANG)StartLoc.bin \ frankspecials.bin $(XWLANG)StartLoc.bin \
$$(ls dawg$(XWLANG)$*_*.bin) > $@ $$(ls dawg$(XWLANG)$*_*.bin) > $@
cp $@ saveme.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/'); \ 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/'); \ end=$$(echo $@ | sed -e 's/dawg$(XWLANG)[0-9]*to\([0-9]*\).stamp/\1/'); \
echo $${start} and $${end}; \ 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) \ -ob dawg$(XWLANG)$* $(ENCP) \
-sn $(XWLANG)StartLoc.bin -min $${start} -max $${end} \ -sn $(XWLANG)StartLoc.bin -min $${start} -max $${end} \
-wc $(XWLANG)$*_wordcount.bin $(FORCE_4) -ns $(XWLANG)$*_nodesize.bin -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 # 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 # other the number of tiles in the dict. Tiles data is utf-8 and so
# number is not derivable from size. # 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}'); \ SIZ=$$(ls -l $< | awk '{print $$5}'); \
perl -e "print pack(\"c\",$$SIZ)" > $@ perl -e "print pack(\"c\",$$SIZ)" > $@
TMP=/tmp/tmp$$$$; \ TMP=/tmp/tmp$$$$; \

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/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 import argparse, datetime, random, signal, subprocess, time
from shutil import rmtree from shutil import rmtree