[1139] | 1 | CWMAINI ;INDPLS/PLS - KIDS INITS FOR GUIMail INSTALL ;20-Jul-2005 14:46;CLC;
|
---|
| 2 | ;;2.3;CWMAIL;;Jul 19, 2005
|
---|
[1138] | 3 | ; Environment Check
|
---|
| 4 | EC 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
|
---|
| 12 | VCHK(CWP,CWV) ;CHECK VERSION OF PASSED PACKAGE
|
---|
| 13 | D:$$VERSION^XPDUTL(CWP)<CWV MES("Requires at least version "_CWV_" of the "_CWP_".")
|
---|
| 14 | Q
|
---|
| 15 | PCHK(CWPATCH) ;CHECK PATCH INSTALLATION
|
---|
| 16 | D:'$$PATCH^XPDUTL(CWPATCH) MES("Requires that patch "_CWPATCH_" be installed.")
|
---|
| 17 | Q
|
---|
| 18 | MES(X) D BMES^XPDUTL(X)
|
---|
| 19 | S XPDQUIT=1
|
---|
| 20 | Q
|
---|
| 21 | ;Post Installation
|
---|
| 22 | EN ;entry point for post installation functions
|
---|
| 23 | ;
|
---|
| 24 | D ^CWMAPP ;populate package parameters
|
---|
| 25 | D EN^CWMACPPI ;convert CWMAIL1 to Generic Parameter Utility
|
---|
[1139] | 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
|
---|
[1138] | 28 | D MMSG ;send mail message indicating package installation
|
---|
| 29 | Q
|
---|
| 30 | MMSG ;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"))_"."
|
---|
[1139] | 36 | S ^TMP($J,"CWBODY",2)="Version #: 2.3" ;_$$VERSION^XPDUTL("CWMA") ;set version number
|
---|
[1138] | 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 | ;
|
---|
| 43 | PDEL890 ;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
|
---|
[1139] | 52 | UPCURVER(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
|
---|
[1138] | 60 | READY(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
|
---|