home *** CD-ROM | disk | FTP | other *** search
INI File | 1993-09-02 | 11.0 KB | 409 lines |
- ;;Modified 8/25/93 SD
-
- Do Setup
-
-
-
- ;; Source directory, used to check version
- [Dir10] := [InstallFromDirectory]
-
- ;;QueFiles to [Dir10] Thermometer NoInterruption Quietly NoInsertionPrompt
- ;; *.ver
- ;;EndQueFiles
-
- ;;GetQuedFiles NoThermometer Quietly
- If FileExists [Dir10]\product.ver
- Dialog
- .cAbout to install AccuRender
- .cinteractive ray-trace renderer
- .cfor AutoCAD Release 12.
- .c
- .cDOS version 1.00
- EndDialog
- Else
- Dialog
- .cAbout to install AccuRender Demo
- .cinteractive ray trace renderer
- .cfor AutoCAD Release 12.
- .c
- .cDOS DEMO version 1.00
- EndDialog
- EndIf
-
- Do Install
-
-
- ;;----------------------------------------------------------------------------
- Procedure Install
-
- DetermineInstallationDrive 1,800,000 RequireFixed
- DetermineInstallationDirectory NoCreate
-
- If DirectoryExists [InstallationDirectory]
- Dialog [YesOrNo1]
- .cThe directory [InstallationDirectory] already exists.
- .cThe ACCUREND.MLB file will be renamed ACCUOLD.MLB.
- .cAll other files in [InstallationDirectory] will be overwritten.
- .c
- .cIf you have customized files in [InstallationDirectory],
- .c stop now and move them to a safe place.
- .c
- .cDo you want to continue installation ?
- EndDialog
- If [YesOrNo1] = N
- Exit
- Else
- If FileExists [InstallationDirectory]\ACCUREND.MLB
- If FileExists [InstallationDirectory]\ACCUOLD.MLB
- DeleteFiles from [InstallationDirectory] Quietly
- ACCUOLD.MLB
- EndDeleteFiles
- EndIf
- If FileExists [InstallationDirectory]\ACCUOLD.MDX
- DeleteFiles from [InstallationDirectory] Quietly
- ACCUOLD.MDX
- EndDeleteFiles
- EndIf
- If FileExists [InstallationDirectory]\ACCUREND.MDX
- RenameFile [InstallationDirectory]\ACCUREND.MDX to ACCUOLD.MDX
- EndIf
- RenameFile [InstallationDirectory]\ACCUREND.MLB to ACCUOLD.MLB
- EndIf
- If FileExists [InstallationDirectory]\ACCUREND.LSP
- DeleteFiles from [InstallationDirectory] Quietly
- ACCUREND.LSP
- EndDeleteFiles
- EndIf
- EndIf
- Else
- CreateDirectoryifNecessary [InstallationDirectory]
- EndIf
-
- QueFileGroup 1
- QueFileGroup 2
- QueFileGroup 3
-
- ;;ask if you want the all materials or a shortened version
- If FileExists [Dir10]\product.ver
- GetMenuChoice
- Install all materials
- ;Preferred Option:
- ;Installs over 250 materials for use with AccuRender.
- ;7 MB free disk space required.
- Install short list of materials
- ;Second Option:
- ;Installs 80 materials for use with AccuRender.
- ;3 MB free disk space required.
- EndGetMenuChoice
-
- ;;Process answer
- InCase Choice is
- = 1: QueFileGroup 5
- = 2: QueFileGroup 4
- EndInCase
- Else
- QueFileGroup 4
- EndIf
-
- GetQuedFiles
-
- ;;AccuRender order form, demo version only.
- If FileExists [InstallFromDrive]:\order.frm
- CopyFiles from [InstallFromDrive]:\ to [InstallationDirectory] Quietly
- order.frm
- EndCopyFiles
- EndIf
-
- If FileExists [InstallationDirectory]\*.ver
- DeleteFiles from [InstallationDirectory] Quietly
- *.ver
- EndDeleteFiles
- Endif
-
- ;;Modify the ACCUREND.ini file
- If FileExists [InstallationDirectory]\ACCUREND.INI
- ExamineTextFile [InstallationDirectory]\ACCUREND.INI
- [Number1] := LineNumberWith (MAPPATH,=,)
- [String1] := LineWith (MAPPATH,=,)
- ForgetTextFile
-
- [Number11] := 0
- [String6] := [InstallationDirectory]
-
- If [String1] <> BlankString ;;{ There is a SET MAPPATH line
- ;;{
- [YesOrNo4] := Y
- [Number3] := LengthOf [String1]
- [Number4] := PositionOf = in [String1]
- IncrementNumber [Number4]
- IncrementNumber [Number4]
- ;; Get environment string for MAPPATH= (string 3)
- ;; If number4 is greater than string length, mappath =
- If [Number4] < [Number3]
- [String3] := SubstringOf [String1] from [Number4] to [Number3]
- Else
- [String3] := $empty$
- EndIf
-
- [Number3] := LengthOf [String3] ;; Length of MAPPATH= after the =
-
- If [String3] Contains [String6] ;;{ SET MAPPATH line contains current Accurend= string
- [String9] := N
- Else
- ;; mappath =
- If [String3] = $empty$
- [String9] := MAPPATH = [InstallationDirectory];
- Else ;; mappath has a value append it
- [String9] := MAPPATH = [InstallationDirectory];[String3]
- EndIf
- EndIf
- EndIf
-
- If [String9] <> N
- ModifyTextFile [InstallationDirectory]\ACCUREND.INI Quietly NoBackup
- AddOrChangeLineWith (MAPPATH,=,) As "[String9]" At Beginning
- EndModifyTextFile
- EndIf
- EndIf
-
- ;;ask if you want to modify Autoexec or make batch file
- If FileExists [Dir10]\order.frm
- GetMenuChoice
- Modify AUTOEXEC.BAT file
- ;Preferred Option:
- ;Modifies your AUTOEXEC.BAT file to run AccuRender
- ;with AutoCAD. Refer to [InstallationDirectory]\ACCUREND.TXT
- ;text file for more information.
- Create ACCUREND.BAT file
- ;Second Option:
- ;Creates a batch file ACCUREND.BAT in your
- ;ACCUREND directory. Use this batch file to
- ;start AutoCAD with AccuRender enabled.
- Exit
- ;Third Option:
- ;Bypass automatic changes. AccuRender will
- ;not run properly unless you add the
- ;ACCUREND directory to your SET ACAD= statement.
- ;Refer to [InstallationDirectory]\ACCUREND.TXT
- ;text file for more information.
- EndGetMenuChoice
- Else
- GetMenuChoice
- Modify AUTOEXEC.BAT file
- ;Preferred Option:
- ;Modifies your AUTOEXEC.BAT file to run AccuRender
- ;with AutoCAD. Refer to "Getting Started" in the
- ;AccuRender User's Guide for more information.
- Create ACCUREND.BAT file
- ;Second Option:
- ;Creates a batch file ACCUREND.BAT in your
- ;ACCUREND directory. Use this batch file to
- ;start AutoCAD with AccuRender enabled.
- Exit
- ;Third Option:
- ;Bypass automatic changes. AccuRender will
- ;not run properly unless you add the
- ;ACCUREND directory to your SET ACAD= statement.
- ;Refer to "Getting Started" in the AccuRender
- ;User's Guide for more information.
- EndGetMenuChoice
- EndIf
-
- ;;Process answer
- InCase Choice is
- = 1: Do FixFiles
- = 2: Do MakeBatFile
- = 3: Do Abort
- EndInCase
-
- If FileExists [Dir10]\order.frm
- Dialog
- .cAccuRender Demo installation complete.
- .cPlease refer to the
- .c[InstallationDirectory]\ACCUREND.TXT text file
- .cfor setup instructions.
-
- .cTo join the AccuRender Beta Program,
- .crefer the [InstallationDirectory]\ORDER.FRM
- .ctext file or call your local
- .cMcNeel Group dealer.
- EndDialog
- Else
- Dialog
- .cAccuRender installation complete.
- .c
- .cRefer to "Getting Started" in the AccuRender User's Guide
- .cfor instructions on loading and running AccuRender.
-
- AccuRender
- (c) 1993-94 Roy Hirshkowitz.
- AccuRender is a trademark of Robert McNeel & Associates.
- AutoCAD is a trademark of Autodesk, Inc.
- EndDialog
- EndIf
-
- EndProcedure
-
- ;;----------------------------------------------------------------------------
- Procedure abort
- Dialog
- .cAccurender will not run properly,
- .cset acad stament must be modified.
- EndDialog
- EndProcedure
-
- ;;----------------------------------------------------------------------------
- Procedure MakeBatFile ;;{
-
- Do GetAcadDir
-
- If [YesOrNo4] = N ;;{ if no valid acad directory identified.
- Dialog
- .cUnable to create Accurender batch file
- EndDialog
- Else ;;{ valid acad directory specified
-
- If FileExists [InstallationDirectory]\accurend.bat ;;{
- CopyFiles from [InstallationDirectory] to [InstallationDirectory] quietly
- accurend.bat as accurend.old
- EndCopyFiles
- DeleteFiles From [InstallationDirectory] quietly
- accurend.bat
- EndDeleteFiles
- Endif ;;}
-
- ModifyTextFile [InstallationDirectory]\accurend.bat Quietly
- InsertAtLine End "SET AC$=%ACAD%"
- InsertAtLine End "SET ACD$=%ACADDRV%"
- InsertAtLine End "[string9]"
- InsertAtLine End "[string10]"
- InsertAtLine End "[string11]"
- InsertAtLine End "SET ACAD=%AC$%"
- InsertAtLine End "SET ACADDRV=%ACD$%"
- InsertAtLine End "SET AC$="
- InsertAtLine End "SET ACD$="
- EndModifyTextFile
-
- Dialog
- .c[InstallationDirectory]\ACCUREND.BAT file created.
- .c
- .cTo Start AutoCAD with Accurender. type
- .c[InstallationDirectory]\ACCUREND at the DOS prompt.
- EndDialog
- ;;}
- EndIf;;}
-
- EndProcedure ;;} MakeBatFile
-
- ;;----------------------------------------------------------------------------
- Procedure FixFiles
-
- NoSysFileConfirmation
-
- ExamineTextFile [BootDrive]:\Autoexec.bat
- [Number1] := LineNumberWith (SET,ACAD=,)
- [String1] := LineWith (SET,ACAD=,)
- [String2] := EnvironmentStringFor ACAD
- ForgetTextFile
-
- [Number11] := 0
- [String6] := [InstallationDirectory]
-
- If [String1] <> BlankString ;;{ There is a SET ACAD line
- ;;{
- [YesOrNo4] := Y
- [Number3] := LengthOf [String1]
- [Number4] := PositionOf = in [String1]
- IncrementNumber [Number4]
- ;; Get environment string for ACAD= (string 3)
- [String3] := SubstringOf [String1] from [Number4] to [Number3]
- [Number3] := LengthOf [String3] ;; Length of ACAD= after the =
-
- If [String3] Contains [String6] ;;{ SET ACAD line contains current Accurend= string
- [String9] := N
- Else
- [String9] := SET ACAD=[String3];[InstallationDirectory]
- Endif ;; }
- ;;}
- Else
-
- Do GetAcadDir
-
- EndIf ;;}
-
- If [YesOrNo4] = Y
- If [String9] <> N
- ModifyAutoexecBat Quietly
- AddOrChangeLineWith (SET,ACAD=,) As "[String9]" At Beginning
- EndModifyAutoexecBat
- EndIf
- EndIf
-
- EndProcedure ;;} FixFiles
-
- ;;----------------------------------------------------------------------------
- Procedure GetAcadDir ;;{
- [Point2]
- [YesOrNo3] := N
- [YesOrNo4] := N
-
- [Dir1] := C:\ACAD
- Dialog [Dir1] 44
- .cWe need to know the location of your AutoCAD system
- .cfiles so that AccuRender can create or modify
- .cbatch files.
-
- Path to AutoCAD:
- EndDialog
-
- If FileExists [Dir1]\ACAD.EXE ;;{
- [String10] := EnvironmentStringFor ACADDRV
- [String9] := EnvironmentStringFor ACAD
-
- ;;if set acad currently set
- If [String9] = ''
- [String9] := SET ACAD=[Dir1]\SUPPORT;[Dir1]\FONTS;[Dir1]\ADS;[InstallationDirectory]
- Else
- [String9] := SET ACAD=[String9];[InstallationDirectory]
- EndIf
-
- ;;if set acaddrv currently set
- If [String10] = ''
- [String10] := SET ACADDRV=[Dir1]\DRV
- Else
- [String10] := SET ACADDRV=[String10]
- EndIf
-
- [String11] := [Dir1]\ACAD %1 %2 %3
- [YesOrNo4] := Y
- Else
- Dialog [YesOrNo3]
- .cCan't find [Dir1]\ACAD.EXE ...
- .cTry again?
- EndDialog
- EndIf
-
- If [YesOrNo3] = Y
- GoTo [Point2]
- Else
- Exit
- EndIf
-
- EndProcedure ;;} GetAcadDir
-
- ;;----------------------------------------------------------------------------
- Procedure Setup ;;{
- SetBackgroundCharTo B0
- SetShadowAttrTo LightGrayOnDarkGray
- SetScreenAttrTo WhiteOnBlue
- SetPopupAttrTo WhiteOnBlue
- SetTopLineAttrTo WhiteONBlue
- SetBottomLineAttrTo WhiteONBlue
- SetTopLineTo " Robert McNeel & Associates, Seattle, WA "
- SetBottomLineTo " Press <Ctrl+X> to quit. Call your local dealer for help. "
- ClearScreen
- EndProcedure ;;} Setup
- ;;----------------------------------------------------------------------------
- EndScript
-
-