]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
Bootvorgang des Installers weitergebracht.
[people/pmueller/ipfire-2.x.git] / src / install+setup / install / main.c
index fab8de3d56c929731b636861281db5caeb5de29a..fa0b849e554660313937d1f4161f70030b9ac480 100644 (file)
@@ -6,8 +6,6 @@
  * (c) Lawrence Manning, 2001
  * Contains main entry point, and misc functions.
  * 
- * $Id: main.c,v 1.63.2.57 2005/09/25 19:57:46 gespinasse Exp $
- * 
  */
 
 #include "install.h"
@@ -24,26 +22,8 @@ char **ctr;
 char *pcmcia = NULL;
 extern char url[STRING_SIZE];
 
-extern char *bz_tr[];
-extern char *cs_tr[];
-extern char *da_tr[];
 extern char *en_tr[];
-extern char *es_tr[];
-extern char *fi_tr[];
-extern char *fr_tr[];
-extern char *hu_tr[];
-extern char *la_tr[];
-extern char *nl_tr[];
 extern char *de_tr[];
-extern char *tr_tr[];
-extern char *it_tr[];
-extern char *el_tr[];
-extern char *pl_tr[];
-extern char *pt_tr[];
-extern char *so_tr[];
-extern char *sv_tr[];
-extern char *no_tr[];
-extern char *vi_tr[];
 
 int main(int argc, char *argv[])
 {
@@ -51,10 +31,6 @@ int main(int argc, char *argv[])
         char *langnames[] = { "English", NULL };
         char *shortlangnames[] = { "en", NULL };
         char **langtrs[] = { en_tr, NULL };
-#elifdef       LANG_ALL
-       char *langnames[] = { "Brasil", "Cestina", "Dansk", "Deutsch", "English", "Español", "Français", "Hellenic", "Italiano", "Spanish Latino", "Magyar", "Nederlands", "Norsk", "Polski", "Português", "Soomali", "Suomi", "Svenska", "Türkçe", "Tieng Viet", NULL };
-       char *shortlangnames[] = { "bz", "cs", "da", "de", "en", "es", "fr", "el", "it", "la", "hu", "nl", "no", "pl", "pt", "so", "fi", "sv", "tr", "vi", NULL };
-       char **langtrs[] = { bz_tr, cs_tr, da_tr, de_tr, en_tr, es_tr, fr_tr, el_tr, it_tr, la_tr, hu_tr, nl_tr, no_tr, pl_tr, pt_tr, so_tr, fi_tr, sv_tr, tr_tr, vi_tr, NULL };        
 #else
        char *langnames[] = { "Deutsch", "English", NULL };
        char *shortlangnames[] = { "de", "en", NULL };
@@ -162,29 +138,13 @@ int main(int argc, char *argv[])
        /* No need to ask.  "choice" already has the index for English */
 #else
        rc = newtWinMenu("Language selection",
-               "Select the language you wish to use for the " NAME ".", 50, 5, 5, 8,
-               langnames, &choice, "Ok", NULL);
+               "Select the language you wish to use for your " NAME ".", 50, 5, 5, 8,
+               langnames, &choice, "OK", NULL);
 #endif
        ctr = langtrs[choice];
        strcpy(shortlangname, shortlangnames[choice]);
-       if (strcmp(shortlangname, "el") == 0)
-               mysystem("/bin/setfont iso07u-16");
-       else if (strcmp(shortlangname, "pt") == 0)
-               mysystem("/bin/setfont lat1-16");
-       else if (strcmp(shortlangname, "bz") == 0)
-               mysystem("/bin/setfont lat1-16");
-       else if (strcmp(shortlangname, "cs") == 0)
-               mysystem("/bin/setfont lat2-16");
-       else if (strcmp(shortlangname, "hu") == 0)
-               mysystem("/bin/setfont lat2-16");
-       else if (strcmp(shortlangname, "pl") == 0)
-               mysystem("/bin/setfont lat2-16");
-       else if (strcmp(shortlangname, "tr") == 0)
-               mysystem("/bin/setfont lat5-16");
-       else if (strcmp(shortlangname, "vi") == 0)
-               mysystem("/bin/setfont viscii10-8x16");
-       else
-               mysystem("/bin/setfont lat0-16");
+
+       mysystem("/bin/setfont lat0-16");
        
        newtDrawRootText(14, 0, NAME " v" VERSION " - " SLOGAN );
        newtPushHelpLine(ctr[TR_HELPLINE]);
@@ -193,16 +153,13 @@ int main(int argc, char *argv[])
        sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
        newtWinMessage(title, ctr[TR_OK], message);
 
-       /* sprintf(message, ctr[TR_SELECT_INSTALLATION_MEDIA_LONG], NAME);
-        * rc = newtWinMenu(ctr[TR_SELECT_INSTALLATION_MEDIA], message,
-        *      50, 5, 5, 6, installtypes, &installtype, ctr[TR_OK],
-        *      ctr[TR_CANCEL], NULL); 
-        *
-        *      if (rc == 2)
-        *      goto EXIT;
-        * This is for avoiding the question for a network installation. Set to cdrom.
-        */
-       sprintf(installtype, CDROM_INSTALL, NAME);
+       sprintf(message, ctr[TR_SELECT_INSTALLATION_MEDIA_LONG], NAME);
+       rc = newtWinMenu(ctr[TR_SELECT_INSTALLATION_MEDIA], message,
+               50, 5, 5, 6, installtypes, &installtype, ctr[TR_OK],
+               ctr[TR_CANCEL], NULL);
+
+       if (rc == 2)
+               goto EXIT;
                                        
        if (installtype == CDROM_INSTALL)
        {       
@@ -556,7 +513,7 @@ int main(int argc, char *argv[])
                swap_file = 0;
        }
 
-       boot_partition = 8; /* in MB */
+       boot_partition = 20; /* in MB */
        current_free = maximum_free - boot_partition - swap_file;
 
        /* Give more place for add-on, extend root to 25% of current_free, upper limit to 8 gigas */
@@ -963,12 +920,7 @@ RESTORE:
                goto EXIT;
        }
        /* Set Bootsplash */
-       if ((handle = fopen("/scsidriver", "r")))
-               mysystem("/bin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cgf >> /harddisk/boot/ipfirerd.img");
-       else
-               mysystem("/bin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cgf > /harddisk/boot/initrd.splash");
-       if ((handle = fopen("/scsidriver", "r")))
-               mysystem("/bin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cgf >> /harddisk/boot/ipfirerd-smp.img");
+       mysystem("/bin/installbootsplash.sh");
        mysystem("/bin/chroot /harddisk /bin/umount -n /proc");
 #endif
 #ifdef __alpha__