home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Multimedia Studio Effects
/
MULTIMEDIA.ISO
/
programs
/
icondesn
/
designer.mst
< prev
next >
Wrap
Text File
|
1994-07-25
|
7KB
|
175 lines
'$INCLUDE 'setupapi.inc'
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST DESTPATH = 300
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST OPTIONS = 800
CONST APPHELP = 900
CONST BADPATH = 6400
CONST Logo = 1
GLOBAL Destination$ ''Default destination directory.
GLOBAL OPTCUR$ ''Option selection from option dialog.
GLOBAL Answer$ ''Answer from functions that return strings.
GLOBAL ICOFileName$ ''Copy file buffer.
GLOBAL SrcFileName$ ''Copy file buffer.
GLOBAL Label$ ''Global name for icon Designer 2.0
GLOBAL Subs$ ''Global subdirectory.
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
INIT:
CUIDLL$ = "mscuistf.dll"
HELPPROC$ = "FHelpDlgProc"
OPTCUR$ = "1"
Destination$ = "C:\DESIGNER"
Label$ = "Icon Designer 2.1"
SetBitmap CUIDLL$, Logo
SetTitle "Windows Icon Designer"
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
WELCOME:
Answer$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF Answer$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
OPTION:
SetSymbolValue "RadioDefault", OPTCUR$
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
GETPATH:
SetSymbolValue "EditTextIn", Destination$
SetSymbolValue "EditFocus", "END"
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
GETPATHL1:
Answer$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$)
Destination$ = GetSymbolValue("EditTextOut")
IF Answer$ = "CONTINUE" THEN
IF IsDirWritable(Destination$) = 0 THEN
GOSUB BADPATH
GOTO GETPATHL1
END IF
UIPop 1
ELSEIF Answer$ = "REACTIVATE" THEN
GOTO GETPATHL1
ELSEIF Answer$ = "BACK" THEN
UIPop 1
GOTO OPTION
ELSE
GOSUB ASKQUIT
GOTO GETPATH
END IF
INSTALL
GOTO FINISH
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
SUB INSTALL STATIC
SrcDir$ = GetSymbolValue("STF_SRCDIR")
WinDir$ = GetWindowsDir()
InfoPath$ = MakePath(SrcDir$,"SETUP.INF")
ReadInfFile InfoPath$
CreateDir Destination$, cmoNone
AddSectionFilesToCopyList "FILES", SrcDir$, Destination$
Subs$ = MakePath(Destination$,"TOONS")
CreateDir Subs$, cmoNone
AddSectionFilesToCopyList "TOONICONS", SrcDir$, Subs$
Subs$ = MakePath(Destination$,"APPS")
CreateDir Subs$, cmoNone
AddSectionFilesToCopyList "APPICONS", SrcDir$, Subs$
Subs$ = MakePath(Destination$,"CUSTOM")
CreateDir Subs$, cmoNone
AddSectionFilesToCopyList "CUSTOMICONS", SrcDir$, Subs$
Subs$ = MakePath(Destination$,"256CLR")
CreateDir Subs$, cmoNone
AddSectionFilesToCopyList "256ICONS", SrcDir$, Subs$
AddSectionFilesToCopyList "DESIGNER.INI",SrcDir$,WinDir$
CopyFilesInCopyList
DesPath$ = ",,,," + MakePath(Destination$,"256CLR")
CreateProgmanGroup Label$ ,"DESIGN21.GRP" ,cmoNone
ShowProgmanGroup Label$ ,1 ,cmoNone
CreateProgmanItem Label$ ,Label$ ,MakePath(Destination$,"DESIGNER.EXE") ,DesPath$ ,cmoOverwrite
CreateProgmanItem Label$ ,"Icon Designer 2.1 Help" ,MakePath(Destination$,"DESIGNER.HLP") ,"" ,cmoOverwrite
END SUB
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = szDir$ + szFile$
ELSE
MakePath = szDir$ + "\" + szFile$
END IF
END FUNCTION
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
BADPATH:
Answer$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF Answer$ = "REACTIVATE" THEN
GOTO BADPATH
END IF
UIPop 1
RETURN
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
ASKQUIT:
Answer$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
IF Answer$ = "EXIT" THEN
UIPopAll
END
ELSEIF Answer$ = "REACTIVATE" THEN
GOTO ASKQUIT
ELSE
UIPop 1
END IF
RETURN
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
FINISH:
Answer$ = UIStartDlg(CUIDLL$, EXITSUCCESS, "FInfoDlgProc", APPHELP, HELPPROC$)
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
QUIT:
END
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------
''----------------------------------------------------------------------------