|
From: <jgr...@us...> - 2003-09-19 20:18:56
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv8332
Modified Files:
Makefile
Added Files:
popfile-windows.pl
Removed Files:
popfilew.pl
Log Message:
MAKE POPFILE BE A TRUE EXE ON WINDOWS
ADDED ATTACHMENT PSEUDOWORDS
Makefile:
At rules for making a variety of POPFile executables:
popfile.exe Loader that picks one of the following four to run:
popfileif.exe Run POPFile in foreground with a tray icon
popfileib.exe Run POPFile in background with a tray icon
popfilef.exe Run POPFile in the foreground
popfileb.exe Run POPFile in the background
Each executable is built with either PerlTray (for those with system
tray icons) or PerlApp (for those with no icon).
popfile-tray.pl:
Equivalent of popfile.pl but with hooks for use by PerlTray for
showing the icon and handling the popup menu.
popfile-windows.pl:
This is the small wrapper that becomes popfile.exe and decides which
version of POPFile to load.
languages/English.msg:
Added the message for the console output option and to warn the user
that the change isn't going to take affect until the next restart.
Platform/MSWin32.pm:
This just contains code now for handling the options windows_trayicon
and windows_console.
Classifier/Bayes.pm:
Removed the second blessing of ourselves because it was not needed.
Classifier/MailParse.pm:
Added pseudowords for attachment names and attachment extensions via a
patch that was submitted.
POPFile/Loader.pm:
New public function module_config() allows a user of the loader to access
configuration items without knowing the internals of Loader.
popfilew.pl:
Removed. This file is replaced by popfile-windows.pl.
--- NEW FILE: popfile-windows.pl ---
#!/usr/bin/perl
# ---------------------------------------------------------------------------------------------
#
# popfile-windows.pl --- Message analyzer and sorter (Windows loader)
#
# Figures out which is four executables to run based on windows options
#
# popfileif.exe Run POPFile in foreground with a tray icon
# popfileib.exe Run POPFile in background with a tray icon
# popfilef.exe Run POPFile in the foreground
# popfileb.exe Run POPFile in the background
#
# Copyright (c) 2001-2003 John Graham-Cumming
#
# This file is part of POPFile
#
# POPFile is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# POPFile is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with POPFile; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---------------------------------------------------------------------------------------------
use strict;
use locale;
use POPFile::Configuration;
use POPFile::MQ;
use Platform::MSWin32;
# Load the minimal amount of POPFile to get reliable access to the
# configuration options and then figure out which popfileXX.exe to run
my $c = new POPFile::Configuration;
my $w = new Platform::MSWin32;
my $mq = new POPFile::MQ;
$w->mq( $mq );
$w->configuration( $c );
$c->configuration( $c );
$c->initialize();
$w->initialize();
$c->load_configuration();
my $i = $w->config_( 'trayicon' )?'i':'';
my $f = $w->config_( 'console' )?'f':'b';
my $popfile_exe = "popfile$i$f.exe";
exec $popfile_exe;
Index: Makefile
===================================================================
RCS file: /cvsroot/popfile/engine/Makefile,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Makefile 15 Sep 2003 14:55:36 -0000 1.21
--- Makefile 19 Sep 2003 20:18:52 -0000 1.22
***************
*** 45,49 ****
# Builds the tray application using PerlTray
! winexe: popfile.exe popfileb.exe
TRAY_OPTIONS = --exe $@ --force --clean --dependent --xclude --icon ../windows/POPFileIcon/popfile.ico --script $< --info CompanyName="The POPFile Project" --info LegalCopyright="Copyright (c) 2003 John Graham-Cumming" --info ProductName=POPFile --info ProductVersion=$(POPFILE_VERSION).0 --info FileDescription=POPFile --info FileVersion=$(POPFILE_VERSION).0
--- 45,49 ----
# Builds the tray application using PerlTray
! winexe: popfile.exe popfileb.exe popfilef.exe popfileib.exe popfileif.exe
TRAY_OPTIONS = --exe $@ --force --clean --dependent --xclude --icon ../windows/POPFileIcon/popfile.ico --script $< --info CompanyName="The POPFile Project" --info LegalCopyright="Copyright (c) 2003 John Graham-Cumming" --info ProductName=POPFile --info ProductVersion=$(POPFILE_VERSION).0 --info FileDescription=POPFile --info FileVersion=$(POPFILE_VERSION).0
***************
*** 52,60 ****
endif
! popfile.exe: popfilew.pl POPFile/Loader.pm
perltray --nogui $(TRAY_OPTIONS)
! popfileb.exe: popfilew.pl POPFile/Loader.pm
perltray $(TRAY_OPTIONS)
# windows builds the Windows installer
--- 52,69 ----
endif
! popfile.exe: popfile-windows.pl
! perlapp --gui $(TRAY_OPTIONS)
!
! popfileif.exe: popfile-tray.pl POPFile/Loader.pm
perltray --nogui $(TRAY_OPTIONS)
! popfileib.exe: popfile-tray.pl POPFile/Loader.pm
perltray $(TRAY_OPTIONS)
+
+ popfilef.exe: popfile.pl POPFile/Loader.pm
+ perlapp $(TRAY_OPTIONS)
+
+ popfileb.exe: popfile.pl POPFile/Loader.pm
+ perlapp --gui $(TRAY_OPTIONS)
# windows builds the Windows installer
--- popfilew.pl DELETED ---
|