home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / utilities / palmbackup / install / install < prev    next >
Encoding:
Text File  |  1999-02-27  |  18.6 KB  |  486 lines

  1. ;
  2. ;                       PalmBackup © 1998-1999 W.F.M.H.
  3. ;
  4. ;           ---------------------------------------------------------
  5. ;
  6. ;              ###    ###    #########  ###    ###    ###    ###
  7. ;              ###    ###    ###        ####  ####    ###    ###
  8. ;              ###    ###    ###        ### ## ###    ###    ###
  9. ;              ###    ###    ########   ### ## ###    ##########
  10. ;              ### ## ###    ########   ###    ###    ##########
  11. ;              ### ## ###    ###        ###    ###    ###    ###
  12. ;              ####  #### ## ###     ## ###    ### ## ###    ### ##
  13. ;              ###    ### ## ###     ## ###    ### ## ###    ### ##
  14. ;
  15. ;           ---------------------------------------------------------
  16. ;
  17. ;                              W.F.M.H.
  18. ;                              ul. Radomska 38
  19. ;                              71-002 Szczecin
  20. ;                              Poland
  21. ;
  22. ;                              tel. ++48 91 4836425
  23. ;
  24. ;                      Internet:   carlos@amiga.com.pl
  25. ;                      WWW     :   http://amiga.com.pl
  26. ;
  27. ;--------------------------------------------------------------------
  28. ;
  29. ;             W.F.M.H. PalmBackup 1.0 - Installer script
  30. ;           Written by Marcin Orlowski <carlos@amiga.com.pl>
  31. ;
  32. ;--------------------------------------------------------------------
  33. ;
  34. ; $VER: WFMH PalmBackup - Installer 1.0 (26.02.99) © Marcin Orlowski
  35. ;
  36. ;--------------------------------------------------------------------
  37.  
  38. ;/// Presets
  39. (set _debug 0)
  40.  
  41. (set __version  1)
  42. (set __revision 0)
  43. (set __date "26.02.1999")
  44.  
  45. (set __destdir "PalmBackup/")
  46. (set __src     "/")
  47. ;//|
  48.  
  49. ;/// English strings - default
  50.  
  51. ;************************ DEFAULT ENGLISH STRINGS ************************
  52.  
  53. (set msg_err_dizzy            "Unexpected error occured! Instalation aborted.")
  54. (set msg_err_cleanup          "Installation aborted. Cleaning up")
  55. (set msg_err_wrongos          "\n\nPalmBackup requires at least OS 2.0 or later to run")
  56. (set msg_err_request          "\n\nInstallation aborted at user request")
  57.  
  58. (set msg_copyrights           "This is a shareware product!\n\nCopyright © 1998-1999 W.F.M.H.\n\nAll rights reserved")
  59.  
  60. (set msg_installdir           "Where do you want to install PalmBackup?\nDrawer \"%s\" will be created there.")
  61. (set msg_installdir_help      "Please select the directory you want PalmBackup to be installed in. A new drawer named \"%s\" will be automatically created there, and ALL NECESSARY files belong to PalmBackup will be placed in that directory.")
  62. (set msg_err_destfile         "\nCan't create directory \"%s\" because a file with that name already exists here. Remove it manually or chose another destination drawer. Aborting installation...")
  63. (set msg_destdir_over         "\nYour destination drawer\n\n\"%s\"\n\nalready exists!\n\nDo you really want to continue?\nRefer to help text for more information.")
  64. (set msg_destdir_over_help    "The destination directory you just selected is already present on your hard drive. Make the choice if you really want to install PalmBackup over existing files.\n\nPressing \"%s\" will contine the instalation and PalmBackup will be installed in the drawer you chose. Pressing \"%s\" will abort the installation - nothing will be installed.")
  65. (set msg_destdir_button_yes   "Continue")
  66. (set msg_destdir_button_no    "Abort")
  67.  
  68. (set msg_sure                 "\n\n\nPalmBackup will be installed on your hard drive in drawer:\n\n\"%s\"\n\nDo you want to proceed?")
  69.  
  70. (set msg_copy_fonts           "\n\nCopying required fonts...\n\nStay tuned, your FONTS: won't be affected...")
  71. (set msg_copy_libs            "\n\nCopying required libraries...\n\nStay tuned, your LIBS: won't be affected...")
  72. (set msg_update_libs          "\n\nUpdating required libraries...")
  73. (set msg_copy_data            "\n\nCopying required data files...\n\nStay tuned...")
  74. (set msg_copy_binaries        "\n\nInstalling program executable file...\n\nStay tuned...")
  75.  
  76. (set _def_alt_lang 0)
  77.  
  78. ;//|
  79. ;/// German strings
  80. ;**************************** GERMAN STRINGS *****************************
  81.  
  82. (if (= @language "deutsch")
  83.  (
  84.   (set _language_version 0)
  85.   (set _def_alt_lang 1)
  86.  
  87.   (set msg_err_dizzy            "Unerwarteter Fehler aufgetreten! Installation abgebrochen.")
  88.   (set msg_err_cleanup          "Installation abgebrochen. Neuaufbau...")
  89.   (set msg_err_wrongos          "\n\nPalmBackup benötigt zum Starten mindestens OS 2.0 oder besser")
  90.   (set msg_err_request          "\n\nInstallation nach Anwendereingabe abgebrochen")
  91.  
  92.   (set msg_copyrights           "Dies ist ein shareware Produkt!\n\nCopyright © 1998-1999 W.F.M.H.\n\nAlle Rechte reserviert")
  93.  
  94.   (set msg_installdir           "Wohin möchten Sie PalmBackup installieren?\nEine Schublade \"%s\" wird hier erstellt.")
  95.   (set msg_installdir_help      "Bitte wählen Sie das Verzeichnis aus, wohin PalmBackup installiert werden soll. Ein neuer Ordner namens \"%s\" wird dort automatisch angelegt und alle zum Starten von PalmBackup BENÖTIGTEN Dateien werden dort abgelegt.")
  96.   (set msg_err_destfile         "\nKonnte das Verzeichnis \"%s\" nicht anlegen, weil bereits eine Datei mit diesem Namen hier existiert. Entfernen Sie sie manuell oder wählen Sie ein anderes Zielverzeichnis. Abbruch der Installation...")
  97.   (set msg_destdir_over         "\nIhr Zielverzeichnis \n\n\"%s\"\n\n existiert bereits!\n\nMöchten Sie wirklich fortfahren?\nSehen Sie in den Hilfe-Text für weitere Informationen.")
  98.   (set msg_destdir_over_help    "Das von Ihnen ausgewählte Zielverzeichnis wurde bereits auf der Festplatte angelegt. Entscheiden Sie sich, ob PalmBackup wirklich über existierende Dateien installiert werden soll.\n\nDas Drücken von \"%s\" setzt die Installation fort und PalmBackup wird in das von Ihnen ausgewählte Verzeichnis installiert. Drücken Sie \"%s\" , um die Installation abzubrechen - nichts wird dann installiert.")
  99.   (set msg_destdir_button_yes   "Fortfahren")
  100.   (set msg_destdir_button_no    "Abbrechen")
  101.  
  102.   (set msg_sure                 "\n\n\nPalmBackup wird auf Ihrer Festplatte im Verzeichnis:\n\n\"%s\"\n\n installiert. Möchten Sie fortfahren?")
  103.  
  104.   (set msg_copy_libs            "\n\nKopieren der benötigten Libraries...\n\nKeine Sorge, Ihr Verzeichnis LIBS: wird nicht berührt...")
  105.   (set msg_update_libs          "\n\nAktualizieren der benötigten Libraries...")
  106.   (set msg_copy_data            "\n\nKopieren der benötigten Daten...\n\nKeine Sorge...")
  107.   (set msg_copy_binaries        "\n\nInstallieren des Hauptprogramms...\n\nKeine Sorge...")
  108.  
  109.  )
  110. )
  111. ;//|
  112. ;/// Polish strings
  113.  
  114. ;**************************** POLISH STRINGS *****************************
  115.  
  116. (if (= @language "polski")
  117.  (
  118.   (set _language_version 1)
  119.   (set _def_alt_lang 1)
  120.  
  121.   (set msg_err_dizzy            "Wystâpiî niespodziewany bîâd! Instalacja przerwana.")
  122.   (set msg_err_cleanup          "Instalacja przerwana. Koïczë pracë")
  123.   (set msg_err_wrongos          "\n\nPalmBackup wymaga co najmniej systemu w wersji OS 2.0")
  124.   (set msg_err_request          "\n\nInstalacja przerwana na ûâdanie uûytkownika")
  125.  
  126.   (set msg_copyrights           "To jest program komercyjny!\n\nCopyright © 1998-1999 W.F.M.H.\n\nWszelkie prawa zastrzeûone")
  127.  
  128.   (set msg_installdir           "Gdzie chcesz zainstalowaê program PalmBackup?\nKatalog \"%s\" zostanie utworzony.")
  129.   (set msg_installdir_help      "Wybierz proszë katalog, w którym chcesz zainstalowaê program PalmBackup. Nowy podkatalog \"%s\" zostanie automatycznie utworzony, i wszystkie NIEZBËDNE pliki zostanâ w nim umieszczone.")
  130.   (set msg_err_destfile         "\nNie mogë utworzyê katalogu \"%s\" poniewaû plik o takiej nazwie juû tu istnieje. Usuï go rëcznie lub wybierz inny katalog docelowy. Instalacja przerwana.")
  131.   (set msg_destdir_over         "\nKatalog docelowy\n\n\"%s\"\n\njuû istnieje!\n\nNa pewno chcesz kontynuoowaê?\nSzczegóîy znajdziesz w tekscie pomocy.")
  132.   (set msg_destdir_over_help    "Katalog w którym chcesz zainstalowaê PalmBackupa juû istnieje na Twoim dysku. Zdecyduj, czy chcesz zainstalowaê w nim PalmBackupa.\n\nJeôli wybierzesz \"%s\", instalacja bëdzie kontynuowana i program zostanie zainstalowany w tym katalogu (pliki o nazwach identycznych z instalowanymi zostanâ przez nie zastâpione). Jeôli chcesz przerwaê instalacjë, wybierz \"%s\" - nic nie zostanie w takim przypadku zainstalowane.")
  133.   (set msg_destdir_button_yes   "Kontynuuj")
  134.   (set msg_destdir_button_no    "Przerwij")
  135.  
  136.   (set msg_sure                 "\n\n\nPalmBackup bëdzie zainstalowany na Twoim dysku w katalogu:\n\n\"%s\"\n\nNa pewno chcesz kontynuowaê?")
  137.  
  138.   (set msg_copy_libs            "\n\nKopiujë niezbëdne biblioteki...\n\nSpokojnie, Twój katalog LIBS: pozostanie nienaruszony...")
  139.   (set msg_update_libs          "\n\nAktualizujë niezbëdne biblioteki...")
  140.   (set msg_copy_data            "\n\nKopiujë niezbëdne pliki danych...\n\nProszë czekaê...")
  141.   (set msg_copy_binaries        "\n\nInstalujë program...\n\nProszë czekaê...")
  142.  
  143.  )
  144. )
  145.  
  146. ;//|
  147. ;/// Italian strings
  148. ;**************************** ITALIAN STRINGS *****************************
  149.  
  150. (if (= @language "italiano")
  151.  (
  152.   (set _language_version 2)
  153.   (set _def_alt_lang 1)
  154.  
  155.   (set msg_err_dizzy            "Si è verificato un errore imprevisto! Installazione interrotta.")
  156.   (set msg_err_cleanup          "Installazione interrotta. Ripristino i file.")
  157.   (set msg_err_wrongos          "\n\nPalmBackup richiede AmigaOS 2.0 o superiore per funzionare.")
  158.   (set msg_err_request          "\n\nInstallazione interrotta su richiesta dell'utente.")
  159.  
  160.   (set msg_copyrights           "Questo è un prodotto shareware!\n\nCopyright © 1998-1999 W.F.M.H.\n\nTutti i diritti riservati.")
  161.  
  162.   (set msg_installdir           "Dove volete installare PalmBackup?\nSarà creato un cassetto \"%s\" nella locazione scelta.")
  163.   (set msg_installdir_help      "Scegliete la directory in cui volete che PalmBackup sia installato. Sarà automaticamente creato un nuovo cassetto di nome \"%s\" nella locazione scelta, e TUTTI i file di PalmBackup saranno copiati in quel cassetto.")
  164.   (set msg_err_destfile         "\nNon posso creare la directory \"%s\" perché esiste già un file con quel nome nella locazione scelta. Cancellatelo manualmente oppure scegliete un'altra directory di destinazione. Installazione interrotta...")
  165.   (set msg_destdir_over         "\nIl cassetto di destinazione\n\n\"%s\"\n\nesiste già!\n\nVolete veramente continuare?\nFate riferimento al testo d'aiuto per maggiori informazioni.")
  166.   (set msg_destdir_over_help    "La directory di destinazione che avete appena selezionato è già presente sul vostro disco rigido. Scegliete se volete davvero installare PalmBackup sovrascrivendo i file esistenti.\n\nPremendo \"%s\" continuerete l'installazione ed PalmBackup sarà installato nel cassetto da voi scelto. Premendo \"%s\" interromperete l'installazione - niente sarà installato.")
  167.   (set msg_destdir_button_yes   "Continua")
  168.   (set msg_destdir_button_no    "Annulla")
  169.  
  170.   (set msg_sure                 "\n\n\nPalmBackup sarà installato sul vostro disco rigido nel cassetto:\n\n\"%s\".\n\nVolete continuare?")
  171.  
  172.   (set msg_icon                 "Saranno ora impostati i parametri di icona del programma.")
  173.   (set msg_icon_help            "Saranno ora impostati i parametri di icona del programma. NON saltate questa parte, altrimenti PalmBackup non funzionerà dopo l'installazione!")
  174.  
  175.   (set msg_copy_libs            "\n\nCopio le librerie necessarie...\n\nAttendere prego, la vostra directory LIBS: non sarà modificata...")
  176.   (set msg_update_libs          "\n\nAggiorno le librerie necessarie......")
  177.   (set msg_copy_data            "\n\nCopio i file dati necessari...\n\nAttendere prego...")
  178.   (set msg_copy_binaries        "\n\nInstallo il file eseguibile del programma...\n\nAttendere prego...")
  179.  
  180.  )
  181. )
  182. ;//|
  183.  
  184. ;/// OnError
  185.  
  186. ;###########################################################################
  187. ;## OnError
  188. ;###########################################################################
  189.  
  190. (onerror
  191.     (working msg_err_cleanup)
  192.     (P_CleanUp)
  193. )
  194. ;//|
  195. ;/// Bug
  196. ;###########################################################################
  197. ;## Bug
  198. ;###########################################################################
  199.  
  200. (procedure bug #tekst  (if (> _debug 0) (message #tekst (all))))
  201.  
  202. ;//|
  203.  
  204. ;/// P_CleanUp
  205.  
  206. ;###########################################################################
  207. ;## P_CleanUp
  208. ;###########################################################################
  209.  
  210. (procedure P_CleanUp
  211.  
  212. )
  213. ;//|
  214. ;/// P_Makedir
  215. ;###########################################################################
  216. ;## P_Makedir
  217. ;###########################################################################
  218.  
  219. (procedure P_Makedir #katalog
  220.  
  221.     (if (= (exists #katalog) 0)
  222.        (
  223.         (makedir #katalog)
  224.        )
  225.     )
  226. )
  227. ;//|
  228.  
  229. ;/// Preparing...
  230. ;###########################################################################
  231. ;## Preparing...
  232. ;###########################################################################
  233.  
  234. (bug "\n\nDebug is ON!")
  235.  
  236.  
  237. (message "\n\n\nW.F.M.H. PalmBackup " __version  "."  __revision "\n\n"
  238.          msg_copyrights
  239. )
  240.  
  241. (complete 0)
  242.  
  243.  
  244.  
  245.  
  246. (set OS_Version (/ (getversion "exec.library" (resident)) 65536))
  247.  
  248. (if (<  OS_Version 36) (abort msg_err_wrongos))
  249. (if (<= OS_Version 38) (set _os 0))
  250. (if (>= OS_Version 39) (set _os 1))
  251.  
  252. ;###########################################################################
  253. ;## Ask where shall we put the files?
  254. ;###########################################################################
  255.  
  256. (set @default-dest "Work:")
  257. (set @default-dest (askdir (prompt  (msg_installdir __destdir))
  258.                            (help    (msg_installdir_help __destdir))
  259.                            (default @default-dest)
  260.                    )
  261. )
  262. (set @default-dest (tackon @default-dest __destdir))
  263.  
  264. (bug (cat "DestDir: " @default-dest))
  265.  
  266. ;//|
  267. ;/// R U sure?
  268.  
  269. ;###########################################################################
  270. ;## R U sure?
  271. ;###########################################################################
  272.  
  273. (message (msg_sure @default-dest) (all))
  274.  
  275. ;//|
  276.  
  277. ;/// De szou mast gou on...
  278.  
  279. ;###########################################################################
  280. ;## De szou mast gou on...
  281. ;###########################################################################
  282.  
  283. (complete 0)
  284.  
  285.  
  286. ;###########################################################################
  287. ;## Let's check if there's nothing with that name...
  288. ;###########################################################################
  289.  
  290.  
  291. (if (= (exists @default-dest) 0)
  292.     (
  293.      (makedir @default-dest (infos))
  294.     )
  295.  
  296. ;  else
  297.  
  298.     (
  299.      (if (= (exists @default-dest) 1)
  300.       (
  301.        (abort (msg_err_destfile @default-dest))
  302.       )
  303.  
  304. ;    else
  305.  
  306.       (if (= (exists @default-dest) 2)
  307.        (
  308.         (set _user (user 2))
  309.         (if (= (askbool (prompt (msg_destdir_over @default-dest)) (help (msg_destdir_over_help msg_destdir_button_yes msg_destdir_button_no)) (choices msg_destdir_button_yes msg_destdir_button_no)) 0)
  310.            (abort msg_err_request)
  311.                 )
  312.                 (user _user)
  313.        )
  314. ;    else
  315.        (
  316.         (abort msg_err_dizzy)
  317.        )
  318.       )
  319.      )
  320.     )
  321. )
  322.  
  323. ;###########################################################################
  324. ;## Let's make some necesary drawers
  325. ;###########################################################################
  326.  
  327. (complete 10)
  328.  
  329. (P_Makedir (tackon @default-dest "Catalogs"))
  330. (P_Makedir (tackon @default-dest "Images"))
  331.  
  332. ;###########################################################################
  333. ;## Let's copy libs we need... We won't touch your LIBS: if not needed...
  334. ;###########################################################################
  335.  
  336. (complete 20)
  337.  
  338. (set #palmlink_name "palmlink.library")
  339. (set #dest_libs     "LIBS:")
  340. (set #src_libs      (tackon __src ""))
  341.  
  342. (set _palmlink_2_libs 0)
  343.  
  344.  
  345. (if (= (exists "LIBS:palmlink.library" (noreq)) 1) (set _palmlink_2_libs 1))
  346.  
  347. (if (= (+ _palmlink_2_libs) 0)
  348.     (working msg_copy_libs)
  349. ; else
  350.     (working msg_update_libs)
  351. )
  352.  
  353. ;/// Let's play with palmlink.library
  354.  
  355. (set #old_library (tackon #dest_libs #palmlink_name))
  356. (set #new_library (tackon #src_libs  #palmlink_name))
  357.  
  358. (if (= _palmlink_2_libs 0)
  359.     (
  360.      (bug (cat "\n\nNo " #palmlink_name " in LIBS: found..."))
  361.      (copyfiles
  362.         (source #new_library)
  363.         (dest   @default-dest)
  364.         (nogauge)
  365.      )
  366.     )
  367. ; else
  368.     (
  369.      (set _old_version (getversion #old_library))
  370.      (set _new_version (getversion #new_library))
  371.  
  372.      (bug (cat "\n\nChecking version of " #palmlink_name ":\n\nOld:" _old_version "\nNew:" _new_version))
  373.  
  374.      (if (> _new_version _old_version)
  375.           (
  376.            (bug (cat "\n\nUpdating " #palmlink_name "..."))
  377.  
  378.            (rename #old_library (cat #old_library "." (getsum #old_library)))
  379.            (copyfiles
  380.              (source #new_library)
  381.              (dest   "LIBS:")
  382.              (nogauge)
  383.            )
  384.           )
  385. ;       else
  386.           (
  387.            (bug (cat "\n\n" #palmlink_name " is up to date..."))
  388.           )
  389.      )
  390.     )
  391. )
  392. ;//|
  393.  
  394.  
  395. ;###########################################################################
  396. ;## Data files
  397. ;###########################################################################
  398.  
  399. (complete 30)
  400. (working msg_copy_data)
  401.  
  402. (copyfiles
  403.     (source (tackon __src "Images"))
  404.     (dest   (tackon @default-dest "Images"))
  405.     (all)
  406.     (nogauge)
  407. )
  408.  
  409. ;###########################################################################
  410. ;## Guide and docs follow...
  411. ;###########################################################################
  412.  
  413. (complete 40)
  414. (working)
  415.  
  416. (copyfiles
  417.     (source  __src)
  418.     (dest    @default-dest)
  419.     (pattern "PalmBackup.#?")
  420.     (nogauge)
  421. )
  422.  
  423. ;###########################################################################
  424. ;## Catalogs...
  425. ;###########################################################################
  426.  
  427. (complete 50)
  428. (working)
  429.  
  430. (copyfiles
  431.     (source  (tackon __src "Catalogs"))
  432.     (dest    (tackon @default-dest "Catalogs"))
  433.     (all)
  434.     (nogauge)
  435. )
  436.  
  437. ;###########################################################################
  438. ;## MUI classes follow...
  439. ;###########################################################################
  440.  
  441. (complete 70)
  442. (working msg_copy_binaries)
  443. (set _mui_dest "MUI:Libs/MUI/")
  444.  
  445. (copylib
  446.     (source  "/MUI/File.mcc")
  447.     (dest    _mui_dest)
  448.     (nogauge)
  449. )
  450.  
  451. (copylib
  452.     (source  "/MUI/NewDirlist.mcc")
  453.     (dest    _mui_dest)
  454.     (nogauge)
  455. )
  456. (copylib
  457.     (source  "/MUI/NewDirlist.mcp")
  458.     (dest    _mui_dest)
  459.     (nogauge)
  460. )
  461.  
  462. ;###########################################################################
  463. ;## Binaries follow...
  464. ;###########################################################################
  465.  
  466. (complete 80)
  467. (working msg_copy_binaries)
  468.  
  469. (set _bin_src (tackon __src "PalmBackup"))
  470.  
  471. (copyfiles
  472.     (source  _bin_src)
  473.     (dest    @default-dest)
  474.     (nogauge)
  475. )
  476.  
  477. ;###########################################################################
  478. ;## Seems it's over...
  479. ;###########################################################################
  480.  
  481. (complete 100)
  482.  
  483. (exit)
  484.  
  485. ;//|
  486.