home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Utilities / QuickFile / Installation < prev    next >
Text File  |  2000-08-04  |  16KB  |  368 lines

  1. ;------------------------------------------------------------------------
  2. ; Script d'installation du programme QuickFile
  3. ;
  4. ; $VER: QuickFile-Install 1.0 (20.07.00)
  5. ;
  6. ; (C) 2000 R.Florac
  7.  
  8. (if (= @language "français") (set catalogue 1) (set catalogue 0))
  9.  
  10. (if (= catalogue 1)
  11.     (
  12.     (set maj_string "Voulez-vous effectuer une mise à jour de la version 3.25 ?")
  13.     (set maj_help_string "Si vous répondez OUI seul le fichier programme QuickFile sera copié.\nN'effectuez une mise à jour que si vous avez déjà installé la version 3.25.\nSi vous répondez NON, l'installation s'effectuera normalement.")
  14.     (set audio_string "Un nouvel exemple (Base audio) est disponible.\nVoulez-vous le copier ?")
  15.     (set help_audio_string "Cet exemple peut utiliser des scripts ARexx pour visualiser les albums ou les chansons, ainsi que pour ajouter de nouveaux CD (utilisez les touches de fonction)")
  16.     (set rep_string "Un répertoire QuickFile sera créé à l'endroit que vous aurez choisi, s'il n'existait pas déjà.")
  17.     (set where_rep_string "Où voulez vous créer le répertoire QuickFile ?")
  18.     (set dest_rep_string "Le répertoire destination pour QuickFile\nsera ")
  19.     (set continue_string "Continuer")
  20.     (set stop_string "Arrêter")
  21.     (set help_rep_string "Si le répertoire spécifié ne vous convient pas, choisissez 'Arrêter': vous devrez relancer le programme d'installation et choisir une autre destination.")
  22.     (set choose_file_string "Choisissez les fichiers à copier")
  23.     (set select_files_string (cat "Sélectionnez les fichiers que vous voulez copier, seuls ceux qui sont marqués le seront.\nQuickFile est le fichier programme.\nQuickFile.keys est le fichier contenant des définitions de touches programmables.\n"
  24.         "QuickFile.config est le fichier définissant les options de fonctionnement du programme (préférences).\nQuickFileWindow.keys est utilisé pour certains exemples (Chargez-le en utilisant la requête des touches de fonction)."))
  25.     (set choose_examples_string "Choisissez les fichiers\n d'exemples à copier")
  26.     (set help_examples_string "Sélectionnez les fichiers que vous voulez copier, seuls ceux qui sont marqués le seront.")
  27.     (set choose_arexx_string "Choisissez les scripts ARexx à copier\nDe nombreux scripts ont été améliorés.")
  28.     (set help_arexx_string "Sélectionnez les fichiers que vous voulez copier, seuls ceux qui sont marqués le seront.\nIl est vivement conseillé de copier TOUS les fichiers.")
  29.     (set copy_icons_string "Voulez-vous copier les icones au format NewIcons ?")
  30.     (set help_icons_string "Ces fichiers ne doivent être copiés que si vous utilisez NewIcons.")
  31.     (set copying_icons_string "Copie des icones NewIcons")
  32.     (set copying_drawer_icon_string "Copie de l'icone du répertoire")
  33.     (set ask_copy_os35icons_string "Voulez-vous copier les icones au format 3.5 ?")
  34.     (set help_os35icons_string "Ces fichiers ne doivent être copiés que si vous utilisez l'OS 3.5.\nLe répertoire OS3.5Icons contient des icones qui ne sont pas copiées par ce script, utilisez le Workbench pour les copier si vous les aimez.")
  35.     (set copying_progicon_string "Copie de l'icone du programme")
  36.     (set copying_history_string "Copie de l'icone du fichier history.doc")
  37.     (set copying_guide_icon_string "Copie de l'icone du guide")
  38.     (set copying_rexxdrawer_string "Copie de l'icone du tiroir ARexx")
  39.     (set copying_examples_icon_string "Copie de l'icone du tiroir d'exemples")
  40.     (set ask_copy_commands_string "Voulez-vous copier les fichiers de commandes du répertoire c ?")
  41.     (set help_copy_commands_string (cat "Ces commandes sont utilisées par certaines bases de données:\n  - Mostra est un afficheur d'images\n  - Muchmore est un afficheur de texte.\n"
  42.         "Ces fichiers seront copiés dans un répertoire c du répertoire QuickFile, elles doivent être copiées pour pouvoir utiliser les exemples de façon complète."))
  43.     (set ask_copy_examples_string "Voulez-vous copier les exemples ?")
  44.     (set help_copy_examples_string "Ces exemples sont des répertoires contenant chacun une petite base de données.\nIl est conseillé de les copier si vous êtes débutant, afin de prendre connaissance du logiciel.")
  45.     (set copying_drawer_icon_string "Copie de l'icone du répertoire")
  46.     (set select_catalog_string "Sélectionnez les catalogues que vous voulez copier")
  47.     (set help_catalog_string "Seul le catalogue correspondant à votre pays est nécessaire.\nLe logiciel utilise l'anglais par défaut.")
  48.     (set copying_catalog_string "Copie du catalogue français")
  49.     (set ask_copy_source_string "Voulez-vous copier les sources du catalogue?")
  50.     (set help_source_string "Les fichiers sources sont nécessaires uniquement si vous voulez créer un nouveau catalogue, pour un pays pour lequel il n'existe pas, ou bien pour modifier un catalogue existant.")
  51.     (set copying_source_string "Copie des sources du catalogue...")
  52.     (set select_catalog_string "Sélectionnez les catalogues que vous voulez copier\nLes catalogues ont été mis à jour sur la version 3.25.")
  53.     (set copying_catalog_string "Copie du catalogue français")
  54.     )
  55.     (
  56.     (set maj_string "Do you want to update the 3.25 version ?")
  57.     (set maj_help_string "If you click on YES the new QuickFile program will be copied only.\nYou can do un update only if you have the 3.25 version already installed.\nIf you choose NO the installation will continue normaly.")
  58.     (set audio_string "A new example (Audio base) is available.\nDo you want to copy it ?")
  59.     (set help_audio_string "This example can use ARexx scripts to display albums or songs, or to add new CD (use the function keys)")
  60.     (set rep_string "A QuickFile drawer will be created at the selected place, if it doesn't already exist.")
  61.     (set where_rep_string "Where do you want to create the QuickFile drawer ?")
  62.     (set dest_rep_string "The destination drawer for QuickFile\nwill be ")
  63.     (set continue_string "Continue")
  64.     (set stop_string "Stop")
  65.     (set help_rep_string "If the selected drawer is not correct, choose 'Stop': you will have to run again the installation program and choose another destination.")
  66.     (set choose_file_string "Select the files to copy")
  67.     (set select_files_string (cat "Select the files you want to copy, only the selected ones will be copied.\nQuickFile is the program file.\nQuickFile.keys is the file where definitions of keys are stored.\n"
  68.         "QuickFile.config is the file defining the options of the program (preferences).\nQuickFileWindow.keys is used to run some examples (Load it using the function keys panel)."))
  69.     (set choose_examples_string "Select the examples files\nto copy")
  70.     (set help_examples_string "Select the files you want to copy, only the selected names will be copied.")
  71.     (set choose_arexx_string "Select the ARexx scripts to copy\nSome scripts have been enhanced.")
  72.     (set help_arexx_string "Select the script files to copy, only the selected names will be copied.\nIt's good to copy ALL of the files.")
  73.     (set copy_icons_string "Do you want to copy the NewIcons icons files ?")
  74.     (set help_icons_string "These files don't have to be copied if you don't use NewIcons.")
  75.     (set copying_icons_string "Copying NewIcons icons files")
  76.     (set copying_drawer_icon_string "Copying the drawer icon")
  77.     (set ask_copy_os35icons_string "Do you want to copy the icons for the 3.5 system ?")
  78.     (set help_os35icons_string "These files can be copied only if you are using OS 3.5.\nThe OS3.5Icons drawer contains some icons that will not be copied by this script, use the Workbench to copy them if you like them.")
  79.     (set copying_progicon_string "Copying the program icon")
  80.     (set copying_history_string "Copying the history.doc icon")
  81.     (set copying_guide_icon_string "Copying the guide icon")
  82.     (set copying_rexxdrawer_string "Copying the ARexx drawer icon")
  83.     (set copying_examples_icon_string "Copying the examples drawer icon")
  84.     (set ask_copy_commands_string "Do you want to copy the command files of the c drawer ?")
  85.     (set help_copy_commands_string (cat "This commands are used by some databases:\n  - Mostra is an image viewer\n  - Muchmore is a text viewer.\n"
  86.         "This files will be copied in a c drawer of the QuickFile drawer, they have to be copied if you want to use the examples efficiently."))
  87.     (set ask_copy_examples_string "Do you want to copy the examples ?")
  88.     (set help_copy_examples_string "This examples are drawers that contain a little database.\nCopy them if you don't know QuickFile, to learn the program.")
  89.     (set copying_drawer_icon_string "Copying the QuickFile drawer icon")
  90.     (set select_catalog_string "Select the catalogs to copy")
  91.     (set help_catalog_string "Only the catalog used for your country is necessary.\nQuickFile uses built-in english strings.")
  92.     (set copying_catalog_string "Copying the french catalog")
  93.     (set ask_copy_source_string "Do-you want to copy the sources of the catalog ?")
  94.     (set help_source_string "The sources files are necessary only if you want to create a new catalog, for a new country or to modify an existing catalog.")
  95.     (set copying_source_string "Copying sources of catalog...")
  96.     (set select_catalog_string "Select the catalogs to copy\nThe catalogs have been updated in version 3.25.")
  97.     (set copying_catalog_string "Copying the french catalog")
  98.     )
  99. )
  100.  
  101. (set #QuickFiledestdir-help rep_string)
  102.  
  103. ;****************************************************************************
  104. ; Choix du répertoire destination *******************************************
  105. ;****************************************************************************
  106.  
  107. (set #destination
  108.     (expandpath
  109.     (askdir
  110.         (prompt where_rep_string)
  111.         (help #QuickFiledestdir-help)
  112.         (default @default-dest)
  113.         (disk)
  114.     )
  115.     )
  116. )
  117.  
  118. (set @default-dest (tackon #destination "QuickFile"))
  119.  
  120. (if (= 0 (askbool
  121.     (prompt (cat dest_rep_string @default-dest))
  122.     (choices continue_string stop_string)
  123.     (help help_rep_string)
  124.     ))
  125.     (exit (quiet))
  126. )
  127.  
  128. ;****************************************************************************
  129. ; Création des répertoires destination **************************************
  130. ;****************************************************************************
  131.  
  132. (if (= (exists @default-dest (noreq)) 0) (makedir @default-dest (infos)))
  133.  
  134. (set maj 0)
  135. (if (= 1 (exists (tackon @default-dest "QuickFile") (noreq)))
  136.     (if (= 196633 (getversion (tackon @default-dest "QuickFile")) )
  137.     (set maj (askbool
  138.         (prompt maj_string)
  139.         (help maj_help_string)
  140.         (default 0))
  141.     )
  142.     )
  143. )
  144.  
  145. (if (= maj 1)
  146.     (
  147.     (copyfiles
  148.         (source "QuickFile")
  149.         (dest @default-dest)
  150.     )
  151.     (if (= 1 (askbool
  152.         (prompt (audio_string))
  153.         (help help_audio_string)
  154.         ))
  155.         (
  156.         (makedir (tackon @default-dest "Examples/Audio"))
  157.         (copyfiles
  158.             (source "Examples/Audio")
  159.             (dest (tackon @default-dest "Examples/Audio"))
  160.             (pattern "#?")
  161.         )
  162.         )
  163.     )
  164.     (exit)
  165.     )
  166. )
  167.  
  168. ;****************************************************************************
  169. ; Copie des fichiers du répertoire QuickFile ********************************
  170. ;****************************************************************************
  171.  
  172. (copyfiles
  173.     (source "")
  174.     (dest @default-dest)
  175.     (pattern "(QuickFile#?|History.doc|QF_Macro.guide)")
  176.     (prompt choose_file_string)
  177.     (help select_files_string)
  178.     (confirm)
  179.     (infos)
  180. )
  181.  
  182. ;****************************************************************************
  183. ; Copie des fichiers d'exemples *********************************************
  184. ;****************************************************************************
  185.  
  186. (set examples
  187.     (askbool
  188.         (prompt ask_copy_examples_string)
  189.         (help help_copy_examples_string)
  190.         (default 0)
  191.     )
  192. )
  193. (if (= examples 1)
  194.     (
  195.     (copyfiles
  196.         (source "Examples")
  197.         (dest (tackon @default-dest "Examples"))
  198.         (pattern "#?")
  199.         (prompt choose_examples_string)
  200.         (help help_examples_string)
  201.         (confirm)
  202.         (infos)
  203.     )
  204.     (set commands
  205.         (askbool
  206.         (prompt ask_copy_commands_string)
  207.         (help help_copy_commands_string)
  208.         (default 0)
  209.         )
  210.     )
  211.     (if (= commands 1)
  212.         (copyfiles
  213.         (source "c")
  214.         (dest (tackon @default-dest "c"))
  215.         (pattern "#?")
  216.         (files)
  217.         )
  218.     )
  219.     )
  220. )
  221.  
  222. ;****************************************************************************
  223. ; Copie des scripts ARexx ***************************************************
  224. ;****************************************************************************
  225.  
  226. (copyfiles
  227.     (source "ARexx")
  228.     (dest (tackon @default-dest "ARexx"))
  229.     (pattern "#?")
  230.     (prompt choose_arexx_string)
  231.     (help help_arexx_string)
  232.     (confirm)
  233.     (infos)
  234. )
  235.  
  236. ;****************************************************************************
  237. ; Copie des icones au format NewIcons ***************************************
  238. ;****************************************************************************
  239. (set newicons
  240.     (askbool
  241.         (prompt copy_icons_string)
  242.         (help help_icons_string)
  243.         (default 0)
  244.     )
  245. )
  246. (if (= newicons 1)
  247.     (
  248.         (copyfiles
  249.             (prompt copying_icons_string)
  250.             (source ("NewIcons/QuickFile.info"))
  251.             (dest @default-dest)
  252.         )
  253.         (copyfiles
  254.             (prompt copying_drawer_icon_string)
  255.             (source ("NewIcons/QuickFile3.info"))
  256.             (dest #destination)
  257.             (newname (cat @default-dest ".info"))
  258.         )
  259.     )
  260. )
  261.  
  262. ;****************************************************************************
  263. ; Copie des icones du système 3.5 *******************************************
  264. ;****************************************************************************
  265. (set icons3.5
  266.     (askbool
  267.         (prompt ask_copy_os35icons_string)
  268.         (help help_os35icons_string)
  269.         (default 0)
  270.     )
  271. )
  272. (if (= icons3.5 1)
  273.     (
  274.         (copyfiles
  275.             (prompt copying_progicon_string)
  276.             (source ("OS3.5Icons/QuickFile.info"))
  277.             (dest @default-dest)
  278.         )
  279.         (copyfiles
  280.             (prompt copying_history_string)
  281.             (source ("OS3.5Icons/History.doc.info"))
  282.             (dest @default-dest)
  283.         )
  284.         (copyfiles
  285.             (prompt copying_guide_icon_string)
  286.             (source ("OS3.5Icons/QuickFile.guide.info"))
  287.             (dest @default-dest)
  288.         )
  289.         (copyfiles
  290.             (prompt copying_rexxdrawer_string)
  291.             (source ("OS3.5Icons/ARexx.info"))
  292.             (dest @default-dest)
  293.         )
  294.         (copyfiles
  295.             (prompt copying_examples_icon_string)
  296.             (source ("OS3.5Icons/Examples.info"))
  297.             (dest @default-dest)
  298.         )
  299.         (copyfiles
  300.             (prompt copying drawer_icon_string)
  301.             (source ("NewIcons/QuickFile3.info"))
  302.             (dest #destination)
  303.             (newname (cat @default-dest ".info"))
  304.         )
  305.     )
  306. )
  307.  
  308. ;****************************************************************************
  309. ; Copie des catalogues ******************************************************
  310. ;****************************************************************************
  311.  
  312. (set catalogues
  313.     (askoptions
  314.         (prompt select_catalog_string)
  315.         (help help_catalog_string)
  316.         (choices "Français")
  317.         (default catalogue)
  318.     )
  319. )
  320.  
  321. (if (= (BITAND catalogues 1) 1)
  322.     (   (makedir (tackon @default-dest "Catalogs"))
  323.     (copyfiles
  324.         (prompt copying_catalog_string)
  325.         (source ("Catalogs/français"))
  326.         (dest   (tackon @default-dest "catalogs/français"))
  327.         (all)
  328.     )
  329.     )
  330. )
  331.  
  332. ;****************************************************************************
  333. ; Copie des sources des catalogues ******************************************
  334. ;****************************************************************************
  335. (set sources
  336.     (askbool
  337.         (prompt ask_copy_source_string)
  338.         (help help_source_string)
  339.         (default 0)
  340.     )
  341. )
  342.  
  343.  
  344. (if (= sources 1)
  345.     (
  346.     (copyfiles
  347.         (prompt copying_source_string)
  348.         (source "Catalogs")
  349.         (dest (tackon @default-dest "catalogs"))
  350.         (pattern "#?.cd")
  351.         (files)
  352.     )
  353.     (if (= (BITAND catalogues 1) 1)
  354.         (   (makedir (tackon @default-dest "Catalogs"))
  355.         (copyfiles
  356.             (prompt copying_catalog_string)
  357.             (source ("Catalogs"))
  358.             (pattern ("#?.français.ct"))
  359.             (dest   (tackon @default-dest "catalogs"))
  360.             (files)
  361.         )
  362.         )
  363.     )
  364.     )
  365. )
  366.  
  367. (exit)
  368.