Update APPS-INIT to update NOTECARDSDIRECTORIES appropriately (#1555)
* Add to APPS-INIT code to always update NOTECARDSDIRECTORIES since automatic builds do not set this correctly * Add AROUNDEXITFN to reset NOTECARDSDIRS after returning from logout, etc.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
|
||||
|
||||
(FILECREATED "16-Jun-2023 17:20:09" {DSK}<home>frank>il>medley>gmedley>greetfiles>APPS-INIT.;11 21130
|
||||
(FILECREATED "25-Feb-2024 13:56:23" {DSK}<home>frank>il>medley>gmedley>greetfiles>APPS-INIT.;17 23321
|
||||
|
||||
:CHANGES-TO (FNS Apps.DoInit)
|
||||
:CHANGES-TO (VARS APPS-INITCOMS)
|
||||
(FNS Apps.DoInit Apps.AroundExitFn)
|
||||
|
||||
:PREVIOUS-DATE "19-Jan-2023 12:44:20"
|
||||
{DSK}<home>frank>il>medley>gmedley>greetfiles>APPS-INIT.;10)
|
||||
:PREVIOUS-DATE "25-Feb-2024 13:14:02"
|
||||
{DSK}<home>frank>il>medley>gmedley>greetfiles>APPS-INIT.;16)
|
||||
|
||||
|
||||
(PRETTYCOMPRINT APPS-INITCOMS)
|
||||
@@ -16,8 +17,9 @@
|
||||
(GLOBALVARS Apps.NotecardsActivated Apps.RoomsActivated)
|
||||
(INITVARS (Apps.NotecardsActivated NIL)
|
||||
(Apps.RoomsActivated NIL))
|
||||
(FNS Apps.InitNotecards Apps.DoInit Apps.CreateButtons Apps.CreateLabel Apps.ActivateCLOS
|
||||
Apps.ActivateRooms Apps.ShowDoc XCL-USER::EXEC_INTERLISP)
|
||||
(FNS Apps.InitNotecards Apps.SetUpNOTECARDSDIRECTORIES Apps.DoInit Apps.CreateButtons
|
||||
Apps.CreateLabel Apps.ActivateCLOS Apps.ActivateRooms Apps.ShowDoc
|
||||
XCL-USER::EXEC_INTERLISP Apps.AroundExitFn)
|
||||
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (Apps.DoInit)))
|
||||
(DECLARE%: FIRST DONTEVAL@LOAD DOCOPY (P (BKSYSBUF " "])
|
||||
|
||||
@@ -90,6 +92,33 @@
|
||||
(if (NOT DoNotRefreshButtons)
|
||||
then (Apps.CreateButtons])
|
||||
|
||||
(Apps.SetUpNOTECARDSDIRECTORIES
|
||||
[LAMBDA NIL
|
||||
|
||||
(* ;; "Find the location of the Notecards directory and call NC.SetUpNOTECARDSDIRECTORIES.")
|
||||
|
||||
(* ;; " This is needed to make sure that lazy loading of Notecard types works.")
|
||||
|
||||
(LET* [(LOC1 (CONCAT MEDLEYDIR "notecards>"))
|
||||
(LOC2 (CONCAT MEDLEYDIR "..>notecards>"))
|
||||
(LOC3 (CONCAT MEDLEYDIR "..>..>notecards>"))
|
||||
(NCDIR (for LOC in (LIST LOC1 LOC2 LOC3) thereis (OR (INFILEP (CONCAT LOC
|
||||
"system>NOTECARDS"))
|
||||
(INFILEP (CONCAT LOC
|
||||
"system>NOTECARDS.LCOM"
|
||||
]
|
||||
(if NCDIR
|
||||
then [SETQ NCDIR (OR (INFILEP (CONCAT NCDIR "system>NOTECARDS"))
|
||||
(INFILEP (CONCAT NCDIR "system>NOTECARDS.LCOM"]
|
||||
(SETQ NCDIR (SUBSTRING NCDIR 1 (IDIFFERENCE (STRPOS "system>NOTECARDS" NCDIR)
|
||||
1)))
|
||||
(NC.SetUpNOTECARDSDIRECTORIES NCDIR)
|
||||
T
|
||||
else (PRIN1 "Warning: Notecards directory could not be found." T)
|
||||
(PRIN1 "Hence, NOTECARDSDIRECTORIES is probably not set correctly" T)
|
||||
(PRIN1 "and Notecards will not work properly." T)
|
||||
NIL])
|
||||
|
||||
(Apps.DoInit
|
||||
[LAMBDA NIL
|
||||
|
||||
@@ -173,7 +202,16 @@
|
||||
|
||||
(* ;; " Make sure Notecards doesn't try to load its HASH file in NC.PostGreet")
|
||||
|
||||
(SETTOPVAL '\NC.SourceAccessFlg NIL])
|
||||
(SETTOPVAL '\NC.SourceAccessFlg NIL)
|
||||
|
||||
(* ;; "Setup NOTECARDSDIRECTORIES.")
|
||||
|
||||
(Apps.SetUpNOTECARDSDIRECTORIES)
|
||||
|
||||
(* ;; "Add AROUNDEXITFN to ensure NOTECARDSDIRECTORIES get reset after LOGOUT, etc.")
|
||||
|
||||
(SETQ AROUNDEXITFNS (LSUBST '(MEDLEY-INIT-VARS Apps.AroundExitFn)
|
||||
'MEDLEY-INIT-VARS AROUNDEXITFNS])
|
||||
|
||||
(Apps.CreateButtons
|
||||
[LAMBDA (DoDocsToo) (* ; "Edited 13-Dec-2022 12:51 by frank")
|
||||
@@ -366,6 +404,11 @@
|
||||
YCOORD _ (IDIFFERENCE SCREENHEIGHT 460]
|
||||
(XCL:SET-DEFAULT-EXEC-TYPE 'INTERLISP)
|
||||
(XCL:SET-EXEC-TYPE 'INTERLISP])
|
||||
|
||||
(Apps.AroundExitFn
|
||||
[LAMBDA (EVENT)
|
||||
(if (MEMB EVENT '(AFTERLOGOUT AFTERSYSOUT AFTERSAVEVM))
|
||||
then (Apps.SetUpNOTECARDSDIRECTORIES])
|
||||
)
|
||||
(DECLARE%: DONTEVAL@LOAD DOCOPY
|
||||
|
||||
@@ -376,8 +419,8 @@
|
||||
(BKSYSBUF " ")
|
||||
)
|
||||
(DECLARE%: DONTCOPY
|
||||
(FILEMAP (NIL (1109 20996 (Apps.InitNotecards 1119 . 4981) (Apps.DoInit 4983 . 8227) (
|
||||
Apps.CreateButtons 8229 . 17053) (Apps.CreateLabel 17055 . 17865) (Apps.ActivateCLOS 17867 . 19216) (
|
||||
Apps.ActivateRooms 19218 . 20069) (Apps.ShowDoc 20071 . 20220) (XCL-USER::EXEC_INTERLISP 20222 . 20994
|
||||
)))))
|
||||
(FILEMAP (NIL (1229 23187 (Apps.InitNotecards 1239 . 5101) (Apps.SetUpNOTECARDSDIRECTORIES 5103 . 6658
|
||||
) (Apps.DoInit 6660 . 10257) (Apps.CreateButtons 10259 . 19083) (Apps.CreateLabel 19085 . 19895) (
|
||||
Apps.ActivateCLOS 19897 . 21246) (Apps.ActivateRooms 21248 . 22099) (Apps.ShowDoc 22101 . 22250) (
|
||||
XCL-USER::EXEC_INTERLISP 22252 . 23024) (Apps.AroundExitFn 23026 . 23185)))))
|
||||
STOP
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user