|
From: Danny B. <dan...@us...> - 2008-12-07 10:32:05
|
Update of /cvsroot/roadmap/roadmap/src/win32 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20061 Modified Files: Makefile Added Files: CreateCab.pl Log Message: Stuff to create a CAB file for a WinCE distribution. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/win32/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile 28 Jun 2008 16:49:29 -0000 1.13 --- Makefile 7 Dec 2008 10:31:58 -0000 1.14 *************** *** 49,53 **** wince_input_mon.h ! TARGETS = wroadmap.exe # --- The real targets -------------------------------------------- --- 49,53 ---- wince_input_mon.h ! TARGETS = wroadmap.exe wroadmap.cab # --- The real targets -------------------------------------------- *************** *** 59,63 **** clean: ! rm -f *.o *.a *.da $(addsuffix .exe,$(TARGETS)) .depends.mk libwroadmap.a: $(RMLIBOBJ) --- 59,63 ---- clean: ! rm -f *.o *.a *.da $(addsuffix .exe,$(TARGETS)) .depends.mk *.rsc libwroadmap.a: $(RMLIBOBJ) *************** *** 103,104 **** --- 103,117 ---- -include .depends.mk + + CABFILES= wroadmap.exe \ + distribution/libexpat-1.dll \ + distribution/font.ttf \ + distribution/roadmap.screenobjects \ + distribution/roadmap.toolbar \ + distribution/sprites \ + distribution/All \ + distribution/session.txt \ + distribution/preferences.txt + + wroadmap.cab: wroadmap.exe + CreateCab.pl --- NEW FILE: CreateCab.pl --- #!/usr/bin/perl # Script for turning the RoadMap executable into a cab, along with a shortcut # Inspired on Eric Houses exe2cab.pl script for the crosswords project. use strict; my $userName = "wroadmap.exe"; sub main() { my $provider = "\"RoadMap project\""; my $path = "wroadmap.exe"; die "$path not found\n" unless -f $path; my $cabname = `basename $path`; chomp $cabname; $cabname =~ s/.exe$//; $userName = $cabname unless $userName; my $cmdline = "\"%CE1%\\RoadMap\\" . $userName . "\""; my $cmdlen = length( $cmdline ); my $fname = "/tmp/file$$.list"; open FILE, "> $fname"; my $tmpfile = "/tmp/$userName"; `cp $path $tmpfile`; print FILE "$tmpfile "; print FILE '%CE1%\\RoadMap', "\n"; print FILE '%CE1%\\RoadMap', "\n"; print FILE 'distribution/libexpat-1.dll %CE1%\\RoadMap', "\n"; print FILE 'distribution/font.ttf %CE1%\\RoadMap', "\n"; print FILE 'distribution/roadmap.screenobjects %CE1%\\RoadMap', "\n"; print FILE 'distribution/roadmap.toolbar %CE1%\\RoadMap', "\n"; print FILE 'distribution/sprites %CE1%\\RoadMap', "\n"; print FILE 'distribution/All %CE1%\\RoadMap\\default', "\n"; print FILE 'distribution/session.txt %CE1%\\RoadMap', "\n"; print FILE 'distribution/preferences.txt %CE1%\\RoadMap', "\n"; # Create a link. The format, says Shaun, is # <number of characters>#command line<no carriage return or line feed> # my $linkName = "RoadMap.lnk"; # open LINKFILE, "> $linkName"; # print LINKFILE $cmdlen, "#", $cmdline; # close LINKFILE; # # print FILE "$linkName "; # print FILE '%CE11%', "\n"; # /* 11 is programs, 14 is games */ # unlink $linkName; close FILE; my $appname = $cabname; $cabname .= ".cab"; my $cmd = "pocketpc-cab -p $provider -a $appname " . "$fname $cabname"; print( STDERR $cmd, "\n"); print `$cmd`; unlink $tmpfile; } main(); |