layman -o http://rion-overlay.googlecode.com/files/rion-overlay.xml -f -a rion && echo "app-crypt/qca ** app-crypt/qca-ossl ** app-crypt/qca-gnupg **">/etc/portage/package.keywords && emerge psi-git
Примечание: исходники будут скачены из git-репозитория.
(инсталлятор также предложит скачать и установить компилятор MinGW - рекомендуется)
Примечание: переменные обновятся только для вновь запущенных процессов, т.е. требуется перезапустить cmd.exe.
WINLOCAL_PREFIX = C:/OpenSSL
include(../src/conf_iris.pri)
было
#CONFIG += psi_plugins
стало
CONFIG += psi_plugins
было
#CONFIG += qca-static
стало
CONFIG += qca-static
CONFIG += release
на
CONFIG += debug
C:\Qt\4.4.3\examples\tutorials\tutorial\t1>qmake
C:\Qt\4.4.3\examples\tutorials\tutorial\t1>make mingw32-make -f Makefile.Debug all mingw32-make[1]: Entering directory `C:/Qt/4.4.3/examples/tutorials/tutorial/t1' g++ -c -g -Wall -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\.. \..\..\include\QtCore" -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtG ui" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include" -I"c:\Qt\4.4.3\include \ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o t mp\obj\debug_shared\main.o main.cpp g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel oc -mthreads -Wl -Wl,-subsystem,windows -o debug\t1.exe tmp/obj/debug_shared/mai n.o -L"c:\Qt\4.4.3\lib" -L"c:\Qt\4.4.3\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtC ored4 mingw32-make[1]: Leaving directory `C:/Qt/4.4.3/examples/tutorials/tutorial/t1' mingw32-make -f Makefile.Release all mingw32-make[1]: Entering directory `C:/Qt/4.4.3/examples/tutorials/tutorial/t1' g++ -c -O2 -Wall -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS _QMAIN -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtCore" -I"..\..\.. \..\include\QtGui" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include" -I"c:\Q t\4.4.3\include\ActiveQt" -I"tmp\moc\release_shared" -I"." -I"..\..\..\..\mkspec s\win32-g++" -o tmp\obj\release_shared\main.o main.cpp g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\t1.exe tmp/obj/release _shared/main.o -L"c:\Qt\4.4.3\lib" -L"c:\Qt\4.4.3\lib" -lmingw32 -lqtmain -lQtG ui4 -lQtCore4 mingw32-make[1]: Leaving directory `C:/Qt/4.4.3/examples/tutorials/tutorial/t1'
Результат сборки release-версии наблюдаем в директории C:\Qt\4.4.3\examples\tutorials\tutorial\t1\release\t1.exe
Это означает, что Qt правильно установлена и работоспособна.
Через некоторое время (10 - 40 минут) ищем результат компиляции в виде psi.exe в psi-svn/src/release
Примечание: размер файла psi.exe может быть различным (зависит от выбранной конфигурации debug/release):
Рассмотрим компиляцию плагинов на примере:
Скачиваем исходный код Psi из SVN по адресу http://svn.psi-im.org/psi/trunk и следующие инструменты:
Скачанный архив qt-win-opensource-src-4.3.2 распаковываем в директорию C:\Qt\4.3.2-msvc2005
Распаковываем содержимое архива acs-4.3.x-patch3.zip в директорию с исходным кодом Qt C:\Qt\4.3.2-msvc2005
В Path прописываем следующие пути:
Добавляем следующие системные переменные:
Копируем содержимое директории C:\OpenSSL\lib\VC в директорию C:\Program Files\Microsoft Visual Studio 8\VC\lib и переименовываем следующие файлы:
Выбираем директорию C:\OpenSSL\include\openssl и копируем всю директорию openssl в C:\Program Files\Microsoft Visual Studio 8\VC\include
В результате должно получиться так C:\Program Files\Microsoft Visual Studio 8\VC\include\openssl
Открываем командную строку Visual Studio 2005 Command Prompt:
Start → Programs → Microsoft Visual Studio 2005 → Visual Studio Tools → Visual Studio 2005 Command Prompt
Для проверки правильности прописанного пути к nmake.exe пишем в cmd:
C:\Qt\4.3.2-msvc2005>nmake /?
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
Usage: NMAKE @commandfile
NMAKE [options] [/f makefile] [/x stderrfile] [macrodefs] [targets]
Options:
........
Накладываем патч из архива acs-4.3.x-patch3.zip:
C:\Qt\4.3.2-msvc2005>installpatch42.bat patching file src/corelib/global/qglobal.cpp patching file src/corelib/global/qglobal.h patching file src/corelib/kernel/qabstractitemmodel.cpp patching file src/corelib/kernel/qvariant.h patching file src/corelib/tools/qshareddata.h patching file src/corelib/tools/qlist.h patching file src/corelib/io/qtextstream.h patching file src/corelib/io/qdir.cpp patching file src/corelib/io/qsettings.cpp patching file src/corelib/io/qtextstream.cpp patching file src/corelib/corelib.pro patching file src/qbase.pri patching file src/opengl/opengl.pro ............. patching file mkspecs/win32-msvc2005/qmake.conf patching file mkspecs/win32-msvc.net/qplatformdefs.h patching file qconfigure.bat patching file examples/threads/waitconditions/waitconditions.pro Press any key to continue . . .
Для вывода справки по команде configure.exe пишем в cmd:
C:\Qt\4.3.2-msvc2005>configure.exe -help
Для начала процесса сборки qmake пишем:
C:\Qt\4.3.2-msvc2005>qconfigure.bat msvc2005 -debug-and-release This is the Qt/Windows Open Source Edition. You are licensed to use this software under the terms of the GNU General Public License. Type '?' to view the GNU General Public License. Type 'y' to accept this license offer. Type 'n' to decline this license offer. Do you accept the terms of the license? y
Далее:
Going to compile qmake now Continue? (Y/N):Y
Затем:
Going to generate Makefiles for Qt now Continue? (Y/N):Y
По окончании сборки qmake будет выведено следующее сообщение:
==================================================== You are now ready to build Qt (msvc2005) If you specified -static or only want to build the Qt library, type 'nmake sub-src' otherwise, type 'nmake' To start over, type 'nmake distclean' and then re-run qconfigure.bat ====================================================
C:\Qt\4.3.2-msvc2005>nmake
Процесс сборки Qt может занять некоторое время (20-60 минут)
Переходим в директорию psi-svn с файлами исходного кода Psi и проверяем правильность путей и переменных:
D:\Psi\psi-svn>qmake -v QMake version 2.01a Using Qt version 4.3.2 in C:\Qt\4.3.2-msvc2005\lib
D:\Psi\psi-svn>echo %QMAKESPEC% win32-msvc2005
Открываем файл D:\Psi\psi-svn\psi.pro и комментируем следующие строки:
<code>
# SUBDIRS += \
# src
</code>
Далее выполняем:
D:\Psi\psi-svn>qmake
Затем:
D:\Psi\psi-svn>nmake
Переходим в директорию psi-svn/src и запускаем команду для создание проекта psi для Visual Studio 2005:
D:\Psi\psi-svn\src>qmake -t vcapp src.pro
После выполнения данной команды в этой же директории видим файл psi.vcproj
Открываем файл psi.vcproj в Visual Studio 2005
Переключаемся на конфигурацию Release и выполняем команду Build
Примечание: On MS-Windows, the patchfile must be a text file, i.e. CR-LF must be used as line endings. A file with LF may give the error: “Assertion failed, hunk, file patch.c, line 343,” unless the option ‘–binary’ is given.