home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2001 July / Gamestar_31_2001-07_cd1.bin / PATCHE / NOLFUpdate003.exe / Setup / Spanish / spsetup.rul < prev    next >
Text File  |  2001-04-25  |  2KB  |  93 lines

  1. //
  2. // Language chooser script
  3. //
  4.  
  5. declare
  6.         STRING svLanguage;
  7.  
  8.         BOOL bvEnglish, bvFrench, bvGerman, bvSpanish, bvSwedish;
  9.  
  10.         STRING svTitle, svMsg;
  11.         STRING svEng, svFre, svGer, svSpa, svSwe;
  12.  
  13.         STRING svFullPath, svRootPath, svFindStr;
  14.         prototype BuildRootPath();
  15.  
  16. program
  17.  
  18. StartHere:
  19.         Disable(BACKGROUND);
  20.         Disable(BACKBUTTON);
  21.         Enable(DIALOGCACHE);
  22.  
  23.         bvEnglish = FALSE;
  24.         bvFrench = FALSE;
  25.         bvGerman = FALSE;
  26.         bvSpanish = TRUE;
  27.         bvSwedish = FALSE;
  28.  
  29.         svTitle = "Escoge Idioma";
  30.         svMsg   = "Escoge el idioma de la instalaci≤n:";
  31.         svEng   = "InglΘs";
  32.         svFre   = "FrancΘs";
  33.         svGer   = "Alemßn";
  34.         svSpa   = "Espa±ol";
  35.         svSwe   = "Sueco";
  36.  
  37.          svFullPath  = SRCDIR ^ "spanish.ins";
  38.         svFindStr   = "Spanish\\spanish.ins";
  39.         BuildRootPath();
  40.  
  41.        // Prompt for language to install
  42.         SetDialogTitle(DLG_ASK_OPTIONS, svTitle);
  43.  
  44.         AskOptions(EXCLUSIVE, svMsg, svEng, bvEnglish, svFre, bvFrench, svGer, bvGerman, svSpa, bvSpanish,
  45.                     svSwe, bvSwedish);
  46.  
  47.         // Kick off the specified language's installer
  48.         if(bvEnglish = TRUE) then
  49.             Enable(HOURGLASS);
  50.             DoInstall(svRootPath ^ "English\\english.INS", "", NOWAIT);
  51.             exit;
  52.         endif;
  53.  
  54.         if(bvFrench = TRUE) then
  55.             Enable(HOURGLASS);
  56.             DoInstall(svRootPath ^ "French\\french.INS", "", NOWAIT);
  57.             exit;
  58.         endif;
  59.  
  60.         if(bvGerman = TRUE) then
  61.             Enable(HOURGLASS);
  62.             DoInstall(svRootPath ^ "German\\german.INS", "", NOWAIT);
  63.             exit;
  64.         endif;
  65.  
  66.         if(bvSpanish = TRUE) then
  67.             Enable(HOURGLASS);
  68.             DoInstall(svFullPath, "", NOWAIT);
  69.             exit;
  70.         endif;
  71.  
  72.         if(bvSwedish = TRUE) then
  73.             Enable(HOURGLASS);
  74.             DoInstall(svRootPath ^ "Swedish\\swedish.INS", "", NOWAIT);
  75.             exit;
  76.         endif;
  77.  
  78.  
  79. exit;
  80.  
  81.  
  82. function BuildRootPath()
  83.         NUMBER nStrLen, nPos;
  84. begin
  85.          nStrLen = StrLength(svFullPath);
  86.         nPos = StrFind(svFullPath, svFindStr);
  87.  
  88.         if (nPos >= 0 && nPos < nStrLen) then
  89.  
  90.             StrSub(svRootPath, svFullPath, 0, nPos);
  91.  
  92.         endif;
  93. end;