Today, I saw someone in the qtcn.org give me a message asked me Qssh Botan in Android and iOS under the arm compiler does not pass, I went to test the next, sure enough is (if any of the Buddies see, I apologize, the day before yesterday, only to see). Previously only in Win and Linux, sure enough arm has problems. I went to the wrong place. The reason is that botan different platforms than the same CPU and compiler configuration.
So I went to see the next qssh with the use of Botan, he is the Botan configuration so many macros under the BOTAN.PRI under the platform and compiler to make a lot of definitions. Looking carefully at so many macros and judgments, and plus I am not very familiar with Botan, I dare not change his configuration. I also think of a lazy way, to replace the qssh with the Botan, directly with their own official download Botan replace Qssh Botan.
Here's my approach:
1, first to download Botan library ,: http://botan.randombit.net/download.html Note, please download the latest stable version of, 1.10.8, Development Board of the 1.11.9 I did not pass the first step.
2, the Botan configuration , that is, the implementation of "configure.py" input parameters to configure, I choose to generate all the algorithm unified Botan_all file. Attach configuration parameters:
ARM V5 's:
./configure.py--gen-amalgamation--cpu=arm/armv5--os=linux--cc=gcc--with-tr1=none
If you are win, it should be:
Python configure.py--gen-amalgamation--cpu=arm/armv5--os=linux--cc=gcc--with-tr1=none
Armv7-a's:
./configure.py--gen-amalgamation--cpu=arm/armv7-a--os=linux--cc=gcc--with-tr1=none
Python needs to be 2.5+, I use the 2.7,3.x I don't know, you can try it.
Reference here: Http://www.tiwoc.de/blog/2013/03/building-the-botan-library-for-android/
The meaning of the parameter I say,
–gen-amalgamation : Generates an aggregated Botan_all file.
–cpu=arm/armv7-a : The type of CPU, ARM/ARMV7-A is we use armv7-a CPU, if it is X86/atom or MIPS, you just need to make other types on the line.
–os=linux : OS type, Android is Linux based, so this is Linux
–CC=GCC : Compiler system, here is GCC,
–with-tr1=none : This parameter, as if it is necessary, if not this parameter will have an ASM assembly error, my ability to change, added. The explanation in the above reference is: When using STLport or other alternative GNU STL, this parameter is necessary, I remember the Android NDK STL is implemented by Google itself, not the GNU STL.
At this point you execute the command, should be in the Botan source directory to see the botan_all.h and botan_all.cpp these two files, these two are what we need.
3, configuration Qssh source code, replace the QSSH in the Botan.
1) Disable Qssh's own Botan, put Src/libs/ssh/ssh.pro in the last sentence:
Include (.. /3RDPARTY/BOTAN/BOTAN.PRI)
Delete or comment out (the comment is preceded by the word "#").
2) Add your own Botan file, this can have a lot of practice, I was directly added to the project, compiled into the qssh. My approach is to:
Copy the botan_all.h and botan_cpp into the/src/libs directory, and then add the two files in the Src/libs/ssh/ssh.pro, it is recommended that you work in the Qt-c, right-click directly under SSH, adding existing files. If you change the file yourself, SOURCES = This parameter is added. /botan_all.cpp,headers = parameter plus: /botan_all.h
3) Change the header file referenced in Qssh, it is recommended to use the QSSH operation directly. After opening the project, search in the following advanced search Results
#include <botan/botan.h>
, select Search and replace, replace all with:
#include ". /botan_all.h "
4) Select your project kit for Android corresponding architecture and start compiling it.
5) in the compilation I encountered a Botan error, you should also encounter, the wrong number of lines in more than 2w lines, the wrong sentence is:
Return std::make_pair<struct dirent*, std::string> (dir, M_cur_dir.second);
This is the use of make_pair a bit of a problem, the middle of the <struct dirent*, std::string> Delete can, note also line, my change is:
Std::make_pair/*<struct dirent*, std::string>*/(dir, M_cur_dir.second);
Similarly, there are several such errors in this function, but it is no problem to change them.
So you compile should be no problem, and compile is passed, but I did not test qssh under the use of Android, if there are problems can be discussed together.
Yes, attached to my environment:
、、
Hope that we go to the source address support me,, Haha,,
Http://www.dushibaiyu.com/2014/07/qssh%E4%B9%8Bandroid%E7%89%88%E7%BC%96%E8%AF%91.html