Commit f348034a69ea26a22c650fce14acfe813c928ef4

Authored by Alain Prouté
1 parent 6f062684

*** empty log message ***

anubis_dev/compiler/proj/linux/Makefile
... ... @@ -62,7 +62,7 @@ anubis_npd: dependancies_npd $(main_objs) $(special_objs:.o=.npd.o) $(cipher_obj
62 62 $(strip) anubis_npd
63 63 cp anubis_npd anubis
64 64 cp anubis_npd $(HOME)/anubis_distrib/linux_install/bin/anubis
65   - cp anubis_npd $(BINDIR)/anubis
  65 +# cp anubis_npd $(BINDIR)/anubis
66 66  
67 67  
68 68  
... ...
anubis_dev/compiler/src/main.cpp
... ... @@ -159,6 +159,8 @@ static void read_option(char *opt)
159 159 else { fprintf(stderr,"Invalid option: -%s \n",opt); anb_exit(1); }
160 160 }
161 161  
  162 +
  163 +
162 164  
163 165 /* reading the command line */
164 166 static void read_command_line(int argc, char **argv)
... ... @@ -166,11 +168,24 @@ static void read_command_line(int argc, char **argv)
166 168 int i;
167 169 for (i = 1; i < argc; i++)
168 170 if (argv[i][0] == '-')
169   - read_option(argv[i]+1);
  171 + read_option(argv[i]+1);
170 172 else
171   - source_file_name = argv[i];
  173 + source_file_name = argv[i];
  174 +}
  175 +
  176 +
  177 +
  178 +/* reading only the options on the command line (needed at very start) */
  179 +static void read_only_options(int argc, char **argv)
  180 +{
  181 + int i;
  182 + for (i = 1; i < argc; i++)
  183 + if (argv[i][0] == '-')
  184 + read_option(argv[i]+1);
172 185 }
173 186  
  187 +
  188 +
174 189  
175 190 static char getsbuf[1000];
176 191  
... ... @@ -540,6 +555,10 @@ int main(int argc, char **argv)
540 555 assert(i_dummy <= 255);
541 556  
542 557  
  558 + /* Read the options right now (they will be reread later by 'read_command_line') */
  559 + read_only_options(argc,argv);
  560 +
  561 +
543 562 /* Setup the 3 main directories as guessed by this program and show them if 'verbose'
544 563 mode is set. These values may be overridden later below. */
545 564 set_executables_directory(argv[0]);
... ... @@ -560,7 +579,7 @@ int main(int argc, char **argv)
560 579  
561 580 /* If the 'my_anubis' directory does not exist, create it with all the files it must
562 581 contain. */
563   - if (FileExist(myAnubisDirectory) == false)
  582 + if (FileExist(myAnubisDirectory + "/library") == false)
564 583 populate_my_anubis_directory();
565 584  
566 585  
... ... @@ -569,11 +588,6 @@ int main(int argc, char **argv)
569 588 create_anubis_conf_file();
570 589  
571 590  
572   - /* If there is only the compiler name on command line, recall the syntax. */
573   - if (argc <= 1)
574   - syntax();
575   -
576   -
577 591 /* Now, read the configuration file and the command line in this order, so that the
578 592 command line options may override the settings found in the configuration file. */
579 593 read_configuration_file();
... ... @@ -625,6 +639,11 @@ int main(int argc, char **argv)
625 639 mkdirz(buf);
626 640  
627 641  
  642 + /* If there is only the compiler name on command line, recall the syntax. */
  643 + if (argc <= 1)
  644 + syntax();
  645 +
  646 +
628 647 /* Setup the paths for where the compiler will search for Anubis source files. */
629 648 {
630 649 String tmpStr;
... ...
anubis_dev/share/FileIO.cpp
... ... @@ -242,7 +242,7 @@ int copy_create_item(const char *filename, const struct stat *s, int flag)
242 242 {
243 243 char *tmp = (char *)malloc(10+strlen(filename)+strlen(dest));
244 244 sprintf(tmp,"cp %s %s",filename,dest);
245   - printf("executing: %s\n",tmp);
  245 + //printf("executing: %s\n",tmp);
246 246 system(tmp);
247 247 free(tmp);
248 248 }
... ... @@ -263,9 +263,9 @@ int copy_create_item(const char *filename, const struct stat *s, int flag)
263 263 bool RecursiveCopy(const String &srcDir, const String &destDir)
264 264 {
265 265 initial_destination = (char *)destDir.Cstr();
266   - printf("initial_destination = %s\n",initial_destination);
  266 + //printf("initial_destination = %s\n",initial_destination);
267 267 initial_source_length = strlen(srcDir.Cstr());
268   - printf("srcDir = %s\n",srcDir.Cstr());
  268 + //printf("srcDir = %s\n",srcDir.Cstr());
269 269 ftw(srcDir.Cstr(),(__ftw_func_t)copy_create_item,10);
270 270 return 0;
271 271 }
... ...
anubis_dev/vm/proj/linux/Makefile
... ... @@ -134,7 +134,7 @@ anbexec: $(main_objs) $(special_objs) $(cipher_objs) $(graph_objs) $(sqlite3_obj
134 134 -ljpeg -lssl -lcrypto -lm -lX11 -ldl -lstdc++ -lpthread -lc
135 135 strip anbexec
136 136 cp anbexec $(HOME)/anubis_distrib/linux_install/bin
137   - cp anbexec $(HOME)/bin/anbexec
  137 +# cp anbexec $(HOME)/bin/anbexec
138 138  
139 139  
140 140 clean:
... ...
anubis_distrib/linux_install/bin/anbexec
No preview for this file type
anubis_distrib/linux_install/bin/anubis
No preview for this file type
anubis_distrib/linux_install/en_How_to_install.txt
... ... @@ -17,31 +17,19 @@ tar -xzf Anubis_1_6_0_10_Linux.tar.gz
17 17  
18 18  
19 19  
20   - (2) Execute the 'makefile'.
21   -
22   - The unfolding of the main archive produces several files, among which is a makefile
23   - named 'Makefile'.
24   -
25   - If you can, you should first become 'root' with the 'su' command.
26   -
27   - If you have become 'root', execute the following command:
28   -
29   -make as_root
30   -
31   - If you cannot become 'root', execute the following command:
32   -
33   -make as_non_root
  20 + (2) Execute the shell 'install'.
  21 +
  22 + To that end, execute the following command:
34 23  
  24 +./install
35 25  
36 26  
37   - (3) If everything works well, the installation is finished. Otherwise, have a look at
38   - the content of 'Makefile' in order to understand why one or several commands were not
39   - executed. 'Makefile' is quite simple, and you should find the problem easily.
40 27  
  28 + (3) If everything works well, the installation is finished.
41 29  
42 30  
43 31 Note: 'anubis' must be executed at least one time in order to setup the directory
44   - 'my_anubis' and the files it contains.
  32 + 'my_anubis' and the files it contains.
45 33  
46 34  
47 35  
... ...
anubis_distrib/linux_install/install
... ... @@ -59,14 +59,20 @@ function install_as_root ()
59 59 # Usage: install_library soname realname installation_directory
60 60 # All libraries are in ./lib
61 61 install_library "libjpeg.so.62" "libjpeg.so.62.0.0" "/usr/lib"
  62 + install_library "libssl.so.0.9.7" "libssl.so.0.9.7" "/usr/lib"
  63 + install_library "libcrypto.so.0.9.7" "libcrypto.so.0.9.7" "/usr/lib"
  64 + install_library "libm.so.6" "libm-2.3.2.so" "/lib"
  65 + install_library "libX11.so.6" "libX11.so.6.2" "/usr/X11R6/lib"
  66 + install_library "libdl.so.2" "libdl-2.3.2.so" "/lib"
  67 + install_library "libstdc++.so.5" "libstdc++.so.5.0.7" "/usr/lib"
  68 + install_library "libpthread.so.0" "libpthread-0.10.so" "/lib"
  69 + install_library "libc.so.6" "libc-2.3.2.so" "/lib"
  70 + install_library "libgcc_s.so.1" "libgcc_s.so.1" "/lib"
62 71  
63 72 echo -e "\n---" Configuring $MUST_LDCONFIG libraries "---"
64 73 if [ $MUST_LDCONFIG != 0 ]
65 74 then perform "/sbin/ldconfig"
66 75 fi
67   -
68   - echo -e "\n---" Storing the archive for user installation "---"
69   - perform "cp my_anubis.tar.gz /usr/share/anubis";
70 76 }
71 77  
72 78  
... ... @@ -84,6 +90,7 @@ function install_as_non_root ()
84 90  
85 91 echo -e "\n--- Installing the Anubis binaries ---"
86 92 perform "mkdir -p $HOME/bin";
  93 + perform "mkdir -p $HOME/anubis/lib";
87 94 perform "tar -xzf anubis_binaries.tar.gz";
88 95 perform "cp bin/anubis $HOME/bin/anubis";
89 96 perform "cp bin/anbexec $HOME/bin/anbexec";
... ... @@ -95,17 +102,18 @@ function install_as_non_root ()
95 102 # Usage: install_library soname realname installation_directory
96 103 # All libraries are in ./lib
97 104 install_library "libjpeg.so.62" "libjpeg.so.62.0.0" "$HOME/anubis/lib"
  105 + install_library "libssl.so.0.9.7" "libssl.so.0.9.7" "$HOME/anubis/lib"
  106 + install_library "libcrypto.so.0.9.7" "libcrypto.so.0.9.7" "$HOME/anubis/lib"
  107 + install_library "libm.so.6" "libm-2.3.2.so" "$HOME/anubis/lib"
  108 + install_library "libX11.so.6" "libX11.so.6.2" "$HOME/anubis/lib"
  109 + install_library "libdl.so.2" "libdl-2.3.2.so" "$HOME/anubis/lib"
  110 + install_library "libstdc++.so.5" "libstdc++.so.5.0.7" "$HOME/anubis/lib"
  111 + install_library "libpthread.so.0" "libpthread-0.10.so" "$HOME/anubis/lib"
  112 + install_library "libc.so.6" "libc-2.3.2.so" "$HOME/anubis/lib"
  113 + install_library "libgcc_s.so.1" "libgcc_s.so.1" "$HOME/anubis/lib"
98 114  
99 115 echo -e "\n---" Configuring $MUST_LDCONFIG libraries "---"
100 116 perform "/sbin/ldconfig -n $HOME/anubis/lib"
101   -
102   -
103   - echo -e "\n--- Creating the 'my_anubis' directory \(if needed\) ---"
104   - perform "mkdir -p $HOME/my_anubis";
105   - perform "tar -C $HOME -xzf my_anubis.tar.gz"
106   -
107   - echo -e "\n--- Creating an initial configuration file '$HOME/my_anubis/anubis.conf' ---"
108   - perform " > $HOME/my_anubis/anubis.conf \[PATH\]"
109 117 }
110 118  
111 119  
... ... @@ -132,6 +140,16 @@ function install_anubis ()
132 140 else echo -e "\n--- Installation successful. ---"
133 141 echo -e " You may remove the directory '$(pwd)' and its content."
134 142 fi
  143 + if [ $UID == "0" ]
  144 + then echo -e "Each user must execute 'anubis' at least one time to have"
  145 + echo -e "the 'my_anubis' directory setup in his 'home' directory."
  146 + echo -e "The documentation may be found in '/usr/share/anubis/en' or"
  147 + echo -e "'/usr/share/anubis/fr'."
  148 + else echo -e "You must now execute 'anubis' at least one time to have"
  149 + echo -e "your 'my_anubis' directory setup in your 'home' directory."
  150 + echo -e "The documentation may be found in '" $HOME "/anubis/en' or"
  151 + echo -e "'" $HOME "/anubis/fr'."
  152 + fi
135 153 }
136 154  
137 155  
... ...
anubis_distrib/linux_install/prepare_package/Makefile
... ... @@ -6,7 +6,7 @@ package:
6 6 mv ../../anubis_files.tar.gz ..
7 7 cd .. && tar --exclude=CVS -chzf anubis_binaries.tar.gz bin lib
8 8 cd .. && tar -czf Anubis_1_6_0_10_Linux.tar.gz anubis_files.tar.gz anubis_binaries.tar.gz\
9   - en_How_to_install.txt fr_How_to_install.txt install
  9 + en_How_to_install.txt fr_Comment_installer.txt install
10 10  
11 11  
12 12  
... ...