From 56ece4ee5fc1b7c25d781301512a2f3258485269 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 27 Dec 2009 21:33:53 +0000 Subject: [PATCH] make provision of dict path optional --- xwords4/wince/scripts/exe2cab.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xwords4/wince/scripts/exe2cab.pl b/xwords4/wince/scripts/exe2cab.pl index 9f75c4289..b1d3080d0 100755 --- a/xwords4/wince/scripts/exe2cab.pl +++ b/xwords4/wince/scripts/exe2cab.pl @@ -10,9 +10,13 @@ my $userName = "Crosswords.exe"; sub main() { my $provider = "\"Crosswords project\""; - usage() if 1 != @ARGV; + usage() if 1 > @ARGV; my $path = shift @ARGV; + my $dict = shift @ARGV; + if ( ! $dict ) { + $dict = "../../../dawg/English/BasEnglish2to8.xwd"; + } usage() unless $path =~ m|.exe$|; @@ -46,7 +50,7 @@ sub main() { print FILE "$tmpfile "; print FILE '%CE1%\\\\Crosswords', "\n"; - print FILE "../../../dawg/English/BasEnglish2to8.xwd "; + print FILE "$dict "; print FILE '%CE1%\\\\Crosswords', "\n"; # print FILE "$ENV{'CEOPT_ROOT'}/opt/mingw32ce/arm-wince-mingw32ce/bin/mingwm10.dll "; @@ -69,7 +73,7 @@ sub main() { } sub usage() { - print STDERR "usage: $0 path/to/xwords4.exe\n"; + print STDERR "usage: $0 path/to/xwords4.exe [path/to/dict.xwd]\n"; exit 2; }