1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/mine/gasgui-more-minimal.patch
3 # Copyright (C) 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- mine-0.23/selector.c.vanilla 2024-05-18 13:01:15.675946976 +0200
15 +++ mine-0.23/selector.c 2024-05-18 13:52:30.425792098 +0200
18 char *instmenu1_items[] = {
19 "1", "Full install (recommended)",
20 - "2", "Only a minimalistic system"
21 + "2", "Minimalistic system w/ Xorg",
22 + "3", "Minimalistic system",
25 char *instmenu2_items[] = {
30 -void set_tree_flag(struct directory * dir, int set_dir, int value)
31 +void set_tree_flag(struct directory * dir, int set_dir, int value, const char * excluding)
33 struct directory_entry * e;
35 if ( set_dir ) dir->is_open_in_gui = value;
37 for (e = dir->list; e != NULL; e = e->next) {
38 - if ( e->content_is_subdir && set_dir)
39 - e->content.dir->is_open_in_gui = value;
40 + if ( excluding && e->content_is_subdir &&
41 + !strcmp(e->content.dir->name, excluding) )
44 if ( !e->content_is_subdir && !set_dir) {
49 if ( e->content_is_subdir )
50 - set_tree_flag(e->content.dir, set_dir, value);
51 + set_tree_flag(e->content.dir, set_dir, value, NULL);
56 16, 50, 10, 10, extra_dir_items);
58 switch(dialog_vars.input_result[0]) {
59 - case 'a': set_tree_flag(dir, 1, 1); break;
60 - case 'b': set_tree_flag(dir, 1, 0); break;
61 - case 'c': set_tree_flag(dir, 0,-1); break;
62 - case 'd': set_tree_flag(dir, 0, 0); break;
63 - case 'e': set_tree_flag(dir, 0, 1); break;
64 - case 'f': set_tree_flag(dir, 0, 2); break;
65 - case 'g': set_tree_flag(dir, 0, 3); break;
66 + case 'a': set_tree_flag(dir, 1, 1, NULL); break;
67 + case 'b': set_tree_flag(dir, 1, 0, NULL); break;
68 + case 'c': set_tree_flag(dir, 0,-1, NULL); break;
69 + case 'd': set_tree_flag(dir, 0, 0, NULL); break;
70 + case 'e': set_tree_flag(dir, 0, 1, NULL); break;
71 + case 'f': set_tree_flag(dir, 0, 2, NULL); break;
72 + case 'g': set_tree_flag(dir, 0, 3, NULL); break;
73 case 'h': show_actions(); break;
74 case 'i': install_deps(dir); break;
75 case 'j': show_deps(); break;
77 dialog_vars.input_result[0]=0;
78 dialog_vars.default_item = NULL;
79 dialog_menu(" G.A.S. (GEM Autoinstall Shell) GUI ",
80 - "", 8, 60, 2, 2, instmenu1_items);
81 + "", 9, 60, 3, 3, instmenu1_items);
83 dialog_vars.extra_button = 1;
84 dialog_vars.help_button = 1;
87 if (dialog_vars.input_result[0] == '1') return 1;
88 if (dialog_vars.input_result[0] == '2') return 2;
89 + if (dialog_vars.input_result[0] == '3') return 3;
96 if ( !pkgcount && !bigmain ) {
97 - char *dirname = "all";
98 + char *dirname = "all", *excluding = NULL;
99 struct directory_entry * e;
100 - if ( instmenu1() == 2 ) dirname = "base";
101 + int inst_choice = instmenu1();
102 + if ( inst_choice != 1 ) dirname = "base"; // minimal
103 + if ( inst_choice == 3 ) excluding = "x11";
105 for (e = rootdir->list; e != NULL; e = e->next) {
106 if ( e->content_is_subdir &&
107 !strcmp(e->content.dir->name, dirname) )
108 - set_tree_flag(e->content.dir, 0, 1);
109 + set_tree_flag(e->content.dir, 0, 1, excluding);