home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 29 / amigaformatcd29.iso / -screenplay- / shareware / hitpuzzle / hitpuzzle_installer < prev    next >
Text File  |  1998-06-01  |  3KB  |  160 lines

  1.  
  2. ; HIT PUZZLE Installer script
  3. ; $VER: HIT PUZZLE Install 1.2
  4. ; written by HIT MAN
  5.  
  6.  
  7. ; Spazio richiesto su disco da HIT PUZZLE
  8. (set size_of_hp 560000)
  9.  
  10.  
  11. ; Lunghezza high-score file
  12. (set size_of_hg 272)
  13.  
  14.  
  15. (set #hitpuzzle-location
  16. (cat "Where I should install HIT PUZZLE?\n(A directory will be created)\n"
  17. ))
  18.  
  19.  
  20. ; Chiede destinazione
  21. (set @new-dest
  22. (askdir
  23. (prompt #hitpuzzle-location)
  24. (help @askdir-help)
  25. (default "SYS:")))
  26.  
  27.  
  28. ; Controlla se copia su se stesso
  29. (set @SeStesso
  30. (cat @new-dest"HitPuzzle/HitPuzzle_Installer"
  31. ))
  32.  
  33. (if (= @icon @SeStesso)
  34.   (abort
  35.     "You can't copy these files over themselves\n"
  36.   )
  37. )
  38.  
  39.  
  40. ; Controlla spazio su disco
  41. (set disk-space(getdiskspace @new-dest))
  42.  
  43. (if (< disk-space size_of_hp)
  44.   (abort
  45.     "Insufficient disk space in\n"
  46.     @new-dest "\n\n"
  47.     "HIT PUZZLE requires at least\n"
  48.     size_of_hp " bytes of empty disk space\n"
  49.   )
  50. )
  51.  
  52.  
  53. ; Assegna destinazione
  54. (makeassign "assigns" @new-dest)
  55.  
  56.  
  57. ; Controlla se è già presente una directory "HitPuzzle"
  58. (if (exists "assigns:HitPuzzle")
  59.   (
  60.  
  61.     (message "\nDirectory already exists!\n\n"
  62.              "The old files will be updated")
  63.   )
  64. )
  65.  
  66.  
  67. ; Crea directory
  68. (makedir "assigns:HitPuzzle")
  69. (makedir "assigns:HitPuzzle/Docs")
  70. (makedir "assigns:HitPuzzle/Gfx")
  71. (makedir "assigns:HitPuzzle/Music")
  72. (makedir "assigns:HitPuzzle/Sfx")
  73.  
  74.  
  75. ; Controlla HitPuzzle.HP
  76. (if (exists "assigns:HitPuzzle/HighScore.HP")
  77.   (
  78.     (set hg-len(getsize "assigns:HitPuzzle/HighScore.HP"))
  79.     (if (<> hg-len size_of_hg)
  80.       (
  81.         (message "\nThere is an old version of the\n"
  82.                  "high-score file called 'HighScore.HP'.\n"
  83.                  "Convert it with the program called\n"
  84.                  "'HighScoreConverter' before to play the game")
  85.       )
  86.     )
  87.   )
  88.   (
  89.     (copyfiles
  90.     (source "HighScore.HP")
  91.     (dest "assigns:HitPuzzle")
  92.     (optional "force"))
  93.   )
  94. )
  95.  
  96.  
  97. ; Copia files
  98. (copyfiles
  99. (source "GFX/Dest.icon")
  100. (dest "assigns:")
  101. (newname "HitPuzzle.info")
  102. (optional "force"))
  103.  
  104. (copyfiles
  105. (source "Docs.info")
  106. (dest "assigns:HitPuzzle")
  107. (optional "force"))
  108.  
  109. (copyfiles
  110. (source "HitPuzzle")
  111. (dest "assigns:HitPuzzle")
  112. (optional "force"))
  113.  
  114. (copyfiles
  115. (source "HitPuzzle.info")
  116. (dest "assigns:HitPuzzle")
  117. (optional "force"))
  118.  
  119. (copyfiles
  120. (source "HighScoreConverter")
  121. (dest "assigns:HitPuzzle")
  122. (optional "force"))
  123.  
  124. (copyfiles
  125. (source "HighScoreConverter.info")
  126. (dest "assigns:HitPuzzle")
  127. (optional "force"))
  128.  
  129. (copyfiles
  130. (source "Docs")
  131. (dest "assigns:HitPuzzle/Docs")
  132. (optional "force")
  133. (all))
  134.  
  135. (copyfiles
  136. (source "Gfx")
  137. (dest "assigns:HitPuzzle/Gfx")
  138. (optional "force")
  139. (all))
  140.  
  141. (copyfiles
  142. (source "Music")
  143. (dest "assigns:HitPuzzle/Music")
  144. (optional "force")
  145. (all))
  146.  
  147. (copyfiles
  148. (source "Sfx")
  149. (dest "assigns:HitPuzzle/Sfx")
  150. (optional "force")
  151. (all))
  152.  
  153.  
  154. ; Cancella Dest.icon
  155. (delete "assigns:HitPuzzle/Gfx/Dest.icon" (safe) (optional "force"))
  156.  
  157.  
  158. ; Ciao ciao
  159. (set @default-dest @new-dest)
  160.