home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 16 / AmigaOS_LeserCD16_02.bin / AmigaOS / PDF_Anzeiger / Apdf / Install < prev    next >
Text File  |  2002-05-21  |  41KB  |  1,123 lines

  1. ;
  2. ; $VER: Apdf-Install 2.2 (4.4.2000)
  3. ;
  4. ; (c) 1999-2000 Emmanuel Lesueur
  5. ;
  6.  
  7. (if (= @language "español") (
  8. ;
  9. ; Traducción al español
  10. ;
  11. (set #wrongversion
  12. (cat "Debe tener una versión antigua de la utilidad 'Installer' en su "
  13.      "sistema.\n\nNecesita la versión 43.3 de dicha utilidad, para "
  14.      "instalar Apdf.\n\n¡Revise su configuración!"
  15. ))
  16. (set #wrongcpu "Es necesario un 68020 para utilizar Apdf.")
  17. (set #wrongos "Es necesario AmigaOS 3.0 para utilizar Apdf.")
  18. (set #wrongmui "Es necesario MUI 3.8 para utilizar Apdf.")
  19. (set #wrongmode
  20. (cat "Imposible encontrar las fuentes. Descomprima el archivo "
  21.      "Apdf_fonts.lha, o ejecute la instalación en modo "
  22.      "'Usuario medio' o 'Usuario experto'."
  23. ))
  24. (set #welcome "¡Bienvenido a la instalación de Apdf!")
  25. (set #parts-to-install "¿Desea instalar el plugin PDF para Voyager 3?")
  26. (set #parts-to-install-help
  27. (cat "Este plugin es inútil si no posee el navegador Voyager 3.\n"
  28.      "Instalar dicho plugin añade dos ficheros a su directorio \"Voyager/Plugins\"."
  29. ))
  30. (set #choose-apdf-dir "¿Dónde desea instalar Apdf?\nSe creará un directorio llamado 'Apdf'. Si ya existe, se hará una copia de seguridad del antiguo.")
  31. (set #rename-apdf "¿Renombrar el antiguo directorio Apdf?")
  32. (set #rename-apdf-help
  33. (cat "Se ha encontrado un directorio llamado Apdf. Ha de ser "
  34.      "renombrado antes de instalar la nueva versión de Apdf. "
  35. ))
  36. (set #rename-apdf-info "¿Renombrar también el icono del directorio Apdf?")
  37. (set #cant-rename-old "Imposible renombrar el antiguo directorio Apdf.")
  38. (set #copy-orig-docs "Copiar la documentación original de Xpdf.")
  39. (set #help-copy-orig-docs
  40. (cat "Es la documentación que viene con el programa Xpdf-0.90. "
  41.      "Se incluye para cumplir las condiciones de distribución de Xpdf, "
  42.      "pero es prescindible. Aunque es aconsajable leer el fichero "
  43.      "README para aclarar 'conceptos'."
  44. ))
  45. (set #building-config "Creando fichero de configuración.")
  46. (set #choose-voyager-dir "Elija el lugar donde Voyager 3 está instalado")
  47. (set #choose-voyager-dir-help
  48. (cat "Ha elegido instalar el plugin PDF para Voyager. Por lo que ha de "
  49.      "indicar la ubicación del navegador Voyager. El plugin se instalará "
  50.      "en el subdirectorio \"Plugins\". Puede pulsar en \"Abortar\" si "
  51.      "no desea instalarlo."
  52. ))
  53. (set #which-fonts "Elija que fuentes desea utilizar con Apdf:")
  54. (set #which-fonts-help
  55. (cat "Apdf ha encontrado fuentes que puede utilizar. Elija las que "
  56.      "desee utilizar, o pulse \"Otras\" para utilizar fuentes de "
  57.      "otro directorio."
  58. ))
  59. (set #choice-apdf-fonts "Fuentes del directorio \"Apdf/fonts\"")
  60. (set #choice-gs-fonts "Fuentes Ghostscript en \"%s\"")
  61. (set #choice-ps-fonts "Fuentes (14) base Postscript en \"PSFONTS:\"")
  62. (set #choice-acro-fonts "Fuentes de Acrobat Reader 4 en \"PSFONTS:\"")
  63. (set #choice-other "Otras")
  64. (set #ask-fonts-dir "Elija el directorio donde se encuentran las fuentes Type1.")
  65. (set #ask-fonts-dir-help
  66. (cat "Necesita estas fuentes (de tipo Type1) para que Apdf funcione:\n"
  67.      "Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, "
  68.      "Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, "
  69.      "Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, "
  70.      "Symbol, y ZapfDingbats.\n\n"
  71.      "La instalación puede configurar Apdf para utilizar:\n"
  72.      "- Las fuentes originales Adobe, con los nombre anteriores, "
  73.      "puede que tengan \".pfa\" o \".pfb\" como extensión.\n"
  74.      "- Las fuentes Ghostscript (n019003l.pfb, ...), que son un "
  75.      "reemplazo gratuito. Estas fuentes se encuentran en el archivo "
  76.      "Apdf_fonts.lha.\n"
  77.      "- Las fuentes utilizadas por Acrobat Reader 4 (Arial, Courier, "
  78.      "TimesNewRoman, ...).\n\n"
  79.      "Puede utilizar otras fuentes, pero entonces deberá configurar "
  80.      "Apdf usted mismo. Las fuentes sustitutas deben ser de tipo Type1 "
  81.      "o TrueType, NO PUEDEN ser fuentes de Amiga o CompuGraphics."
  82. ))
  83. (set #fonts-not-recognized
  84. (cat "Ninguna fuente de este directorio son reconocidas para "
  85.      "su utilizarlas con Apdf. Si está seguro de querer utilizarlas "
  86.      "deberá configrar Apdf usted mismo.\n¿Está seguro de querer "
  87.      "utilizar este directorio?"
  88. ))
  89. (set #fonts-not-recognized-help
  90. (cat "Esta instalación solo reconoce las fuentes procedentes de "
  91.      "la distribución Ghostscript, Acrobat Reader 4, o las (14) "
  92.      "fuentes base Postscript. Si no tiene ninguna de estas, "
  93.      "consiga el archivo \"Apdf_fonts.lha\". Es posible que "
  94.      "distribuciones antiguas de Ghostscript no tengan todas "
  95.      "las fuentes necesarias."
  96. ))
  97. (set #need-some-fonts
  98. (cat "Las fuentes a utilizar por Apdf no se han podido configurar "
  99.      "durante la instalación. Deberá de hacerlo usted mismo, o "
  100.      "algunos documetos PDF no se verán correctamente. Lea la sección "
  101.      "\"Fuentes\" del manual. Puede utiliar el documento \"test.pdf\" "
  102.      "para verificar dicha configuración."
  103. ))
  104. (set #end-msg
  105. (cat "¡Instalación finalizada!\nPruebe a ver el fichero \"test.pdf\" "
  106.      "para comprobar si la configuración de las fuentes es correcta.\n\n"
  107.      "Si desea leer documentos PDF encriptados, visite la página: "
  108.      "http://elesueur.free.fr/Apdf, y bájese el módulo de desencriptar, "
  109.      "y cópielo en el directorio de Apdf."
  110. ))
  111. (set #copy-catalogs "Elija el/los idioma(s) a instalar:")
  112. (set #guide-language "Elija el idioma de la documentación a instalar:")
  113.  
  114. )
  115. (if (= @language "deutsch") (
  116. ;
  117. ;   German catalog.
  118. ;
  119. (set #wrongversion
  120. (cat "Du hast eine alte Version des 'Installer' auf deinem Amiga!"
  121.      "\n\nDie Installationsprozedur benötigt mindestens den Installer 43.3.\n\n"
  122.      "Bitte überprüfe das!"
  123. ))
  124. (set #wrongcpu "Du benötigst mindestens einen 68020 für Apdf.")
  125. (set #wrongos "Du benötigst mindestens AmigaOS 3.0 für Apdf.")
  126. (set #wrongmui "Du benötigst mindestens MUI 3.8 für Apdf.")
  127. (set #wrongmode
  128. (cat "Die Zeichensätze können nicht gefunden werden. Entweder besorgst du dir"
  129.      "das Archiv Apdf_fonts.lha oder du startest die Installation im Modus"
  130.      "'Geübter Benutzer' oder 'Experte'."
  131. ))
  132. (set #welcome "Willkommen bei der Installation von Apdf !")
  133. (set #parts-to-install "Möchtest du das PDF plugin für Voyager 3 installieren ?")
  134. (set #parts-to-install-help
  135. (cat "Das Voyager plugin ist ohne Voyager 3 nutzlos.\n"
  136.      "Das Installieren der plugin kopiert zwei Dateien in dein \"Voyager/Plugins\" Verzeichnis."
  137. ))
  138. (set #choose-apdf-dir "Wo soll Apdf installiert werden ? Das Verzeichnis 'Apdf' wird erstellt. Falls es bereits existiert, wird es zuvor gesichert.")
  139. (set #rename-apdf "Benenne das alte Apdf Verzeichnis um ?")
  140. (set #rename-apdf-help
  141. (cat "Ein altes Apdf Verzeichnis wurde gefunden. "
  142.      "Es muss vor dem Installieren eines neuen umbenannt werden. "
  143. ))
  144. (set #rename-apdf-info "Benenne das Piktogramm des alten Apdf Verzeichnisses um ?")
  145. (set #cant-rename-old "Das Umbenennen ist fehlgeschlagen")
  146. (set #copy-orig-docs "Kopiere die originale Dokumentation zu Xpdf")
  147. (set #help-copy-orig-docs
  148. (cat "Dies ist die Dokumentation zu Xpdf-0.90. "
  149.      "Sie wird mitgeliefert, um die Bedingungen des Xpdf-Vertriebs zu erfüllen, "
  150.      "aber das meiste ist für Apdf nicht relevant. "
  151.      "Trotzdem sollte man die Datei README lesen."
  152. ))
  153. (set #building-config "Erzeuge Konfigurationsdatei.")
  154. (set #choose-voyager-dir "In welchem Verzeichnis ist Voyager 3 installiert")
  155. (set #choose-voyager-dir-help
  156. (cat "Du wolltest das Voyager plugin installieren. Wähle das Verzeichnis, "
  157.      "in welchem Voyager 3 installiert ist. Der plugin wird in "
  158.      "\"Plugins\" kopiert. Du kannst durch \"Abbruch\" deine Meinung ändern."
  159. ))
  160. (set #which-fonts "Wähle die gewünschten Zeichensätze.")
  161. (set #which-fonts-help
  162. (cat "Apdf hat ein paar brauchbare Zeichensätze gefunden. Wähle die, "
  163.      "welche du nutzen möchtest oder \"Andere\" aus einem anderen Verzeichnis."
  164. ))
  165. (set #choice-apdf-fonts "Die Zeichensätze im Verzeichnis \"Apdf/fonts\"")
  166. (set #choice-gs-fonts "Die Ghostscript Zeichensätze in \"%s\"")
  167. (set #choice-ps-fonts "Die 14 Postscript basierten Zeichensätze in \"PSFONTS:\"")
  168. (set #choice-acro-fonts "Die Acrobat 4 Zeichensätze in \"PSFONTS:\"")
  169. (set #choice-other "Andere")
  170. (set #ask-fonts-dir "Wähle das Verzeichnis, welches deine Type1 Zeichensätze enthält.")
  171. (set #ask-fonts-dir-help
  172. (cat "Du benötigst Type1 Zeichensätze als Ersatz für folgende 14 Zeichnsätze: "
  173.      "Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, "
  174.      "Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, "
  175.      "Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, "
  176.      "Symbol und ZapfDingbats.\n\n"
  177.      "Diese Installation kann Apdf konfigurieren, um entweder:\n"
  178.      "- Die originalen Adobe Zeichensätze, mit den oben gegebenen Namen, "
  179.      "vielleicht mit einer Endung \".pfa\" oder \".pfb\".\n"
  180.      "- Die Ghostscript Zeichensätze (n019003l.pfb, ...), welche ein "
  181.      "frei verfügbarer Ersatz sind. Diese sind im Archiv Apdf_fonts.lha "
  182.      "enthalten.\n"
  183.      "- Die Zeichensätze von Acrobat Reader 4 (Arial, Courier, "
  184.      "TimesNewRoman, ...).\n zu nutzen.\n"
  185.      "Man kann aber auch anderen Ersatz nutzen, muss dann aber "
  186.      "Apdf selber konfigurieren. Der Ersatz muss entweder Type1 oder "
  187.      "TrueType Zeichensätze sein, NICHT Amiga Bitmap oder CompuGraphics Zeichensätze."
  188. ))
  189. (set #fonts-not-recognized
  190. (cat "Es kann keiner der benötigten Zeichensätze in diesem Verzeichnis gefunden werden. "
  191.      "Wenn du dieses benutzt, musst du Apdf selbst konfigurieren. "
  192.      "Möchtest du es benutzen ?"
  193. ))
  194. (set #fonts-not-recognized-help
  195. (cat "Diese Installation kann Apdf für die Zeichensätze aus "
  196.      "Ghostscript, Acrobat Reader 4 oder den vorgegebenen 14 Basis "
  197.      "Postscript Zeichensätze konfigurieren. Falls du keine davon besitzt, "
  198.      "besorge das Archiv \"Apdf_fonts.lha\". Beachte, dass alte "
  199.      "Versionen von Ghostscript nicht alle benötigten Zeichensätze aufweisen."
  200. ))
  201. (set #need-some-fonts
  202. (cat "Durch diese Installation werden keine Zeichensätze konfiguriert. "
  203.      "Du musst dies von Hand nachholen, oder viele Texte "
  204.      "werden nicht dargestellt. Lies im Abschnitt \"Fonts\" "
  205.      "des Handbuchs für Erklärungen dazu. Benutze das Dokument "
  206.      "\"test.pdf\", um die Konfiguration zu überprüfen."
  207. ))
  208. (set #end-msg
  209. (cat "Installation abgeschlossen ! Prüfe nun mit Hilfe des Dokuments \"test.pdf\" "
  210.      "die Installation der Zeichensätze.\n\n"
  211.      "Falls du Unterstützung von verschlüsselten Dokumenten benötigst, "
  212.      "schaue unter http://elesueur.free.fr/Apdf und lade "
  213.      "das Verschlüssleungsmodul herunter, und kopiere es in das Apdf Verzeichnis."
  214. ))
  215. (set #copy-catalogs "Welche Sprachen sollen installiert werden")
  216. (set #guide-language "Welche Dokumentationen sollen installiert werden.")
  217.  
  218.  
  219.  
  220. )
  221. (if (= @language "français") (
  222. ;
  223. ;   French catalog.
  224. ;
  225. (set #wrongversion
  226. (cat "Votre version du programme 'Installer' est trop ancienne.\n\n"
  227.      "La procedure d'installation nécessite au moins la version 43.3."
  228. ))
  229. (set #wrongcpu "Apdf nécessite au moins un 68020.")
  230. (set #wrongos "Apdf nécessite au moins AmigaOS 3.0.")
  231. (set #wrongmui "Apdf nécessite au moins MUI 3.8.")
  232. (set #wrongmode
  233. (cat "Je ne peux trouver de polices tout seul."
  234.      "Vous pouvez soit relancer ce programme d'installation "
  235.      "en mode 'initié' ou 'expert', soit récuperer l'archive "
  236.      "Apdf_fonts.lha et la décompresser dans le même tiroir "
  237.      "que les autres."
  238. ))
  239. (set #welcome "Bienvenue dans le programme d'installation d'Apdf !")
  240. (set #parts-to-install "Voulez-vous installer le plugin PDF pour Voyager 3 ?")
  241. (set #parts-to-install-help
  242. (cat "Le plugin ne sert que si vous avez Voyager 3.\n"
  243.      "Son installation ajoute deux fichiers dans le tiroir \"Voyager/Plugins\"."
  244. ))
  245. (set #choose-apdf-dir
  246. (cat "Où voulez-vous installer Apdf ? Un tiroir 'Apdf' sera créé. "
  247.      "S'il existe déjà, il sera sauvegardé d'abord."))
  248. (set #rename-apdf "Renommer le vieux tiroir 'Apdf' ?")
  249. (set #rename-apdf-help
  250. (cat "Un vieux répertoire 'Apdf' a été trouvé. "
  251.      "Il doit être renommé avant d'en créer un nouveau."
  252. ))
  253. (set #rename-apdf-info "Renommer l'ancienne icône ?")
  254. (set #cant-rename-old "Impossible de renommer le vieux tiroir.")
  255. (set #copy-orig-docs "Copie de la documentation originale d'Xpdf")
  256. (set #help-copy-orig-docs
  257. (cat "Il s'agit de la documentation distribuée avec Xpdf-0.90. "
  258.      "Elle est là pour satisfaire aux conditions de distribution "
  259.      "d'Xpdf, mais la plupart de son contenu ne concerne pas "
  260.      "directement Apdf. Lire le README est tout de même une "
  261.      "bonne idée."
  262. ))
  263. (set #building-config "Création du fichier de configuration.")
  264. (set #choose-voyager-dir "Selectionnez le tiroir où est installé Voyager 3")
  265. (set #choose-voyager-dir-help
  266. (cat "Vous avez choisi d'installer le plugin Voyager. Selectionnez "
  267.      "le tiroir où ce dernier est installé. Le plugin ira dans le "
  268.      "sous-repertoire \"Plugins\". Choisissez \"Interrompre\" si vous "
  269.      "ne souhaitez plus installer le plugin."
  270. ))
  271. (set #which-fonts "Choisissez les polices à utiliser.")
  272. (set #which-fonts-help
  273. (cat "Des polices utilisables par Apdf ont été trouvées. "
  274.      "Choisissez celles que vous voulez, ou \"Autres\" pour "
  275.      "choisir un autre tiroir."
  276. ))
  277. (set #choice-apdf-fonts "Les polices du tiroir \"Apdf/fonts\"")
  278. (set #choice-gs-fonts "Les polices de Ghostscript dans le tiroir \"%s\"")
  279. (set #choice-ps-fonts "Les 14 polices Postscript de base dans \"PSFONTS:\"")
  280. (set #choice-acro-fonts "Les polices d'Acrobat 4 dans \"PSFONTS:\"")
  281. (set #choice-other "Autres")
  282. (set #ask-fonts-dir "Selectionnez le tiroir contenant vos polices Type1.")
  283. (set #ask-fonts-dir-help
  284. (cat "Il vous faut des polices Type1 pour être substituées aux 14 "
  285.      "polices suivantes: "
  286.      "Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, "
  287.      "Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, "
  288.      "Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, "
  289.      "Symbol, et ZapfDingbats.\n\n"
  290.      "Ce script d'installation peut configurer Apdf pour utiliser:\n"
  291.      "- soit les polices Postscript originales d'Adobe, avec les noms "
  292.      "donnés ci-dessus, éventuellement avec un suffixe \".pfa\" ou \".pfb\".\n"
  293.      "- soit les polices de Ghostscript (n019003l.pfb, ...), qui sont "
  294.      "des polices de remplacement librement distribuables. Ce sont celles "
  295.      "contenues dans l'archive Apdf_fonts.lha.\n"
  296.      "- soit les polices utilisées par Acrobat Reader 4 (Arial, Courier, "
  297.      "TimesNewRoman, ...).\n\n"
  298.      "Il est possible d'utiliser d'autres polices, mais il vous "
  299.      "faudra configurer Apdf vous-même pour cela. Ces polices "
  300.      "doivent être soit Type1, soit TrueType, et PAS des polices "
  301.      "bitmap Amiga ni des polices CompuGraphics."
  302. ))
  303. (set #fonts-not-recognized
  304. (cat "Je ne reconnais aucun jeu de polices dans ce tiroir. "
  305.      "Si vous voulez l'utiliser, il vous faudra configurer Apdf "
  306.      "vous-même. Voulez-vous vraiment utiliser ce tiroir ?"
  307. ))
  308. (set #fonts-not-recognized-help
  309. (cat "Ce script peut configurer Apdf pour utiliser les polices "
  310.      "fournies avec Ghostscript, Acrobat Reader 4, ou les 14 "
  311.      "polices Postscript de base. Si vous n'avez aucunes de "
  312.      "celles-ci, récupérez l'archive \"Apdf_fonts.lha\". Notez "
  313.      "que les distributions de Ghostscript trop anciennes n'ont pas "
  314.      "toutes les polices nécessaires."
  315. ))
  316. (set #need-some-fonts
  317. (cat "Les polices à utiliser par Apdf n'ont pas été configurées "
  318.      "durant l'installation. Il va vous falloir le faire vous-même, "
  319.      "où beaucoup de textes n'apparaîtront pas. Lisez la section "
  320.      "\"Fonts\" du manuel pour avoir des explications. Vous pouvez "
  321.      "utiliser le document \"test.pdf\" pour vérifier la configuration."
  322. ))
  323. (set #end-msg
  324. (cat "Installation terminée ! Essayez de visualiser le fichier "
  325.      "\"test.pdf\" pour vérifier que la configuration des polices "
  326.      "est correcte.\n\n"
  327.      "Si vous voulez lire des documents cryptés, allez sur "
  328.      "http://elesueur.free.fr/Apdf, téléchargez le module "
  329.      "de décryptage, et placez-le dans le tiroir d'Apdf."
  330. ))
  331. (set #copy-catalogs "Choisissez le(s) catalogue(s) à installer")
  332. (set #guide-language "Choisissez la langue de la documentation à installer.")
  333.  
  334. )( ; defaults to english
  335. ;
  336. ;  English catalog.
  337. ;
  338. (set #wrongversion
  339. (cat "You have an old version of the program 'Installer' "
  340.      "on your Amiga!\n\nThe installation procedure needs at least Installer 43.3.\n\n"
  341.      "Please check your configuration!"
  342. ))
  343. (set #wrongcpu "You need at least a 68020 to use Apdf.")
  344. (set #wrongos "You need at least AmigaOS 3.0 to use Apdf.")
  345. (set #wrongmui "You need at least MUI 3.8 to use Apdf.")
  346. (set #wrongmode
  347. (cat "I can't find fonts. Either get and uncompress the "
  348.      "Apdf_fonts.lha archive, or run this installation "
  349.      "script in 'average' or 'expert' mode."
  350. ))
  351. (set #welcome "Welcome to the Apdf installation utility !")
  352. (set #parts-to-install "Do you want to install the PDF plugin for Voyager 3 ?")
  353. (set #parts-to-install-help
  354. (cat "The Voyager plugin is useless without Voyager 3.\n"
  355.      "Installing the plugin adds two files in your \"Voyager/Plugins\" directory."
  356. ))
  357. (set #choose-apdf-dir "Where do you wish to install Apdf ? The directory 'Apdf' will be created. If it already exists, it will be backed up first.")
  358. (set #rename-apdf "Rename old Apdf directory ?")
  359. (set #rename-apdf-help
  360. (cat "An old Apdf directory has been found. "
  361.      "It must be renamed before installing a new one. "
  362. ))
  363. (set #rename-apdf-info "Rename old Apdf directory's icon ?")
  364. (set #cant-rename-old "Can't rename old Apdf directory")
  365. (set #copy-orig-docs "Copying original Xpdf docs")
  366. (set #help-copy-orig-docs
  367. (cat "This is the documentation that comes with Xpdf-0.90. "
  368.      "It is here to comply with Xpdf's distribution conditions, "
  369.      "but most of it is not relevant for Apdf. "
  370.      "It is still a good idea to read the README file, though."
  371. ))
  372. (set #building-config "Building config file.")
  373. (set #choose-voyager-dir "Select the directory where Voyager 3 is installed")
  374. (set #choose-voyager-dir-help
  375. (cat "You chose to install the Voyager plugin. Select the directory "
  376.      "where you have installed Voyager 3. The plugin will go in its "
  377.      "\"Plugins\" subdirectory. You can press \"Abort\" if you no "
  378.      "longer want to install it."
  379. ))
  380. (set #which-fonts "Select the fonts to use.")
  381. (set #which-fonts-help
  382. (cat "Apdf has found some fonts it can use. Select those you "
  383.      "want to use, or \"other\" to use some from an other directory."
  384. ))
  385. (set #choice-apdf-fonts "The fonts in the \"Apdf/fonts\" directory")
  386. (set #choice-gs-fonts "The Ghostscript fonts in \"%s\"")
  387. (set #choice-ps-fonts "The 14 Postscript base fonts in \"PSFONTS:\"")
  388. (set #choice-acro-fonts "The Acrobat 4 fonts in \"PSFONTS:\"")
  389. (set #choice-other "Other")
  390. (set #ask-fonts-dir "Select the directory that contains your Type1 fonts.")
  391. (set #ask-fonts-dir-help
  392. (cat "You need Type1 fonts substitute for the following 14 fonts: "
  393.      "Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, "
  394.      "Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, "
  395.      "Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, "
  396.      "Symbol, and ZapfDingbats.\n\n"
  397.      "This installer script can configure Apdf to use either:\n"
  398.      "- The original Adobe fonts, with the names given above, "
  399.      "maybe with a \".pfa\" or \".pfb\" suffix.\n"
  400.      "- The Ghostscript fonts (n019003l.pfb, ...), which are "
  401.      "free replacements. Those are the fonts in the Apdf_fonts.lha "
  402.      "archive.\n"
  403.      "- The fonts used by Acrobat Reader 4 (Arial, Courier, "
  404.      "TimesNewRoman, ...).\n\n"
  405.      "You can use other substitutes, but you will have to "
  406.      "configure Apdf yourself. Substitutes must be either Type1 or "
  407.      "TrueType fonts, NOT Amiga bitmap nor CompuGraphics fonts."
  408. ))
  409. (set #fonts-not-recognized
  410. (cat "I can not find any of the fontsets I know in that directory. "
  411.      "If you choose this one, you will have to configure Apdf "
  412.      "by yourself. Do you still want to use it ?"
  413. ))
  414. (set #fonts-not-recognized-help
  415. (cat "This script can configure Apdf to use fonts from "
  416.      "Ghostscript, Acrobat Reader 4, or the standard 14 base "
  417.      "Postscript fonts. If you don't have any of them, "
  418.      "get the \"Apdf_fonts.lha\" archive. Note that old "
  419.      "versions of Ghostscript don't have all the needed fonts."
  420. ))
  421. (set #need-some-fonts
  422. (cat "No fonts were configured during this installation. "
  423.      "You will need to do that yourself by hand, or lots of "
  424.      "text will not appear. Read the \"Fonts\" section of the "
  425.      "manual for explanations on how to do that. Use the "
  426.      "\"test.pdf\" document to check your configuration."
  427. ))
  428. (set #end-msg
  429. (cat "Installation finished ! Try to view the \"test.pdf\" "
  430.      "document to check that the fonts installation is correct.\n\n"
  431.      "If you want encryption support, go to "
  432.      "http://elesueur.free.fr/Apdf, download the "
  433.      "decryption module, and put it in Apdf's directory."
  434. ))
  435. (set #copy-catalogs "Select the languages to install")
  436. (set #guide-language "Select the documentation language to install.")
  437.  
  438. ))))
  439.  
  440. (procedure P_check_gs_base_fonts #dir
  441.   (and (and (and (and (and (and (and
  442.   (and (and (and (and (and (and
  443.   (exists (tackon #dir "n019003l.pfb"))
  444.   (exists (tackon #dir "n019004l.pfb")))
  445.   (exists (tackon #dir "n019023l.pfb")))
  446.   (exists (tackon #dir "n019024l.pfb")))
  447.   (exists (tackon #dir "n021003l.pfb")))
  448.   (exists (tackon #dir "n021004l.pfb")))
  449.   (exists (tackon #dir "n021023l.pfb")))
  450.   (exists (tackon #dir "n021024l.pfb")))
  451.   (exists (tackon #dir "n022003l.pfb")))
  452.   (exists (tackon #dir "n022004l.pfb")))
  453.   (exists (tackon #dir "n022023l.pfb")))
  454.   (exists (tackon #dir "n022024l.pfb")))
  455.   (exists (tackon #dir "s050000l.pfb")))
  456.   (exists (tackon #dir "d050000l.pfb")))
  457. )
  458.  
  459. (procedure P_check_acro4_fonts #dir
  460.   (and (and (and (and (and (and (and
  461.   (and (and (and (and (and (and
  462.   (exists (tackon #dir "Arial"))
  463.   (exists (tackon #dir "Arial-Bold")))
  464.   (exists (tackon #dir "Arial-BoldItalic")))
  465.   (exists (tackon #dir "Arial-Italic")))
  466.   (exists (tackon #dir "Courier")))
  467.   (exists (tackon #dir "Courier-Bold")))
  468.   (exists (tackon #dir "Courier-BoldOblique")))
  469.   (exists (tackon #dir "Courier-Oblique")))
  470.   (exists (tackon #dir "TimesNewRoman")))
  471.   (exists (tackon #dir "TimesNewRoman-Bold")))
  472.   (exists (tackon #dir "TimesNewRoman-BoldItalic")))
  473.   (exists (tackon #dir "TimesNewRoman-Italic")))
  474.   (exists (tackon #dir "Symbol")))
  475.   (exists (tackon #dir "ZapfDingbats")))
  476. )
  477.  
  478. (procedure P_check_base_ps_fonts #dir
  479.   (and (and (and (and (and (and (and
  480.   (and (and (and (and (and (and
  481.   (or (or (exists (tackon #dir "Helvetica"))
  482.       (exists (tackon #dir "Helvetica.pfa")))
  483.       (exists (tackon #dir "Helvetica.pfb")))
  484.   (or (or (exists (tackon #dir "Helvetica-Bold"))
  485.       (exists (tackon #dir "Helvetica-Bold.pfa")))
  486.       (exists (tackon #dir "Helvetica-Bold.pfb"))))
  487.   (or (or (exists (tackon #dir "Helvetica-BoldOblique"))
  488.       (exists (tackon #dir "Helvetica-BoldOblique.pfa")))
  489.       (exists (tackon #dir "Helvetica-BoldOblique.pfb"))))
  490.   (or (or (exists (tackon #dir "Helvetica-Oblique"))
  491.       (exists (tackon #dir "Helvetica-Oblique.pfa")))
  492.       (exists (tackon #dir "Helvetica-Oblique.pfb"))))
  493.   (or (or (exists (tackon #dir "Courier"))
  494.       (exists (tackon #dir "Courier.pfa")))
  495.       (exists (tackon #dir "Courier.pfb"))))
  496.   (or (or (exists (tackon #dir "Courier-Bold"))
  497.       (exists (tackon #dir "Courier-Bold.pfa")))
  498.       (exists (tackon #dir "Courier-Bold.pfb"))))
  499.   (or (or (exists (tackon #dir "Courier-BoldOblique"))
  500.       (exists (tackon #dir "Courier-BoldOblique.pfa")))
  501.       (exists (tackon #dir "Courier-BoldOblique.pfb"))))
  502.   (or (or (exists (tackon #dir "Courier-Oblique"))
  503.       (exists (tackon #dir "Courier-Oblique.pfa")))
  504.       (exists (tackon #dir "Courier-Oblique.pfb"))))
  505.   (or (or (exists (tackon #dir "Times-Roman"))
  506.       (exists (tackon #dir "Times-Roman.pfa")))
  507.       (exists (tackon #dir "Times-Roman.pfb"))))
  508.   (or (or (exists (tackon #dir "Times-Bold"))
  509.       (exists (tackon #dir "Times-Bold.pfa")))
  510.       (exists (tackon #dir "Times-Bold.pfb"))))
  511.   (or (or (exists (tackon #dir "Times-BoldItalic"))
  512.       (exists (tackon #dir "Times-BoldItalic.pfa")))
  513.       (exists (tackon #dir "Times-BoldItalic.pfb"))))
  514.   (or (or (exists (tackon #dir "Times-Italic"))
  515.       (exists (tackon #dir "Times-Italic.pfa")))
  516.       (exists (tackon #dir "Times-Italic.pfb"))))
  517.   (or (or (exists (tackon #dir "Symbol"))
  518.       (exists (tackon #dir "Symbol.pfa")))
  519.       (exists (tackon #dir "Symbol.pfb"))))
  520.   (or (or (exists (tackon #dir "ZapfDingbats"))
  521.       (exists (tackon #dir "ZapfDingbats.pfa")))
  522.       (exists (tackon #dir "ZapfDingbats.pfb"))))
  523. )
  524.  
  525. (procedure P_set_gs_extra_fontmap #cfgfile
  526.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"AvantGarde-Book/a010013l.pfb[T1]\""))
  527.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"AvantGarde-BookOblique/a010033l.pfb[T1]\""))
  528.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"AvantGarde-Demi/a010015l.pfb[T1]\""))
  529.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"AvantGarde-DemiOblique/a010035l.pfb[T1]\""))
  530.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Bookman-Demi/b018015l.pfb[T1]\""))
  531.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Bookman-DemiItalic/b018035l.pfb[T1]\""))
  532.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Bookman-Light/b018012l.pfb[T1]\""))
  533.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Bookman-LightItalic/b018032l.pfb[T1]\""))
  534.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Narrow/n019043l.pfb[T1]\""))
  535.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Narrow-Oblique/n019063l.pfb[T1]\""))
  536.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Narrow-Bold/n019044l.pfb[T1]\""))
  537.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Narrow-BoldOblique/n019064l.pfb[T1]\""))
  538.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"NewCenturySchlbk-Roman/c059013l.pfb[T1]\""))
  539.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"NewCenturySchlbk-Italic/c059033l.pfb[T1]\""))
  540.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"NewCenturySchlbk-Bold/c059016l.pfb[T1]\""))
  541.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"NewCenturySchlbk-BoldItalic/c059036l.pfb[T1]\""))
  542.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Palatino-Roman/p052003l.pfb[T1]\""))
  543.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Palatino-Italic/p052023l.pfb[T1]\""))
  544.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Palatino-Bold/p052004l.pfb[T1]\""))
  545.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Palatino-BoldItalic/p052024l.pfb[T1]\""))
  546.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"ZapfChancery-MediumItalic/z003034l.pfb[T1]\""))
  547. )
  548.  
  549. (procedure P_set_gs_fontmap #cfgfile
  550.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica/n019003l.pfb[T1]\""))
  551.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Bold/n019004l.pfb[T1]\""))
  552.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Oblique/n019023l.pfb[T1]\""))
  553.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-BoldOblique/n019024l.pfb[T1]\""))
  554.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-Roman/n021003l.pfb[T1]\""))
  555.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-Bold/n021004l.pfb[T1]\""))
  556.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-Italic/n021023l.pfb[T1]\""))
  557.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-BoldItalic/n021024l.pfb[T1]\""))
  558.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Courier/n022003l.pfb[T1]\""))
  559.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Courier-Bold/n022004l.pfb[T1]\""))
  560.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Courier-Oblique/n022023l.pfb[T1]\""))
  561.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Courier-BoldOblique/n022024l.pfb[T1]\""))
  562.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Symbol/s050000l.pfb[T1]\""))
  563.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"ZapfDingbats/d050000l.pfb[T1]\""))
  564. )
  565.  
  566. (procedure P_set_acro4_fontmap #cfgfile
  567.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica/Arial[T1]\""))
  568.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Bold/Arial-Bold[T1]\""))
  569.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-Oblique/Arial-Oblique[T1]\""))
  570.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Helvetica-BoldOblique/Arial-BoldOblique[T1]\""))
  571.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-Roman/TimesNewRoman[T1]\""))
  572.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-Bold/TimesNewRoman-Bold[T1]\""))
  573.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-Italic/TimesNewRoman-Italic[T1]\""))
  574.   (run (cat "MakeConfig \"" #cfgfile "\" FONTMAP=\"Times-BoldItalic/TimesNewRoman-BoldItalic[T1]\""))
  575. )
  576.  
  577. ;------------------------------------------------------------------------
  578.  
  579. ; Check installer version. I'm not sure what exact version is
  580. ; needed, but there is no reason not to have 43.3+.
  581.  
  582. (if (< @installer-version 2818051)
  583.   (
  584.     (message #wrongversion)
  585.     (exit (quiet))
  586.   )
  587. )
  588.  
  589. ; Apdf works only on 68020+
  590.  
  591. (if (patmatch "68000|68010" (database "cpu"))
  592.   (
  593.     (message #wrongcpu)
  594.     (exit (quiet))
  595.   )
  596. )
  597.  
  598. ; Apdf requires OS 3.0+
  599.  
  600. (if (< (getversion "exec.library" (resident)) 2555904)
  601.   (
  602.     (message #wrongos)
  603.     (exit (quiet))
  604.   )
  605. )
  606.  
  607. ; Apdf requires MUI 3.8+
  608.  
  609. (if (< (getversion "libs:muimaster.library") 1245184)
  610.   (
  611.     (message #wrongmui)
  612.     (exit (quiet))
  613.   )
  614. )
  615.  
  616. ; Check if we can find fonts. If we can't we'll have to ask
  617. ; the user. Don't do that in 'novice' mode.
  618.  
  619. (set #has-apdf-fonts 0)
  620. (set #has-gs-fonts 0)
  621. (set #has-acro4-fonts 0)
  622. (set #has-ps-fonts 0)
  623. (if (exists "Ghostscript:fonts" (noreq))
  624.   (
  625.     (if (P_check_gs_base_fonts "Ghostscript:fonts")
  626.       (
  627.     (set #has-gs-fonts 1)
  628.     (set #gs-fonts-dir "Ghostscript:fonts")
  629.       )
  630.       (
  631.     (message #wronggs)
  632.       )
  633.     )
  634.   )
  635. )
  636. (if (and (exists "fonts") (P_check_gs_base_fonts "fonts"))
  637.   (set #has-apdf-fonts 1)
  638. )
  639. (if (exists "PSFONTS:" (noreq))
  640.   (
  641.     (if (P_check_base_ps_fonts "PSFONTS:")
  642.       (
  643.     (set #has-ps-fonts 1)
  644.     (set #ps-fonts-dir "PSFONTS:")
  645.       )
  646.     )
  647.     (if (P_check_acro4_fonts "PSFONTS:")
  648.       (
  649.     (set #has-acro4-fonts 1)
  650.     (set #acro4-fonts-dir "PSFONTS:")
  651.       )
  652.     )
  653.     (if (and (not #has-gs-fonts) (P_check_gs_base_fonts "PSFONTS:"))
  654.       (
  655.     (set #has-gs-fonts 1)
  656.     (set #gs-fonts-dir "PSFONTS:")
  657.       )
  658.     )
  659.   )
  660. )
  661.  
  662. ; Find out how the user wants to install things
  663.  
  664. (welcome #welcome)
  665.  
  666.  
  667. ; Check whether we can do a complete installation without
  668. ; asking any question.
  669.  
  670. (if (and (= @user-level 0)
  671.     (and (and (not #has-apdf-fonts) (not #has-gs-fonts))
  672.      (and (not #has-ps-fonts) (not #has-acro4-fonts))))
  673.   (
  674.     (message #wrongmode)
  675.     (exit (quiet))
  676.   )
  677. )
  678.  
  679.  
  680.  
  681. ; Get fonts directories
  682.  
  683. (set #found-fonts (+ #has-apdf-fonts #has-gs-fonts #has-ps-fonts #has-acro4-fonts))
  684.  
  685. (if (or (= @user-level 2)
  686.     (and (>= #found-fonts 1) (not #has-apdf-fonts)))
  687.   (
  688.     ; if we have already found some fonts, ask which ones to use
  689.  
  690.     (if #found-fonts
  691.       (
  692.     (set #apdf-fonts-choice
  693.       (select #has-apdf-fonts "" #choice-apdf-fonts))
  694.     (set #gs-fonts-choice
  695.       (select #has-gs-fonts "" (#choice-gs-fonts #gs-fonts-dir)))
  696.     (set #ps-fonts-choice
  697.       (select #has-ps-fonts "" #choice-ps-fonts))
  698.     (set #acro4-fonts-choice
  699.       (select #has-acro4-fonts "" #choice-acro-fonts))
  700.  
  701.     (if #has-apdf-fonts
  702.       (set #default-fonts 0)
  703.       (if #has-gs-fonts
  704.         (set #default-fonts 1)
  705.         (if #has-acro4-fonts
  706.           (set #default-fonts 3)
  707.           (set #default-fonts 2)
  708.         )
  709.       )
  710.     )
  711.  
  712.     (set #has-apdf-fonts 0)
  713.     (set #has-gs-fonts 0)
  714.     (set #has-ps-fonts 0)
  715.     (set #has-acro4-fonts 0)
  716.  
  717.     (select
  718.       (askchoice
  719.         (prompt #which-fonts)
  720.         (help #which-fonts-help)
  721.         (default #default-fonts)
  722.         (choices #apdf-fonts-choice #gs-fonts-choice #ps-fonts-choice
  723.              #acro4-fonts-choice #choice-other)
  724.       )
  725.       (set #has-apdf-fonts 1)
  726.       (set #has-gs-fonts 1)
  727.       (set #has-ps-fonts 1)
  728.       (set #has-acro4-fonts 1)
  729.       (set #found-fonts 0)
  730.     )
  731.       )
  732.     )
  733.   )
  734. )
  735.  
  736. ; if no fonts where found, or the user selected 'other',
  737. ; ask for the fonts directory.
  738.  
  739. (while (not #found-fonts)
  740.   (
  741.     (trap 1
  742.       (set #fonts-dir
  743.     (askdir
  744.       (prompt #ask-fonts-dir)
  745.       (help #ask-fonts-dir-help)
  746.       (default "SYS:")
  747.     )
  748.       )
  749.     )
  750.  
  751.     (if (P_check_gs_base_fonts #fonts-dir)
  752.       (
  753.     (set #has-gs-fonts 1)
  754.     (set #gs-fonts-dir #fonts-dir)
  755.     (set #found-fonts 1)
  756.       )
  757.       (
  758.     (if (P_check_base_ps_fonts #fonts-dir)
  759.       (
  760.         (set #has-ps-fonts 1)
  761.         (set #ps-fonts-dir #fonts-dir)
  762.         (set #found-fonts 1)
  763.       )
  764.       (
  765.         (if (P_check_acro4_fonts #fonts-dir)
  766.           (
  767.         (set #has-acro4-fonts 1)
  768.         (set #acro4-fonts-dir #fonts-dir)
  769.         (set #found-fonts 1)
  770.           )
  771.         )
  772.       )
  773.     )
  774.       )
  775.     )
  776.  
  777.     (if (not #found-fonts)
  778.       (
  779.     (set #found-fonts
  780.       (askbool
  781.         (prompt #fonts-not-recognized)
  782.         (help #fonts-not-recognized-help)
  783.       )
  784.     )
  785.       )
  786.     )
  787.   )
  788. )
  789.  
  790. (if #has-apdf-fonts
  791.   (
  792.     (set #has-gs-fonts 0)
  793.     (set #has-ps-fonts 0)
  794.     (set #has-acro4-fonts 0)
  795.   )
  796. )
  797.  
  798.  
  799. (set #install-apdf 1)
  800.  
  801. ; Choose Apdf's directory
  802.  
  803. (if #install-apdf
  804.   (
  805.     ; Select a directory
  806.  
  807.     (set #apdf-dir @default-dest)
  808.     (if (> @user-level 0)
  809.       (set #apdf-dir
  810.     (askdir
  811.       (prompt #choose-apdf-dir)
  812.       (help #choose-apdf-dir)
  813.       (default #apdf-dir)
  814.     )
  815.       )
  816.     )
  817.     (set @default-dest #apdf-dir)
  818.   )
  819. )
  820.  
  821. ; Install plugin ?
  822.  
  823. (set #install-vpdf (= (exists "ENV:Vapor/Voyager_LASTUSEDDIR" (noreq)) 1))
  824. (if (> @user-level 0)
  825.   (
  826.     (set #install-vpdf
  827.       (askbool
  828.     (prompt #parts-to-install)
  829.     (help #parts-to-install-help)
  830.     (default #install-vpdf)
  831.       )
  832.     )
  833.   )
  834. )
  835.  
  836.  
  837. ; Choose the documentation language
  838.  
  839. (set #apdf-doc "Apdf.guide")
  840. (if (exists "Apdf_español.guide" (noreq))
  841.   (
  842.     (if (= @user-level 0)
  843.       (
  844.     (if (= @language "español")
  845.       (set #apdf-doc "Apdf_español.guide")
  846.     )
  847.       )
  848.       (
  849.     (if (askchoice
  850.           (prompt #guide-language)
  851.           (help #guide-language)
  852.           (choices "english" "español")
  853.           (default (= @language "español")))
  854.       (set #apdf-doc "Apdf_español.guide")
  855.     )
  856.       )
  857.     )
  858.   )
  859. )
  860.  
  861.  
  862. ; Apdf installation
  863.  
  864. (if #install-apdf
  865.   (
  866.     (set #in-place (= (expandpath (tackon #apdf-dir "Apdf")) (expandpath "")))
  867.     (if #in-place
  868.       (
  869.     (set #apdf-dir "")
  870.     (set @default-dir #apdf-dir)
  871.     (if (> (exists "Apdf.info_") 0)
  872.       (
  873.         (rename "Apdf.info_" "Apdf.info")
  874.         (tooltype (dest "Apdf") (settooltype "stub"))
  875.       )
  876.     )
  877.     (if (> (exists "Apdf.guide.info_") 0)
  878.       (
  879.         (rename "Apdf.guide.info_" "Apdf.guide.info")
  880.         (tooltype (dest "Apdf.guide") (settooltype "stub"))
  881.       )
  882.     )
  883.     (if (> (exists "ReadMe.mui.info_") 0)
  884.       (
  885.         (rename "ReadMe.mui.info_" "ReadMe.mui.info")
  886.         (tooltype (dest "ReadMe.mui") (settooltype "stub"))
  887.       )
  888.     )
  889.     (if (> (exists "COPYING.info_") 0)
  890.       (
  891.         (rename "COPYING.info_" "COPYING.info")
  892.         (tooltype (dest "COPYING") (settooltype "stub"))
  893.       )
  894.     )
  895.     (if (> (exists "ATO.readme.info_") 0)
  896.       (
  897.         (rename "ATO.readme.info_" "ATO.readme.info")
  898.         (tooltype (dest "ATO.readme") (settooltype "stub"))
  899.       )
  900.     )
  901.     (if (> (exists "Test.pdf.info_") 0)
  902.       (
  903.         (rename "Test.pdf.info_" "Test.pdf.info")
  904.         (tooltype (dest "Test.pdf") (settooltype "stub"))
  905.       )
  906.     )
  907.       )
  908.       (
  909.     ; Backup an old Apdf directory if needed
  910.  
  911.     (if (> (exists (tackon #apdf-dir "Apdf")) 0)
  912.       (
  913.         (set #n 1)
  914.         (while (exists (tackon #apdf-dir (cat "Apdf.old." #n)))
  915.           (set #n (+ #n 1))
  916.         )
  917.         (rename
  918.           (tackon #apdf-dir "Apdf")
  919.           (tackon #apdf-dir (cat "Apdf.old." #n))
  920.           (prompt #rename-apdf)
  921.           (help #rename-apdf-help)
  922.           (confirm)
  923.         )
  924.         (rename
  925.           (tackon #apdf-dir "Apdf.info")
  926.           (tackon #apdf-dir (cat "Apdf.old." #n ".info"))
  927.           (prompt #rename-apdf-info)
  928.           (help #rename-apdf-info)
  929.           (confirm)
  930.         )
  931.         (if (> (exists (tackon #apdf-dir "Apdf")) 0)
  932.           (
  933.         (message #cant-rename-old)
  934.         (exit (quiet))
  935.           )
  936.         )
  937.       )
  938.     )
  939.  
  940.     ; Create the Apdf directory
  941.  
  942.     (makedir (tackon #apdf-dir "Apdf"))
  943.     (copyfiles (dest #apdf-dir) (source "Apdf.dirinfo") (newname "Apdf.info"))
  944.     (set #apdf-dir (tackon #apdf-dir "Apdf"))
  945.     (set @default-dest #apdf-dir)
  946.  
  947.     ; Copy the files
  948.  
  949.     (copyfiles (dest #apdf-dir) (source "Apdf") (infos))
  950.     (if (> (exists "Apdf.info_") 0)
  951.       (copyfiles (dest #apdf-dir) (source "Apdf.info_") (newname "Apdf.info"))
  952.     )
  953.     (copyfiles (dest #apdf-dir) (source #apdf-doc) (newname "Apdf.guide") (infos))
  954.     (if (> (exists "Apdf.guide.info_") 0)
  955.       (copyfiles (dest #apdf-dir) (source "Apdf.guide.info_") (newname "Apdf.guide.info"))
  956.     )
  957.     (copyfiles
  958.       (dest (tackon #apdf-dir "Catalogs"))
  959.       (source "Catalogs")
  960.       (choices "català" "czech" "deutsch" "español" "français"
  961.            "italiano" "norsk" "português-brasil" "russian"
  962.            "slovensko" "svenska" "türkçe")
  963.       (confirm)
  964.       (prompt #copy-catalogs) (help #copy-catalogs)
  965.     )
  966.     (copyfiles (dest (tackon #apdf-dir "doc.orig")) (source "doc.orig") (all) (confirm) (prompt #copy-orig-docs) (help #help-copy-orig-docs))
  967.     (copyfiles (dest #apdf-dir) (source "ReadMe.mui") (infos))
  968.     (if (> (exists "ReadMe.mui.info_") 0)
  969.       (copyfiles (dest #apdf-dir) (source "ReadMe.mui.info_") (newname "ReadMe.mui.info"))
  970.     )
  971.     (copyfiles (dest #apdf-dir) (source "ATO.readme") (infos))
  972.     (if (> (exists "ATO.readme.info_") 0)
  973.       (copyfiles (dest #apdf-dir) (source "ATO.readme.info_") (newname "ATO.readme.info"))
  974.     )
  975.     (copyfiles (dest #apdf-dir) (source "Test.pdf") (infos))
  976.     (if (> (exists "Test.pdf.info_") 0)
  977.       (copyfiles (dest #apdf-dir) (source "Test.pdf.info_") (newname "Test.pdf.info"))
  978.     )
  979.     (copyfiles (dest #apdf-dir) (source "COPYING") (infos))
  980.     (if (> (exists "COPYING.info_") 0)
  981.       (copyfiles (dest #apdf-dir) (source "COPYING.info_") (newname "COPYING.info"))
  982.     )
  983.     (copyfiles (dest #apdf-dir) (source "") (pattern "#?.module"))
  984.     (if #has-apdf-fonts
  985.       (
  986.         (copyfiles (dest #apdf-dir) (source "ReadMe.fonts") (infos))
  987.         (copyfiles (dest (tackon #apdf-dir "fonts")) (source "fonts") (all))
  988.       )
  989.     )
  990.       )
  991.     )
  992.  
  993.     ; Build config file.
  994.  
  995.     (working #building-config)
  996.     (set #apdf-config (tackon #apdf-dir "Apdf.config"))
  997.     (if #has-apdf-fonts
  998.       (run (cat "MakeConfig \"" #apdf-config "\" FONTDIR=PROGDIR:fonts"))
  999.     )
  1000.     (if (or #has-apdf-fonts #has-gs-fonts)
  1001.       (P_set_gs_fontmap #apdf-config)
  1002.     )
  1003.     (if #has-gs-fonts
  1004.       (
  1005.     (run (cat "MakeConfig \"" #apdf-config "\" FONTDIR=\"" #gs-fonts-dir "\""))
  1006.     (P_set_gs_extra_fontmap #apdf-config)
  1007.       )
  1008.     )
  1009.     (if #has-acro4-fonts
  1010.       (
  1011.     (run (cat "MakeConfig \"" #apdf-config "\" FONTDIR=\"" #acro4-fonts-dir "\""))
  1012.     (P_set_acro4_fontmap #apdf-config)
  1013.       )
  1014.     )
  1015.     (if #has-ps-fonts
  1016.       (
  1017.     (run (cat "MakeConfig \"" #apdf-config "\" FONTDIR=\"" #ps-fonts-dir "\""))
  1018.       )
  1019.     )
  1020.   )
  1021. )
  1022.  
  1023.  
  1024. ; Vpdf installation
  1025.  
  1026. (if #install-vpdf
  1027.   (
  1028.     (set #install-vpdf 0)
  1029.     (trap 1
  1030.       (
  1031.     ; Find the Voyager directory
  1032.  
  1033.     (set #vpdf-dir (getenv "Vapor/Voyager_LASTUSEDDIR"))
  1034.     (if (or (not (exists (tackon #vpdf-dir "Plugins")))
  1035.         (= @user-level 2))
  1036.       (set #vpdf-dir
  1037.         (askdir
  1038.           (prompt #choose-voyager-dir)
  1039.           (help #choose-voyager-dir-help)
  1040.           (default #vpdf-dir)
  1041.         )
  1042.       )
  1043.     )
  1044.     (set #vpdf-dir (tackon #vpdf-dir "Plugins"))
  1045.     (set #install-vpdf 1)
  1046.       )
  1047.     )
  1048.   )
  1049. )
  1050. (if #install-vpdf
  1051.   (
  1052.     ; Copy files
  1053.  
  1054.     (copyfiles (dest #vpdf-dir) (source "Vpdf.VPlug"))
  1055.  
  1056.     (if (not (exists (tackon #vpdf-dir "Data")))
  1057.       (makedir (tackon #vpdf-dir "Data"))
  1058.     )
  1059.  
  1060.     (set #vpdf-config (tackon #vpdf-dir "Data/Vpdf.config"))
  1061.  
  1062.     (if #install-apdf
  1063.       (
  1064.     (run (cat "MakeConfig \"" #vpdf-config "\" MODULESDIR=\"" (expandpath #apdf-dir) "\""))
  1065.       )
  1066.       (
  1067.     (copyfiles (dest #vpdf-dir) (pattern "#?.module"))
  1068.     (if #has-apdf-fonts
  1069.       (
  1070.         (copyfiles (dest (tackon #vpdf-dir "Data")) (source "ReadMe.fonts") (infos))
  1071.         (copyfiles (dest (tackon #vpdf-dir "Data/fonts")) (source "fonts") (all))
  1072.         (set apdf-dir "PROGDIR:Plugins/Data")
  1073.       )
  1074.     )
  1075.       )
  1076.     )
  1077.  
  1078.     ; Build config file.
  1079.  
  1080.     (working #building-config)
  1081.     (if #has-apdf-fonts
  1082.       (if #install-apdf
  1083.     (
  1084.       (run (cat "MakeConfig \"" #vpdf-config "\" FONTDIR=\"" (tackon (expandpath #apdf-dir) "fonts") "\""))
  1085.       (run (cat "MakeConfig \"" #vpdf-config "\" FONTDIR=\"PROGDIR:Plugins/Data/fonts\""))
  1086.     )
  1087.       )
  1088.     )
  1089.     (if (or #has-apdf-fonts #has-gs-fonts)
  1090.       (P_set_gs_fontmap #vpdf-config)
  1091.     )
  1092.     (if #has-gs-fonts
  1093.       (
  1094.     (run (cat "MakeConfig \"" #vpdf-config "\" FONTDIR=\"" #gs-fonts-dir "\""))
  1095.     (P_set_gs_extra_fontmap #vpdf-config)
  1096.       )
  1097.     )
  1098.     (if #has-acro4-fonts
  1099.       (
  1100.     (run (cat "MakeConfig \"" #apdf-config "\" FONTDIR=\"" #acro4-fonts-dir "\""))
  1101.     (P_set_acro4_fontmap #apdf-config)
  1102.       )
  1103.     )
  1104.     (if #has-ps-fonts
  1105.       (
  1106.     (run (cat "MakeConfig \"" #apdf-config "\" FONTDIR=\"" #ps-fonts-dir "\""))
  1107.       )
  1108.     )
  1109.   )
  1110. )
  1111.  
  1112. ; If no fonts where installed, tell the user that he needs some.
  1113.  
  1114. (if (not (or (or #has-apdf-fonts #has-gs-fonts)
  1115.          (or #has-ps-fonts #has-acro4-fonts)))
  1116.   (message #need-some-fonts)
  1117. )
  1118.  
  1119. ; End with a message.
  1120.  
  1121. (message #end-msg)
  1122.  
  1123.