--- /dev/null
+#include "Types.r"
+
+resource 'DITL' (135, nonpurgeable) {
+ { /* array DITLarray: 2 elements */
+ /* [1] */
+ {96, 292, 116, 360},
+ Button {
+ enabled,
+ "OK"
+ },
+ /* [2] */
+ {16, 64, 84, 360},
+ StaticText {
+ disabled,
+ "This version of the SAP client has expir"
+ "ed. Please consult: http://web.mit.edu/r"
+ "eeng/www/saphelp/ for instructions on ob"
+ "taining a new version."
+ }
+ }
+};
+
+resource 'DITL' (136, nonpurgeable) {
+ { /* array DITLarray: 2 elements */
+ /* [1] */
+ {116, 300, 136, 368},
+ Button {
+ enabled,
+ "OK"
+ },
+ /* [2] */
+ {16, 64, 100, 360},
+ StaticText {
+ disabled,
+ "This version of the SAP client will expi"
+ "re on January 15, 1997. Please consult: "
+ "http://web.mit.edu/reeng/www/saphelp/ fo"
+ "r instructions on obtaining a new versio"
+ "n when it is available."
+ }
+ }
+};
+
+data 'DLGX' (135) {
+ $"0743 6869 6361 676F 0000 0000 0000 0000" /* .Chicago........ */
+ $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
+ $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
+ $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
+ $"000C 0000 0000 0001 0004 0004 0000 0000" /* ................ */
+ $"0002 0000 0000 0000 0000 0000 0000 0006" /* ................ */
+ $"0000 0000 0000 0000 0000" /* .......... */
+};
+
+data 'DLGX' (136) {
+ $"0743 6869 6361 676F 0000 0000 0000 0000" /* .Chicago........ */
+ $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
+ $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
+ $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
+ $"000C 0000 0000 0001 0004 0004 0000 0000" /* ................ */
+ $"0002 0000 0000 0000 0000 0000 0000 0006" /* ................ */
+ $"0000 0000 0000 0000 0000" /* .......... */
+};
+
+data 'ictb' (136) {
+ $"0000 0000 0000 0000" /* ........ */
+};
+
+resource 'ALRT' (135, nonpurgeable) {
+ {383, 390, 511, 770},
+ 135,
+ { /* array: 4 elements */
+ /* [1] */
+ OK, visible, sound1,
+ /* [2] */
+ OK, visible, sound1,
+ /* [3] */
+ OK, visible, sound1,
+ /* [4] */
+ OK, visible, sound1
+ }
+ /****** Extra bytes follow... ******/
+ /* $"0000" /* .. */
+};
+
+resource 'ALRT' (136, nonpurgeable) {
+ {383, 390, 531, 774},
+ 136,
+ { /* array: 4 elements */
+ /* [1] */
+ OK, visible, sound1,
+ /* [2] */
+ OK, visible, sound1,
+ /* [3] */
+ OK, visible, sound1,
+ /* [4] */
+ OK, visible, sound1
+ }
+ /****** Extra bytes follow... ******/
+ /* $"0000" /* .. */
+};
+
+resource 'actb' (136) {
+ { /* array ColorSpec: 5 elements */
+ /* [1] */
+ wContentColor, 65535, 65535, 65535,
+ /* [2] */
+ wFrameColor, 0, 0, 0,
+ /* [3] */
+ wTextColor, 0, 0, 0,
+ /* [4] */
+ wHiliteColor, 0, 0, 0,
+ /* [5] */
+ wTitleBarColor, 65535, 65535, 65535
+ }
+};
+
--- /dev/null
+#include <CodeFragments.h>
+#define TBALERTID 135
+#define TB30ALERTID 136
+
+OSErr __initializeSAPglue(InitBlockPtr ibp);
+
+OSErr __initializeSAPglue(InitBlockPtr ibp)
+{
+ OSErr err = noErr;
+ short fileRefNum;
+ DateTimeRec goalTimeBomb;
+ long currentTime, goalTimeBombInSecs;
+
+ __initialize();
+
+ if (ibp->fragLocator.where == kDataForkCFragLocator) {
+ fileRefNum = FSpOpenResFile(ibp->fragLocator.u.onDisk.fileSpec, fsRdPerm);
+
+ if ( fileRefNum == -1 )
+ err = ResError();
+ }
+
+ goalTimeBomb.year = 1997;
+ goalTimeBomb.month = 1;
+ goalTimeBomb.day = 15;
+ goalTimeBomb.hour = 0; /* Let's use midnight for simplicity */
+ goalTimeBomb.minute = 0;
+ goalTimeBomb.second = 0;
+
+ DateToSeconds( &goalTimeBomb, &goalTimeBombInSecs );
+
+ GetDateTime(¤tTime);
+
+ if ( (goalTimeBombInSecs - currentTime) <= 0 ) {
+ StopAlert(TBALERTID, NULL);
+ /* if we just reported an error, then the SAP client would continue running. We
+ don't want that so instead we'll just call ExitToShell and hope it doesn't
+ leave anything hangin. If we just wanted the error, report non-zero */
+ //err = -1;
+ ExitToShell();
+ } else if ( (goalTimeBombInSecs - currentTime) < 1209600 ) { /* num seconds in 14 days */
+ NoteAlert(TB30ALERTID, NULL);
+ }
+
+ if ( fileRefNum != -1 )
+ CloseResFile( fileRefNum );
+
+ return err;
+}
+