home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 February
/
PCWK0296.iso
/
abcflow
/
abc
/
network
/
install.ctl
< prev
next >
Wrap
Text File
|
1995-05-17
|
41KB
|
1,252 lines
##############################################################################
# #
# Copyright (c) Micrografx, Inc., 1991 - 1992. All rights reserved. #
# Permission to use this work for any purpose must by obtained in writing #
# from Micrografx, 1303 Arapaho, Richardson, TX. 75081. #
# #
##############################################################################
# This line MgxExit
# is so the installer cleans up correctly & kills the
# loaded program when the install app is closed
[MgxExit] ()
[MgxMain] ()
BOOL bCDROM TRUE; // Set to TRUE for CD based installer
BOOL bTrialVersion TRUE;
BOOL bNeedLocalDir TRUE;
BOOL bCancel FALSE;
BOOL bIcons FALSE;
BOOL bNeedToRestart FALSE;
BOOL bResult FALSE;
BOOL bSuccess FALSE;
BOOL bStop FALSE;
BOOL bQuit FALSE;
BOOL bAskIcons FALSE;
BOOL bNeedToCopyOLEDLLs FALSE;
BOOL bNeedToRebootFirst FALSE;
BOOL bRunitMessage FALSE;
INT nCount 0;
INT nMax 0;
INT nResult 0;
INT TT 6;
STRING pathWindows "";
STRING pathSystem "";
# All paths listed below are referenced in the
# MANIFEST.CTL for ABC 4.0 - they all need to
# be set to something valid before the call to "Install"
STRING pathABC "";
STRING pathABCView "";
STRING pathWINSYS "";
STRING pathDATA "";
STRING pathDATASAMPLE "";
STRING pathDATATUTOR "";
STRING pathABCPAL "";
STRING pathABCSAMPLE "";
STRING pathABCTUTOR "";
STRING pathCPPSAMPLE "";
STRING pathCPPSAMPLERES "";
STRING pathFONT "";
STRING pathSNAP "";
STRING pathSNAPPAL "";
STRING pathQuikTour "";
STRING pathSNAPSAMPLE "";
# END - MANIFEST.CTL paths
STRING pathABCNode "";
STRING szHelp "";
STRING pathSavePAL "";
STRING szProductIni "";
STRING szTemp "";
STRING szTemp2 "";
STRING szUser "";
STRING szCompany "";
STRING szRunEnd "";
STRING szRunEndShort "";
STRING szRunEndName "";
STRING szABCAppName "";
STRING szABCVIEWAppName "";
STRING szDATAAppName "";
STRING szSNAPAppName "";
STRING szSectionName "";
STRING szRunDataEnd "";
STRING szRunDataName "";
STRING szABCName "";
STRING szDataName "";
STRING szSnapName "";
STRING szDATFile "";
STRING szOrderInfo "";
SetValue(szABCName, "ABC FlowCharter");
SetValue(szDataName, "ABC DataAnalyzer");
SetIcon (ABCFlowIcon,1,1,'ABC FlowCharter');
if LT (SCRIPT.nWindowsVersion,310)
{
MessageBox("ABC FlowCharter 4.0 requires\nMicrosoft Windows 3.1 or greater for installion.", "ABC FlowCharter 4.0", MB_OK | MB_ICONEXCLAMATION);
bQuit = TRUE;
}
SetValue(szABCAppName, 'ABCFLOW.EXE');
SetValue(szDATAAppName, 'ABCDATA.EXE');
SetValue(szABCVIEWAppName, 'ABCVIEW.EXE');
SetValue(szSNAPAppName, 'ABCSNAP.EXE');
if EQUALS(bDemoVersion, TRUE)
{
SetValue(szABCAppName, 'ABCDEMO.EXE');
}
SetText ("\n\n\n\n\n\n~One moment, please...");
PathCat(szTemp,SCRIPT.pathInstaller,'MGXNET.BIN');
if EXISTS(szTemp)
{
LoadManifest(szTemp);
}
if EQUALS (SCRIPT.bRestart,TRUE)
{
PathCat(szTemp, SCRIPT.pathInstaller,'MAN_ABC.BIN');
LoadManifest(szTemp);
if EXISTS(szTemp)
{
Delete(szTemp);
}
PathCat(szTemp, SCRIPT.pathInstaller,'VAR_ABC.BIN');
RestoreVariables(szTemp);
if EXISTS(szTemp)
{
Delete(szTemp);
}
call FinalCopyStep;
bQuit = TRUE;
}
if EQUALS(bCDROM, TRUE)
{
# running the CD install from \abc\network
# set szTemp to \abc
PathUp(szTemp, SCRIPT.pathInstaller);
pathABC = szTemp;
pathABCView = szTemp;
pathDATA = szTemp;
pathSNAP = szTemp;
PathCat(pathQuikTour, szTemp, 'TUTORIAL');
PathCat(pathABCTUTOR, szTemp, 'TUTORIAL');
PathCat(pathDATATUTOR, szTemp, 'TUTORIAL');
PathCat(pathABCSAMPLE, szTemp, 'SAMPLES');
PathCat(pathCPPSAMPLE, szTemp, 'SAMPLES');
PathCat(pathCPPSAMPLE, pathCPPSAMPLE, 'OLE_VBX');
}
else
{
PathCat(szTemp,SCRIPT.pathInstaller,'MGXNET.INI');
if EXISTS(szTemp)
{
GetProfileString(szABCName,'ABCPath',pathABC, szTemp);
GetProfileString(szABCName,'ABCViewPath',pathABCView, szTemp);
GetProfileString(szABCName,'DataPath',pathDATA, szTemp);
GetProfileString(szABCName,'SNAPPath',pathSNAP, szTemp);
GetProfileString(szABCName,'QuikTourPath',pathQuikTour, szTemp);
GetProfileString(szABCName,'ABCTutorPath',pathABCTUTOR, szTemp);
GetProfileString(szABCName,'DATATutorPath',pathDATATUTOR, szTemp);
GetProfileString(szABCName,'SamplePath',pathABCSAMPLE, szTemp);
GetProfileString(szABCName,'CPPSamplePath',pathCPPSAMPLE, szTemp);
}
}
GetWindowsPath (pathWindows);
GetSystemPath (pathSystem);
SetValue(pathOLE, pathSystem);
SetValue(pathFONT, pathSystem);
SetProfileString('Micrografx', 'ABC FlowCharter 2.0', NULL);
SetProfileString('Micrografx', 'ABC FlowCharter 3.0', NULL);
GetProfileString('Micrografx', 'ABC FlowCharter 4.0 Node', pathABCNode);
if STRCMP (pathABCNode,'')
{
PathUp (szTemp,pathWindows);
PathCat (pathABCNode, szTemp, 'ABC');
}
PathCat (pathABCPAL, pathABCNode, 'PALETTES');
# start of main loop
while EQUALS (bQuit,FALSE)
{
if EQUALS (bTrialVersion, FALSE)
{
call HandleSerialNo;
}
# test here because HandleSerialNo dialog has the only quit button
if EQUALS(bQuit, FALSE)
{
bCancel = FALSE;
bIcons = FALSE;
bNeedLocalDir = FALSE;
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
bNeedLocalDir = TRUE;
}
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
bNeedLocalDir = TRUE;
}
if EQUALS (bNeedLocalDir,TRUE)
{
call ChooseABCPath;
}
if EQUALS(bCancel, FALSE)
{
bAskIcons = FALSE;
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
bAskIcons = TRUE;
}
GetSelectCount (nCount,'pkgABCSamples','','');
if GT (nCount,0)
{
bAskIcons = TRUE;
}
GetSelectCount (nCount,'pkgABCView','','');
if GT (nCount,0)
{
bAskIcons = TRUE;
}
GetSelectCount (nCount,'pkgDataCharter','','');
if GT (nCount,0)
{
bAskIcons = TRUE;
}
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
bAskIcons = TRUE;
}
bIcons = FALSE;
if(EQUALS(bAskIcons, TRUE)
{
SetHelp ("Click ADD to add icons.");
SetExtHelp ("");
SetButtons ("&Add","&Skip","Cancel",BUTTON1, BUTTON2, BUTTON3);
TextDialog (
"The installation program can add the ABC FlowCharter icons
" to the Program Manager for you. If you want to
" add icons, click ADD now.");
if PRESSED (BUTTON1)
{
bIcons = TRUE;
}
if PRESSED (BUTTON3)
{
bCancel = TRUE;
bStop = TRUE;
}
}
call FinalCopyStep;
}
}
}
[ChooseABCPath] ()
SetHelp ("Click CONTINUE to proceed.");
pathSavePAL = pathABCNode;
SetHelp ("Click OK to accept the local ABC directory.");
SetExtHelp (
"You can choose where you want to install the local ABC
" files. It's as easy as accepting the drive and directory
" in the text box or typing new information in the text
" box.\n\n
"To select a drive and directory:\n
"- Type a new drive and directory in the text box, then
" click OK.\n
"\tOR\n
"- Accept the path listed in the text box by clicking OK.\n\n
"Note: The space available on each drive is located to the
" right of the drive letter in the list box.");
SetButtons ("OK","Cancel","",BUTTON1,BUTTON2);
AutoGetPath(pathABCNode,"Enter the path to use for your local ABC directory.
"Where do you want to put the local ABC files? The directory
" you specify will contain the local ABC files when the installation process is complete.");
if PRESSED (BUTTON1)
{
PathCat (pathABCPAL, pathABCNode, 'PALETTES');
}
if PRESSED (BUTTON2)
{
pathABCNode = pathSavePAL;
bStop = TRUE;
bCancel = TRUE;
}
[AddIcons] ()
InitProgMan(bResult);
if EQUALS(bResult,TRUE)
{
# do the Demos icons first so the Program
# icons end up in front
GetSelectCount (nCount,'pkgABCSamples','','');
if GT (nCount,0)
{
# only add the OLE AUTO Help Icon in this group if samples where installed
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
SetValue(szGroupName, 'ABC OLE Automation Demos');
PathCat (szTemp2,pathABC,"AUTOMATE.HLP");
SetValue(szTemp, 'WINHELP ');
strcat(szTemp, szTemp2);
AddIcon (szGroupName,"ABC OLE Automation Help",szTemp,'WINHELP.EXE',0);
}
SetValue(szGroupName, 'ABC OLE Automation Demos');
# Add icons for the demo programs
PathCat (szTemp,pathWINSYS,"DEPLOY.EXE");
AddIcon (szGroupName,"Deployment Flowchart DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"ORGCHART.EXE");
AddIcon (szGroupName,"Org Chart DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"EXCELDAT.EXE");
AddIcon (szGroupName,"Excel 5.0 Data DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"NETWORK.EXE");
AddIcon (szGroupName,"Network Database DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"MOVE.EXE");
AddIcon (szGroupName,"Move Event DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"EVENTS.EXE");
AddIcon (szGroupName,"Double-Click & Delete Events DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"FIELD.EXE");
AddIcon (szGroupName,"Field Change DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"LINEDRAW.EXE");
AddIcon (szGroupName,"Line Draw DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"MENU.EXE");
AddIcon (szGroupName,"Menus DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathABCSAMPLE,"T_ONLINE.EXE");
AddIcon (szGroupName,"Text On Lines DEMO",szTemp,szTemp,0);
PathCat (szTemp,pathCPPSAMPLE,"OLE_VBX.EXE");
AddIcon (szGroupName,"VC++/MFC Events DEMO",szTemp,szTemp,0);
}
SetValue(szGroupName, 'ABC FlowCharter 4.0');
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
PathCat (szTemp,pathABC,szABCAppName);
if EQUALS (bTrialVersion, TRUE)
{
AddIcon (szGroupName,"ABC FlowCharter 30-Day Trial Version",szTemp,szTemp,0);
}
else
{
AddIcon (szGroupName,"ABC FlowCharter",szTemp,szTemp,0);
}
}
GetSelectCount (nCount,'pkgABCView','','');
if GT (nCount,0)
{
PathCat (szTemp,pathABCView,szABCVIEWAppName);
AddIcon (szGroupName,"ABC Viewer",szTemp,szTemp,0);
}
GetSelectCount (nCount,'pkgDataCharter','','');
if GT (nCount,0)
{
PathCat(szTemp,pathDATA,szDATAAppName);
if EQUALS (bTrialVersion, TRUE)
{
AddIcon (szGroupName,"ABC DataAnalyzer 30-Day Trial Version",szTemp,szTemp,0);
}
else
{
AddIcon (szGroupName,"ABC DataAnalyzer",szTemp,szTemp,0);
}
}
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
# Delete the old icon(s)
DeleteIcon ("Micrografx", "SnapGrafx");
DeleteIcon ("Micrografx", "ABC SnapGraphics 1.0");
PathCat(szTemp,pathSNAP,szSNAPAppName);
if EQUALS (bTrialVersion, TRUE)
{
AddIcon (szGroupName,"ABC SnapGraphics 30-Day Trial Version",szTemp,szTemp,0);
}
else
{
AddIcon (szGroupName,"ABC SnapGraphics",szTemp,szTemp,0);
}
}
TermProgMan;
}
[AddWinIni] ()
# ABC FlowCharter stuff
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
PathCat(szTemp,pathABC,szABCAppName);
strcat(szTemp, ' ^.af3');
SetProfileString ('Extensions','af3',szTemp);
PathCat(szTemp,pathABC,szABCAppName);
strcat(szTemp, ' ^.af2');
SetProfileString ('Extensions','af2',szTemp);
PathCat(szTemp,pathABC,szABCAppName);
strcat(szTemp, ' ^.abc');
SetProfileString ('Extensions','abc',szTemp);
PathCat(szTemp,pathABC,szABCAppName);
strcat(szTemp, ' ^.aft');
SetProfileString ('Extensions','aft',szTemp);
PathCat(szTemp,pathABC,szABCAppName);
strcat(szTemp, ' ^.afw');
SetProfileString ('Extensions','afw',szTemp);
SetProfileString('Micrografx', 'ABC FlowCharter 4.0 Node', pathABCNode);
}
GetSelectCount (nCount,'pkgDataCharter','','');
if GT (nCount,0)
{
PathCat(szTemp,pathDATA,szDATAAppName);
strcat(szTemp, ' ^.dat');
SetProfileString ('Extensions','dat',szTemp);
PathCat(szTemp,pathDATA,szDATAAppName);
strcat(szTemp, ' ^.grf');
SetProfileString ('Extensions','grf',szTemp);
SetProfileString('Micrografx', 'ABC LIBRARIES', pathDATA);
}
# ABC SnapGraphics stuff
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
if EQUALS(bDemo, FALSE)
{
PathCat (szTemp,pathSNAP,szSNAPAppName);
strcat(szTemp, ' ^.sg');
SetProfileString ('Extensions','sg',szTemp);
PathCat (szTemp,pathSNAP,szSNAPAppName);
strcat(szTemp, ' ^.sgt');
SetProfileString ('Extensions','sgt',szTemp);
PathCat (szTemp,pathSNAP,szSNAPAppName);
strcat(szTemp, ' ^.sgw');
SetProfileString ('Extensions','sgw',szTemp);
}
}
[AddABCIni] ()
PathCat(szTemp, pathWindows, 'ABC.INI');
SetValue(szSectionName, 'ABC FlowCharter');
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
SetProfileString (szSectionName,'PalettePath',pathABCPAL, szTemp);
SetProfileString (szSectionName,'SpellNumLanguages', "1", szTemp);
SetProfileString (szSectionName,'SpellLanguage1', "English (US),16,128,abcspeng.lex,abchyeng.lex", szTemp);
SetProfileString (szSectionName,'LastChartDir',pathABCNode, szTemp);
PathCat(szTemp2, pathABCNode, 'USER.DIC');
SetProfileString (szSectionName,'SpellUserDictionary', szTemp2,szTemp);
SetProfileString (szSectionName,'SpellDictionaryPath', pathABC, szTemp);
SoftSetProfileString (szSectionName,'IndexCurrDir',pathABCTUTOR, szTemp);
SoftSetProfileString (szSectionName,'LastLogoDir',pathABCSAMPLE, szTemp);
SoftSetProfileString (szSectionName,'LastPaletteDir',pathABCPAL, szTemp);
SoftSetProfileString (szSectionName,'AppMaximized', 'true', szTemp);
SoftSetProfileString (szSectionName,'PaletteOn', 'true', szTemp);
SoftSetProfileString (szSectionName,'NoteOn', 'false', szTemp);
SoftSetProfileString (szSectionName,'IndexOn', 'false', szTemp);
SoftSetProfileString (szSectionName,'RulersOn', 'true', szTemp);
SoftSetProfileString (szSectionName,'ShapeSizing', '0', szTemp);
SoftSetProfileString (szSectionName,'DoubleClick', '0', szTemp);
SoftSetProfileString (szSectionName,'CtrlDblClick', '1', szTemp);
SoftSetProfileString (szSectionName,'IndexUseCurrDir', 'true', szTemp);
SoftSetProfileString (szSectionName,'IndexSrchSubDirs', 'false', szTemp);
SoftSetProfileString (szSectionName,'IndexView', '0', szTemp);
SoftSetProfileString (szSectionName,'Files', '64', szTemp);
SoftSetProfileString (szSectionName,'RulerSnap', 'true', szTemp);
SoftSetProfileString (szSectionName,'SnapResolution', '0', szTemp);
SoftSetProfileString (szSectionName,'GuidelineRange', '75', szTemp);
SetProfileString (szSectionName,'RuleMeasure', NULL, szTemp);
SetProfileString (szSectionName,'IndexFont', NULL, szTemp);
SetProfileString (szSectionName,'HorzLineSpacing', NULL, szTemp);
SetProfileString (szSectionName,'VertLineSpacing', NULL, szTemp);
if EQUALS (bTrialVersion, FALSE)
{
SetProfileString (szSectionName,'Warning', '0', szTemp);
}
else
{
SetProfileString (szSectionName,'Warning', '1', szTemp);
}
PathCat(szTemp2, pathABCSAMPLE, 'DEFAULT.AFT');
SetProfileString (szSectionName,'DefaultTemplate', szTemp2, szTemp);
SetProfileString (szSectionName,'DefaultPalette','STD.AFP', szTemp);
PathCat(szTemp2,pathABCPAL,"AUDIT.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"AUDIT1.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"BASIC.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"BASICC.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"BUSIPROC.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"CATALYST.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"COLORS.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"DATAFLOW.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"DIN66001.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"NETWORK1.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"NETWORK2.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"NETWORK3.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"NETWORK4.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"NETWORK5.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"V_ADDONS.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"OFFICE.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"ORGCHART.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"ORIGINAL.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"PROCESS.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"PROCESS1.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"QUALITY.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"QUALITY1.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"SCHEMA.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"SDL.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"SIMPLIFY.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"STD.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"TELCO.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"TPM.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
PathCat(szTemp2,pathABCPAL,"XTENSION.AFP");
AddShapePal(szTemp, szSectionName, szTemp2);
}
# save out the user info
SetProfileString ('User Info','Name', szUser, szTemp);
SetProfileString ('User Info','Company', szCompany, szTemp);
# save out the pathnames of the ABC.EXE and ABCDATA.EXE
PathCat(szTemp2,pathABC,szABCAppName);
if EXISTS(szTemp2)
{
SetProfileString ('Components',szABCName,szTemp2, szTemp);
}
else
{
SetProfileString ('Components',szABCName,NULL, szTemp);
}
PathCat(szTemp2,pathDATA,szDATAAppName);
if EXISTS(szTemp2)
{
# This is new for FlowCharter 4.0
SetValue(szTemp3, 'ABC DataAnalyzer,');
strcat(szTemp3, szTemp2);
SetProfileString(szSectionName,'AddOn1', szTemp3, szTemp);
# This is the old line - left in, harmless
SetProfileString ('Components','ABC DataAnalyzer',szTemp2, szTemp);
}
else
{
SetProfileString ('Components','ABC DataAnalyzer', NULL, szTemp);
}
PathCat(szTemp2,pathSNAP,szSNAPAppName);
if EXISTS(szTemp2)
{
SetValue(szTemp3, 'ABC SnapGraphics,');
strcat(szTemp3, szTemp2);
SetProfileString(szSectionName,'AddOn2', szTemp3, szTemp);
SetProfileString ('Components','ABC SnapGraphics', szTemp2, szTemp);
}
else
{
SetProfileString ('Components','ABC SnapGraphics', NULL, szTemp);
}
SetProfileString ('ABC DataAnalyzer','Path',pathDATATUTOR,szTemp);
SetProfileString ('ABC DataAnalyzer','BubbleHelp','1',szTemp);
if EQUALS (bTrialVersion, FALSE)
{
SetProfileString ('ABC DataAnalyzer','Warning', '0', szTemp);
}
else
{
SetProfileString ('ABC DataAnalyzer','Warning', '1', szTemp);
}
[AddSNAPIni] ()
if EQUALS(bDemo, TRUE)
{
PathCat(szTemp, pathWindows, 'ABCDEMO.INI');
}
else
{
PathCat(szTemp, pathWindows, 'ABC.INI');
}
# Create a 'sub-path' for Snap Palettes
SetProfileString ('SnapGraphics','PalettePath',pathABCPAL, szTemp);
# Create a 'sub-path' for CHARTS
PathCat(szTemp2, pathABCNode, 'CHARTS');
CreatePath(bResult, szTemp2);
if EQUALS(bSuccess, TRUE)
{
SetProfileString ('SnapGraphics','LastChartDir',szTemp2, szTemp);
}
else
{
SetProfileString ('SnapGraphics','LastChartDir', NULL, szTemp);
}
SetProfileString ('SnapGraphics','AppMaximized', 'true', szTemp);
SetProfileString ('SnapGraphics','RuleMeasure', NULL, szTemp);
SetProfileString ('SnapGraphics','HintOff', 'false', szTemp);
if EQUALS (bTrialVersion, FALSE)
{
SetProfileString ('SnapGraphics','Warning', '0', szTemp);
}
else
{
SetProfileString ('SnapGraphics','Warning', '1', szTemp);
}
SetProfileString ('SnapGraphics','SpellNumLanguages','1' ,szTemp);
SetProfileString ('SnapGraphics','SpellLanguage1','English (US),16,128,abcspeng.lex,abchyeng.lex',szTemp);
SetProfileString ('SnapGraphics','SpellOptions','0' ,szTemp);
SetProfileString ('SnapGraphics','SpellCurrLanguage','1' ,szTemp);
PathCat(szTemp2, pathABCNode, 'USER.DIC');
SetProfileString ('SnapGraphics','SpellUserDictionary', szTemp2,szTemp);
SetProfileString ('SnapGraphics','SpellDictionaryPath',pathSNAP,szTemp);
# write out user info
SetProfileString('User Info','Name', szUser, szTemp);
SetProfileString('User Info','Company', szCompany, szTemp);
# register the SNAP OLE 2.0 server
call SNAPServerReg;
# add icons to Word 6.0 and Excel 5.0
if EQUALS (bTrialVersion, FALSE)
{
SetText ("\n\n\n\n\n\n~One moment, please...");
ShowWindow;
PathCat(szTemp,pathABCNode,'SNAPBTN.EXE');
WinExec(nResult,szTemp,SW_SHOW);
}
[ResultDialog] ()
bCancel = FALSE;
bStop = FALSE;
bQuit = FALSE;
SetText ("\n\n\n\n\n\n~One moment, please...");
if EQUALS (bSuccess,TRUE)
{
SetExtHelp ('');
SetHelp("");
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
PathCat(szTemp,pathABC,szABCAppName);
SetValue(szRunEnd, szTemp);
SetValue(szRunEndShort, szABCAppName);
SetValue(szRunEndName, "ABC FlowCharter 4.0");
GetSelectCount (nCount,'pkgDataCharter','','');
if GT (nCount,0)
{
SetValue(szRunDataShort, szDATAAppName);
SetValue(szRunDataName, "ABC DataAnalyzer 1.1");
}
SetHelp("Click START to run ABC FlowCharter 4.0.");
}
else
{
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
PathCat(szTemp,pathSNAP,szSNAPAppName);
SetValue(szRunEnd, szTemp);
SetValue(szRunEndName, "ABC SnapGraphics");
SetValue(szRunEndShort, szSNAPAppName);
SetHelp("Click START to run ABC SnapGraphics.");
}
else
{
GetSelectCount (nCount,'pkgABCView','','');
if GT (nCount,0)
{
PathCat(szTemp,pathABCView,szABCVIEWAppName);
SetValue(szRunEnd, szTemp);
SetValue(szRunEndName, "ABC Viewer");
SetValue(szRunEndShort, szABCVIEWAppName);
SetHelp("Click START to run ABC Viewer.");
}
else
{
GetSelectCount (nCount,'pkgDataCharter','','');
if GT (nCount,0)
{
PathCat(szTemp,pathDATA,szDATAAppName);
SetValue(szRunEnd, szTemp);
SetValue(szRunEndName, "ABC DataAnalyzer");
SetValue(szRunEndShort, szDATAAppName);
SetHelp("Click START to run ABC DataAnalyzer.");
}
}
}
}
bRunitMessage = FALSE;
if EQUALS(SCRIPT.bNetwork, FALSE)
{
if EXISTS (szRunEnd)
{
bRunitMessage = TRUE;
}
}
if EQUALS(bRunitMessage, TRUE)
{
if EQUALS(bNeedToRestart, TRUE)
{
SetHelp ("Click QUIT to end Micrografx Installer.");
SetButtons ("&Quit",'','',BUTTON1,BUTTON1);
TextDialog (
"~Installation was successful!\n\n
"To start " szRunEndName ", you must exit Windows,
" make changes to your AUTOEXEC.BAT, and reboot your
" workstation.\n\n
"To end the Micrografx Installer, click QUIT now.");
SetHelp ('');
SetButtons ('','','',BUTTON1,BUTTON1);
}
else
{
if EQUALS(bRunitMessage, TRUE)
{
SetButtons ("&Start", "&Quit",'',BUTTON1,BUTTON2);
if EQUALS (bIcons,TRUE)
{
TextDialog (
"~Installation was successful!\n\n
"To start " szRunEndName ", click START now. Or, double
" click the " szRunEndName " icon in the ABC FlowCharter 4.0 group
" of the Program Manager.");
}
else
{
TextDialog (
"~Installation was successful!\n\n
"To start " szRunEndName ", click START now. Or, run the
" File Manager, change to the " szRunEndName " directory,
" and double click the file " szRunEndShort ".");
}
if PRESSED (BUTTON1)
{
WinExec(nResult,szRunEnd,SW_SHOW);
}
call DoBasicSetIcon;
SetHelp ('');
SetButtons ('','','',BUTTON1,BUTTON1);
}
else
{
SetHelp ("Click QUIT to end Micrografx Installer.");
SetButtons ("&Quit",'','',BUTTON1,BUTTON1);
TextDialog (
"~Installation was successful!\n\n
"To end the Micrografx Installer, click QUIT now.");
SetHelp ('');
SetButtons ('','','',BUTTON1,BUTTON1);
}
}
}
}
bCancel = TRUE;
bStop = TRUE;
bQuit = TRUE;
[RegOLE2] ()
# do the regedit for the OLE2 libraries
PathCat(szTemp2,pathSystem,'OLE2.REG');
SetValue(szTemp, 'REGEDIT /S ');
strcat(szTemp, szTemp2);
WinExec (nResult,szTemp,SW_HIDE);
[HandleSerialNo]
GetModuleFileName(szTemp);
PathUp(szTemp, szTemp);
if EQUALS(bCDROM, TRUE)
{
PathCat(szHelp, szTemp, 'README.HLP');
}
else
{
PathCat(szHelp, szTemp, 'NETWORK.HLP');
}
WinHelp(bResult,szHelp,HELP_INDEX);
PathCat(szProductIni,SCRIPT.pathArchive,"PRODUCT.INI");
if NOT EXISTS (szProductIni)
{
PathCat (szProductIni,SCRIPT.pathInstaller,"PRODUCT.INI");
}
if EQUALS (bCDROM,FALSE)
{
GetProfileString ('Owner Info' ,'Company',szCompany ,szProductIni);
}
if EQUALS (bTrialVersion, FALSE)
{
SetExtHelp (
"ABC FlowCharter is already installed on your network. The Micrografx
" Installer will make it available to you.\n\n
"Please enter your full name and company name (if applicable)
" in the boxes provided. ABC FlowCharter will display this information
" in its About box for easy identification.\n\n");
}
else
{
SetExtHelp (
"The 30-Day trial version of ABC FlowCharter is already installed on your network.
" The Micrografx Installer will make it available to you.\n\n
"Please enter your full name and company name (if applicable)
" in the boxes provided. ABC FlowCharter will display this information
" in its About box for easy identification.\n\n");
}
bStop = FALSE;
while EQUALS (bStop,FALSE)
{
SetButtons ("&Continue","&Quit",'',BUTTON1,BUTTON2);
if EQUALS (bTrialVersion, TRUE)
{
Input2 (
szUser,"Enter your full name."
szCompany,"Enter your company name."
"Welcome to the Micrografx Installer for the 30-Day trial version of ABC
" FlowCharter 4.0 for quick and easy Windows flowcharting.\n\n
"Use this program to install ABC FlowCharter and its
" additional features such as tutorials and samples.\n\n");
}
else
{
Input2 (
szUser,"Enter your full name."
szCompany,"Enter your company name."
"Welcome to the Micrografx Installer for ABC FlowCharter 4.0
" for quick and easy Windows flowcharting.\n\n
"Use this program to install ABC FlowCharter and its
" additional features such as tutorials and samples.\n\n");
}
if PRESSED (BUTTON1)
{
SetHelp ("Click CONTINUE to proceed.");
SetExtHelp ('');
SetButtons ("&Continue","&Back","",BUTTON1,BUTTON2);
TextDialog (
"Is this information correct?\n\n
"\tName:\t\t" szUser "\n
"\tCompany:\t" szCompany "\n\n
"If the information above is correct, click CONTINUE to
" proceed with installation, or click BACK to change your
" input.");
if PRESSED (BUTTON1)
{
SetProfileString ('Owner Info','Company',szCompany,szProductIni,1);
bStop = TRUE;
}
}
else
{
bStop = TRUE;
bQuit = TRUE;
}
}
[CopyOverNetFiles]
NeedToInstallOLE2DLLs(bNeedToCopyOLEDLLs, bNeedToRebootFirst);
# prevent ENDLESS re-booting
if EQUALS (SCRIPT.bRestart,TRUE)
{
bNeedToRebootFirst = FALSE;
}
if EQUALS (bNeedToRebootFirst, TRUE)
{
PathCat(szTemp, SCRIPT.pathInstaller,'MAN_ABC.BIN');
SaveManifest(szTemp);
PathCat(szTemp, SCRIPT.pathInstaller,'VAR_ABC.BIN');
SaveVariables(szTemp);
SetIcon (LogoIcon,1,1,"ABC FlowCharter");
SetHelp ("Click CONTINUE to proceed and restart Windows.");
SetButtons ("&Continue","&Quit","",BUTTON1,BUTTON2);
TextDialog (
"ABC FlowCharter 4.0 requires the latest OLE 2.0 libraries.\n
"To copy the libraries, Windows must restart.\n\n
"If you choose QUIT, ABC FlowCharter 4.0 will not install.");
if PRESSED (BUTTON1)
{
RestartInstaller;
}
if PRESSED (BUTTON2)
{
bQuit = TRUE;
}
}
if EQUALS (bQuit, FALSE)
{
SetText ("\n\n\n\n\n\n~Copying font files...");
PathCat (szTemp,SCRIPT.pathInstaller,'*.TTF');
Copy(szTemp, pathSystem);
PathCat (szTemp,SCRIPT.pathInstaller,'*.FOT');
Copy(szTemp, pathSystem);
if EQUALS (bNeedToCopyOLEDLLs, TRUE)
{
SetText("\n\n\n\n\n\n~Copying OLE 2.0 files...");
PathCat(szTemp,SCRIPT.pathInstaller,'*.DLL');
UpdateDLLs(szTemp, pathSystem);
}
PathCat(szTemp,SCRIPT.pathInstaller,'OLE2*.REG');
UpdateFiles(szTemp, pathSystem);
SetText("\n\n\n\n\n\n~Copying OLE Automation support files...");
# get rid of the Toolkit 1.1 VBX
PathCat(szTemp,pathSystem,'ABCFLOW.VBX');
Delete(szTemp);
PathCat(szTemp,SCRIPT.pathInstaller,'*.VBX');
Copy(szTemp, pathSystem);
PathCat(szTemp,pathSystem,'DEPLOY.INI');
Delete(szTemp);
PathCat(szTemp,SCRIPT.pathInstaller,'DEPLOY.*');
Copy(szTemp, pathSystem);
PathCat(szTemp,SCRIPT.pathInstaller,'NETWORK*.EXE');
Copy(szTemp, pathSystem);
PathCat(szTemp,SCRIPT.pathInstaller,'ABCAUTO*.REG');
Copy(szTemp, pathSystem);
GetSelectCount (nCount,'pkgABC','','');
if GT (nCount,0)
{
CreatePath(bSuccess, pathABCPAL);
if EQUALS(bSuccess, TRUE)
{
SetText ("\n\n\n\n\n\n~Copying ABC shape palette files...");
PathCat(szTemp,SCRIPT.pathInstaller,'*.AFP');
UpdateFiles(szTemp, pathABCPAL);
}
}
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
CreatePath(bSuccess, pathABCPAL);
if EQUALS(bSuccess, TRUE)
{
SetText ("\n\n\n\n\n\n~Copying ABC shape palette files...");
PathCat(szTemp,SCRIPT.pathInstaller,'*.SGP');
UpdateFiles(szTemp, pathABCPAL);
}
# copy the Word & Excel button programs to the
# local node
PathCat(szTemp,pathSNAP,'SNAPBTN*.*');
Copy(szTemp, pathABCNode);
}
}
[FinalCopyStep] ()
if EQUALS(bCancel, FALSE)
{
Call CopyOverNetFiles;
SetHelp ('');
SetButtons ('','','',BUTTON1,BUTTON1);
ClearInfoPanel (CLEAR_ALL);
# ABC 4.0 no longer installs fonts
# SetText ("\n\n\n\n\n\n~Processing fonts...");
# ProcessFonts(bSuccess, '', TT, TRUE, 'pkgFonts', TRUE);
# FontChange;
#
# WinIniChange("fonts");
if EQUALS (bIcons,TRUE)
{
SetText ("\n\n\n\n\n\n~Adding icons...");
call AddIcons;
}
call RegOLEAutomation;
SetText ("\n\n\n\n\n\n~Processing WIN.INI...");
call AddWinIni;
SetText ("\n\n\n\n\n\n~Processing ABC.INI...");
call AddABCIni;
call AddViewerIni;
GetSelectCount (nCount,'pkgSNAP','','');
if GT (nCount,0)
{
call AddSNAPIni;
}
if EQUALS(bNeedToCopyOLEDLLs, TRUE)
{
SetText ("\n\n\n\n\n\n~Registering OLE 2.0 libraries...");
call RegOLE2;
}
GetSelectCount (nCount,'pkgABC','','');
if GT(nCount,0)
{
SetText ("\n\n\n\n\n\n~Registering ABC FlowCharter OLE Server...");
call RegFlowOLE;
}
GetSelectCount (nCount,'pkgDataCharter','','');
if GT(nCount,0)
{
SetText ("\n\n\n\n\n\n~Registering ABC DataAnalyzer OLE Server...");
call RegDAOLE;
}
call ResultDialog;
}
[RegOLEAutomation]
# do the regedit for the ABC OLE Automation Support
PathCat(szTemp2,pathABC,'ABCAUTO.REG');
if EXISTS(szTemp2)
{
SetValue(szTemp, 'REGEDIT /S ');
strcat(szTemp, szTemp2);
WinExec (nResult,szTemp,SW_HIDE);
# now clean up the paths for the OLE Automation
# server entries
PathCat(szTemp2,pathABC,'abcflow.exe');
if EXISTS(szTemp2)
{
PathCat(szTemp,pathABC,'abcflow.exe /automation');
}
else
{
PathCat(szTemp2,pathABCView,'abcview.exe');
if EXISTS(szTemp2)
{
PathCat(szTemp,pathABCView,'abcview.exe /automation');
}
else
{
PathCat(szTemp,pathABC,'abcflow.exe /automation');
}
}
RegSetValue("CLSID\\{B9513B80-ECC8-101A-9DC4-0000C0B58E81}\\LocalServer", szTemp);
PathCat(szTemp,pathABC,'ABCAUTO.TLB');
RegSetValue("TypeLib\\{02C28460-F307-101A-9DC4-0000C0B58E81}\\4\\409\\win16", szTemp);
RegSetValue("TypeLib\\{02C28460-F307-101A-9DC4-0000C0B58E81}\\4\\HELPDIR", pathABC);
}
[DoBasicSetIcon] ()
SetIcon (ABCFlowIcon,1,1,"ABC FlowCharter");
[SNAPServerReg] ()
# do the regedit for the SNAP OLE 2.0 Server Support
PathCat(szTemp2,pathSNAP,'SNAP.REG');
if EXISTS(szTemp2)
{
SetValue(szTemp, 'REGEDIT /S ');
strcat(szTemp, szTemp2);
WinExec (nResult,szTemp,SW_HIDE);
PathCat(szTemp,pathSNAP,szSNAPAppName);
# HKEY_CLASSES_ROOT\CLSID\{1B46B1A1-6F12-101B-8432-0000C083742D}\LocalServer = c:\snap\abcsnap.exe
RegSetValue('CLSID\\{1B46B1A1-6F12-101B-8432-0000C083742D}\\LocalServer', szTemp);
#HKEY_CLASSES_ROOT\ABCSnap\protocol\StdFileEditing\server = c:\snap\abcsnap.exe
RegSetValue('ABCSnap\\protocol\\StdFileEditing\\server', szTemp);
#HKEY_CLASSES_ROOT\ABCSnap\shell\print\command = C:\SNAP\ABCSNAP.EXE /p %1
PathCat(szTemp,pathSNAP,szSNAPAppName);
strcat(szTemp, ' /p %%1');
RegSetValue('ABCSnap\\shell\\print\\command', szTemp);
#HKEY_CLASSES_ROOT\ABCSnap\shell\open\command = C:\SNAP\SNAP.EXE %1
PathCat(szTemp,pathSNAP,szSNAPAppName);
strcat(szTemp, ' %%1');
RegSetValue('ABCSnap\\shell\\open\\command', szTemp);
# HKEY_CLASSES_ROOT\CLSID\{1B46B1A1-6F12-101B-8432-0000C083742D}\DefaultIcon = c:\snap\snap.exe,0
PathCat(szTemp,pathSNAP,szSNAPAppName);
strcat(szTemp, ',0');
RegSetValue('CLSID\\{1B46B1A1-6F12-101B-8432-0000C083742D}\\DefaultIcon', szTemp);
}
[AddViewerIni] ()
PathCat(szTemp, pathWindows, 'ABC.INI');
SetValue(szSectionName, 'ABC Viewer');
GetSelectCount (nCount,'pkgABCView','','');
if GT (nCount,0)
{
SetProfileString (szSectionName,'LastChartDir',pathABCNode, szTemp);
SoftSetProfileString (szSectionName,'IndexCurrDir',pathABCTUTOR, szTemp);
GetSelectCount (nCount,'pkgABCSamples','','');
if GT (nCount,0)
{
SetProfileString (szSectionName,'LastChartDir',pathABCSAMPLE, szTemp);
SoftSetProfileString (szSectionName,'LastLogoDir',pathABCSAMPLE, szTemp);
}
SoftSetProfileString (szSectionName,'AppMaximized', 'true', szTemp);
SoftSetProfileString (szSectionName,'PaletteOn', 'true', szTemp);
SoftSetProfileString (szSectionName,'NoteOn', 'false', szTemp);
SoftSetProfileString (szSectionName,'IndexOn', 'false', szTemp);
SoftSetProfileString (szSectionName,'RulersOn', 'true', szTemp);
SoftSetProfileString (szSectionName,'ShapeSizing', '0', szTemp);
SoftSetProfileString (szSectionName,'DoubleClick', '0', szTemp);
SoftSetProfileString (szSectionName,'CtrlDblClick', '1', szTemp);
SoftSetProfileString (szSectionName,'IndexUseCurrDir', 'true', szTemp);
SoftSetProfileString (szSectionName,'IndexSrchSubDirs', 'false', szTemp);
SoftSetProfileString (szSectionName,'IndexView', '0', szTemp);
SoftSetProfileString (szSectionName,'Files', '64', szTemp);
SoftSetProfileString (szSectionName,'RulerSnap', 'true', szTemp);
SoftSetProfileString (szSectionName,'SnapResolution', '0', szTemp);
SoftSetProfileString (szSectionName,'GuidelineRange', '75', szTemp);
SetProfileString (szSectionName,'RuleMeasure', NULL, szTemp);
SetProfileString (szSectionName,'IndexFont', NULL, szTemp);
SetProfileString (szSectionName,'HorzLineSpacing', NULL, szTemp);
SetProfileString (szSectionName,'VertLineSpacing', NULL, szTemp);
}
[RegDAOLE] ()
# register the ABC PA OLE 1.0 server
PathCat(szTemp2,pathDATA,'ABCDATA.REG');
SetValue(szTemp, 'REGEDIT /S ');
strcat(szTemp, szTemp2);
WinExec (nResult,szTemp,SW_HIDE);
# fix up all the paths
PathCat(szTemp,pathDATA,'abcdata.exe %%1');
RegSetValue("ABCData\\shell\\open\\command", szTemp);
PathCat(szTemp,pathDATA,'abcdata.exe /p %%1');
RegSetValue("ABCData\\shell\\print\\command", szTemp);
PathCat(szTemp,pathDATA,'abcdata.exe');
RegSetValue("ABCData\\protocol\\StdFileEditing\\server", szTemp);
PathCat(szTemp,pathDATA,'abcdhnd.dll');
RegSetValue("ABCData\\protocol\\StdFileEditing\\handler", szTemp);
[RegFlowOLE] ()
# register the ABC PA OLE 1.0 server
PathCat(szTemp2,pathABC,'ABCFLOW.REG');
SetValue(szTemp, 'REGEDIT /S ');
strcat(szTemp, szTemp2);
WinExec (nResult,szTemp,SW_HIDE);
# fix up all the paths
PathCat(szTemp,pathABC,'abcflow.exe %%1');
RegSetValue("ABCFlow\\shell\\open\\command", szTemp);
PathCat(szTemp,pathABC,'abcflow.exe /p %%1');
RegSetValue("ABCFlow\\shell\\print\\command", szTemp);
PathCat(szTemp,pathABC,'abcflow.exe');
RegSetValue("ABCFlow\\protocol\\StdFileEditing\\server", szTemp);