home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1997 #3 / amigamamagazinepolishissue03-1 / ma_shareware / mashare76 / proged.lha / proged22 / installproged / Install < prev    next >
Text File  |  1996-07-22  |  17KB  |  900 lines

  1. ;
  2. ; ProgED Installer Utility
  3. ;
  4. ; This script is Copyright ©1995 Giovanni Lambiase
  5. ;
  6.  
  7. (
  8.     ; Setup English default strings
  9.  
  10.     (set #intro
  11.         (cat
  12.             "ProgED V2.2 - All Rights Reserved.\n"
  13.             "\n"
  14.             "ProgED  ©'95-'96 Giovanni Lambiase\n"
  15.             "Triton.library - Copyright Stefan Zeiger\n"
  16.             "Reqtools.library - Copyright Nico François\n"
  17.             "Powerpacker.library - Copyright Nico François\n"
  18.             "XpkMaster.library - Copyright Urban Dominik Müller & Bryan Ford\n"
  19.             "\n"
  20.             "ProgED is NOT 'freely distributable' but SHAREWARE.\n"
  21.             "Look at the licence file before installing ProgED.\n"
  22.             "Installing this software means\naccepting that licence.\n"
  23.             "Thank you.\n"
  24.         )
  25.     )
  26.  
  27.     (set #badkick "\n Sorry, this package requires OS v2.1 or better.\n")
  28.  
  29.     (set #askdir
  30.         (cat    "Select where you would like to install "
  31.             "ProgED. A drawer called 'ProgED' will "
  32.             "be created here."
  33.         )
  34.     )
  35.  
  36.     (set #askdir_help
  37.         (cat
  38.             "ProgED and all necessary files will be installed "
  39.             "in the directory of your choice. You may wish "
  40.             "to create a new directory for ProgED by using "
  41.             "the 'Make New Drawer' gadget.\n\n"
  42.             "You may install this version over your existing "
  43.             "version of ProgED, but you will loose previous "
  44.             "files. Current preference settings will be "
  45.             "backuped."
  46.         )
  47.     )
  48.  
  49.     (set #overwrite    "The 'ProgED' directory already exists, overwrite?")
  50.  
  51.     (set #overwrite_help
  52.         (cat
  53.             "You may stop the install to "
  54.             "avoid overwriting your current "
  55.             "version of ProgED.\n\n"
  56.             "Continuing the install will "
  57.             "overwrite your current files "
  58.             "and you will loose your current "
  59.             "preferences."
  60.         )
  61.     )
  62.  
  63.     (set #yes "Yes")
  64.  
  65.     (set #no "No")
  66.  
  67.     (set #quit "Quit")
  68.  
  69.         (set #ext "ENG")
  70.  
  71.     (set #havemwb "Do you have MagicWB installed on your system ?")
  72.  
  73.     (set #havemsb_help
  74.         (cat
  75.             "MagicWB is an icon package by Martin Huttenloher "
  76.             "(© 1993). MagicWB icons looks 3D, 8 colors, ecc. "
  77.             "If you haven't it look at your BBS to download "
  78.             "1.2 PD version."
  79.         )
  80.     )
  81.  
  82.     (set #installed "ProgED will be installed in ")
  83.  
  84.     (set #installing "Installing ProgED Program...")
  85.  
  86.     (set #creating "Creating 'ProgED' directory")
  87.  
  88.     (set #copingexe "coping ProgED executable...")
  89.  
  90.     (set #copingexeprt "coping PED_Print executable...")
  91.  
  92.     (set #copingman "coping Manual...")
  93.  
  94.     (set #copinghist "coping History & LastNotes ...")
  95.  
  96.     (set #crticonsdir "Creating 'Icons' directory")
  97.  
  98.     (set #crtprjdir "Creating 'Projects' directory")
  99.  
  100.     (set #crtclientsdir "Creating 'Clients' directory")
  101.  
  102.     (set #crtfoldersdir "Creating 'Folders' directory")
  103.  
  104.     (set #crtscannersdir "Creating 'Scanners' directory")
  105.  
  106.     (set #crtmacrosdir "Creating 'Macros' directory")
  107.  
  108.     (set #crtcatalogsdir "Creating 'Catalogs' directory")
  109.  
  110.     (set #crtldir "Creating 'L' directory")
  111.  
  112.     (set #crtsasc "Creating 'SASC_Support' directory")
  113.  
  114.     (set #crtsources "Creating 'Sources' directory")
  115.  
  116.     (set #thanks
  117.         (cat
  118.             "Thanks for registering. Supporting shareware's authors is Amiga's future! "
  119.             "Now you should also install "
  120.             "the triton.library. You can find a general "
  121.             "version of this library in this archive. "
  122.         )
  123.     )
  124.  
  125.     (set #nokeyfile
  126.         (cat
  127.             "No keyfile was found during "
  128.             "installation. For details of how to register "
  129.             "and receive the full version, refer to the "
  130.             "documentation. If you are a 1.x registered user "
  131.             "please use UpdateKeyFile program to update your "
  132.             "keyfile. DO NOT USE KEYFILES OF 1.0/1.1 "
  133.             "RELEASES. THANKS. If you are a 2.x registered "
  134.             "user simply use your keyfile :-). Now you should also install "
  135.             "the triton.library. You can find a general "
  136.             "version of this library in this archive. "
  137.         )
  138.     )
  139.  
  140.     (set #reset
  141.         (cat
  142.             "\n\nWhen this installation stops remember that you MUST "
  143.             "reset your Amiga to properly setup ProgED enviroment!"
  144.         )
  145.     )
  146.  
  147.     (set #setup1
  148.         (cat
  149.             "To properly setup ProgED I have to modify your "
  150.             "User-StartUp adding following command:\n\n"
  151.         )
  152.     )
  153.  
  154.     (set #setup2
  155.         (cat
  156.             "If you skip this pass you MUST manually enter "
  157.             "it later."
  158.         )
  159.     )
  160.  
  161.     (set #setup_help
  162.         (cat
  163.             "ProgED needs an Assign in main directory to "
  164.             "properly setup. If you skip this pass you MUST "
  165.             "manually enter it later in your User-StartUp or "
  166.             "in a shell prior to run ProgED."
  167.         )
  168.     )
  169.  
  170.     (set #prefsbackuped
  171.         (cat
  172.             "I found a previous ProgED preferences file. I "
  173.                         "backuped it. YOU CAN USE IT ONLY IF IT'S A 2.x "
  174.             "PREFS FILE, OTHERWISE DON'T USE IT! "
  175.         )
  176.     )
  177.  
  178.     ; If language is german simply set the right extension but
  179.     ; use english strings (sorry!)
  180.  
  181.     (if (= @language "deutsch")
  182.     (
  183.             (set #ext "GER")
  184.     ))
  185.  
  186.     ; If language is italian then ...
  187.  
  188.     (if (= @language "italiano")
  189.     (
  190.     ; Setup Italian strings
  191.  
  192.     (set #intro
  193.         (cat
  194.             "ProgED V2.2 - All Rights Reserved.\n"
  195.             "\n"
  196.             "ProgED  ©'95-'96 Giovanni Lambiase\n"
  197.             "Triton.library - Copyright Stefan Zeiger\n"
  198.             "Reqtools.library - Copyright Nico François\n"
  199.             "Powerpacker.library - Copyright Nico François\n"
  200.             "XpkMaster.library - Copyright Urban Dominik Müller & Bryan Ford\n"
  201.             "\n"
  202.             "ProgED NON E' 'liberamente distribuibile' ma\n"
  203.             "SHAREWARE. Leggi il file di licenza prima di\n"
  204.             "iniziare l'installazione. Installare questo\n"
  205.             " software significa accettare quella licenza.\n"
  206.             "Grazie.\n"
  207.         )
  208.     )
  209.  
  210.     (set #badkick "\n Spiacente, questo pacchetto richiede il sistema operativo OS v2.1 o superiori.\n")
  211.  
  212.     (set #askdir
  213.         (cat    "Selezione dove vuoi installare ProgED. "
  214.             "Un nuovo cassetto chiamato 'ProgED' sarà "
  215.             "creato dove specificato."
  216.         )
  217.     )
  218.  
  219.     (set #askdir_help
  220.         (cat
  221.             "ProgED e tutti i file necessari saranno installati "
  222.             "nella directory scelta. Puoi creare un nuovo cassetto "
  223.             "per ProgED usando il gadget 'Crea nuovo cassetto'.\n\n"
  224.             "Puoi installare questa versione sovrascrivendo "
  225.             "una precedente versione di ProgED, ma perderai i "
  226.             "file precedenti. Le vecchie preferenze saranno "
  227.             "archiviate."
  228.         )
  229.     )
  230.  
  231.     (set #overwrite "Il cassetto 'ProgED' esiste già, lo sovrascrivo ?")
  232.  
  233.     (set #overwrite_help
  234.         (cat
  235.             "Puoi fermare l'installazione per "
  236.             "evitare la sovrascrittura della "
  237.             "versione corrente di ProgED.\n\n"
  238.             "Continuare l'installazione sovrascriverà "
  239.             "i file correnti e perderai le preferenze "
  240.             "correnti."
  241.         )
  242.     )
  243.  
  244.     (set #yes "Si")
  245.  
  246.     (set #no "No")
  247.  
  248.     (set #quit "Esci")
  249.  
  250.         (set #ext "ITA")
  251.  
  252.     (set #havemwb "Hai MagicWB installato sul tuo sistema ?")
  253.  
  254.     (set #havemsb_help
  255.         (cat
  256.             "MagicWB è un package di icone creato da Martin Huttenloher "
  257.             "(© 1993). Le icone di MagicWB sono tridimensionali, hanno "
  258.             "8 colors, ecc. Se non hai ancora installato MagicWB cerca "
  259.             "nella tua BBS la versione 1.2 PD e scaricala."
  260.         )
  261.     )
  262.  
  263.     (set #installed "ProgED sarà installato in ")
  264.  
  265.     (set #installing "Sto installando il ProgED ...")
  266.  
  267.     (set #creating "Sto creando il cassetto 'ProgED'")
  268.  
  269.     (set #copingexe "Sto copiando l'eseguibile del ProgED ...")
  270.  
  271.     (set #copingexeprt "Sto copiando l'eseguibile del PED_Print ...")
  272.  
  273.     (set #copingman "Sto copiando il manuale ...")
  274.  
  275.     (set #copinghist "Sto copiando i file History & LastNotes ...")
  276.  
  277.     (set #crticonsdir "Sto creando il cassetto 'Icons'")
  278.  
  279.     (set #crtprjdir "Sto creando il cassetto 'Projects'")
  280.  
  281.     (set #crtclientsdir "Sto creando il cassetto 'Clients'")
  282.  
  283.     (set #crtfoldersdir "Sto creando il cassetto 'Folders'")
  284.  
  285.     (set #crtscannersdir "Sto creando il cassetto 'Scanners'")
  286.  
  287.     (set #crtmacrosdir "Sto creando il cassetto 'Macros'")
  288.  
  289.     (set #crtcatalogsdir "Sto creando il cassetto 'Catalogs'")
  290.  
  291.     (set #crtldir "Sto creando il cassetto 'L'")
  292.  
  293.     (set #crtsasc "Sto creando il cassetto 'SASC_Support'")
  294.  
  295.     (set #thanks
  296.         (cat
  297.             "Grazie per esserti registrato. Aiutare gli autori di software shareware è il futuro di Amiga! "
  298.             "Ora dovresti anche installare la triton.library. "
  299.             "Puoi trovarne una versione generale in questo archivio. "
  300.         )
  301.     )
  302.  
  303.     (set #nokeyfile
  304.         (cat
  305.             "Nessun keyfile trovato durante l'installazione. "
  306.             "Per i dettagli riguardo la registrazione e su come "
  307.             "ricevere una versione pienamente funzionante leggi "
  308.             "la documentazione allegata. Se sei un utente "
  309.             "registrato delle versioni 1.x, per favore, usa il programma "
  310.             "UpdateKeyFile per aggiornare il tuo vecchio keyfile. "
  311.             "NON USARE UN KEYFILE DELLA 1.0/1.1. GRAZIE. "
  312.             "Se sei un utente della 2.x semplicemente usa il tuo keyfile :-) "
  313.             "Ora dovresti anche installare la triton.library. "
  314.             "Puoi trovarne una versione generale in questo archivio. "
  315.         )
  316.     )
  317.  
  318.     (set #reset
  319.         (cat
  320.             "\nQuando questa installazione sarà terminata ricorda "
  321.             "che DEVI resettare il tuo Amiga per preparare propriamente "
  322.             "l'ambiente del ProgED!"
  323.         )
  324.     )
  325.  
  326.     (set #setup1
  327.         (cat
  328.             "Per preparare l'ambiente del ProgED DEVO modificare la tua "
  329.             "User-StartUp aggiungendo i seguenti comandi:\n\n"
  330.         )
  331.     )
  332.  
  333.     (set #setup2    "Se salti questo passo DOVRAI inserirli manualmente più tardi.")
  334.  
  335.     (set #setup_help
  336.         (cat
  337.             "ProgED necessita di un assegnamento alla sua directory "
  338.             "principale al fine di funzionare correttamente. Se "
  339.             "salti questo passo DOVRAI inserirlo manualmente nella "
  340.             "tua User-StartUp o in una shell prima di eseguire il ProgED."
  341.         )
  342.     )
  343.  
  344.     (set #prefsbackuped
  345.         (cat
  346.             "Ho trovato una precedente versione del file di "
  347.                         "configurazione di ProgED. E' stato rinominato. "
  348.                         "PUOI UTILIZZARLO SOLO SE E' UN FILE DI PREFERENZE "
  349.             "DELLA 2.x. IN CASO CONTRARIO NON UTILIZZARLO!"
  350.         )
  351.     )))
  352.  
  353.     (message #intro)
  354.  
  355.     ; sure we are running under a 2.1 KICK ?
  356.  
  357.     (if (< (/ (getversion) 65536) 38)
  358.         (
  359.             (message #badkick)
  360.             (exit (quiet))
  361.         )
  362.     )
  363.  
  364.  
  365.     ; Ask where to install it...
  366.  
  367.     (set destdir
  368.         (askdir
  369.             (prompt #askdir)
  370.             (help #askdir_help)
  371.             (default @default-dest)
  372.             (disk)
  373.         )
  374.     )
  375.  
  376.     (set destdir
  377.         (tackon destdir "ProgED")
  378.     )
  379.  
  380.     (set @default-dest destdir)
  381.  
  382.     ; See whether this directory exists, if so warn the user
  383.  
  384.     (if (exists @default-dest) 
  385.         (
  386.             (if (= 0 (askbool
  387.                     (prompt #overwrite)
  388.                     (help #overwrite_help)
  389.                     (choices #yes #quit)
  390.                 ))
  391.  
  392.                 (
  393.  
  394.                 ; User wishes to quit
  395.  
  396.                 (exit (quiet))
  397.                 )
  398.  
  399.             )
  400.         )
  401.     )
  402.  
  403.     ; Ask user if he wants MagicWB icons
  404.     ; and figure out where pick up icons
  405.  
  406.     (if
  407.         (askbool
  408.             (prompt #havemwb)
  409.             (help #havemsb_help)
  410.             (choices #yes #no)
  411.         )
  412.         (set insticonsdir "Icons/MagicWB")
  413.         (set insticonsdir "Icons/Standard")
  414.     )
  415.  
  416.     ; Prompt for choosed dir
  417.  
  418.     (message #installed @default-dest)
  419.  
  420.     ; Start!
  421.  
  422.     (complete 0)
  423.  
  424.     (working #installing)
  425.  
  426.     ; Create the directory if it doesn't exist
  427.  
  428.     (if (= 0 (exists @default-dest))
  429.         (
  430.             (makedir @default-dest
  431.                 (prompt #creating)
  432.                 (infos)
  433.             )
  434.         )
  435.     )
  436.  
  437.     (working #copingexe)
  438.  
  439.     ; Install the ProgED executable file
  440.  
  441.     (copyfiles
  442.         (source "ProgED")
  443.         (dest @default-dest)
  444.     )
  445.  
  446.     ; Install the prefs dir
  447.  
  448.     (complete 10)
  449.  
  450.     (set prefsdir (tackon @default-dest "Prefs"))
  451.  
  452.     (if (= 0 (exists prefsdir))
  453.         (
  454.             (makedir prefsdir)
  455.         )
  456.     )
  457.  
  458.     (copyfiles
  459.         (source "Prefs")
  460.         (dest prefsdir)
  461.         (all)
  462.     )
  463.  
  464.     (complete 20)
  465.  
  466.     ; Install the PED executable file
  467.  
  468.     (copyfiles
  469.         (source "PED")
  470.         (dest @default-dest)
  471.     )
  472.  
  473.     (delete
  474.         (tackon @default-dest "PED.info")
  475.     )
  476.  
  477.     ; Install the UpdateKeyFile executable file
  478.  
  479.     (copyfiles
  480.         (source "UpdateKeyFile")
  481.         (dest @default-dest)
  482.     )
  483.  
  484.     (complete 25)
  485.  
  486.     (working #copingexeprt)
  487.  
  488.     ; Install the PED_Print executable file
  489.  
  490.     (copyfiles
  491.         (source "PED_Print")
  492.         (dest @default-dest)
  493.     )
  494.  
  495.     (complete 30)
  496.  
  497.     (working #copingman)
  498.  
  499.     ; Install the Manual
  500.  
  501.     (copyfiles
  502.         (source (cat "Manual_" #ext))
  503.         (dest @default-dest)
  504.         (newname "Manual")
  505.     )
  506.  
  507.     ; Install the History and LastNotes
  508.  
  509.     (working #copinghist)
  510.  
  511.     (copyfiles
  512.         (source "History")
  513.         (dest @default-dest)
  514.     )
  515.  
  516.     (copyfiles
  517.         (source "LastNotes")
  518.         (dest @default-dest)
  519.     )
  520.  
  521.     (complete 35)
  522.  
  523.     (working #crticonsdir)
  524.  
  525.     ; Create icons' dir
  526.  
  527.     (set iconsdir (tackon @default-dest "Icons"))
  528.  
  529.     (if (= 0 (exists iconsdir))
  530.         (
  531.             (makedir iconsdir)
  532.  
  533.             (copyfiles
  534.                 (source (tackon insticonsdir "Icons.info"))
  535.                 (dest @default-dest)
  536.             )
  537.         )
  538.     )
  539.  
  540.     ; Copy all icons
  541.  
  542.     (copyfiles
  543.         (source (tackon insticonsdir "Icons"))
  544.         (dest iconsdir)
  545.         (all)
  546.     )
  547.  
  548.     (complete 40)
  549.  
  550.     (working #crtprjdir)
  551.  
  552.     ; Create projects' dir
  553.  
  554.     (set projectsdir (tackon @default-dest "Projects"))
  555.  
  556.     (if (= 0 (exists projectsdir))
  557.         (
  558.             (makedir projectsdir)
  559.  
  560.             (copyfiles
  561.                 (source (tackon insticonsdir "Projects.info"))
  562.                 (dest @default-dest)
  563.             )
  564.         )
  565.     )
  566.  
  567.     (complete 45)
  568.  
  569.     (working #crtclientsdir)
  570.  
  571.     ; Create clients' dir
  572.  
  573.     (set clientsdir (tackon @default-dest "Clients"))
  574.  
  575.     (if (= 0 (exists clientsdir))
  576.         (
  577.             (makedir clientsdir)
  578.  
  579.             (copyfiles
  580.                 (source (tackon insticonsdir "Clients.info"))
  581.                 (dest @default-dest)
  582.             )
  583.         )
  584.     )
  585.  
  586.     ; Copy all examples clients
  587.  
  588.     (copyfiles
  589.         (source "Clients")
  590.         (dest clientsdir)
  591.         (all)
  592.     )
  593.  
  594.     (complete 55)
  595.  
  596.     (working #crtfoldersdir)
  597.  
  598.     ; Create folders' dir
  599.  
  600.     (set foldersdir (tackon @default-dest "Folders"))
  601.  
  602.     (if (= 0 (exists foldersdir))
  603.         (
  604.             (makedir foldersdir)
  605.  
  606.             (copyfiles
  607.                 (source (tackon insticonsdir "Folders.info"))
  608.                 (dest @default-dest)
  609.             )
  610.         )
  611.     )
  612.  
  613.     ; Copy all examples folders
  614.  
  615.     (copyfiles
  616.         (source "Folders")
  617.         (dest foldersdir)
  618.         (all)
  619.     )
  620.  
  621.     (complete 60)
  622.  
  623.     (working crtscannersdir)
  624.  
  625.     ; Create scanners' dir
  626.  
  627.     (set scannersdir (tackon @default-dest "Scanners"))
  628.  
  629.     (if (= 0 (exists scannersdir))
  630.         (
  631.             (makedir scannersdir)
  632.  
  633.             (copyfiles
  634.                 (source (tackon insticonsdir "Scanners.info"))
  635.                 (dest @default-dest)
  636.             )
  637.         )
  638.     )
  639.  
  640.     ; Copy all examples scanners
  641.  
  642.     (copyfiles
  643.         (source "Scanners")
  644.         (dest scannersdir)
  645.         (all)
  646.     )
  647.  
  648.     (complete 65)
  649.  
  650.     (working crtmacrosdir)
  651.  
  652.     ; Create macros' dir
  653.  
  654.     (set macrosdir (tackon @default-dest "Macros"))
  655.  
  656.     (if (= 0 (exists macrosdir))
  657.         (
  658.             (makedir macrosdir)
  659.  
  660.             (copyfiles
  661.                 (source (tackon insticonsdir "Macros.info"))
  662.                 (dest @default-dest)
  663.             )
  664.         )
  665.     )
  666.  
  667.     ; Copy all examples macros
  668.  
  669.     (copyfiles
  670.         (source "Macros")
  671.         (dest macrosdir)
  672.         (all)
  673.     )
  674.  
  675.     (complete 70)
  676.  
  677.     (working #crtcatalogsdir)
  678.  
  679.     ; Create Catalogs dir
  680.  
  681.     (set catalogsdir (tackon @default-dest "Catalogs"))
  682.  
  683.     (if (= 0 (exists catalogsdir))
  684.         (
  685.             (makedir catalogsdir)
  686.         )
  687.     )
  688.  
  689.     ; Copy all catalogs dir
  690.  
  691.     (copyfiles
  692.         (source "Catalogs")
  693.         (dest catalogsdir)
  694.         (all)
  695.     )
  696.  
  697.     (complete 75)
  698.  
  699.     (working crtldir)
  700.  
  701.     ; Create L dir
  702.  
  703.     (set ldir (tackon @default-dest "L"))
  704.  
  705.     (if (= 0 (exists ldir))
  706.         (
  707.             (makedir ldir)
  708.         )
  709.     )
  710.  
  711.     ; Copy all handlers
  712.  
  713.     (copyfiles
  714.         (source "L")
  715.         (dest ldir)
  716.         (all)
  717.     )
  718.  
  719.     (complete 80)
  720.  
  721.     (working #crtsasc)
  722.  
  723.     ; Create SASC_Support dir
  724.  
  725.     (set sascdir (tackon @default-dest "SASC_Support"))
  726.  
  727.     (if (= 0 (exists sascdir))
  728.         (
  729.             (makedir sascdir)
  730.         )
  731.     )
  732.  
  733.     ; Copy all files
  734.  
  735.     (copyfiles
  736.         (source "SASC_Support")
  737.         (dest sascdir)
  738.         (all)
  739.     )
  740.  
  741.     (complete 85)
  742.  
  743.     (working #crtsources)
  744.  
  745.     ; Create sources dir
  746.  
  747.     (set sourcesdir (tackon @default-dest "Sources"))
  748.  
  749.     (if (= 0 (exists sourcesdir))
  750.         (
  751.             (makedir sourcesdir)
  752.         )
  753.     )
  754.  
  755.     ; Copy all files
  756.  
  757.     (copyfiles
  758.         (source "Sources")
  759.         (dest sourcesdir)
  760.         (all)
  761.     )
  762.  
  763.     (complete 90)
  764.  
  765.     ; Copy all icons
  766.  
  767.     (copyfiles
  768.         (source insticonsdir)
  769.         (dest @default-dest)
  770.         (all)
  771.     )
  772.  
  773.     (copyfiles
  774.         (source (tackon insticonsdir "Icons/def_Handler.info"))
  775.         (dest "DEVS:DosDrivers")
  776.         (newname "PED.info")
  777.     )
  778.  
  779.     (copyfiles
  780.         (source (tackon insticonsdir "Icons/def_Handler.info"))
  781.         (dest "DEVS:DosDrivers")
  782.         (newname "PRJ.info")
  783.     )
  784.  
  785.     ; Copy keyfile if it exists
  786.  
  787.     (if (exists "KeyFile")
  788.         (
  789.             (copyfiles
  790.                 (source "KeyFile")
  791.                 (dest @default-dest)
  792.             )
  793.  
  794.             (set foundkeyfile #thanks)
  795.         )
  796.  
  797.         ; Else, note we didn't find one
  798.  
  799.         (
  800.             (set foundkeyfile #nokeyfile)
  801.         )
  802.     )
  803.  
  804.     (set foundkeyfile
  805.         (cat foundkeyfile #reset)
  806.     )
  807.  
  808.     (complete 95)
  809.  
  810.     ; Check backup prefs
  811.  
  812.     (set prefsbackup 0)
  813.     (if (<> 0 (exists "ENVARC:PED/PED.prefs"))
  814.         (
  815.             (rename "ENVARC:PED/PED.prefs" "ENVARC:PED/PED.oldprefs")
  816.             (set prefsbackup 1)
  817.         )
  818.     )
  819.  
  820.     ; Copy EnvArc's file
  821.  
  822.     (set envarcdir "ENVARC:PED")
  823.  
  824.     (if (= 0 (exists envarcdir))
  825.         (
  826.             (makedir envarcdir)
  827.         )
  828.     )
  829.  
  830.     ; Copy  prefs
  831.  
  832.     (copyfiles
  833.         (source (cat "EnvArc/PED.prefs." #ext))
  834.         (dest envarcdir)
  835.         (newname "PED.prefs")
  836.     )
  837.  
  838.     ; Copy Presets' file
  839.  
  840.     (set presetsdir (tackon @default-dest "Presets"))
  841.  
  842.     (if (= 0 (exists presetsdir))
  843.         (
  844.             (makedir presetsdir)
  845.         )
  846.     )
  847.  
  848.     (copyfiles
  849.         (source "Presets")
  850.         (dest presetsdir)
  851.         (all)
  852.     )
  853.  
  854.     ; Copy Handlers' files
  855.  
  856.     (set handlersdir "DEVS:DosDrivers")
  857.  
  858.     (if (= 0 (exists handlersdir))
  859.         (
  860.             (makedir handlersdir)
  861.         )
  862.     )
  863.  
  864.     (copyfiles
  865.         (source "Devs")
  866.         (dest handlersdir)
  867.         (all)
  868.     )
  869.  
  870.     ; Updates User-StartUp
  871.  
  872.     (startup "ProgED"
  873.         (prompt
  874.             (cat
  875.                 #setup1
  876.                 "Assign ProgED: \"" @default-dest "\"\n"
  877.                 "Path ProgED: ADD\n\n"
  878.                 #setup2
  879.             )
  880.         )
  881.         (help #setup_help)
  882.         (command
  883.             "Assign ProgED: \"" @default-dest "\"\n"
  884.             "Path ProgED: ADD\n"
  885.         )
  886.     )
  887.  
  888.     (complete 100)
  889.  
  890.     ; Prefs backuped ?
  891.  
  892.     (if (= 1 prefsbackup)
  893.         (message #prefsbackuped)
  894.     )
  895.  
  896.     ; Say goodbye
  897.  
  898.     (message foundkeyfile)
  899. )
  900.