home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / demos / spiele / ShadowofTimeDemo / Install_ISOT < prev    next >
Encoding:
Text File  |  1998-10-06  |  8.5 KB  |  364 lines

  1. ; $VER: ShadowDemoInstallscript 1.0 (07.2.97)
  2. ; © 1998 by Henrik Smiding
  3. ;
  4. ;
  5. ; /////////////////////////////// Requirements //////////////////////////////
  6.  
  7. (set  #minreqcpu "68020"
  8.    #minreqosnr 39
  9.    #minreqos "3.0"
  10.    #minreqdisk 1100000
  11.    #minreqdisk1 (/ #minreqdisk 1000000)
  12.    #minreqdisk2 (- (/ #minreqdisk 100000) (* #minreqdisk1 10))
  13.    #minreqchipset "AA")
  14.  
  15. ; ////////////////////////////// Default strings /////////////////////////////
  16.  
  17. (set
  18.    #DirName "ShadowofTime"
  19.    #Version (getversion "ShadowofTime")
  20.    #Ver (/ #Version 65536)
  21.    #Rev (- #Version (* #Ver 65536))
  22.  
  23.    #Welcome (cat "\nWelcome to the installationscript of\n"
  24.             "--> In Shadow of Time V" #Ver "." #Rev " <--\n\n"
  25.             "This preview requires atleast a " #minreqcpu " processor, "
  26.             "AmigaDOS V" #minreqos " of better, "
  27.             "AGA chipset, "
  28.             "and " #minreqdisk1 "." #minreqdisk2 " Mb of free space.")
  29.  
  30.    #OldOS (cat "\nYou need atleast AmigaDOS " #minreqos "(" #minreqosnr ") to run this preview.")
  31.    #LowCpu (cat "\nYou need a " #minreqcpu " or better to run this preview.")
  32.    #OldChip (cat "\nYou need the AGA chipset to run this preview.")
  33.    #LowDisk (cat "\nThis preview requires atleast " (/ #minreqdisk 1024) "Kbytes of free diskspace.")
  34.  
  35.    #Location (cat "Where do you wish to install this preview?\n"
  36.              "A drawer named '" #DirName "' will be created here.")
  37.    #LocationH (cat "Please select where on your harddisk you wish to place "
  38.          "this previewdemo of 'In Shadow of Time'. A directory "
  39.          "called '" #DirName "' will be created there and all "
  40.          "files needed will be placed inside that directory."
  41.          "\nEx.\nIf you choose 'Work:', a directory called 'Work:" #DirName "' will be created, "
  42.          "and all files will be copied into it. You will then have an icon on you 'Work:' partition "
  43.          "called '" #DirName "' which you can access from workbench.")
  44.    #FontPrompt "Copying fonts..."
  45.    #FontLocation "Where should I copy the fonts?"
  46.    #FontHelp (cat "The game requires a set of fonts to work properly. "
  47.          "These font are included, but they have to be copied to the 'Fonts:' "
  48.          "directory, or the game won't be able to find them.\n"
  49.          "By pressing 'Proceed', the installer will copy this fontset "
  50.          "to the 'Fonts:' assign, which should be pointing to directory "
  51.          "where the rest of the fonts are located.\n"
  52.          "(Normally 'System:Fonts', or 'SYS:Fonts')")
  53.    #OtherIcons (cat "Choose the set of icons you want copied.")
  54.    #OtherIconsH (cat "\nStandard - This is a standard 4-colour iconset, like the ones on the Workbench disks.\n\n"
  55.            "MagicWB  - This is a 8-colour iconset that uses the 'MagicWorkbench' palette. "
  56.            "If you haven't installed MagicWB on your system, this set won't look very nice.")
  57.  
  58.    #InsertDisk1 "\nPlease insert disk "
  59.    #InsertDisk2 " in any drive."
  60.  
  61.    #CopyMainFiles "Copying main gamefiles..."
  62.    #CopyDataFiles "Copying datafiles disk #"
  63.  
  64.    #Exists "\nIt seems there's already "
  65.    #Exists2 "version of the game installed here ("
  66.    #Exists3 (cat ").\nDo you want to overwrite it with this version (" #Ver "." #Rev ")?")
  67.    #ExistsH (cat "If you have an older version, you should go ahead and install."
  68.          "If you have a more recent version, you should abort, or atleast make a backup before you proceed.")
  69.  
  70.    #Finished "\nTadaaaa!")
  71.  
  72.  
  73. (if (>= @installer-version 42)
  74.    (set #choicehead "\x1b[2p")
  75.    (set #choicehead "")
  76. )
  77.  
  78. ; ////////////////////////////////// Startup ///////////////////////////////////
  79.  
  80. (message #Welcome)
  81. (complete 0)
  82.  
  83. (if (< (/ (getversion) 65536) #minreqosnr) (abort #OldOS))
  84. (if (< (database "cpu") #minreqcpu) (abort #LowCpu))
  85. (if (not (patmatch #minreqchipset (database "chiprev"))) (abort #OldChip))
  86.  
  87. (complete 1)
  88.  
  89. (set #destdir
  90.    (askdir
  91.       (prompt #Location)
  92.       (help #LocationH)
  93.       (default @default-dest)
  94.    )
  95. )
  96.  
  97. (complete 2)
  98.  
  99. (set destdir (tackon #destdir #DirName))
  100. (set @default-dest destdir)
  101.  
  102. (if (< (getdiskspace destdir) minreqdisk) (abort #LowDisk))
  103.  
  104. (complete 3)
  105.  
  106. (if (<> 0 (exists destdir))
  107. (
  108.    (set #DVersion (getversion (tackon destdir "ShadowofTime"))
  109.         #DVer (/ #DVersion 65536)
  110.         #DRev (- #DVersion (* #DVer 65536))
  111.    )
  112.  
  113.    (set #VerStat (if (< #DVersion #Version)
  114.    ("an older ")
  115.    (if (= #DVersion #Version) ("a ") ("a more recent "))
  116.    ))
  117.  
  118.    (if (= 0 (askbool
  119.       (Prompt #Exists #Verstat #Exists2 #DVer "." #DRev #Exists3)
  120.       (help #ExistsH)
  121.       (default 1)
  122.       (choices "Yes, overwrite" "No, abort installation")
  123.       )
  124.       )
  125.    (exit)
  126.    )
  127. )
  128. (makedir destdir)
  129. )
  130. (complete 4)
  131.  
  132. ; ///////////////////////// Ask Icons ///////////////////////////
  133.  
  134. (set #MWBIcons
  135.    (askchoice
  136.       (prompt #OtherIcons)
  137.       (help #OtherIconsH)
  138.       (choices (cat #choicehead "Standard - 4 colour") "MagicWB  - 8 colour")
  139.    )
  140. )
  141.  
  142. (complete 5)
  143.  
  144. ; ///////////////////////// Copy fonts ///////////////////////////
  145.  
  146. (set #FontDir (if (= 2 @user-level)
  147.    (askdir
  148.       (prompt #FontLocation)
  149.       (help #FontHelp)
  150.       (default "Fonts:")
  151.       (newpath)
  152.    )
  153.    ("Fonts:")
  154. ))
  155.  
  156. (copyfiles
  157.    (all)
  158.    (prompt #FontPrompt)
  159.    (source  "Fonts")
  160.    (dest #FontDir)
  161.    (optional oknodelete)
  162. )
  163.  
  164. (complete 6)
  165.  
  166. ; ///////////////////////// Copy Main Files /////////////////////////
  167.  
  168. (if (= 0 #MWBIcons)
  169.    (
  170.       (copyfiles
  171.          (source "Icons/Org_drawer.info")
  172.          (newname "ShadowofTime.info")
  173.          (help @copyfiles-help)
  174.          (dest #destdir)
  175.       )
  176.       (copyfiles
  177.          (prompt #CopyMainFiles)
  178.          (source "")
  179.          (help @copyfiles-help)
  180.          (choices "ShadowofTime" "ShadowofTime.guide")
  181.          (dest destdir)
  182.          (infos)
  183.       )
  184.    )
  185.    (
  186.       (copyfiles
  187.          (source "Icons/MWB_Drawer.info")
  188.          (newname "ShadowofTime.info")
  189.          (help @copyfiles-help)
  190.          (dest #destdir)
  191.       )
  192.       (copyfiles
  193.          (prompt #CopyMainFiles)
  194.          (source "")
  195.          (help @copyfiles-help)
  196.          (choices "ShadowofTime" "ShadowofTime.guide")
  197.          (dest destdir)
  198.       )
  199.       (copyfiles
  200.          (prompt #CopyMainFiles)
  201.          (source "Icons/")
  202.          (help @copyfiles-help)
  203.          (choices "ShadowofTime.info" "ShadowofTime.guide.info")
  204.          (dest destdir)
  205.       )
  206.    )
  207. )
  208.  
  209. (complete 7)
  210.  
  211. (makedir (tackon destdir "Savedgames"))
  212.  
  213. (complete 8)
  214.  
  215. ; ///////////////////////// Copy Data Files /////////////////////////
  216.  
  217. (Set #DataDir (tackon destdir "data"))
  218. (makedir #DataDir)
  219.  
  220. (copyfiles
  221.    (prompt #CopyDataFiles "1...")
  222.    (help @copyfiles-help)
  223.    (source  "Data/")
  224.    (dest #DataDir)
  225.    (all)
  226. )
  227.  
  228. (complete 10)
  229.  
  230. ;(askdisk
  231. ;  (prompt #InsertDisk1 "2" #InsertDisk2)
  232. ;  (help @askdisk-help)
  233. ;  (dest "ISOT_2")
  234. ;)
  235. ;
  236. ;(copyfiles
  237. ;  (prompt #CopyDataFiles "2...")
  238. ;  (help @copyfiles-help)
  239. ;  (source  "ISOT_2:Data/")
  240. ;  (dest #DataDir)
  241. ;  (all)
  242. ;)
  243. ;
  244. ;(complete 20)
  245.  
  246. ;(askdisk
  247. ;  (prompt #InsertDisk1 "3" #InsertDisk2)
  248. ;  (help @askdisk-help)
  249. ;  (dest "ISOT_3")
  250. ;)
  251. ;
  252. ;(copyfiles
  253. ;  (prompt #CopyDataFiles "3...")
  254. ;  (help @copyfiles-help)
  255. ;  (source  "ISOT_3:Data/")
  256. ;  (dest #DataDir)
  257. ;  (all)
  258. ;)
  259. ;
  260. ;(complete 30)
  261.  
  262. ;(askdisk
  263. ;  (prompt #InsertDisk1 "4" #InsertDisk2)
  264. ;  (help @askdisk-help)
  265. ;  (dest "ISOT_4")
  266. ;)
  267. ;
  268. ;(copyfiles
  269. ;  (prompt #CopyDataFiles "4...")
  270. ;  (help @copyfiles-help)
  271. ;  (source  "ISOT_4:Data/")
  272. ;  (dest #DataDir)
  273. ;  (all)
  274. ;)
  275. ;
  276. ;(complete 40)
  277.  
  278. ;(askdisk
  279. ;  (prompt #InsertDisk1 "5" #InsertDisk2)
  280. ;  (help @askdisk-help)
  281. ;  (dest "ISOT_5")
  282. ;)
  283. ;
  284. ;(copyfiles
  285. ;  (prompt #CopyDataFiles "5...")
  286. ;  (help @copyfiles-help)
  287. ;  (source  "ISOT_5:Data/")
  288. ;  (dest #DataDir)
  289. ;  (all)
  290. ;)
  291. ;
  292. ;(complete 50)
  293.  
  294. ;(askdisk
  295. ;  (prompt #InsertDisk1 "6" #InsertDisk2)
  296. ;  (help @askdisk-help)
  297. ;  (dest "ISOT_6")
  298. ;)
  299. ;
  300. ;(copyfiles
  301. ;  (prompt #CopyDataFiles "6...")
  302. ;  (help @copyfiles-help)
  303. ;  (source  "ISOT_6:Data/")
  304. ;  (dest #DataDir)
  305. ;  (all)
  306. ;)
  307. ;
  308. ;(complete 60)
  309.  
  310. ;(askdisk
  311. ;  (prompt #InsertDisk1 "7" #InsertDisk2)
  312. ;  (help @askdisk-help)
  313. ;  (dest "ISOT_7")
  314. ;)
  315. ;
  316. ;(copyfiles
  317. ;  (prompt #CopyDataFiles "7...")
  318. ;  (help @copyfiles-help)
  319. ;  (source  "ISOT_7:Data/")
  320. ;  (dest #DataDir)
  321. ;  (all)
  322. ;)
  323. ;
  324. ;(complete 70)
  325.  
  326. ;(askdisk
  327. ;  (prompt #InsertDisk1 "8" #InsertDisk2)
  328. ;  (help @askdisk-help)
  329. ;  (dest "ISOT_8")
  330. ;)
  331. ;
  332. ;(copyfiles
  333. ;  (prompt #CopyDataFiles "8...")
  334. ;  (help @copyfiles-help)
  335. ;  (source  "ISOT_8:Data/")
  336. ;  (dest #DataDir)
  337. ;  (all)
  338. ;)
  339. ;
  340. ;(complete 80)
  341.  
  342. ;(askdisk
  343. ;  (prompt #InsertDisk1 "9" #InsertDisk2)
  344. ;  (help @askdisk-help)
  345. ;  (dest "ISOT_9")
  346. ;)
  347. ;
  348. ;(copyfiles
  349. ;  (prompt #CopyDataFiles "9...")
  350. ;  (help @copyfiles-help)
  351. ;  (source  "ISOT_9:Data/")
  352. ;  (dest #DataDir)
  353. ;  (all)
  354. ;)
  355. ;
  356. ;(complete 90)
  357.  
  358.  
  359. (complete 99)
  360.  
  361. (message #Finished)
  362.  
  363. (complete 100)
  364.