Install into /My Documents/Crosswords since that's the only place the

OpenFile dialog will let you browse.  And use filename as -a option so
more than one dictionary can be installed -- without that the
installer treats all dicts as versions of the same app and removes the
old before installing the new.
This commit is contained in:
ehouse 2006-04-16 05:49:59 +00:00
parent 6680edebb6
commit ddb21c3cfc

View file

@ -6,7 +6,7 @@
use strict;
my $provider = "-p \"Crosswords project\"";
my $provider = "\"Crosswords project\"";
usage() if 0 == @ARGV;
@ -23,17 +23,21 @@ while ( my $path = shift @ARGV ) {
my $fname = "/tmp/file$$.list";
# see this url for %CE5% and other definitions:
# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/DevGuideSP/html/sp_wce51consmartphonewindowscestringsozup.asp
open FILE, "> $fname";
print FILE "$path ";
print FILE '%CE1%\\Crosswords', "\n";
print FILE '%CE5%\\Crosswords', "\n";
close FILE;
my $cabname = `basename $path`;
chomp $cabname;
$cabname =~ s/.xwd$/_xwd/;
$cabname .= ".cab";
$cabname =~ s/.xwd$//;
my $appname = $cabname;
$cabname .= "_xwd.cab";
`pocketpc-cab $provider $fname $cabname`;
`pocketpc-cab -p $provider -a $appname $fname $cabname`;
print STDERR "$cabname done\n";
unlink $fname;