home *** CD-ROM | disk | FTP | other *** search
/ Treasure Hunt 2001 PRESSKIT / TH2001_PRESSKIT.iso / demo / scol_install / Setup.ini < prev    next >
Encoding:
INI File  |  2000-11-13  |  7.9 KB  |  391 lines

  1. [Init]
  2.   set APP_TITTLE "SCOL Voy@ger"
  3.   set APP_VERSION_SUP "3"
  4.   set APP_VERSION_INF "5"
  5.   set APP_RELEASE "(p10)"
  6.   set APP_VERSION APP_VERSION_SUP 
  7.   strcat APP_VERSION "."
  8.   strcat APP_VERSION APP_VERSION_INF
  9.   set PROGRAMGROUP "Scol"
  10.   set SCOLDIR ""
  11.   set VERSION "2000-11-10"
  12.  
  13.   set NEEDEDSPACE "50000000"
  14.  
  15. [Setup]
  16.   GetSystemVars
  17.   goto "Init"
  18.   include languagefile "InitInstall"
  19.  
  20.   set EXENAME "usmwin.exe"
  21.   set EXEARGS "/INSTALL"
  22.  
  23.   strcat INTRO APP_TITTLE
  24.   strcat INTRO " v "
  25.   strcat INTRO APP_VERSION_SUP
  26.   strcat INTRO "."
  27.   strcat INTRO APP_VERSION_INF
  28.   strcat INTRO APP_RELEASE
  29.  
  30.   strcat INTRO INTRO2
  31.  
  32.   set rootSRCDIR SRCDIR
  33.   strcat SRCDIR SCOLDIR
  34.  
  35.   DetectTCPIP
  36.   if
  37.   else
  38.     Quit NOTCPIP ABORT_TTL 
  39.   endif
  40.  
  41.   CheckForDLL "WININET.DLL"
  42.   if
  43.   else
  44.     Quit NOWININET ABORT_TTL
  45.   endif
  46.  
  47.  
  48.   IsScolRunning
  49.   if
  50.     Quit SCOLRUNNING ABORT_TTL
  51.   endif
  52.  
  53.   ShowFile "Licence.txt"
  54.   if
  55.   else
  56.     Quit ABORT_MSG ABORT_TTL
  57.   endif
  58.  
  59.   DetectSCOL
  60.   if
  61.     set DSTDIR SCOLpath
  62.     set INSTYPE "UPDATE"
  63.     MsgBoxOk CLOSEBROWSERBEFORE ADVISE_TTL 
  64.     goto "CheckUsmDotIni"
  65.   else
  66.     set INSTYPE "INSTALL"
  67.     goto "ScolInstall"
  68.   endif
  69.  
  70. [CheckUsmDotIni]
  71. ;  set USM_INI DSTDIR
  72. ;  strcat USM_INI "\usm.ini"
  73. ;  exist USM_INI
  74. ;  if
  75. ;  else
  76.     goto "AskNewest"
  77. ;  endif
  78.  
  79. [AskNewest]
  80.   IsScolUpdated VERSION
  81.   if
  82.     quit ABORTUPDATE_MSG ABORTUPDATE_TTL
  83.   else
  84.     goto "Update"
  85.   endif
  86.  
  87. [Update]
  88.   Goto "UpdateFiles"
  89.  
  90. [UpdateFiles]
  91.   MkDir DSTDIR
  92. ;  CopyDir2Dest "Cache"
  93.   CopyDir2Dest "Log"
  94.   CopyDir2Dest "Plugins"
  95.   CopyDir2Dest "Partition"
  96.   ParseFile "usmress.diff" "ParseUsmRess"
  97.   goto "CommonFiles"
  98.  
  99. [ParseUsmRess]
  100.   set usmress_ini DSTDIR
  101.   strcat usmress_ini "\usmress.ini"
  102.   findInFile TempStripped usmress_ini
  103.   if
  104.   else
  105.     appendFile TempLine usmress_ini
  106.   endif
  107.  
  108. [ScolInstall]
  109.   ShowWindow
  110.   IShowInstallDlg
  111.   if 
  112.     set tmp DSTDIR
  113.     strcat tmp "\usm.ini"
  114.     delete tmp
  115.     goto "ScolInstallOk"
  116.   else
  117.     Quit ABORT_MSG ABORT_TTL
  118.   endif
  119.  
  120. [ScolInstallOk]
  121.   Goto "ScolInstallFiles"
  122.  
  123. [ScolInstallFiles]
  124.   MkDir DSTDIR
  125.   CopyDir2Dest "Cache"
  126.   CopyDir2Dest "Log"
  127.   CopyDir2Dest "Plugins"
  128.   CopyDir2Dest "Partition"
  129.   Copy "UsmRess.ini"
  130.   Copy "NSproto.exe"
  131.   strcmp INSTYPE "UPDATE"
  132.   if
  133.   else
  134.     GetScolSettings
  135.   endif
  136.  
  137.   IsSilent
  138.   if
  139.   else
  140.     goto "RegNSProto"
  141.   endif
  142.  
  143.   goto "CommonFiles"
  144.  
  145. [RegNSProto]
  146. ;  strcmp NETSCAPEDEFAULT "YES"
  147. ;  if
  148.     set EXENAME DSTDIR
  149.     strcat EXENAME "\"
  150.     strcat EXENAME "NSproto.exe"
  151.     set EXEARGS "/RegServer"
  152.     SetText REGNETSCAPE_MSG
  153.     runwait EXENAME EXEARGS
  154. ;  endif
  155.  
  156.  
  157. [CommonFiles]
  158. ; List of common operations :
  159.  
  160. ;prepare for copying bookmarks and customs if not present
  161.  
  162.   set tempDSTDIR DSTDIR
  163.   set ETC DSTDIR
  164.   strcat ETC "\Partition\locked\etc"
  165.   set DSTDIR ETC
  166. ;copy customs if not present
  167.   set FIND ETC
  168.   strcat FIND "\custom.txt"
  169.   exist FIND
  170.   if
  171.   else
  172.     Copy "custom.txt"
  173.   endif
  174. ;copy bookmarks if not present
  175.   set FIND ETC
  176.   strcat FIND "\bookmark.txt"
  177.   exist FIND
  178.   if
  179.   else
  180.     Copy "bookmark.txt"
  181.   endif
  182. ;cleaning
  183.   set DSTDIR tempDSTDIR
  184.  
  185.   Copy "UsmWin.exe"
  186.   Copy "licence.txt"
  187.  
  188.   set temp SRCDIR
  189.   set SRCDIR rootSRCDIR
  190.   Copy "scolsetup.exe"
  191.   Copy "setup.ini"
  192.   Copy "setup.English.txt"
  193.   Copy "setup.French.txt"
  194.   Copy "setup.German.txt"
  195.   Copy "setup.Dutch.txt"
  196.   Copy "setup.Spanish.txt"
  197.   Copy "setup.Italian.txt"
  198.   Copy "setup.ini"
  199.   set SRCDIR temp
  200.  
  201.   ; copy the netscape files for further use... (eventually a manual install...)
  202.   Copy "npScol.dll"
  203.   Copy "ScolNet.class"
  204.   Copy "ScolObserver.class"
  205.   Copy "ScolTest.class"  
  206.   ; most important : DllScol.dll
  207.   Copy "scol-2000-11-10-p10.dll"
  208.   Copy "AXScol.dll"
  209.   ; uninstall any previous instance of the scol dll, it does no more have to be in the system dir
  210.   delete "DllScol.dll" SYSDIR
  211.  
  212.   goto "NetscapeInstall"
  213.  
  214.   Register "AXscol.dll" DSTDIR
  215. ;  Register "plugins\xtension.dll" DSTDIR
  216.   MkPgmGroup PROGRAMGROUP
  217.   MkLink "usmwin.exe" "Scol"
  218.   CreateDesktopLink "usmwin.exe" "Scol"
  219. ;  set LINKARG "/autostart"
  220. ;  CreateStartLink "usmwin.exe" "Scol"
  221.   MkLink "licence.txt" Licence_agreement_LNK
  222.   MkLink "scolsetup.exe" Uninstall_SCOL_LNK
  223.   set uninstall DSTDIR
  224.   strcat uninstall "\scolsetup.exe "
  225.   CopyWord DSTDIR
  226.   strcat uninstall WORD
  227.   SetUninstall "Cryo-Networks - SCOL" uninstall
  228.   set setup DSTDIR
  229.   strcat setup "\setup.txt"
  230.   appendfile "Installed OK" setup
  231.   set setup DSTDIR
  232.   strcat setup "\scolapp.ini"
  233.   exist setup
  234.   if
  235.   else
  236.     appendfile "[uninstall]" setup
  237.     appendfile ";Any scol application should set its uninstall script here:" setup
  238.     appendfile "" setup
  239.   endif
  240.   ImportOldScol "scol-2000-11-10-p10.dll SCOLWinMain" VERSION
  241.   goto "FinalRun"
  242.   InstallSuccess
  243.   quit SUCCESS_MSG SUCCESS_TTL
  244.  
  245. [NetscapeInstall]
  246.   ; Install Plugin for Communicator :
  247.   set temp DSTDIR
  248.   strcmp NETSCAPEPATH ""
  249.   if
  250.   else
  251.     set DSTDIR NETSCAPEPATH
  252.     goto "NetscapeFiles"
  253.     goto "TestSearchNetscape"
  254.   endif
  255.   set DSTDIR temp
  256.  
  257. [TestSearchNetscape]
  258. IsSilent
  259. if 
  260. else
  261.   goto "SearchNetscape"
  262. endif
  263.  
  264. [SearchNetscape]
  265.   ; Search all occurrences of Netscape :
  266.   set nsfound NETSCAPENOTFOUND1_MSG
  267.   strcat nsfound DSTDIR
  268.   strcat nsfound NETSCAPENOTFOUND2_MSG
  269.   MsgBoxYesNo nsfound NETSCAPENOTFOUND_TTL
  270.   if 
  271.     ApplyOnFiles "netscape.exe" "_NetscapeFiles"
  272.   endif
  273.  
  274. [NetscapeFiles]
  275.   ; Files to copy for the netscape plugin:
  276.   strcat DSTDIR "\plugins"
  277.   Copy "npScol.dll"
  278.   Copy "ScolNet.class"
  279.   Copy "ScolObserver.class"
  280.   Copy "ScolTest.class"
  281.  
  282. [_NetscapeFiles]
  283.   set nstst NETSCAPEPATH 
  284.   stricmp nstst DSTDIR
  285.   if
  286.   else
  287.     goto "__NetscapeFiles"
  288.   endif
  289.  
  290. [__NetscapeFiles]
  291.   set msg INSTALLTHISNETSCAPE_MSG1
  292.   strcat msg DSTDIR
  293.   strcat msg INSTALLTHISNETSCAPE_MSG2
  294.   MsgBoxOKCancel msg INSTALLTHISNETSCAPE_TTL
  295.   if
  296.     goto "NetscapeFiles"
  297.   endif
  298.  
  299. [FinalRun]
  300.   set EXENAME DSTDIR
  301.   strcat EXENAME "/usmwin.exe"
  302.   set EXEARGS "/INSTALL"
  303.   runwait EXENAME EXEARGS
  304.  
  305. ;**********************************************************
  306. [Uninstall]
  307.   GetSystemVars
  308.   goto "Init"
  309.  
  310.   include languagefile "InitUninstall"
  311.  
  312.   MsgBoxOKCancel UNINSTALL_MSG SETUPNAME
  313.   If
  314.     ; Default variables set :
  315.     Goto "UFiles"
  316.     DelUninstall "Cryo-Networks - SCOL"
  317.     quit SUCCESFULL_MSG SUCCESFULL_TTL
  318.   Else
  319.     quit ABORT_MSG ABORT_TTL
  320.   Endif
  321.  
  322. [UFiles]
  323.   IsScolRunning
  324.   if
  325.     Quit SCOLRUNNING ABORT_TTL
  326.   endif
  327.  
  328.   ; List of file operations :
  329.   UnRegister "AXscol.dll" SRCDIR
  330. ;  UnRegister "plugins\xtension.dll" SRCDIR
  331.   delete "dllscol.dll" SYSDIR
  332.  
  333.   set EXENAME DSTDIR
  334.   strcat EXENAME "\"
  335.   strcat EXENAME "NSproto.exe"
  336.   set EXEARGS "/UnRegServer"
  337.   SetText REGNETSCAPE_MSG
  338.   runwait EXENAME EXEARGS
  339.  
  340.   ; Uninstall Netscape Files:
  341.   goto "NetscapeUninstall"
  342.  
  343.   DelPgmGroup PROGRAMGROUP
  344.   DestroyStartLink "Scol"
  345.   DestroyDesktopLink "Scol"
  346.  
  347.   Deltree "plugins"
  348.   Deltree "Cache"
  349.   Deltree "Log"
  350.   Deltree "partition\Locked"
  351.   Deltree "partition\Comm"
  352.   DeleteAllFiles SRCDIR
  353.   CleanRegistry
  354.  
  355. [NetscapeUninstall]
  356.   ; Uninstall Plugin for Communicator :
  357.   set temp DSTDIR
  358.   strcmp NETSCAPEPATH ""
  359.   if
  360.   else
  361.     set DSTDIR NETSCAPEPATH
  362.     goto "UNetscapeFiles"
  363.     goto "SearchDelNetscape"
  364.   endif
  365.   set DSTDIR temp
  366.  
  367. [SearchDelNetscape]
  368.   strcat INSTALLTHISNETSCAPE_MSG1 NETSCAPEPATH
  369.   strcat INSTALLTHISNETSCAPE_MSG1 INSTALLTHISNETSCAPE_MSG2  
  370. MsgBoxOKCancel INSTALLTHISNETSCAPE_MSG1 SEARCH_TTL
  371.   if
  372.     ApplyOnFiles "netscape.exe" "_UNetscapeFiles"
  373.   endif
  374.  
  375. [UNetscapeFiles]
  376.   ; Files to delete for the netscape plugin:
  377.   strcat DSTDIR "\plugins"
  378.   delete "npScol.dll" DSTDIR
  379.   delete "ScolNet.class" DSTDIR
  380.   delete "ScolObserver.class" DSTDIR
  381.   delete "ScolTest.class" DSTDIR
  382.  
  383. [_UNetscapeFiles]
  384.   set nstst NETSCAPEPATH 
  385.   stricmp nstst DSTDIR
  386.   if
  387.   else
  388.     goto "UNetscapeFiles"
  389.   endif
  390.  
  391.