* added the Unlicense as valid in misc/share/REGISTER
[t2sde.git] / package / archiver / mine / gasgui-more-minimal.patch
blob15c1853f2dcce44d3ae820ff1454258ed1e238b1
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/mine/gasgui-more-minimal.patch
3 # Copyright (C) 2024 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
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
16 @@ -45,7 +45,8 @@
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[] = {
26 @@ -170,15 +171,16 @@
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) )
42 + continue;
44 if ( !e->content_is_subdir && !set_dir) {
45 if ( value == 0 ) {
46 @@ -201,7 +203,7 @@
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);
55 @@ -303,13 +305,13 @@
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;
76 @@ -402,7 +404,7 @@
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;
85 @@ -410,6 +412,7 @@
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;
90 return 0;
93 @@ -566,13 +569,16 @@
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);
111 bigmain = 1;
112 break;