home *** CD-ROM | disk | FTP | other *** search
/ GQ - Louise, World Cup, …remy Clarkson, Armageddon / GQCD.iso / files / startup.dxr / 00001.ls next >
Encoding:
Text File  |  1998-05-21  |  2.1 KB  |  68 lines

  1. global gMasterObj, gVideoObj, gSoundObj, gMenuObj, gCustompath, gWindowspath, gDirutil, gIniobj, gVideopath
  2.  
  3. on startMovie
  4.   set the exitLock to 1
  5.   if voidp(gCustompath) then
  6.     set gCustompath to the pathName
  7.   end if
  8.   set the actorList to []
  9.   set gMasterObj to new(script "masterScript")
  10.   set gVideoObj to new(script "videoScript")
  11.   set gSoundObj to new(script "soundScript")
  12.   set gMenuObj to new(script "menuScript")
  13.   autoWebLink(gMasterObj)
  14.   shutDownWebLink(gMasterObj)
  15.   if the runMode <> "Author" then
  16.     set gVideopath to gCustompath
  17.     set gWindowspath to getOSDirectory()
  18.     set gWindowspath to gWindowspath & "\"
  19.     if gWindowspath = 0 then
  20.       alert("Cannot Locate Windows System Folder." & RETURN & "Please call In Chair Viewing Technical Support on" & RETURN & "0171 486 6760")
  21.       quit()
  22.     end if
  23.     setMeUp()
  24.   end if
  25. end
  26.  
  27. on setMeUp
  28.   init()
  29.   install()
  30.   close()
  31. end
  32.  
  33. on init
  34.   openXLib(gCustompath & "Dirutil")
  35.   openXLib(gCustompath & "Iniobj")
  36.   set gDirutil to DirUtil(mnew)
  37.   set gIniobj to IniObj(mnew)
  38. end
  39.  
  40. on install
  41.   CopyFile(gWindowspath & "system.ini", gWindowspath & "system.bak")
  42.   CopyFile(gWindowspath & "win.ini", gWindowspath & "win.bak")
  43.   gIniobj(mWriteStr, gWindowspath & "system.ini", "mci", "ICVVideo", "mciavi.drv")
  44.   gIniobj(mWriteStr, gWindowspath & "win.ini", "extensions", "icv", "mplayer.exe ^.icv")
  45.   gIniobj(mWriteStr, gWindowspath & "win.ini", "embedding", "ICVFile", "Video Clip,Video Clip,C:\mplayer.exe /icv,picture")
  46.   gIniobj(mWriteStr, gWindowspath & "win.ini", "embedding", "AVIFile", EMPTY)
  47.   gIniobj(mWriteStr, gWindowspath & "win.ini", "mci extensions", "icv", "AVIVideo")
  48.   gIniobj(mWriteBool, gWindowspath & "win.ini", "mciavi", "skipframes", 1)
  49. end
  50.  
  51. on remove
  52.   CopyFile(gWindowspath & "win.bak", gWindowspath & "win.ini")
  53.   CopyFile(gWindowspath & "system.bak", gWindowspath & "system.ini")
  54.   DeleteFile(gWindowspath & "win.bak")
  55.   DeleteFile(gWindowspath & "system.bak")
  56. end
  57.  
  58. on close
  59.   if objectp(gDirutil) then
  60.     gDirutil(mdispose)
  61.   end if
  62.   if objectp(gIniobj) then
  63.     gIniobj(mdispose)
  64.   end if
  65.   closeXLib(gCustompath & "Dirutil")
  66.   closeXLib(gCustompath & "Iniobj")
  67. end
  68.