html에서 로컬 프린터로 프린트창을 띄우지 않고 여러장을 인쇄할 수 있는...
시작은 좋았다.
여백도 잘 맞추고 인쇄도 잘 되는 듯 하였는데...
어느 날 깃헙의 오픈소스프로젝트가 클로즈되고 모든 자료는 없어졌다.
그래도 인쇄가 잘 되니 문제없다고 생각했는데...
1000장의 인쇄물 중에 비정상적으로 겹쳐서 인쇄되는 1장의 오류가 발생했다.
알 수 없었다.
이것을 해결하기 위해 여러가지 방향으로 접근을 했고 최종적으로는 오픈소스 코드 자체의 문제는 아닌 것으로 생각했는데...
Qt5의 버전업이 필요할 것이 아닌가라는 생각이 들면서
버전 업을 결심하고 큰 삽을 들게 되었다.
.
.
.
.
2주간 인터넷의 모든 Qt관련 페이지를 뒤지고 이제 결론을 얻어야하는 시기가 왔다.
하지만...
어느 곳에서나 실행할 수 있는 Static빌드가 필수라는데....
Qt5를 Static빌드해서 쓰기 위해서는 openssl, icu, webkit등을 개발환경에 맞추어 빌드를 해줘야한다고 하는데...
그래서 시작한 Qt5 webkit 빌드 삽질
webkit은 프린터라이브러리의 필수.
그런데 webkit에서 공식적으로 지원하던 것을 철회했다가 다시 개발하고 있다는 사실로
많은 혼란에 빠졌었는데..
https://github.com/annulen/webkit 이걸 찾게되어 희망이보임...
참조페이지::
https://wiki.qt.io/MinGW-64-bit#MinGW-builds_.28with_OpenSSL.2C_ICU_and_QtWebKit.29
https://github.com/annulen/webkit/wiki/Building-QtWebKit-on-Windows-(MSYS)
1.openssl빌드
https://wiki.qt.io/MinGW-64-bit#MinGW-builds_.28with_OpenSSL.2C_ICU_and_QtWebKit.29
위의 페이지 중에서
If you are using MSYS2, only then run below command. If you are using MSYS, then do not run below command.
export PATH="/c/msys2/mingw64/bin:$PATH"
Run these commands (if you are using either MSYS or MSYS2):
cd /c/Qt/qt5_deps tar -zxvf openssl-1.0.1e.tar.gz cd openssl-1.0.1e ./Configure —prefix=/c/Qt/qt5_deps/openssl-1.0.1e/dist no-idea no-mdc2 no-rc5 shared mingw64 make depend && make && make install cp /c/Qt/qt5_deps/openssl-1.0.1e/dist/bin/*.dll /c/Qt/qt5/qtbase/bin
-prefix=....... >>>> --prefix=..... 으로 수정이 필요하다.
빌드단계에서 또 다른 에러...--
POD document had syntax errors at /usr/bin/core_perl/pod2man line 70.
>>https://hellosorappang.wordpress.com/2014/04/15/openssl-1-0-1g-pod-document-had-syntax-errors-at-usrbinpod2man-line-71/
make depend && make && make install_sw 변경
2. icu빌드
Run these commands (if you are using either MSYS or MSYS2):
cd /c/Qt/qt5_deps unzip icu4c-52_1-src.zip cd /c/Qt/qt5_deps/icu/Source ./runConfigureICU MinGW prefix=/c/Qt/qt5_deps/icu/dist make && make install cp /c/Qt/qt5_deps/icu/dist/lib/icu*52.dll /c/Qt/Qt5_src/qtbase/bin
./runConfigureICU MinGW prefix=/c/Qt/qt5_deps/icu/dist
prefix=....... >>>> --prefix=..... 으로 수정이 필요하다.
여기까지 했지만 사실은 msys를 사용하면 빌드가 더 간편하다는 사실을 알게되어
아래와 같이 진행했다. 앞부분은 생략해도 된다.
참조페이지::
https://github.com/annulen/webkit/wiki/Building-QtWebKit-on-Windows-(MSYS)
3. webkit빌드
msys로 빌드하는 것이 맞다.# base-devel has much more than actually needed
# TODO: find precise package subset
pacman -S base-devel
pacman -S mingw32/mingw-w64-i686-libjpeg-turbo
pacman -S mingw32/mingw-w64-i686-icu
pacman -S mingw32/mingw-w64-i686-libpng
pacman -S mingw32/mingw-w64-i686-sqlite3
pacman -S mingw32/mingw-w64-i686-libwebp
빠진 라이브러리 추가 pacman -S mingw32/mingw-w64-i686-libxml2
pacman -S mingw32/mingw-w64-i686-libxslt
4. Qt빌드
여기서부터가 조금 어려움이 있었다.Static 빌드를 5.8.0에서 정상지원하지 않는 듯하다.
빌드과정에 대해서는 다음 시간에 정리하도록 하겠다.
정말 삽질을 했던 것 같다. 하지만 덕분에 C++ Qt 프레임워크의
빌드과정에 대해서 어느정도 이해를 할 수 있었던 시간이었다.
작성을 더 하겠지만 결론은 WEBKIT사용이 가능하다는 것이고
참조할 페이지는 다음과 같다.
https://github.com/annulen/webkit/wiki
댓글 없음:
댓글 쓰기