]> 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 1330b4099b9f54bc04c05127031a8f42054dcb8d..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]);
@@ -197,10 +157,10 @@ int main(int argc, char *argv[])
        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)
        {       
                /* First look for an IDE CDROM. */
@@ -378,7 +338,7 @@ int main(int argc, char *argv[])
                        goto EXIT;
                }
 
-               /* Check for ipcop-<VERSION>.tgz */
+               /* Check for ipfire-<VERSION>.tgz */
                if (!(checktarball(SNAME "-" VERSION ".tgz")))
                {
                        errorbox(ctr[TR_NO_IPCOP_TARBALL_FOUND]);
@@ -553,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 */
@@ -690,13 +650,20 @@ int main(int argc, char *argv[])
                snprintf(commandstring, STRING_SIZE, 
                        "/bin/wget -O - %s/" SNAME "-" VERSION ".tgz | /bin/tar -C /harddisk -xvzf -", url);
        
-       if (runcommandwithprogress(60, 4, title, commandstring, 4600,
-               ctr[TR_INSTALLING_FILES]))
+       /* if (runcommandwithprogress(60, 4, title, commandstring, 4600,
+        *      ctr[TR_INSTALLING_FILES]))
+        * {
+        *      errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
+        *      goto EXIT;
+        * }
+        */
+
+       if (runcommandwithstatus(commandstring, ctr[TR_INSTALLING_FILES]))
        {
                errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
                goto EXIT;
        }
-       
+               
        /* Save USB controller type to modules.conf */
        write_usb_modules_conf();
 
@@ -953,10 +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");
+       mysystem("/bin/installbootsplash.sh");
        mysystem("/bin/chroot /harddisk /bin/umount -n /proc");
 #endif
 #ifdef __alpha__