home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / tui160 / install.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-05  |  39.8 KB  |  1,112 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* INSTALL.C                                                                */
  4. /*                                                                          */
  5. /*                                                                          */
  6. /****************************************************************************/
  7. /*----------------------------- include files ------------------------------*/
  8. #include <stdio.h>
  9. #include <alloc.h>
  10. #include <ctype.h>
  11. #include <dir.h>
  12. #include "t.h"                                /* include the TUI header     */
  13. #include "install.def"                        /* include dialog definitions */
  14.  
  15. #define SH_TOP_LEFT     0               /* used by shadow window functions  */
  16. #define SH_TOP_RIGHT    1
  17. #define SH_BOTTOM_RIGHT 2
  18. #define SH_BOTTOM_LEFT  3
  19.  
  20. #define ULTRAWIN        0
  21. #define INTUITION       1
  22. #define ENCOM           2
  23.  
  24. /*--------------------------------- globals --------------------------------*/
  25. WINDOW    *Out_wnp;
  26.  
  27. TUI       Install_tui, *Tuip = &Install_tui;
  28.  
  29. uchar     Src_install[3] = { ON, ON, ON };
  30. uchar     Hdr_install[3] = { ON, ON, ON };
  31. uchar     Lib_install[3] = { ON, ON, ON };
  32. uchar     Help_install[3] = { ON, ON, ON };
  33. uchar     Example_install[3] = { ON, ON, ON };
  34. int       Compilers[3];
  35. char      *Compiler_names[3];
  36. char      Src_paths[3][81];
  37. char      Hdr_paths[3][81];
  38. char      Lib_paths[3][81];
  39. char      Help_paths[3][81];
  40. char      Example_paths[3][81];
  41. char      Others[3][21];
  42. char      Ending_path[81];
  43. char      Src_drive = 'a', Dests[3] = { 'c', 'c', 'c' };
  44.  
  45. /*------------------- slider/image/palette globals -------------------------*/
  46. uchar Palette_install[16] =
  47.   { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
  48.     0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F };
  49.  
  50. /*------------------------------- prototypes -------------------------------*/
  51. void main( int argc, char *argv[] );
  52. long disk_free( char drive_letter );
  53. int  install( TUI *tuip, WINDOW *wnp );
  54. int  do_main_dlg( TUI *tuip, int dlg_inx );
  55. int  do_install_dlg( TUI *tuip, int dlg_inx, char *title, int product );
  56. void shadow_window( WINDOW *wnp, int type, int w, int h, int att );
  57. void unshadow_window( WINDOW *wnp );
  58. void change_compiler( TUI *tuip, char *compiler_name );
  59. void change_dest( TUI *tuip, char dest );
  60. void make_directory( char *p );
  61. void install_help( void );
  62. void whereto_help( void );
  63. WINDOW *create_message( char *msg );
  64. void destroy_message( WINDOW *wnp );
  65. int  copy_file( char *src_fname, char *dest_fname );
  66.  
  67. int  register_install_tui( TUI *tuip );
  68. void register_install_dlg0( TUI *tuip );
  69. void register_install_dlg1( TUI *tuip );
  70.  
  71.  
  72. /*********/
  73. /* ~main */
  74. /*       ********************************************************************/
  75. /****************************************************************************/
  76. void main( int argc, char *argv[] )
  77. {
  78.   WINDOW *desk_wnp;
  79.   int  c, i = 0;
  80.   char path[200], *pathp;
  81.  
  82.   if( (argc == 1) && (argv[0][1] == ':') )      /* run from other drive?    */
  83.     Src_drive = tolower(argv[0][0]);
  84.   else
  85.     Src_drive = getdisk() + 'a';                /* run from current!        */
  86.  
  87.   /* load_tui(Tuip, "INSTALL.TUI"); */
  88.   register_install_tui(Tuip);
  89.  
  90.   init_tui(Tuip);
  91.  
  92.   /*-------------------------- do background screen ------------------------*/
  93.   c = (Tuip->back_att & 0xF0) >> 4;             /* get background color     */
  94.   desk_wnp = Tuip->back_wnp;                    /* get desktop window ptr   */
  95.   desk_wnp->scroll = OFF;                       /* turn off desktop scroll  */
  96.   while (i++ < 45)
  97.   {                                             /* to show off the shadow   */
  98.     wn_color(DARKGRAY, c, desk_wnp);
  99.     wn_st("UltraWin 2.60  ", desk_wnp);
  100.     wn_color(WHITE, c, desk_wnp);
  101.     wn_st("InTUItion 1.60  ", desk_wnp);
  102.     wn_color(BLACK, c, desk_wnp);
  103.     wn_st("EnCom 1.60  ", desk_wnp);
  104.   }
  105.   wn_color(WHITE, BLACK, desk_wnp);
  106.   mv_cs(0, 24, desk_wnp);
  107.   wn_cleol(desk_wnp);
  108.   wn_plst(CENTERED, 24, "Welcome to EnQue Software's Install Utility", desk_wnp);
  109.  
  110.   /*--------------------- try to figure out their compiler! ---------------*/
  111.   if ( (pathp = getenv("PATH")) != NULL )
  112.   {
  113.     strcpy(path, pathp), strupr(path);
  114.     for (i=ULTRAWIN; i<=ENCOM; i++)
  115.     {
  116.       if ( strstr(path, "WATCOM") )
  117.         Compilers[i] = WATCOM, Compiler_names[i] = "watcom";
  118.       else
  119.       if ( strstr(path, "BORLANDC") )
  120.         Compilers[i] = BORLAND, Compiler_names[i] = "borlandc";
  121.       else
  122.       if ( strstr(path, "TURBOC") )
  123.         Compilers[i] = TURBO, Compiler_names[i] = "turboc";
  124.       else
  125.       if ( strstr(path, "MSVC") )
  126.         Compilers[i] = MICROSOFT, Compiler_names[i] = "msvc";
  127.       else
  128.       if ( strstr(path, "ZORTECH") )
  129.         Compilers[i] = ZORTECH, Compiler_names[i] = "zortech";
  130.       else
  131.       if ( strstr(path, "POWERC") || strstr(path, "MIX") )
  132.         Compilers[i] = MIX, Compiler_names[i] = "powerc";
  133.       else
  134.         Compilers[i] = BORLAND, Compiler_names[i] = "borlandc";
  135.     }
  136.   } else
  137.   for (i=ULTRAWIN; i<=ENCOM; i++)
  138.     Compilers[i] = BORLAND, Compiler_names[i] = "borlandc";
  139.  
  140.   /*--------------------- make some default paths --------------------------*/
  141.   for (i=ULTRAWIN; i<=ENCOM; i++)
  142.   {
  143.     switch(i)
  144.     {
  145.       case ULTRAWIN:
  146.         sprintf(Ending_path,  "%c:\\%s",        Dests[i], Compiler_names[i]);
  147.         sprintf(Src_paths[i], "%c:\\%s\\uw260", Dests[i], Compiler_names[i]);
  148.         break;
  149.       case INTUITION:
  150.         sprintf(Src_paths[i], "%c:\\%s\\tui160", Dests[i], Compiler_names[i]);
  151.         break;
  152.       case ENCOM:
  153.         sprintf(Src_paths[i], "%c:\\%s\\encom160", Dests[i], Compiler_names[i]);
  154.         break;
  155.     }
  156.     sprintf(Hdr_paths[i],    "%c:\\%s\\include", Dests[i], Compiler_names[i]);
  157.     sprintf(Lib_paths[i],    "%c:\\%s\\lib",     Dests[i], Compiler_names[i]);
  158.     sprintf(Help_paths[i],   "%c:\\%s\\enqhelp", Dests[i], Compiler_names[i]);
  159.     sprintf(Example_paths[i],"%s\\examples",     Src_paths[i]);
  160.   }
  161.  
  162.   /*------------------------------- do install -----------------------------*/
  163.   do_main_dlg(Tuip, MAIN_DLG);
  164.  
  165.   end_tui(Tuip);
  166.   free_tui(Tuip);
  167.   exit(0);
  168. }
  169. /*** end of main ***/
  170.  
  171. /**************/
  172. /* ~disk_free */
  173. /*            ***************************************************************/
  174. /* returns free space on given drive...                                     */
  175. /****************************************************************************/
  176. long disk_free( char drive_letter )
  177. {
  178.   struct dfree df;
  179.   int drive;
  180.   long avail = 0L;
  181.  
  182.   drive = toupper(drive_letter) - 'A' + 1;
  183.   getdfree(drive, &df);
  184.   if (df.df_sclus != 0xFFFF)
  185.     avail = (long) df.df_avail * (long) df.df_bsec * (long) df.df_sclus;
  186.   return(avail);
  187. }
  188. /*** end of disk_free ***/
  189.  
  190. /************/
  191. /* ~install */
  192. /*          *****************************************************************/
  193. /****************************************************************************/
  194. int install( TUI *tuip, WINDOW *wnp )
  195. {
  196.   WINDOW *msg_wnp;
  197.   char  buffer[133], zip_src[41], zip_exe[41], *mem, *src_mem, *dest_mem,
  198.         *src_path, *src, *dest;
  199.   int   i, num_zips = 0, show_len = 45, stat = 1;
  200.  
  201.   /*------------------- get memory for source/dest files -------------------*/
  202.   if ( (mem = calloc(100, 81)) == NULL )
  203.     return(0);
  204.   src_mem = &mem[0];
  205.   dest_mem = &mem[81 * 50];
  206.  
  207.   /*------------------------- use the regular dialog -----------------------*/
  208.   m_hide();
  209.   wn_clear(wnp);
  210.   wn_color(WHITE, BLUE, wnp);
  211.   wn_plst(CENTERED, 3, "Creating directories, one moment please...", wnp);
  212.   m_show();
  213.  
  214.   /*------------------------ copy unzip.exe to root ------------------------*/
  215.   sprintf(zip_src, "%c:\\UNZIP.EXE", Src_drive);
  216.   sprintf(zip_exe, "%c:\\UNZIP.EXE", Dests[0]);
  217.  
  218.   for (i=ULTRAWIN; i<=ENCOM; i++)
  219.     if ( is_selected(tuip, MAIN_ULTRAWIN + i) )
  220.   {
  221.     switch(i)
  222.     {
  223.       case ULTRAWIN:  src_path = "uw260";    break;
  224.       case INTUITION: src_path = "tui160";   break;
  225.       case ENCOM:     src_path = "encom160"; break;
  226.     }
  227.     /*---------------------- the ENQHELP.EXE engine ------------------------*/
  228.     sprintf(buffer, "%c:\\enqhelp.zip", Src_drive);
  229.     if ( file_exists(buffer) )
  230.     {
  231.       make_directory(Src_paths[i]);
  232.       sprintf( &src_mem[num_zips * 81], buffer);
  233.       strcpy( &dest_mem[num_zips * 81], Src_paths[i]);
  234.       num_zips++;
  235.     }
  236.     /*---------------------- the ENQRBLD.EXE program -----------------------*/
  237.     sprintf(buffer, "%c:\\enqrbld.zip", Src_drive);
  238.     if ( file_exists(buffer) )
  239.     {
  240.       make_directory(Src_paths[i]);
  241.       sprintf( &src_mem[num_zips * 81], buffer);
  242.       strcpy( &dest_mem[num_zips * 81], Src_paths[i]);
  243.       num_zips++;
  244.     }
  245.     /*--------------------------- source code ------------------------------*/
  246.     if( Src_install[i] )
  247.     {
  248.       sprintf(buffer, "%c:\\%s\\source.zip", Src_drive, src_path);
  249.       if ( file_exists(buffer) )
  250.       {
  251.         make_directory(Src_paths[i]);
  252.         sprintf( &src_mem[num_zips * 81], buffer);
  253.         strcpy( &dest_mem[num_zips * 81], Src_paths[i]);
  254.         num_zips++;
  255.       }
  256.     }
  257.     /*--------------------------- header files -----------------------------*/
  258.     if( Hdr_install[i] )
  259.     {
  260.       sprintf(buffer, "%c:\\%s\\hdr.zip", Src_drive, src_path);
  261.       if ( file_exists(buffer) )
  262.       {
  263.         make_directory(Hdr_paths[i]);
  264.         sprintf( &src_mem[num_zips * 81], buffer);
  265.         strcpy( &dest_mem[num_zips * 81], Hdr_paths[i]);
  266.         num_zips++;
  267.       }
  268.     }
  269.     /*----------------------------- lib files ------------------------------*/
  270.     if( Lib_install[i] )
  271.     {
  272.       sprintf(buffer, "%c:\\%s\\lib.zip", Src_drive, src_path);
  273.       if ( file_exists(buffer) )
  274.       {
  275.         make_directory(Lib_paths[i]);
  276.         sprintf( &src_mem[num_zips * 81], buffer);
  277.         strcpy( &dest_mem[num_zips * 81], Lib_paths[i]);
  278.         num_zips++;
  279.       }
  280.     }
  281.     /*---------------------------- help files ------------------------------*/
  282.     if( Help_install[i] )
  283.     {
  284.       sprintf(buffer, "%c:\\%s\\help.zip", Src_drive, src_path);
  285.       if ( file_exists(buffer) )
  286.       {
  287.         make_directory(Help_paths[i]);
  288.         sprintf( &src_mem[num_zips * 81], buffer);
  289.         strcpy( &dest_mem[num_zips * 81], Help_paths[i]);
  290.         num_zips++;
  291.       }
  292.     }
  293.     /*---------------------------- example files ---------------------------*/
  294.     if( Example_install[i] )
  295.     {
  296.       sprintf(buffer, "%c:\\%s\\examples.zip", Src_drive, src_path);
  297.       if ( file_exists(buffer) )
  298.       {
  299.         make_directory(Example_paths[i]);
  300.         sprintf( &src_mem[num_zips * 81], buffer);
  301.         strcpy( &dest_mem[num_zips * 81], Example_paths[i]);
  302.         num_zips++;
  303.       }
  304.     }
  305.   }
  306.  
  307.   copy_file(zip_src, zip_exe);
  308.  
  309.   /*--------------------------- show the src/dest --------------------------*/
  310.   m_hide();
  311.   wn_clear(wnp);
  312.   wn_color(WHITE, BLUE, wnp);
  313.   wn_plst(2, 1, "Source", wnp);
  314.   wn_plst(2, 3, "Destination", wnp);
  315.   wn_color(YELLOW, BLUE, wnp);
  316.   mv_cs(2, 6, wnp);
  317.   wn_qch(show_len, '▒', wnp);
  318.   m_show();
  319.  
  320.   /*----------------------- do the actual install --------------------------*/
  321.   for (i=0; i<num_zips; i++)
  322.   {
  323.     src = &src_mem[i * 81], strupr(src);
  324.     dest = &dest_mem[i * 81], strupr(dest);
  325.     m_hide();
  326.     wn_color(YELLOW, BLUE, wnp);
  327.     mv_cs(47, 6, wnp);
  328.     wn_printf(wnp, " (%d of %d)", i + 1, num_zips);
  329.     wn_plst(4, 2, src, wnp), wn_cleol(wnp);
  330.     wn_plst(4, 4, dest, wnp), wn_cleol(wnp);
  331.     mv_cs(2, 6, wnp);
  332.     wn_qch(((i + 1) * show_len) / num_zips  , '█', wnp);
  333.     m_show();
  334.  
  335.     /*------------------------ check for free space ------------------------*/
  336.     if ( disk_free(dest[0]) < 1500000L )
  337.     {
  338.       msg_wnp = create_message("Disk storage is low, please free some space!");
  339.       wait_event();
  340.       destroy_message(msg_wnp);
  341.       stat = 0;
  342.       break;
  343.     }
  344.     /*-------------------------- now do the unzip --------------------------*/
  345.     setdisk(dest[0] - 'A');
  346.     chdir(dest);
  347.     sprintf(buffer, "%s -o -qq %s", zip_exe, src);
  348.     system(buffer);
  349.   }
  350.   unlink(zip_exe);
  351.   setdisk(Ending_path[0] - 'A');
  352.   chdir(Ending_path);
  353.   free(mem);
  354.   return(stat);
  355. }
  356. /*** end of install ***/
  357.  
  358. /****************/
  359. /* ~do_main_dlg */
  360. /*              *************************************************************/
  361. /****************************************************************************/
  362. int do_main_dlg( TUI *tuip, int dlg_inx )
  363. {
  364.   WINDOW *msg_wnp;
  365.   int ret_inx, end_flag = OFF, stat = 0;
  366.  
  367.   center_dialog(tuip,dlg_inx);
  368.   draw_dialog(tuip, dlg_inx);
  369.   shadow_window( get_dlg_wnp(tuip, dlg_inx), SH_BOTTOM_RIGHT, 2, 1, DARKGRAY);
  370.   while (!end_flag)
  371.   {
  372.     ret_inx = do_dialog(tuip, dlg_inx, DO_RETURN_EVENT);
  373.     switch( ret_inx )
  374.     {
  375.       case EVENT_RETURNED:
  376.         if ( !Event.is_mouse )
  377.           if ( Event.key == KEY_ESC )
  378.             end_flag = 1;
  379.         break;
  380.  
  381.       case MAIN_ULTRAWIN:
  382.         if ( is_selected(tuip, ret_inx) )
  383.           if ( !do_install_dlg(tuip, INSTALL_DLG, "UltraWin 2.60 Installation", ULTRAWIN) )
  384.             deselect(tuip, ret_inx), draw_item(tuip, ret_inx);
  385.         break;
  386.  
  387.       case MAIN_INTUITION:
  388.         if ( is_selected(tuip, ret_inx) )
  389.           if ( !do_install_dlg(tuip, INSTALL_DLG, "InTUItion 1.60 Installation", INTUITION) )
  390.           deselect(tuip, ret_inx), draw_item(tuip, ret_inx);
  391.  
  392.         break;
  393.       case MAIN_ENCOM:
  394.         if ( is_selected(tuip, ret_inx) )
  395.           if ( !do_install_dlg(tuip, INSTALL_DLG, "EnCom 1.60 Installation", ENCOM) )
  396.             deselect(tuip, ret_inx), draw_item(tuip, ret_inx);
  397.         break;
  398.  
  399.       case MAIN_INSTALL:
  400.         if ( !(is_selected(tuip, MAIN_ULTRAWIN) ||
  401.                is_selected(tuip, MAIN_INTUITION) ||
  402.                is_selected(tuip, MAIN_ENCOM)) )
  403.         {
  404.           msg_wnp = create_message("Please select at least one product!");
  405.           wait_event();
  406.           destroy_message(msg_wnp);
  407.           deselect(tuip, MAIN_INSTALL);
  408.           draw_item(tuip, MAIN_INSTALL);
  409.         } else
  410.         {
  411.           if ( install(tuip, get_dlg_wnp(tuip, dlg_inx)) )
  412.             stat = 1;
  413.           end_flag = 1;
  414.         }
  415.         break;
  416.  
  417.       case MAIN_CANCEL:
  418.         end_flag = 1;
  419.         break;
  420.     }
  421.   }
  422.   unshadow_window(get_dlg_wnp(tuip, dlg_inx));
  423.   erase_dialog(tuip, dlg_inx);
  424.   if ( stat )
  425.     whereto_help();
  426.   return(1);
  427. }
  428. /*** end of do_main_dlg ***/
  429.  
  430. /*******************/
  431. /* ~do_install_dlg */
  432. /*                 **********************************************************/
  433. /****************************************************************************/
  434. int do_install_dlg( TUI *tuip, int dlg_inx, char *title, int product )
  435. {
  436.   int   ret_value, end_flag = OFF, i, compiler, stat = 0;
  437.   char  *compiler_name, dest;
  438.  
  439.   set_btn_text(tuip, PARM_TITLE, title);
  440.   /*--------------------------- set the dest disk --------------------------*/
  441.   for (i=DEST_C; i<=DEST_F; i++)
  442.     deselect(tuip, i);
  443.   switch(Dests[product])
  444.   {
  445.     case 'C': case 'c': select(tuip, DEST_C); break;
  446.     case 'D': case 'd': select(tuip, DEST_D); break;
  447.     case 'E': case 'e': select(tuip, DEST_E); break;
  448.     case 'F': case 'f': select(tuip, DEST_F); break;
  449.   }
  450.   dest = Dests[product];
  451.  
  452.   /*-------------------------- set the source button -----------------------*/
  453.   for (i=WATCOM; i<=MIX; i++)
  454.     deselect(tuip, i);
  455.   if ( Compilers[product] == OTHER )
  456.     strcpy(get_inp_text(tuip, OTHER), Others[product]);
  457.   else
  458.   {
  459.     strcpy(get_inp_text(tuip, OTHER), "");
  460.     select(tuip, Compilers[product]);
  461.   }
  462.   compiler = Compilers[product];
  463.   compiler_name = Compiler_names[product];
  464.  
  465.   /*-------------------------- copy the new paths --------------------------*/
  466.   strcpy(get_inp_text(tuip, SRC_PATH),    Src_paths[product]);
  467.   strcpy(get_inp_text(tuip, HDR_PATH),    Hdr_paths[product]);
  468.   strcpy(get_inp_text(tuip, LIB_PATH),    Lib_paths[product]);
  469.   strcpy(get_inp_text(tuip, HELP_PATH),   Help_paths[product]);
  470.   strcpy(get_inp_text(tuip, EXAMPLE_PATH),Example_paths[product]);
  471.  
  472.   /*----------------------- set the install selections ---------------------*/
  473.   if ( Src_install[product] )
  474.     select(tuip, SRC_INSTALL);
  475.   else
  476.     deselect(tuip, SRC_INSTALL);
  477.   if ( Hdr_install[product] )
  478.     select(tuip, HDR_INSTALL);
  479.   else
  480.     deselect(tuip, HDR_INSTALL);
  481.   if ( Lib_install[product] )
  482.     select(tuip, LIB_INSTALL);
  483.   else
  484.     deselect(tuip, LIB_INSTALL);
  485.   if ( Help_install[product] )
  486.     select(tuip, HELP_INSTALL);
  487.   else
  488.     deselect(tuip, HELP_INSTALL);
  489.   if ( Example_install[product] )
  490.     select(tuip, EXAMPLE_INSTALL);
  491.   else
  492.     deselect(tuip, EXAMPLE_INSTALL);
  493.  
  494.   draw_dialog(tuip, dlg_inx);
  495.   shadow_window( get_dlg_wnp(tuip, dlg_inx), SH_BOTTOM_RIGHT, 2, 1, DARKGRAY);
  496.   while (!end_flag)
  497.   {
  498.     ret_value = do_dialog(tuip, dlg_inx, DO_RETURN_EVENT);
  499.     if( (Event.m_button == RB) ||
  500.        ((Event.key == KEY_ALT_H) && (ret_value == EVENT_RETURNED)) )
  501.       install_help();
  502.     else switch( ret_value )
  503.     {
  504.       /*---------------- ESC pressed or clicked off dialog -----------------*/
  505.       case NO_SELECTION:
  506.         end_flag = ON;
  507.         break;
  508.  
  509.       case INSTALL_HELP:
  510.         deselect(tuip, ret_value);
  511.         detab(tuip, ret_value);
  512.         draw_item(tuip, ret_value);
  513.         install_help();
  514.         break;
  515.  
  516.       case INSTALL_CANCEL:
  517.         deselect(tuip, ret_value);
  518.         detab(tuip, ret_value);
  519.         draw_item(tuip, ret_value);
  520.         end_flag = 2;
  521.         break;
  522.  
  523.       case INSTALL_OK:
  524.         deselect(tuip, ret_value);
  525.         detab(tuip, ret_value);
  526.         Src_install[product]    = is_selected(Tuip, SRC_INSTALL);
  527.         Hdr_install[product]    = is_selected(Tuip, HDR_INSTALL);
  528.         Lib_install[product]    = is_selected(Tuip, LIB_INSTALL);
  529.         Help_install[product]   = is_selected(Tuip, HELP_INSTALL);
  530.         Example_install[product]= is_selected(Tuip, EXAMPLE_INSTALL);
  531.         Compilers[product]      = compiler;
  532.         Compiler_names[product] = compiler_name;
  533.         strcpy(Others[product],       get_inp_text(Tuip, OTHER));
  534.         strcpy(Src_paths[product],    get_inp_text(tuip, SRC_PATH));
  535.         strcpy(Hdr_paths[product],    get_inp_text(tuip, HDR_PATH));
  536.         strcpy(Lib_paths[product],    get_inp_text(tuip, LIB_PATH));
  537.         strcpy(Help_paths[product],   get_inp_text(tuip, HELP_PATH));
  538.         strcpy(Example_paths[product],get_inp_text(tuip, EXAMPLE_PATH));
  539.         sprintf(Ending_path, "%c:\\%s", Dests[0], Compiler_names[0]);
  540.         Dests[product] = dest;
  541.         end_flag = stat = ON;
  542.         break;
  543.  
  544.       case WATCOM:
  545.         strcpy(get_inp_text(Tuip, OTHER), "");
  546.         draw_item(tuip, OTHER);
  547.         compiler = WATCOM;
  548.         compiler_name = "watcom";
  549.         change_compiler(tuip, compiler_name);
  550.         break;
  551.       case BORLAND:
  552.         strcpy(get_inp_text(Tuip, OTHER), "");
  553.         draw_item(tuip, OTHER);
  554.         compiler = BORLAND;
  555.         compiler_name = "borlandc";
  556.         change_compiler(tuip, compiler_name);
  557.         break;
  558.       case TURBO:
  559.         strcpy(get_inp_text(Tuip, OTHER), "");
  560.         draw_item(tuip, OTHER);
  561.         compiler = TURBO;
  562.         compiler_name = "turboc";
  563.         change_compiler(tuip, compiler_name);
  564.         break;
  565.       case MICROSOFT:
  566.         strcpy(get_inp_text(Tuip, OTHER), "");
  567.         draw_item(tuip, OTHER);
  568.         compiler = MICROSOFT;
  569.         compiler_name = "msvc";
  570.         change_compiler(tuip, compiler_name);
  571.         break;
  572.       case ZORTECH:
  573.         strcpy(get_inp_text(Tuip, OTHER), "");
  574.         draw_item(tuip, OTHER);
  575.         compiler = ZORTECH;
  576.         compiler_name = "zortech";
  577.         change_compiler(tuip, compiler_name);
  578.         break;
  579.       case MIX:
  580.         strcpy(get_inp_text(Tuip, OTHER), "");
  581.         draw_item(tuip, OTHER);
  582.         compiler = MIX;
  583.         compiler_name = "powerc";
  584.         change_compiler(tuip, compiler_name);
  585.         break;
  586.  
  587.       case OTHER:
  588.         for (i=WATCOM; i<=MIX; i++)
  589.           deselect(tuip, i), draw_item(tuip, i);
  590.         compiler = OTHER;
  591.         compiler_name = get_inp_text(Tuip,OTHER);
  592.         change_compiler(tuip, compiler_name);
  593.         break;
  594.  
  595.       case DEST_C: dest = 'c'; change_dest(tuip, dest); break;
  596.       case DEST_D: dest = 'd'; change_dest(tuip, dest); break;
  597.       case DEST_E: dest = 'e'; change_dest(tuip, dest); break;
  598.       case DEST_F: dest = 'f'; change_dest(tuip, dest); break;
  599.     }
  600.   }
  601.   unshadow_window(get_dlg_wnp(tuip, dlg_inx));
  602.   erase_dialog(tuip, dlg_inx);
  603.   return(stat);
  604. }
  605. /*** end of do_install_dlg ***/
  606.  
  607. /****************/
  608. /* ~change_dest */
  609. /*              *************************************************************/
  610. /****************************************************************************/
  611. void change_dest( TUI *tuip, char dest )
  612. {
  613.   int i;
  614.   char *p;
  615.  
  616.   for( i=SRC_PATH; i<=EXAMPLE_PATH; i++ )
  617.   {
  618.     p = get_inp_text(Tuip, i);
  619.     *p = dest;
  620.     draw_item( tuip, i);
  621.   }
  622. }
  623. /*** end of change_dest ***/
  624.  
  625. /********************/
  626. /* ~change_compiler */
  627. /*                  *********************************************************/
  628. /****************************************************************************/
  629. void change_compiler( TUI *tuip, char *compiler_name )
  630. {
  631.   int i;
  632.   char buff[133], *p, *p1;
  633.  
  634.   for( i=SRC_PATH; i<=EXAMPLE_PATH; i++ )
  635.   {
  636.     setmem(buff, 132, 0);
  637.     p = get_inp_text(Tuip, i);
  638.  
  639.     if( p[1] == ':' && p[2] == '\\' )
  640.       strncpy( buff, p, 3 );
  641.     else if( p[1] == ':' )
  642.       strncpy( buff, p, 2 );
  643.     strcat( buff, compiler_name );
  644.  
  645.     if( strchr(p,'\\') != NULL )
  646.       strcat( buff, strchr(strchr(p,'\\') + 1, '\\') );
  647.  
  648.     strcpy( p, buff );
  649.     draw_item( tuip, i);
  650.   }
  651. }
  652. /*** end of change_compiler ***/
  653.  
  654. /*******************/
  655. /* ~make_directory */
  656. /*                 **********************************************************/
  657. /****************************************************************************/
  658. void make_directory( char *p )
  659. {
  660.   int i;
  661.   char tmp[81], tmp1[81];
  662.  
  663.   i = 0;
  664.   tmp[i++] = *p++;
  665.   tmp[i++] = *p++;
  666.   tmp[i++] = *p++;
  667.   while( *p )
  668.   {
  669.     while( *p && (*p != '\\') )
  670.       tmp[i++] = *p++;
  671.     tmp[i] = '\0';
  672.     mkdir(tmp);
  673.     if( *p == '\\' )
  674.       tmp[i++] = *p++;
  675.   }
  676. }
  677. /*** end of make_directory ***/
  678.  
  679. /*****************/
  680. /* ~install_help */
  681. /*               ************************************************************/
  682. /****************************************************************************/
  683. char *Helps[] = {
  684. "Setting install check boxes",
  685. "  There is a check box next to each path.  Click on the check box or",
  686. "  press the indicated key to turn the check box on/off.  Only those",
  687. "  boxes with an X will be installed.",
  688. "",
  689. "Setting up directory paths",
  690. "  There are five directory paths that need to be created. Default paths",
  691. "  are created if you select none.  You can change each path individually",
  692. "  by clicking on the path string or pressing 1-5.  If you elect to use",
  693. "  the standard directories, borlandc, tc, etc., simply click or select",
  694. "  the desired compiler.",
  695. "",
  696. "Setting the destination drive",
  697. "  Clicking or selecting (ALT C-E) a destination drive will automatically",
  698. "  change the paths for you.  You can also change them individually."
  699. };
  700. void install_help( void )
  701. {
  702.   int i;
  703.   WINDOW wn;
  704.  
  705.   m_hide();
  706.   wn_create( 1, 2, V_cols-4, V_rows-4, SGL_BDR, WN_POPUP, &wn );
  707.   wn_color( LIGHTGRAY, RED, &wn );
  708.   wn_name("Help", &wn);
  709.   wn_set(&wn);
  710.   for( i = 0; i < 15; i++ )
  711.   {
  712.     if ( !strncmp(Helps[i], "Set", 3) )
  713.       wn_color(WHITE, RED, &wn);
  714.     else
  715.       wn_color(LIGHTGRAY, RED, &wn );
  716.     wn_plst( 1, i + 1, Helps[i], &wn );
  717.   }
  718.   m_show();
  719.   wait_event();
  720.   m_hide();
  721.   wn_destroy(&wn);
  722.   m_show();
  723. }
  724. /*** end of install_help ***/
  725.  
  726. /*****************/
  727. /* ~whereto_help */
  728. /*               ************************************************************/
  729. /****************************************************************************/
  730. char *Whelps[] = {
  731. "",
  732. "   It is recommended that you first read the help files for the products",
  733. "that you have installed. First, set the environment variable as follows,",
  734. "\"SET ENQHELP=C:\\BORLANDC\\ENQHELP\" or whatever path you chose for the",
  735. "help files, then run the help as follows: (it is recommended that you put",
  736. "the set command in your AUTOEXEC.BAT file)",
  737. "   for EnCom     \"enqhelp encom.hlp\"",
  738. "   for UltraWin  \"enqhelp uw_help0.hlp\"",
  739. "   for InTUItion \"enqhelp tui0.hlp\"",
  740. "",
  741. "ENCOM: If you installed EnCom, go into the EnCom directory and run the",
  742. "   EnCom demo, \"COM_DEMO\".  You can also run \"TD\", the terminal demo",
  743. "   which can be used to dial the EnQue BBS.",
  744. "",
  745. "ULTRAWIN: If you installed UltraWin, go into the UltraWin directory and",
  746. "   run the demo, \"UW_DEMO\".",
  747. "",
  748. "INTUITION: If you installed InTUItion, be sure that UltraWin in also",
  749. "   installed, then go into the directory and run the tutorials as follows,",
  750. "   \"TUICP -PBUTTON.TUT\". There are four tutorials; BUTTON.TUT, ENTRY.TUT,",
  751. "   HELP.TUT, and MENU.TUT.",
  752. "   And of course you are running an InTUItion demo right now!"
  753. };
  754. void whereto_help( void )
  755. {
  756.   int i, end_flag = OFF;
  757.   WINDOW wn;
  758.  
  759.   m_hide();
  760.   wn_create( 0, 0, V_cols-1, V_rows-1, SGL_BDR, WN_POPUP, &wn );
  761.   wn_color(WHITE, RED, &wn );
  762.   wn_name("[Where To Go From Here]", &wn);
  763.   wn_set(&wn);
  764.   for( i = 0; i < 22; i++ )
  765.     wn_plst( 0, i, Whelps[i], &wn );
  766.   while (!end_flag)
  767.   {
  768.     wait_event();
  769.     if ( !Event.is_mouse && (Event.key == KEY_ESC) )
  770.       end_flag = ON;
  771.   }
  772.   wn_destroy(&wn);
  773.   m_show();
  774. }
  775. /*** end of whereto_help ***/
  776.  
  777. /******************/
  778. /* ~shadow_window */
  779. /*                ***********************************************************/
  780. /* This routine takes the window passed by pointer and shadows it.  It does */
  781. /* this by creating sub windows using the usr_ptr member of the window      */
  782. /* structure.                                                               */
  783. /*                                                                          */
  784. /* The contents under these sub windows are read off the screen and put     */
  785. /* inside the windows.  The attribute is then changed and the window is     */
  786. /* placed on the screen, giving the illusion of a shadow.                   */
  787. /*                                                                          */
  788. /* You may pass this routine a width, height and attribute (DARKGRAY on     */
  789. /* BLACK with a width of 2 and height of 1 usually looks nice).             */
  790. /* You may also pass a type, which is a number from 0-3 (see #defines) that */
  791. /* indicates the direction the shadow falls.                                */
  792. /*                                                                          */
  793. /* The main thing to remember is be SURE that you call the unshadow_window  */
  794. /* function BEFORE you destroy the window, or else you will have heap       */
  795. /* problems.                                                                */
  796. /****************************************************************************/
  797. void shadow_window( WINDOW *wnp, int type, int w, int h, int att )
  798. {
  799.   WINDOW  *wnp1, *wnp2;                         /* shadow window pointers   */
  800.   int     x1 = wnp->pane.x_min;                 /* get the screen coords    */
  801.   int     y1 = wnp->pane.y_min;
  802.   int     x2 = wnp->pane.x_max;
  803.   int     y2 = wnp->pane.y_max;
  804.   int     win1_x1, win1_y1, win1_x2, win1_y2;
  805.   int     win2_x1, win2_y1, win2_x2, win2_y2;
  806.   int     i;
  807.   uchar   *dest;
  808.  
  809.   if (wnp->usr_ptr == NULL)
  810.   {
  811.     switch(type)
  812.     {
  813.       case SH_TOP_LEFT:
  814.         win1_x1 = x1 - w, win1_y1 = y1 - h;     /* left side of window      */
  815.         win1_x2 = x1 - 1, win1_y2 = y2 - h;
  816.         win2_x1 = x1    , win2_y1 = y1 - h;     /* top side of window       */
  817.         win2_x2 = x2 - w, win2_y2 = y1 - 1;
  818.         break;
  819.       case SH_TOP_RIGHT:
  820.         win1_x1 = x2 + 1, win1_y1 = y1 - h;     /* right side of window     */
  821.         win1_x2 = x2 + w, win1_y2 = y2 - h;
  822.         win2_x1 = x1 + w, win2_y1 = y1 - h;     /* top side of window       */
  823.         win2_x2 = x2    , win2_y2 = y1 - 1;
  824.         break;
  825.       case SH_BOTTOM_LEFT:
  826.         win1_x1 = x1 - w, win1_y1 = y1 + h;     /* left side of window      */
  827.         win1_x2 = x1 - 1, win1_y2 = y2 + h;
  828.         win2_x1 = x1    , win2_y1 = y2 + 1;     /* bottom side of window    */
  829.         win2_x2 = x2 - w, win2_y2 = y2 + h;
  830.         break;
  831.       default:
  832.         win1_x1 = x2 + 1, win1_y1 = y1 + h;     /* right side of window     */
  833.         win1_x2 = x2 + w, win1_y2 = y2 + h;
  834.         win2_x1 = x1 + w, win2_y1 = y2 + 1;     /* bottom side of window    */
  835.         win2_x2 = x2    , win2_y2 = y2 + h;
  836.         break;
  837.     }
  838.     wnp->usr_ptr = calloc(1, sizeof(WINDOW));   /* alloc/create first win   */
  839.     wn_create(win1_x1, win1_y1, win1_x2, win1_y2,
  840.               NO_BDR, WN_POPUP,
  841.               (WINDOW *) wnp->usr_ptr);
  842.     wnp1 = (WINDOW *) wnp->usr_ptr;
  843.     wn_read(wnp1);
  844.     dest = wnp1->buff + 1;                      /* set to DARKGRAY on BLACK */
  845.     for (i=0; i<(wnp1->cols * wnp1->rows); i++)
  846.       *dest = att, dest += 2;
  847.  
  848.     wnp1->usr_ptr = calloc(1, sizeof(WINDOW));  /* alloc/create second win  */
  849.     wn_create(win2_x1, win2_y1, win2_x2, win2_y2,
  850.               NO_BDR, WN_POPUP,
  851.               (WINDOW *) wnp1->usr_ptr);
  852.     wnp2 = (WINDOW *) wnp1->usr_ptr;
  853.     wn_read(wnp2);
  854.     dest = wnp2->buff + 1;                      /* set to DARKGRAY on BLACK */
  855.     for (i=0; i<(wnp2->cols * wnp2->rows); i++)
  856.       *dest = att, dest += 2;
  857.  
  858.     wn_save(wnp1), wn_rfsh(wnp1);               /* do the wn_set equivalent */
  859.     wn_save(wnp2), wn_rfsh(wnp2);
  860.   }
  861. }
  862. /*** end of shadow_window ***/
  863.  
  864. /********************/
  865. /* ~unshadow_window */
  866. /*                  *********************************************************/
  867. /*  This is the complement to shadow_window.  You MUST call this function   */
  868. /* before you destroy the window that has been shadowed or you will have    */
  869. /* severe problems.  If you don't it will have the same effect as not       */
  870. /* calling wn_destroy on a created window.  Your computer will lockup!      */
  871. /****************************************************************************/
  872. void unshadow_window( WINDOW *wnp )
  873. {
  874.   WINDOW  *wnp1, *wnp2;                         /* shadow window pointers   */
  875.  
  876.   if (wnp->usr_ptr)                             /* does it have a shadow?   */
  877.   {
  878.     wnp1 = (WINDOW *) wnp->usr_ptr;             /* get the window pointers  */
  879.     wnp2 = (WINDOW *) wnp1->usr_ptr;
  880.     wn_destroy(wnp2), wn_destroy(wnp1);
  881.     free(wnp2), free(wnp1);                     /* and free the structure   */
  882.     wnp->usr_ptr = NULL;
  883.   }
  884. }
  885. /*** end of unshadow_window ***/
  886.  
  887. /*******************/
  888. /* ~create_message */
  889. /*                 **********************************************************/
  890. /****************************************************************************/
  891. WINDOW *create_message( char *msg )
  892. {
  893.   WINDOW *wnp = calloc(1, sizeof(WINDOW));
  894.   int    len = strlen(msg), x1 = 38 - (len / 2), x2 = x1 + len + 3;
  895.  
  896.   m_hide();
  897.   wn_create(x1, 11, x2, 13, SGL_BDR, WN_POPUP, wnp);
  898.   wn_color(WHITE, RED, wnp);
  899.   wn_bdr_color(YELLOW, RED, wnp);
  900.   wn_set(wnp);
  901.   shadow_window(wnp, SH_BOTTOM_RIGHT, 2, 1, DARKGRAY);
  902.   wn_plst(CENTERED, 0, msg, wnp);
  903.   m_show();
  904.   return(wnp);
  905. }
  906. /*** end of create_message ***/
  907.  
  908. /********************/
  909. /* ~destroy_message */
  910. /*                  *********************************************************/
  911. /****************************************************************************/
  912. void destroy_message( WINDOW *wnp )
  913. {
  914.   m_hide();
  915.   unshadow_window(wnp);
  916.   wn_destroy(wnp);
  917.   free(wnp);
  918.   m_show();
  919. }
  920. /*** end of destroy_message ***/
  921.  
  922. /**************/
  923. /* ~copy_file */
  924. /*            ***************************************************************/
  925. /* file copy that uses only 4k of buffer area...                            */
  926. /****************************************************************************/
  927. int copy_file( char *src_fname, char *dest_fname )
  928. {
  929.   int read, stat = 0;
  930.   char *buff;
  931.   FILE *src_fp, *dest_fp;
  932.  
  933.   if( (buff = malloc(4096)) != NULL )
  934.   {
  935.     if( (src_fp = fopen(src_fname, "rb")) != NULL )
  936.     {
  937.       if( (dest_fp = fopen(dest_fname, "wb")) != NULL )
  938.       {
  939.         while( 1 )
  940.         {
  941.           read = fread(buff, 1, 4096, src_fp);
  942.           if( read <= 0 )
  943.             break;
  944.           if( fwrite(buff, 1, read, dest_fp) != read )
  945.             stat = -1;                          /* on error, set stat = - 1 */
  946.         }
  947.         fclose(dest_fp);
  948.         if( !stat )               /* if no errors during copy, set stat = 1 */
  949.           stat = 1;
  950.       }
  951.       fclose(src_fp);
  952.     }
  953.     free(buff);
  954.   }
  955.   return(stat);
  956. }
  957. /*** end of copy_file ***/
  958.  
  959.  
  960. /*************************/
  961. /* ~register_install_tui */
  962. /*                       ****************************************************/
  963. /* Call this function to register the TUI.  This replaces load_tui!         */
  964. /****************************************************************************/
  965. int register_install_tui( TUI *tuip )
  966. {
  967.   Tui_error = OFF;
  968.   setmem(tuip, sizeof(TUI), 0);
  969.   tuip->version_num = 160L;
  970.   tuip->blink_set = ON;
  971.   tuip->rows = 25;
  972.   tuip->back_att = 0x7f;
  973.   tuip->back_bdr_att = 0x7f;
  974.   movmem(Palette_install, tuip->palette, 16);
  975.  
  976.   register_install_dlg0(tuip);
  977.   register_install_dlg1(tuip);
  978.   set_tui_parenting(tuip);
  979.   if (Tui_error)
  980.   {
  981.     free_tui(tuip);
  982.     return(0);
  983.   } else return(1);
  984. }
  985. /*** end of register_install_tui ***/
  986.  
  987. /**************************/
  988. /* ~register_install_dlg0 */
  989. /*                        ***************************************************/
  990. /* Internally called function to register one dialog.                       */
  991. /****************************************************************************/
  992. void register_install_dlg0( TUI *tuip )
  993. {
  994.   add_dialog(tuip, 0x0000, 9, 8, 61, 9, 0x1F, 0x1F, 1);
  995.   add_button(tuip, 67, 0x0013, 0, 31, 6, 27, 1, 1,
  996.     0x71, 0x74, 0x03, 0x0e, 0x0f, 0, "Cancel");
  997.   add_check(tuip, 85, 0x1013, 0, 3, 1, 17, 1, 1,
  998.     0x30, 0x3E, 0x3f, 3, 0x04, 6, "  [ ] UltraWin");
  999.   add_check(tuip, 73, 0x1013, 0, 22, 1, 17, 1, 1,
  1000.     0x30, 0x3E, 0x3f, 3, 0x04, 6, "  [ ] InTUItion");
  1001.   add_check(tuip, 69, 0x1013, 0, 41, 1, 17, 1, 1,
  1002.     0x30, 0x3E, 0x3f, 3, 0x04, 6, "  [ ] Encom");
  1003.   add_button(tuip, 0, 0x0000, 0, 3, 3, 55, 1, 0,
  1004.     0x1F, 0x1f, 0x1f, 0x1f, 0x1f, 0, "Select the products you wish to install, and choose one");
  1005.   add_button(tuip, 0, 0x1000, 0, 3, 4, 47, 1, 0,
  1006.     0x1F, 0x1f, 0x1f, 0x1f, 0x1f, 0, "Of the buttons below.");
  1007.   add_button(tuip, 66, 0x0013, 0, 2, 6, 27, 1, 1,
  1008.     0x71, 0x74, 0x03, 0x0e, 0x0f, 0, "Begin Installation");
  1009. }
  1010. /*** end of register_install_dlg0 ***/
  1011.  
  1012. /**************************/
  1013. /* ~register_install_dlg1 */
  1014. /*                        ***************************************************/
  1015. /* Internally called function to register one dialog.                       */
  1016. /****************************************************************************/
  1017. void register_install_dlg1( TUI *tuip )
  1018. {
  1019.   add_dialog(tuip, 0x0000, 1, 2, 76, 20, 0x1F, 0x1F, 1);
  1020.   add_box(tuip, 0, 0x0000, 0, 56, 7, 17, 11, 0x3F, 1);
  1021.   add_box(tuip, 0, 0x0000, 0, 58, 8, 12, 6, 0x11, 1);
  1022.   add_box(tuip, 0, 0x0000, 0, 56, 1, 17, 5, 0x3F, 1);
  1023.   add_box(tuip, 0, 0x0000, 0, 2, 3, 51, 11, 0x30, 1);
  1024.   add_button(tuip, 0, 0x0000, 0, 2, 1, 51, 1, 1,
  1025.     0x3E, 0x3e, 0x3e, 0x3e, 0x3e, 0, "Title Goes Here");
  1026.   add_button(tuip, 0, 0x0000, 0, 56, 1, 17, 1, 0,
  1027.     0x71, 0x71, 0x71, 0x71, 0x71, 0, "Dest (Alt C-F)");
  1028.   add_button(tuip, 0, 0x0000, 0, 56, 7, 17, 1, 0,
  1029.     0x71, 0x71, 0x71, 0x71, 0x71, 0, "Compiler");
  1030.   add_button(tuip, 67, 0x0013, 0, 2, 15, 14, 3, 1,
  1031.     0x71, 0x74, 0x03, 0x0e, 0x0f, 0, "Cancel");
  1032.   add_button(tuip, 291, 0x0013, 0, 19, 15, 22, 3, 1,
  1033.     0x71, 0x74, 0x03, 0x0e, 0x0f, 4, "Alt-H for help");
  1034.   add_button(tuip, 75, 0x0013, 0, 44, 15, 10, 3, 1,
  1035.     0x71, 0x74, 0x03, 0x0e, 0x0f, 1, "Ok");
  1036.   add_button(tuip, 302, 0x0017, 0, 58, 2, 5, 1, 1,
  1037.     0x1B, 0x1e, 0x03, 0x0e, 0x0f, 0, "C");
  1038.   add_button(tuip, 288, 0x0017, 0, 58, 4, 5, 1, 1,
  1039.     0x1B, 0x1e, 0x03, 0x0e, 0x0f, 0, "D");
  1040.   add_button(tuip, 274, 0x0017, 0, 65, 2, 5, 1, 1,
  1041.     0x1B, 0x1e, 0x03, 0x0e, 0x0f, 0, "E");
  1042.   add_button(tuip, 289, 0x0017, 0, 65, 4, 5, 1, 1,
  1043.     0x1B, 0x1e, 0x03, 0x0e, 0x0f, 0, "F");
  1044.   add_button(tuip, 0, 0x0000, 0, 4, 3, 14, 1, 0,
  1045.     0x3E, 0x3e, 0x3e, 0x3e, 0x3e, 0, "Install ON/OFF");
  1046.   add_button(tuip, 0, 0x0000, 0, 31, 3, 13, 1, 0,
  1047.     0x3E, 0x3e, 0x3e, 0x3e, 0x3e, 0, "Install Paths");
  1048.   add_check(tuip, 83, 0x1013, 0, 4, 4, 10, 1, 0,
  1049.     0x30, 0x3E, 0x3f, 1, 0x58, 4, "[ ] Source");
  1050.   add_check(tuip, 72, 0x1013, 0, 4, 6, 11, 1, 0,
  1051.     0x30, 0x3E, 0x3f, 1, 0x58, 4, "[ ] Headers");
  1052.   add_check(tuip, 76, 0x1013, 0, 4, 8, 13, 1, 0,
  1053.     0x30, 0x3E, 0x3f, 1, 0x58, 4, "[ ] Libraries");
  1054.   add_check(tuip, 69, 0x1013, 0, 4, 10, 8, 1, 0,
  1055.     0x30, 0x3E, 0x3f, 1, 0x58, 5, "[ ] Help");
  1056.   add_check(tuip, 65, 0x1013, 0, 4, 12, 11, 1, 0,
  1057.     0x30, 0x3E, 0x3f, 1, 0x58, 6, "[ ] Example");
  1058.   add_button(tuip, 0, 0x0000, 0, 20, 4, 2, 1, 1,
  1059.     0x1E, 0x1e, 0x1e, 0x1e, 0x1e, 0, "1)");
  1060.   add_button(tuip, 0, 0x0000, 0, 20, 6, 2, 1, 1,
  1061.     0x1E, 0x1e, 0x1e, 0x1e, 0x1e, 0, "2)");
  1062.   add_button(tuip, 0, 0x0000, 0, 20, 8, 2, 1, 1,
  1063.     0x1E, 0x1e, 0x1e, 0x1e, 0x1e, 0, "3)");
  1064.   add_button(tuip, 0, 0x0000, 0, 20, 10, 2, 1, 1,
  1065.     0x1E, 0x1e, 0x1e, 0x1e, 0x1e, 0, "4)");
  1066.   add_button(tuip, 0, 0x0000, 0, 20, 12, 2, 1, 1,
  1067.     0x1E, 0x1e, 0x1e, 0x1e, 0x1e, 0, "5)");
  1068.   add_input(tuip, 49, 0x000B, 0, 22, 4, 29, 1, 1, 0x17, 0x0f, 0x0a,
  1069.     "",
  1070.     "________________________________________________________________________________",
  1071.     "********************************************************************************");
  1072.   add_input(tuip, 50, 0x000B, 0, 22, 6, 29, 1, 1, 0x17, 0x0f, 0x0a,
  1073.     "",
  1074.     "________________________________________________________________________________",
  1075.     "********************************************************************************");
  1076.   add_input(tuip, 51, 0x000B, 0, 22, 8, 29, 1, 1, 0x17, 0x0f, 0x0a,
  1077.     "",
  1078.     "________________________________________________________________________________",
  1079.     "********************************************************************************");
  1080.   add_input(tuip, 52, 0x000B, 0, 22, 10, 29, 1, 1, 0x17, 0x0f, 0x0a,
  1081.     "",
  1082.     "________________________________________________________________________________",
  1083.     "********************************************************************************");
  1084.   add_input(tuip, 53, 0x000B, 0, 22, 12, 29, 1, 1, 0x17, 0x0f, 0x0a,
  1085.     "",
  1086.     "________________________________________________________________________________",
  1087.     "********************************************************************************");
  1088.   add_button(tuip, 66, 0x0017, 0, 58, 8, 12, 1, 0,
  1089.     0x17, 0x1e, 0x03, 0x0e, 0x0f, 0, "Watcom C32");
  1090.   add_button(tuip, 66, 0x0017, 0, 58, 9, 12, 1, 0,
  1091.     0x17, 0x1e, 0x03, 0x0e, 0x0f, 0, "Borland");
  1092.   add_button(tuip, 84, 0x0017, 0, 58, 10, 12, 1, 0,
  1093.     0x17, 0x1e, 0x03, 0x0e, 0x0f, 0, "Turbo");
  1094.   add_button(tuip, 77, 0x0017, 0, 58, 11, 12, 1, 0,
  1095.     0x17, 0x1e, 0x03, 0x0e, 0x0f, 0, "Microsoft");
  1096.   add_button(tuip, 90, 0x0017, 0, 58, 12, 12, 1, 0,
  1097.     0x17, 0x1e, 0x03, 0x0e, 0x0f, 0, "Zortech");
  1098.   add_button(tuip, 88, 0x0017, 0, 58, 13, 12, 1, 0,
  1099.     0x17, 0x1e, 0x03, 0x0e, 0x0f, 2, "Mix");
  1100.   add_button(tuip, 0, 0x0000, 0, 62, 15, 5, 1, 0,
  1101.     0x31, 0x3e, 0x31, 0x3e, 0x31, 0, "Other");
  1102.   add_input(tuip, 79, 0x000B, 0, 59, 16, 11, 1, 1, 0x17, 0x0f, 0x0a,
  1103.     "",
  1104.     "________________________________________________________________________________",
  1105.     "********************************************************************************");
  1106. }
  1107. /*** end of register_install_dlg1 ***/
  1108.  
  1109. /*** END OF FILE ***/
  1110.  
  1111. /*** END OF FILE ***/
  1112.