source: GuiMail/trunk/p/CWMAINI.m@ 1657

Last change on this file since 1657 was 1139, checked in by George Lilly, 14 years ago

version 2.3 of GuiMail

File size: 2.8 KB
Line 
1CWMAINI ;INDPLS/PLS - KIDS INITS FOR GUIMail INSTALL ;20-Jul-2005 14:46;CLC;
2 ;;2.3;CWMAIL;;Jul 19, 2005
3 ; Environment Check
4EC D VCHK("RPC BROKER",1.1) ;RPC Broker
5 D PCHK("DI*21.0*34") ;Fileman/Delphi Components
6 D PCHK("XM*7.1*50") ;MailMan Patch
7 D PCHK("XM*7.1*73") ;MailMan Patch to $$CONVERT^XMXUTIL1
8 D PCHK("XU*8.0*71") ;Kernel date formatting patch
9 D PCHK("XT*7.3*26") ;Kernel Tool-Kit Generic Parameters
10 S:$G(XPDENV) XPDDIQ("XPZ1")=0 ;force Disable Options/Protocols prompt to NO
11 Q
12VCHK(CWP,CWV) ;CHECK VERSION OF PASSED PACKAGE
13 D:$$VERSION^XPDUTL(CWP)<CWV MES("Requires at least version "_CWV_" of the "_CWP_".")
14 Q
15PCHK(CWPATCH) ;CHECK PATCH INSTALLATION
16 D:'$$PATCH^XPDUTL(CWPATCH) MES("Requires that patch "_CWPATCH_" be installed.")
17 Q
18MES(X) D BMES^XPDUTL(X)
19 S XPDQUIT=1
20 Q
21 ;Post Installation
22EN ;entry point for post installation functions
23 ;
24 D ^CWMAPP ;populate package parameters
25 D EN^CWMACPPI ;convert CWMAIL1 to Generic Parameter Utility
26 D UPCURVER(2.3) ;make sure current version is updated
27 ;D PDEL890 ;prompt for deletion of File 890 CW GUI VISTA MAIL USER
28 D MMSG ;send mail message indicating package installation
29 Q
30MMSG ;send mail message to Indianapolis indicating CW GUIMail installation
31 ;
32 N CWSUBJ,CWRECP,CWBODY
33 S CWBODY=$NA(^TMP($J,"CWBODY"))
34 S CWSUBJ="GUIMail Installation at "_$G(^XMB("NETNAME"))
35 S ^TMP($J,"CWBODY",1)="GUIMail has just been installed at: "_$G(^XMB("NETNAME"))_"."
36 S ^TMP($J,"CWBODY",2)="Version #: 2.3" ;_$$VERSION^XPDUTL("CWMA") ;set version number
37 S ^TMP($J,"CWBODY",3)="Installer: "_$P($G(^VA(200,+$G(DUZ),0)),U)
38 S CWRECP("G.GUIMAIL@INDIANAPOLIS.VA.GOV")=""
39 D SENDMSG^XMXAPI(DUZ,CWSUBJ,CWBODY,.CWRECP)
40 K ^TMP($J,"CWBODY")
41 Q
42 ;
43PDEL890 ;I $$READY("Do you wish to remove the file at this time","NO") D
44 ;. N DIU
45 ;. S DIU="^CWMAIL1(",DIU(0)="DST" D EN^DIU2
46 ;E D
47 ;. W !,"OK. You may delete later by executing D PDEL890^CWMAINI."
48 D BMES^XPDUTL("Removing CW GUI VISTA MAIL USER (890) File ...")
49 N DIU
50 S DIU="^CWMAIL1(",DIU(0)="DST" D EN^DIU2
51 Q
52UPCURVER(VER) ;
53 N IEN,CWFDA
54 S IEN=$$FIND1^DIC(9.4,"","B","CW GUIMail","B","","OUT")
55 I IEN D
56 .Q:$G(^DIC(9.4,IEN,"VERSION"))=VER
57 .S CWFDA(9.4,IEN_",",13)=VER
58 .D FILE^DIE("","CWFDA")
59 Q
60READY(CWPRMPT,CWDEF) ; Prompts user for input
61 ;Input - CWPRMPT - will set DIR("A" to this value
62 ; CWDEF - will set DIR("B" to this value
63 ;Output - returns a 1(yes) or 0(no)
64 N DIR,X,Y
65 W !!," * * * * WARNING * * * *"
66 W !!," You are about to remove file 890. This file held"
67 W !!," personal preferences for GUIMail v2.0. All of the settings"
68 W !!," should have been moved to the Generic Parameter File"
69 W !!," during installation.",!!
70 S DIR("B")=$G(CWDEF,"NO")
71 S DIR(0)="Y"
72 D ^DIR Q:Y 1 ; answered YES
73 Q 0 ; answered NO
Note: See TracBrowser for help on using the repository browser.