From f348034a69ea26a22c650fce14acfe813c928ef4 Mon Sep 17 00:00:00 2001 From: Alain Prouté Date: Wed, 8 Feb 2006 21:53:04 +0000 Subject: [PATCH] *** empty log message *** --- anubis_dev/compiler/proj/linux/Makefile | 2 +- anubis_dev/compiler/src/main.cpp | 35 +++++++++++++++++++++++++++-------- anubis_dev/share/FileIO.cpp | 6 +++--- anubis_dev/vm/proj/linux/Makefile | 2 +- anubis_distrib/linux_install/bin/anbexec | Bin 669592 -> 0 bytes anubis_distrib/linux_install/bin/anubis | Bin 726204 -> 0 bytes anubis_distrib/linux_install/en_How_to_install.txt | 24 ++++++------------------ anubis_distrib/linux_install/install | 40 +++++++++++++++++++++++++++++----------- anubis_distrib/linux_install/prepare_package/Makefile | 2 +- 9 files changed, 68 insertions(+), 43 deletions(-) diff --git a/anubis_dev/compiler/proj/linux/Makefile b/anubis_dev/compiler/proj/linux/Makefile index ebed8b9..1fcb642 100644 --- a/anubis_dev/compiler/proj/linux/Makefile +++ b/anubis_dev/compiler/proj/linux/Makefile @@ -62,7 +62,7 @@ anubis_npd: dependancies_npd $(main_objs) $(special_objs:.o=.npd.o) $(cipher_obj $(strip) anubis_npd cp anubis_npd anubis cp anubis_npd $(HOME)/anubis_distrib/linux_install/bin/anubis - cp anubis_npd $(BINDIR)/anubis +# cp anubis_npd $(BINDIR)/anubis diff --git a/anubis_dev/compiler/src/main.cpp b/anubis_dev/compiler/src/main.cpp index 562a314..8c5824d 100644 --- a/anubis_dev/compiler/src/main.cpp +++ b/anubis_dev/compiler/src/main.cpp @@ -159,6 +159,8 @@ static void read_option(char *opt) else { fprintf(stderr,"Invalid option: -%s \n",opt); anb_exit(1); } } + + /* reading the command line */ static void read_command_line(int argc, char **argv) @@ -166,11 +168,24 @@ static void read_command_line(int argc, char **argv) int i; for (i = 1; i < argc; i++) if (argv[i][0] == '-') - read_option(argv[i]+1); + read_option(argv[i]+1); else - source_file_name = argv[i]; + source_file_name = argv[i]; +} + + + +/* reading only the options on the command line (needed at very start) */ +static void read_only_options(int argc, char **argv) +{ + int i; + for (i = 1; i < argc; i++) + if (argv[i][0] == '-') + read_option(argv[i]+1); } + + static char getsbuf[1000]; @@ -540,6 +555,10 @@ int main(int argc, char **argv) assert(i_dummy <= 255); + /* Read the options right now (they will be reread later by 'read_command_line') */ + read_only_options(argc,argv); + + /* Setup the 3 main directories as guessed by this program and show them if 'verbose' mode is set. These values may be overridden later below. */ set_executables_directory(argv[0]); @@ -560,7 +579,7 @@ int main(int argc, char **argv) /* If the 'my_anubis' directory does not exist, create it with all the files it must contain. */ - if (FileExist(myAnubisDirectory) == false) + if (FileExist(myAnubisDirectory + "/library") == false) populate_my_anubis_directory(); @@ -569,11 +588,6 @@ int main(int argc, char **argv) create_anubis_conf_file(); - /* If there is only the compiler name on command line, recall the syntax. */ - if (argc <= 1) - syntax(); - - /* Now, read the configuration file and the command line in this order, so that the command line options may override the settings found in the configuration file. */ read_configuration_file(); @@ -625,6 +639,11 @@ int main(int argc, char **argv) mkdirz(buf); + /* If there is only the compiler name on command line, recall the syntax. */ + if (argc <= 1) + syntax(); + + /* Setup the paths for where the compiler will search for Anubis source files. */ { String tmpStr; diff --git a/anubis_dev/share/FileIO.cpp b/anubis_dev/share/FileIO.cpp index 8aedef1..a7a7ada 100644 --- a/anubis_dev/share/FileIO.cpp +++ b/anubis_dev/share/FileIO.cpp @@ -242,7 +242,7 @@ int copy_create_item(const char *filename, const struct stat *s, int flag) { char *tmp = (char *)malloc(10+strlen(filename)+strlen(dest)); sprintf(tmp,"cp %s %s",filename,dest); - printf("executing: %s\n",tmp); + //printf("executing: %s\n",tmp); system(tmp); free(tmp); } @@ -263,9 +263,9 @@ int copy_create_item(const char *filename, const struct stat *s, int flag) bool RecursiveCopy(const String &srcDir, const String &destDir) { initial_destination = (char *)destDir.Cstr(); - printf("initial_destination = %s\n",initial_destination); + //printf("initial_destination = %s\n",initial_destination); initial_source_length = strlen(srcDir.Cstr()); - printf("srcDir = %s\n",srcDir.Cstr()); + //printf("srcDir = %s\n",srcDir.Cstr()); ftw(srcDir.Cstr(),(__ftw_func_t)copy_create_item,10); return 0; } diff --git a/anubis_dev/vm/proj/linux/Makefile b/anubis_dev/vm/proj/linux/Makefile index 0d79919..a88e66c 100644 --- a/anubis_dev/vm/proj/linux/Makefile +++ b/anubis_dev/vm/proj/linux/Makefile @@ -134,7 +134,7 @@ anbexec: $(main_objs) $(special_objs) $(cipher_objs) $(graph_objs) $(sqlite3_obj -ljpeg -lssl -lcrypto -lm -lX11 -ldl -lstdc++ -lpthread -lc strip anbexec cp anbexec $(HOME)/anubis_distrib/linux_install/bin - cp anbexec $(HOME)/bin/anbexec +# cp anbexec $(HOME)/bin/anbexec clean: diff --git a/anubis_distrib/linux_install/bin/anbexec b/anubis_distrib/linux_install/bin/anbexec index 87f56c9..aee1ffe 100755 Binary files a/anubis_distrib/linux_install/bin/anbexec and b/anubis_distrib/linux_install/bin/anbexec differ diff --git a/anubis_distrib/linux_install/bin/anubis b/anubis_distrib/linux_install/bin/anubis index 285d8d2..ca2fb8b 100755 Binary files a/anubis_distrib/linux_install/bin/anubis and b/anubis_distrib/linux_install/bin/anubis differ diff --git a/anubis_distrib/linux_install/en_How_to_install.txt b/anubis_distrib/linux_install/en_How_to_install.txt index f019d2c..bdd2500 100644 --- a/anubis_distrib/linux_install/en_How_to_install.txt +++ b/anubis_distrib/linux_install/en_How_to_install.txt @@ -17,31 +17,19 @@ tar -xzf Anubis_1_6_0_10_Linux.tar.gz - (2) Execute the 'makefile'. - - The unfolding of the main archive produces several files, among which is a makefile - named 'Makefile'. - - If you can, you should first become 'root' with the 'su' command. - - If you have become 'root', execute the following command: - -make as_root - - If you cannot become 'root', execute the following command: - -make as_non_root + (2) Execute the shell 'install'. + + To that end, execute the following command: +./install - (3) If everything works well, the installation is finished. Otherwise, have a look at - the content of 'Makefile' in order to understand why one or several commands were not - executed. 'Makefile' is quite simple, and you should find the problem easily. + (3) If everything works well, the installation is finished. Note: 'anubis' must be executed at least one time in order to setup the directory - 'my_anubis' and the files it contains. + 'my_anubis' and the files it contains. diff --git a/anubis_distrib/linux_install/install b/anubis_distrib/linux_install/install index a54b3cc..f7ae3c1 100755 --- a/anubis_distrib/linux_install/install +++ b/anubis_distrib/linux_install/install @@ -59,14 +59,20 @@ function install_as_root () # Usage: install_library soname realname installation_directory # All libraries are in ./lib install_library "libjpeg.so.62" "libjpeg.so.62.0.0" "/usr/lib" + install_library "libssl.so.0.9.7" "libssl.so.0.9.7" "/usr/lib" + install_library "libcrypto.so.0.9.7" "libcrypto.so.0.9.7" "/usr/lib" + install_library "libm.so.6" "libm-2.3.2.so" "/lib" + install_library "libX11.so.6" "libX11.so.6.2" "/usr/X11R6/lib" + install_library "libdl.so.2" "libdl-2.3.2.so" "/lib" + install_library "libstdc++.so.5" "libstdc++.so.5.0.7" "/usr/lib" + install_library "libpthread.so.0" "libpthread-0.10.so" "/lib" + install_library "libc.so.6" "libc-2.3.2.so" "/lib" + install_library "libgcc_s.so.1" "libgcc_s.so.1" "/lib" echo -e "\n---" Configuring $MUST_LDCONFIG libraries "---" if [ $MUST_LDCONFIG != 0 ] then perform "/sbin/ldconfig" fi - - echo -e "\n---" Storing the archive for user installation "---" - perform "cp my_anubis.tar.gz /usr/share/anubis"; } @@ -84,6 +90,7 @@ function install_as_non_root () echo -e "\n--- Installing the Anubis binaries ---" perform "mkdir -p $HOME/bin"; + perform "mkdir -p $HOME/anubis/lib"; perform "tar -xzf anubis_binaries.tar.gz"; perform "cp bin/anubis $HOME/bin/anubis"; perform "cp bin/anbexec $HOME/bin/anbexec"; @@ -95,17 +102,18 @@ function install_as_non_root () # Usage: install_library soname realname installation_directory # All libraries are in ./lib install_library "libjpeg.so.62" "libjpeg.so.62.0.0" "$HOME/anubis/lib" + install_library "libssl.so.0.9.7" "libssl.so.0.9.7" "$HOME/anubis/lib" + install_library "libcrypto.so.0.9.7" "libcrypto.so.0.9.7" "$HOME/anubis/lib" + install_library "libm.so.6" "libm-2.3.2.so" "$HOME/anubis/lib" + install_library "libX11.so.6" "libX11.so.6.2" "$HOME/anubis/lib" + install_library "libdl.so.2" "libdl-2.3.2.so" "$HOME/anubis/lib" + install_library "libstdc++.so.5" "libstdc++.so.5.0.7" "$HOME/anubis/lib" + install_library "libpthread.so.0" "libpthread-0.10.so" "$HOME/anubis/lib" + install_library "libc.so.6" "libc-2.3.2.so" "$HOME/anubis/lib" + install_library "libgcc_s.so.1" "libgcc_s.so.1" "$HOME/anubis/lib" echo -e "\n---" Configuring $MUST_LDCONFIG libraries "---" perform "/sbin/ldconfig -n $HOME/anubis/lib" - - - echo -e "\n--- Creating the 'my_anubis' directory \(if needed\) ---" - perform "mkdir -p $HOME/my_anubis"; - perform "tar -C $HOME -xzf my_anubis.tar.gz" - - echo -e "\n--- Creating an initial configuration file '$HOME/my_anubis/anubis.conf' ---" - perform " > $HOME/my_anubis/anubis.conf \[PATH\]" } @@ -132,6 +140,16 @@ function install_anubis () else echo -e "\n--- Installation successful. ---" echo -e " You may remove the directory '$(pwd)' and its content." fi + if [ $UID == "0" ] + then echo -e "Each user must execute 'anubis' at least one time to have" + echo -e "the 'my_anubis' directory setup in his 'home' directory." + echo -e "The documentation may be found in '/usr/share/anubis/en' or" + echo -e "'/usr/share/anubis/fr'." + else echo -e "You must now execute 'anubis' at least one time to have" + echo -e "your 'my_anubis' directory setup in your 'home' directory." + echo -e "The documentation may be found in '" $HOME "/anubis/en' or" + echo -e "'" $HOME "/anubis/fr'." + fi } diff --git a/anubis_distrib/linux_install/prepare_package/Makefile b/anubis_distrib/linux_install/prepare_package/Makefile index 4422ddc..5c2425f 100644 --- a/anubis_distrib/linux_install/prepare_package/Makefile +++ b/anubis_distrib/linux_install/prepare_package/Makefile @@ -6,7 +6,7 @@ package: mv ../../anubis_files.tar.gz .. cd .. && tar --exclude=CVS -chzf anubis_binaries.tar.gz bin lib cd .. && tar -czf Anubis_1_6_0_10_Linux.tar.gz anubis_files.tar.gz anubis_binaries.tar.gz\ - en_How_to_install.txt fr_How_to_install.txt install + en_How_to_install.txt fr_Comment_installer.txt install -- libgit2 0.21.4