# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/mine/gasgui-more-minimal.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- mine-0.23/selector.c.vanilla 2024-05-18 13:01:15.675946976 +0200 +++ mine-0.23/selector.c 2024-05-18 13:52:30.425792098 +0200 @@ -45,7 +45,8 @@ char *instmenu1_items[] = { "1", "Full install (recommended)", - "2", "Only a minimalistic system" + "2", "Minimalistic system w/ Xorg", + "3", "Minimalistic system", }; char *instmenu2_items[] = { @@ -170,15 +171,16 @@ } } -void set_tree_flag(struct directory * dir, int set_dir, int value) +void set_tree_flag(struct directory * dir, int set_dir, int value, const char * excluding) { struct directory_entry * e; if ( set_dir ) dir->is_open_in_gui = value; for (e = dir->list; e != NULL; e = e->next) { - if ( e->content_is_subdir && set_dir) - e->content.dir->is_open_in_gui = value; + if ( excluding && e->content_is_subdir && + !strcmp(e->content.dir->name, excluding) ) + continue; if ( !e->content_is_subdir && !set_dir) { if ( value == 0 ) { @@ -201,7 +203,7 @@ } if ( e->content_is_subdir ) - set_tree_flag(e->content.dir, set_dir, value); + set_tree_flag(e->content.dir, set_dir, value, NULL); } } @@ -303,13 +305,13 @@ 16, 50, 10, 10, extra_dir_items); switch(dialog_vars.input_result[0]) { - case 'a': set_tree_flag(dir, 1, 1); break; - case 'b': set_tree_flag(dir, 1, 0); break; - case 'c': set_tree_flag(dir, 0,-1); break; - case 'd': set_tree_flag(dir, 0, 0); break; - case 'e': set_tree_flag(dir, 0, 1); break; - case 'f': set_tree_flag(dir, 0, 2); break; - case 'g': set_tree_flag(dir, 0, 3); break; + case 'a': set_tree_flag(dir, 1, 1, NULL); break; + case 'b': set_tree_flag(dir, 1, 0, NULL); break; + case 'c': set_tree_flag(dir, 0,-1, NULL); break; + case 'd': set_tree_flag(dir, 0, 0, NULL); break; + case 'e': set_tree_flag(dir, 0, 1, NULL); break; + case 'f': set_tree_flag(dir, 0, 2, NULL); break; + case 'g': set_tree_flag(dir, 0, 3, NULL); break; case 'h': show_actions(); break; case 'i': install_deps(dir); break; case 'j': show_deps(); break; @@ -402,7 +404,7 @@ dialog_vars.input_result[0]=0; dialog_vars.default_item = NULL; dialog_menu(" G.A.S. (GEM Autoinstall Shell) GUI ", - "", 8, 60, 2, 2, instmenu1_items); + "", 9, 60, 3, 3, instmenu1_items); dialog_vars.extra_button = 1; dialog_vars.help_button = 1; @@ -410,6 +412,7 @@ if (dialog_vars.input_result[0] == '1') return 1; if (dialog_vars.input_result[0] == '2') return 2; + if (dialog_vars.input_result[0] == '3') return 3; return 0; } @@ -566,13 +569,16 @@ } if ( !pkgcount && !bigmain ) { - char *dirname = "all"; + char *dirname = "all", *excluding = NULL; struct directory_entry * e; - if ( instmenu1() == 2 ) dirname = "base"; + int inst_choice = instmenu1(); + if ( inst_choice != 1 ) dirname = "base"; // minimal + if ( inst_choice == 3 ) excluding = "x11"; + for (e = rootdir->list; e != NULL; e = e->next) { if ( e->content_is_subdir && !strcmp(e->content.dir->name, dirname) ) - set_tree_flag(e->content.dir, 0, 1); + set_tree_flag(e->content.dir, 0, 1, excluding); } bigmain = 1; break;