2017년 3월 29일 수요일

갤럭시 S8, G6 스펙 비교 - 크기와 무게 중심으로

쓰던 스마트폰이 노후되어서 이제 교체를 해야겠다고 마음먹고 있는데
최근 엘지와 삼성의 플래그쉽 모델이 잇달아 신규 출시되었다.
갤럭시 S8은 오늘 0시에 발표되고나서 포털 실시간검색어에 노출되어
스마트폰에 대한 현대인들의 관심의 정도를 보여주고 있다.

최근에 부자병이라고 하는 어플루엔자(어플루엔자(Affluenza)는 풍요를 뜻하는 낱말 affluece와 유행성 독감을 뜻하는 낱말 influenza의 합성어이다)를 통해서 느끼는 바가 어느정도 있지만...

시대에 뒤떨어질 수는 없기에 어떤 스마트폰을 선택할 것인가를 고민하고 있었다.

그래서 삼성과 엘지의 플래그쉽 모델의 스펙을 비교하여 의사결정에 도움을 받고자 했다.
휴대성이 중요하다는 판단하에 무게와 크기를 중심으로 정보를 검색하는데
직접적으로 비교해 놓은 글을 찾기가 어려워 손수 작성하여 참고하려고 한다.

최근 베젤리스라던가 풀비젼이라던가 하는 것과 동시에 무게와 크기가 휴대성에 영향을 주지 않도록 디자인하는 것이 트랜드가 되어가는 것 같다.

일단은 먼저 출시된 G6의 스펙을 공식 페이지에서 가져왔다.

Specifications

  • Display: 5.7" QHD Plus FullVision (2880 x 1440) with 564 ppi and 18:9 Aspect Ratio
  • Battery Capacity: 3,300 mAh Non-Removable
  • Platform: Android 7.0 (Nougat)
  • Processor: Qualcomm Snapdragon™ 821 2.35 GHz + 1.6 GHz Quad-Core Custom 64-bit Qualcomm Kryo™
  • Technology: LTE, CDMA, GSM, UMTS
  • Network: CDMA, GSM, LTE, LTE CA

  • microSD cards sold separately.
  • Size & Weight: 5.86" (H) x 2.83" (W) x 0.31" (D); Weight: 5.74 oz.
  • Internal Memory: 32 GB
  • Supports microSD card up to 2 TB1
  • RAM: 4 GB
  • Available Colors: Platinum, Black

갤럭시 S8의 스펙을 공식 홈에서 가져왔다.


  • OS
    Android N OS 7.0

  • Size
    Product Dimensions (inches)
    2.68" x 5.86" x 0.32"

  • Camera
    Camera resolution (Front)
    8MP
    Camera resolution (Rear)
    12MP
    Features

    High Photo Quality Camera

  • Battery
    Battery, Standby

    Up to 3.38 days


    Battery, Talk Time

    Up to 29hrs
    Battery Type and Size
    3000mAh

  • Memory
    Internal Memory
    Flash: 64 GB, RAM: 4GB
    External Memory/microSD™ Capacity
    Removable microSD up to 256 GB

  • Connectivity
    Wi-Fi
    802.11 a/b/g/n/ac
    Bluetooth
    Bluetooth v5.0

  • Processor
    Processor Speed, Type
    Powerful MSM 8998 Octa Core 2.35Ghz (Quad Core) + 1.9GHz (Quad)

  • Display
    Main Display Size
    5.8"
    Main Display Technology
    Super AMOLED

    thegear에서 가져온 스펙

    갤럭시 S8(SM-G950) 스펙

    • 5.8인치 QHD+(2960 x 1440, 570ppi) 인피니티 디스플레이
    • 퀄컴 스냅드래곤 835·엑시노스 8895 옥타코어 프로세서
    • 4GB 메모리
    • 64GB·128GB 저장 공간(마이크로SD 최대 256GB 확장)
    • 전면 800만·후면 1200만 화소 카메라
    • 802.11 a/b/g/n/ac(2X2 MIMO), 블루투스 5, NFC, 홍채인식, 지문인식, GPS, GLONASS, Beidou, Galileo
    • 148.9 x 68.1 x 8.0mm, 152g
    • 3000mAh 배터리(USB 타입C), 고속 충전, 무선 충전
    • 안드로이드 7.0 누가

    갤럭시 S8 플러스(SM-G955) 스펙

    • 6.2인치 QHD+(2960 x 1440, 529ppi) 인피니티 디스플레이
    • 퀄컴 스냅드래곤 835·엑시노스 8895 옥타코어 프로세서
    • 4GB 메모리
    • 64GB·128GB 저장 공간(마이크로SD 최대 256GB 확장)
    • 전면 800만·후면 1200만 화소 카메라
    • 802.11 a/b/g/n/ac(2X2 MIMO), 블루투스 5, NFC, 홍채인식, 지문인식, GPS, GLONASS, Galileo
    • 159.4 x 73.4 x 8.1mm, 173g
    • 3500mAh 배터리(USB 타입C), 고속 충전, 무선 충전
    • 안드로이드 7.0 누가



    나무위키의 갤럭시 S8 스펙은 아래와 같다.

    프로세서삼성 엑시노스 9 Series (8895) SoC. ARM big.LITTLE↓, ARM Mali-G71 MP20 550 MHz GPU
    Samsung Exynos M2 MP4 2.3 GHz CPU + ARM Cortex-A53 MP4 1.7 GHz CPU
    퀄컴 스냅드래곤 835 MSM8998 SoC. Qualcomm Kryo 280 MP4 2.35 GHz + 1.9 GHz CPU, 퀄컴 Adreno 540 670 MHz GPU
    퀄컴 Hexagon 680 DSP
    메모리4 GB LPDDR4 SDRAM, 64 GB UFS 2.1 규격 내장 메모리micro SDXC (256 GB 공식 지원)
    디스
    플레이
    5.8인치 2960 x 1440 (배열 RG-BG 펜타일) 서브픽셀 방식의 삼성D Super AMOLED Dual-Edge
    멀티터치 지원 정전식 터치 스크린, 고릴라 글래스 5
    네트워크LTE Cat.16·13, HSPA+ 42Mbps, HSDPA & HSUPA & UMTS, GSM & EDGE
    근접통신Wi-Fi 802.11a/b/g/n/ac, 블루투스 5.0 / aptX Codec, NFC, ANT+, MST
    카메라전면 800만 화소 F1.7, 후면 OIS 기술 탑재 Dual Pixel 1200만 화소 F1.7 AF 트래킹 지원 위상차 검출 AFLED 플래시
    배터리내장형 Li-lon 3000 mAh
    운영체제안드로이드 7.0 (Nougat)
    삼성 터치위즈 Dream UX
    규격68.1 x 148.9 x 8.0 mm, 152 g
    색상[1]미드나이트 블랙, 오키드 그레이, 아크틱 실버, 코랄 블루, 메이플 골드
    단자정보USB 3.1 Gen1 Type-C x 1, 3.5 mm 단자 x 1
    기타VoLTE 및 Wideband Audio 지원, IP68 등급 방수 방진 지원, 무선충전 Qi 규격 및 PMA 규격 지원
    홍채인식 및 에어리어 방식 지문인식 지원, 심장 박동 인식 센서 내장





    나무위키의 LG G6의 내용을 보면....

    프로세서퀄컴 스냅드래곤 821 MSM8996 Pro SoC. Qualcomm Kryo MP2 2.34 GHz + MP2 1.6 GHz CPU, 퀄컴 Adreno 530 653 MHz GPU
    퀄컴 Hexagon 680 DSP
    메모리4 GB LPDDR4 SDRAM, 32 / 64 GB UFS 2.0 규격 내장 메모리, micro SDXC (2 TB 공식 지원)
    디스플레이5.7인치 2880 x 1440 RGB 서브픽셀 방식의 LGD Full Vision Display (IPS TFT-LCD 방식 & 564 ppi)
    멀티터치 지원 정전식 AIT(Advanced In-cell Touch) 터치 스크린
    고릴라 글래스 3
    고릴라 글래스 5
    네트
    워크
    기본HSPA+ 42Mbps, HSDPA & HSUPA & UMTS, GSM & EDGE
    선택LTE Cat.12·13LTE Cat.11TD-LTECDMA & EV-DO Rev. A
    근접통신Wi-Fi 802.11a/b/g/n/ac, 블루투스 4.2+BLE, NFC, MST[1]
    카메라전면 500만 화소, 후면 OIS 기술 탑재 1,300만 화소 x 2 듀얼 렌즈 위상차 검출 AF 및 듀얼 LED 플래시
    배터리내장형 Li-lon 3300 mAh
    운영체제안드로이드 7.0 (Nougat)
    LG UX 6.0
    규격71.9 x 148.9 x 7.9 mm, 163 g
    색상[2]아스트로 블랙, 미스틱 화이트, 아이스 플래티넘
    단자정보USB 3.1 Gen1 Type-C x 1, 3.5 mm 단자 x 1
    기타기본VoLTE 및 Wideband Audio 지원, IP68 등급 방수 방진 지원 및 MIL-STD-810G 인증 취득
    에어리어 방식 지문인식 지원, Dolby Vision & HDR 10 규격 지원
    선택쿼드 Sabre DAC 탑재지상파 HD DMB 및 고화질 스마트 DMB 지원무선충전 Qi 규격 지원



    자료를 찾다보니 쉽게 결론을 낼 수 있을 것 같다.
    찾고 싶었던 자료는 아래와 같은 것이다.

    갤럭시의 크기, 무게(해상도)

    68.1 x 148.9 x 8.0 mm, 152 g (2960 x 1440)

    LG G6의 크기, 무게(해상도)

    71.9 x 148.9 x 7.9 mm, 163 g (2880 x 1440)


    세로 크기는 동일하고 두께도 비슷하고..
    갤럭시 S8 가로크기 G6보다 -3.8mm 이다.
    무게도 -11g 이다.
    삼성전자가 진정 극한의 기술력을 선보이려하나...


    좋은 마케팅으로 극복가능한 차이라고 쓰고
    적당한 가격차로 승부를 걸자라고 말한다.


    갤럭시 S8 출시가 아직 20일 이상 남았으니
    엘지 마케팅본부, 이제는 배수의 진을 쳐봐야하지 않겠는가...




    .

2017년 2월 22일 수요일

Qt 5.5.1버전 Static 설치하기

회사 물류프로그램에 프린터 라이브러리로 사용하던 프로젝트가 클로즈 되어 버렸다.

오픈소스 프린터 라이브러리는 pulas 라는 ...

일단은 프로젝트가 빌드된 환경은 Qt 5.5.1버전으로 공식다운로드 사이트에서는 찾기 어려웠다.
이전 포스팅을 할 당시에는 5.5.1을 꼭 해야한다는 의무감이 없어서 이런 저런 삽질을 많이 했었던 것 같다. 하지만 5.8.0에서 Makefile project.o file not found 오류와
5.7.1에서 빌드시 QMAKE_PRL_TARGET 문제등을 겪은 후 5.5.1을 찾아야겠다는 생각을 하게 되었고 구글을 통해서 찾을 수 있었다.
(QMAKE_PRL_TARGET 문제 참고사이트 >> https://bugreports.qt.io/browse/QTBUG-51977 )

Qt 5.5.1버전은 아래주소에서 다운받을 수 있었다.

https://download.qt.io/archive/qt/5.5/5.5.1/

빌드는 Static한 빌드를 해야한다. 따라서 Static으로 설치하는 법에 대해서 공유한다.

qt-opensource-windows-x86-mingw492-5.5.1.exe prebuild된 설치파일을 받아서 설치를 진행한다.
대략 30분쯤 후 설치된다.

아래주소로 다시 이동한다.
https://download.qt.io/archive/qt/5.5/5.5.1/single/

qt-everywhere-opensource-src-5.5.1.7z 이 파일은 받지 않아도 되나 혹시나
필요할 경우를 위해서 경로를 남긴다.

webkit을 프로젝트에 포함해야 했기에 webkit을 빌드해야한다.
압축을 해제한 소스폴더에 보면 qtwebkit이존재하고 거시서 빌드스크립트를 실행시켜줘야한다.
빌드를 위해서는 루비와 펄이 필요하다.
그리고 GnuWin32중에서 flex와 bison이 필요한데...
flex는 win_flex의 이름을 flex로 변경해서 실행하는데 win_flex도 있어야한다.ㅡㅡ;

관련오류는 스택오버플로우에 ....
http://stackoverflow.com/questions/33916633/qt5-5-1-nmake-unknown-flag-for-usage-error

In my case I've installed the GnuWin32 files (C:\Program Files (x86)\GnuWin32\bin): "flex.exe" and "bison.exe" (and other files there) and the "winflex" files (C:\winflex): "win_flex.exe" and "win_bison.exe". All of this files are in the PATH variable (set PATH=%PATH%;C:\winflex;...). And for correct work I did following:
1) rename C:\Program Files (x86)\GnuWin32\bin\flex.exe to some unused name.
2) rename C:\Program Files (x86)\GnuWin32\bin\bison.exe to some unused name.
3) rename C:\winflex\win_bison.exe to bison.exe.
And the flex error fixed.

이제 펄 스크립트를 실행해보자..
qtwebkit 폴더안에서...
perl Tools\Scripts\build-webkit --qt --release
잘 안된다면 환경탓.
 

이젠 아래 주소로 이동한다.
https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW#Command_line

이 페이지를 중심으로 설치를 진행하면 잘 된다.
내용은 아래와 같다.
따라서 설치를 진행해주면 되는데

영어가 귀찮다면 일단은 스크롤로 하단까지 이동...
--------------------------------------------------------------------------------

Why a static Qt?

On Windows, the pre-built environments from qt.io are dynamically linked. This means that your Qt application dynamically references the Qt DLL's which are installed with the pre-built environment.
This is probably the preferred environment for developing and debugging since everything is there and ready to use. However, when it comes to deploying an application on systems without pre-installed Qt environments, it becomes complicated. There are several DLL’s to deploy with the application. Even using the classical DLL Dependency Walker tool, you cannot find all required DLL’s since some of them are dynamically loaded at execution. So, when the application is ready to deploy, it is easier to build a static version of it. But building a static version of the application requires a static version of the Qt environment in addition to the pre-built dynamic Qt environment.
This article describes an automated way of downloading, building and installing a static Qt development environment using a Windows PowerShell script.
Note that building and installing a static version of Qt on Windows was somewhat problematic up to Qt 4. But Qt 5 has now a much better support for static builds on Windows and this article takes advantage of that.

MinGW vs. MSVC

On Windows, two pre-built environments can be downloaded: one using MinGW and one using Microsoft Visual Studio. The two environments are incompatible and cannot be mixed. You have to choose one.
This article describes how to build a static version of Qt in a MinGW environment. If you need a static Qt for MSVC, you may probably find some ideas here but there is definitely some extra work.

Target environment

When you develop Qt applications on Windows and need to deploy them later on "general purpose" Windows machines, the recommended Qt environment contains two distinct builds of the same version of Qt:
  • A dynamic version, installed in C:\Qt from a pre-built package.
  • A static version, installed in C:\Qt\Static using the procedure which is described in this article.
The pre-built dynamic environment shall be used for development and debugging. In addition to the Qt command line tools (qmake, moc, uic, lupdate, lrelease, etc.), it contains the high-level GUI tools such as Qt Creator, Assistant, Linguist, etc. The installation is straightforward, everything is here, well integrated, working like a charm.
The static environment shall be used to release the deployment version of the application, after it has been fully developed and debugged using the dynamic environment. The static environment contains only the Qt command line tools. There are at least two reasons for not building static versions of the GUI tools. First, releasing a new version of an application is typically a task that you automate using a script and there is no need for GUI tools at this stage. Second, it is probably impossible to build a static version of Qt Creator because of the lack of support for plugins in a static environment.

Restrictions in a static environment

Although building a static version of your application makes it easier to deploy, there are some restrictions in a static environment. Be sure to check that your application complies with these constraints before going further.
  1. There are licensing issues in distributing applications embedding Qt code in a static link. See here and here for more details. While you are probably safe if your application is distributed according to the terms of a recognized free and open-source license, you should definitely check the licensing issue for proprietary or closed-source applications.
  2. The application cannot use a dynamic modular approach using plugins. But you cannot both ask for a static environment and for a dynamic loading of your own DLL's.
Also note the following points:
  • The static executable file of the application is bigger than the dynamic one since all used Qt code is copied into the executable. However, if your application has only one executable, the total deployed size is smaller since only the Qt code which is actually used is linked. When deploying a dynamic version of the application, you have to install all required Qt DLL's with the application and the overall size of all these DLL's is larger than the static application.
  • A Qt static build means that no Qt or MinGW DLL's are used. However, the static executable file of the application still references the Windows DLL's such as kernel32.dll or user32.dll. These DLL's, however, are installed with Windows and do not need to be deployed with the application.

Prerequisites

Dynamic pre-built Qt environment

Install the dynamic pre-built package from qt.io. Select the package named "Qt 5.5.0 for Windows 32-bit (MinGW 4.9.2, 959 MB)". The exact name and version may vary. You can also browse the tree of installation packages.
Preferably plan the installation of the same version of Qt for the dynamic and static builds. This is not a strict requirement but it is a safe configuration. At the time of writing of this article, the latest Qt version is 5.5.0.
During installation, select the default installation location (C:). Be sure to add the MinGW environment in the installation (selectable in the "Tools" branch of the installation options).
If you have a separated MinGW environment that you prefer to use and do not install the one from the Qt package installer, be sure to specify the option -MingwDir in the static build script (see below).

Windows PowerShell

The script which builds the static Qt environment is a PowerShell script.
The PowerShell version 3.0 or higher is required. PowerShell 3.0 comes with Windows 8 but it can be installed on Windows 7 as well from Microsoft download. It is probably impossible to install PowerShell 3.0 on Windows XP or Vista. This article consequently applies to Windows 7 and higher only.

7-Zip

The build script also requires 7-Zip to uncompress the downloaded Qt source code. Be sure to install it first.

Building the Qt static environment

Download and run, all done

Download the script named windows-build-qt-static.ps1 and execute it.
The above link fetches the script directly from the git repository of a small open-source project named QtlMovie. You may want to have a look at the various build scripts in this project for sample application builds and installations.
The windows-build-qt-static.ps1 script can be directly invoked from the Windows Explorer if you are ok with the default parameter values (see below). If you are not familiar with PowerShell, simply right-click on the file and select "Run with PowerShell".
The script performs the following steps:
  1. Download Qt source code.
  2. Build a static version of Qt using the MinGW compiler in the pre-built dynamic environment. It builds the libraries and the command line tools (qmake, moc, uic, lupdate, lrelease, etc.)
  3. Install the static version of Qt in C:\Qt\Static by default.
The execution of this script may take a couple of hours to complete, depending on your processing power. So you have to be patient. Qt is a complex framework with a very large amount of code.

Command line syntax

Alternatively, you can invoke the script from the PowerShell prompt using the following syntax:
windows-build-qt-static.ps1 [-QtSrcUrl url] [-QtStaticDir directory] [-QtVersion string] [-MingwDir directory] [-NoPause]

Command line parameters

-QtSrcUrl url
Specify the URL of the Qt source file archive. By default, the latest identified version is hardcoded ([1] at the time of this article was edited).
Instead of using the parameter on the command line, you may want to modify the default value in the script using another URL / version. Update the following line:
 $QtSrcUrl = "http://download.qt-project.org/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.7z",
-QtStaticDir directory
Specify the root directory where the static versions of Qt are installed. By default: C:.
-QtVersion string
Specify the Qt version. By default, the script tries to extract the version number from the Qt source file name. Usually, this is sufficient, the script will find "5.5.0" or "5.0.0-rc1" for instance. If the naming scheme of the Qt source file changes one day, you may need to specify an explicit value to this parameter.
-MingwDir directory
Specify the root directory of the MinGW environment. By default, use the version which was installed by the prebuilt Qt environment.
When the prebuilt environment for Qt 5.5.0 is installed for instance, the script locates MinGW in C:\5.5.0\Tools\mingw492_32. If you chose not to install MinGW as part of the prebuilt environment for Qt, you have to specify the root directory of your MinGW installation.
-NoPause
Do not wait for the user to press enter at the end of execution. By default, the scripts executes a pause instruction at the end of execution, which is useful when the script was run from the Windows Explorer.

Using the Qt static environment

Command line

This section describes how to use the static Qt environment from the command line, either the traditional Windows command shell (cmd.exe) or the Windows PowerShell.
Simply add the bin subdirectory of the static Qt environment in front of the Path environment variable. For Qt 5.5.0, this is C:\Qt\Static\5.5.0\bin.
Do not forget to also include the MinGW environment in the path. With the dynamic pre-built Qt environment, you may want to add Qt Creator also.
The following commands summarize the command line setups for the various environments.
Dynamic pre-built Qt with the traditional Windows command shell:
set Path=C:\Qt\Qt5.5.0\5.5.0\mingw492_32\bin;C:\Qt\Qt5.5.0\Tools\mingw492_32\bin;C:\Qt\Qt5.5.0\Tools\QtCreator\bin;C:32;C:
Dynamic pre-built Qt with the Windows PowerShell:
$env:Path=C:\Qt\5.5.0\5.5.0\mingw492_32\bin;C:\Qt\Qt5.5.0\Tools\mingw492_32\bin;C:\Qt\5.5.0\Tools\QtCreator\bin;C:\32;C:
Static Qt build with the traditional Windows command shell:
set Path=C:\2.0\bin;C:\Qt\Qt5.5.0\Tools\mingw492_32\bin;C:\32;C:
Static Qt build with the Windows PowerShell:
$env:Path=C:\Qt\.5.0\bin;C:\Qt\Qt5.5.0\Tools\mingw492_32\bin;C:\32;C:

Using the Qt static environment with Qt Creator

This section describes how to use the static Qt environment from Qt Creator. Note that Qt Creator itself is part of the dynamic pre-built environment. By default, it builds the applications for this dynamic environment. But it is possible to configure it to additionally use the static Qt environment.
The following description is based on a Qt 5.5.0 / Qt Creator 3.4.2 installation, without additional customization of Qt Creator. Change the version numbers to adapt to your configuration.

Qt Creator setup

Open the Qt Creator options edit box (menu "Tools" then "Options…"). Select "Build & Run".
Go to tab "Qt Versions". In the "qmake location" table, there must be an "Auto-detected" part and a "Manual" part. In the "Auto-detected" part, there should be one line named "Qt 5.5.0 MinGW 32bit C:\Qt\Qt5.5.0\5.5\mingw492_32\bin\qmake.exe". The "Manual" part is initially empty.
Click "Add", browse to C:\Qt\Qt5.5.0\bin and select "qmake.exe". The version name is automatically set to "Qt 5.5.0 (5.5.0)". You should set a more meaningful name such as "Qt 5.5.0 MinGW Static 32bit"
Then go to tab "Kits". Again, there must be an "Auto-detected" part and an initially empty "Manual" part. Click "Add". Set a meaningful name such as "Desktop Qt 5.5.0 MinGW Static 32bit". In the "Qt version" field, select your static environment, named "Qt 5.5.0 MinGW Static 32bit" if you followed the above advice.
Then click "OK" to terminate the options setup.

Project setup

In each project you want to deploy with a static build, edit the project setup (select "Projects" in the left vertical pane).
Click "Add Kit" in the upper left corner and select your static kit, named "Desktop Qt 5.5.0 MinGW Static 32bit" if you followed the above advice.
The new kit for your project is configured. Note that, by default, there are distinct build directories for the dynamic and static versions of your project.
Now you can build your application in any combination of static vs. dynamic and release vs. debug. In the bottom part of the left pane, the project selector (the computer icon with the name of your project and either "Release" or "Debug") lets you select the combination you want.
Note that it is recommended to build only release versions of the application with the static environment. Avoid building a debug version of the application with the static environment. There are several reasons for that:
  • The recommended environment for the development, debug and test phase is the pre-built dynamic environment, not the static one.
  • The size of a static application in debug mode is insanely huge. For a given application, the following sizes have been observed for the application executable file:
    • Dynamic + Release: 1 MB
    • Dynamic + Debug: 33 MB
    • Static + Release: 16 MB
    • Static + Debug: 297 MB
--------------------------------------------------------------------------------

윈도우즈의 파워쉘과 7zip이 먼저 설치되어 있어야 한다.
파워쉘은 윈도우 기본이지만 혹시나 확인해보길 바란다.
7zip은 잘 설치하면 된다.

해당페이지의 중간쯤 위치한
windows-build-qt-static.ps1 and execute it ...

파일 다운로드 링크를 남긴다.
https://sourceforge.net/p/qtlmovie/code/ci/v1.2.16/tree/build/windows-build-qt-static.ps1?format=raw
이 파일을 다운로드 받는다.

파일을 열어보면
78라인쯤에

$QtSrcUrl = "http://download.qt-project.org/official_releases/qt/5.3/5.3.0/single/qt-everywhere-opensource-src-5.3.0.7z",
    $QtStaticDir = "C:\Qt\Static",
    $QtVersion = "",
    $MingwDir = "",
    [switch]$NoPause = $false

여기서 다운로드 주소가 변경된다.

param(
    $QtSrcUrl = "https://download.qt.io/archive/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.7z",
    $QtStaticDir = "D:\Qt\Static",
    $QtVersion = "5.5.1",
    $MingwDir = "D:\Qt\Qt5.5.1\Tools\mingw492_32",
    [switch]$NoPause = $false

154라인에 파워쉘 path설정이 있는데 약간 수정이 필요하다.
$env:path = $env:path +";$MingwDir\bin;$MingwDir\opt\bin;$env:SystemRoot\system32;$env:SystemRoot"
Path가 path로 변경되어야한다.


이렇게 수정한 후 파워쉘에서 실행을 해주면 된다.
여기서 보듯이 이미 prebuild된 Qt를 설치하는 것이 좋다.
나중에 Creator도 당연히 필요하니까.

빌드는 대략 3시간 정도 걸렸던 것 같다.

이제 크리에이터를 실행하고 옵션을 수정하여 마무리한다.

추후 사진을 첨부하도록 하겠다.

Qt5 webkit 빌드 삽질기

Qt5로 만들어진 오픈소스가 있었다.

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
 

2017년 2월 16일 목요일

오라클 9i 최신 CentOS에 설치하기

자료는 있지만 꼭 맞는 자료는 없다.

웹개발자로 살면 오라클 설치는 피할 수 없는 임무중 하나인듯 하다.

centos 6.6을 먼저 설치했다.

인터넷을 설정하고 필수 팩키지를 설치한다.

yum groupinstall "X Window System"
yum install glibc.i686
yum install compat-gcc-32
yum install compat-db
yum install libaio-devel
yum install sysstat


4. Changing redhat-release file
One of the first checks performed by the Oracle Universal Installer (OUI) is to determine if the host platform is supported. The OUI uses the file /etc/redhat-release to determine the platform. For the case of Red Hat Enterprise Linux, Oracle Database 10g Release 2 expects either RHEL 3 or RHEL/OEL 4.
The easiest way to get around this error is to modify the /etc/redhat-release file replacing the current release information (CentOS release 5 (Final)) with the following:
redhat-4
Before modifying /etc/redhat-release, make a backup copy of the file and ensure to replace the original one after the Oracle installation and patch process has been completed.
cp /etc/redhat-release /etc/redhat-release.original
echo "redhat-4" > /etc/redhat-release
After all these configurations, you should get this result:








export EDITOR=vim
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9204
export ORACLE_OWNER=oracle
export ORACLE_TERM=xterm
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/usr/sbin:$ORACLE_HOME/Apache/bin:$PATH
export NLS_LANG=KOREAN_KOREA.KO16KSC5601
export LANG=C
export THREADS_FLAG=native
#SID
export ORACLE_SID=TESTDB



2015년 7월 9일 목요일

리눅스 스크립트를 만들고 확인할 사항(오류방지를 위해서)

sh -x 사용sh -x 스크립트경로/스크립트이름.sh

사용자 환경에 맞추어 실행을 시뮬레이션 해보아야 한다.

실행시킬 사용자로 반드시 해볼 것을 추천.

2015년 2월 26일 목요일

이클립스 + jeus 5 + 오라클 프로젝트 구성


[출처:http://blog.naver.com/PostView.nhn?blogId=yruyo&logNo=80105185296]
출처에서 가져온 내용을 임의로 편집을 하겠습니다.
회사에 제우스5 라이센스가 많이 놀고 있어서 제우스를 써야한다.ㅜㅜ
제우스의 성능 차이가 톰캣과는 넘사벽일까? 

아래를 참조해서 이클립스에 제우스 플러그인을 설치를 완료한다.
http://kyjmagic.tistory.com/entry/JEUS-60%EA%B3%BC-Eclipse-35-%EA%B0%88%EB%A6%B4%EB%A0%88%EC%98%A4-%EC%97%B0%EB%8F%99

Eclipse+Tomcat 셋팅에서 JEUS 셋팅 갈아타기 

1. JEUS WEBMain.xml 설정
일반적으로 JEUS 폴더의 config 폴더내에 있다.
<?xml version="1.0" encoding="UTF-8"?><jeus-system xmlns="http://www.tmaxsoft.com/xml/ns/jeus" version="6.0">
   <node>
      <name>WAS</name>
      <engine-container>
         <name>container1</name>
         <id>9</id>
         <base-port>9841</base-port>
         <command-option>-Xms256m -Xmx1024m -XX:MaxPermSize=256m</command-option>
         <user-class-path>/source/app/war/WEB-INF/message:/source/app/war/WEB-INF/conf</user-class-path>
         <engine-command>
            <type>servlet</type>
            <name>engine1</name>
         </engine-command>
         <sequential-start>true</sequential-start>
      </engine-container>
      <class-ftp>true</class-ftp>
      <sequential-start>true</sequential-start>
      <enable-webadmin>true</enable-webadmin>
      <system-logging>
         <level>INFO</level>
         <handler>
            <file-handler>
               <name>fileHandler</name>
               <level>INFO</level>
               <valid-day>1</valid-day>
            </file-handler>
         </handler>
      </system-logging>
   </node>
   <resource>
      <data-source>
         <database>
            <vendor>oracle</vendor>
            <export-name>jdbc/oracle</export-name>
            <data-source-class-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-class-name>
            <data-source-type>ConnectionPoolDataSource</data-source-type>
            <database-name>데이터베이스명</database-name>
            <port-number>1521</port-number>
            <server-name>서버 아이피</server-name>
            <user>데이터베이스 계정</user>
            <password>계정 비밀번호</password>
            <property>
               <name>driverType</name>
               <type>java.lang.String</type>
               <value>thin</value>
            </property>
            <connection-pool>
               <pooling>
                  <min>20</min>
                  <max>40</max>
                  <step>5</step>
                  <period>3600000</period>
               </pooling>
               <check-query>select 1 from dual</check-query>
            </connection-pool>
         </database>
      </data-source>
   </resource>
   <application>
      <name>web</name>
      <path>/source/app/war</path>
      <deployment-type>COMPONENT</deployment-type>
      <web-component/>
      <deployment-target>
         <target>
            <engine-container-name>WAS_container1</engine-container-name>
            <web-context-group>
               <name>MyGroup</name>
            </web-context-group>
         </target>
      </deployment-target>
   </application>
</jeus-system>


우선 command-option 부분은 Eclipse에 Tomcat Plug-In을 붙여서 사용했던 분들은 아시겠지만
Eclipse의 Window>Preferences에서 Tomcat>JVM Settings>Append to JVM Parameters에
해당하는 부분이며 user-class-path 부분은 Tomcat>JVM Settings>Classpath에 해당하는 부분이다. 위의 2곳을 Eclipse에 동일하게 맞춰서 engine-container을 셋팅해 주고 data-source 부분은
oracle 이면 거의 대부분이 동일한데 database-name, port-number, server-name, user, password
이정도만 확인해 줘도 충분할 것이다. 각 사항은 직관적이니 설명은 스킵한다. 그리고 application 부분에서는 JEUS WebAdmin에서 디플로이하면 설정되는 부분인데 구분하기 위한 name을 설정하고
실제 소스의 home 디렉토리를 path에 설정하면 WEBMain.xml 설정은 끝.


2. 개별 엔진의 WEBMain.xml 설정
<?xml version="1.0"?>
<web-container xmlns="http://www.tmaxsoft.com/xml/ns/jeus" version="6.0">
    <context-group>
        <group-name>MyGroup</group-name>
        <webserver-connection>
            <http-listener>
                <listener-id>http1</listener-id>
                <port>8091</port>
                <thread-pool>
                    <min>10</min>
                    <max>10</max>
                    <step>1</step>
                </thread-pool>
            </http-listener>
<!--
            <webtob-listener>
                <listener-id>webtob1</listener-id>
                <port>9900</port>
                <output-buffer-size>8192</output-buffer-size>
                <thread-pool>
                   <min>30</min>
                   <max>30</max>
                   <step>1</step>
                   <max-idle-time>30000</max-idle-time>
                </thread-pool>
                <webtob-address>localhost</webtob-address>
                <registration-id>MyGroup</registration-id>
            </webtob-listener>
-->
        </webserver-connection>
        <logging>
            <access-log>
                <handler>
                    <file-handler>
                        <name>handler1</name>
                        <valid-day>1</valid-day>
                    </file-handler>
                </handler>
            </access-log>
        </logging>
    </context-group>
</web-container>


JEUS의 config 폴더의 개별 엔진의 폴더에 들어가면 위에서 설명한 같은 이름의 WEBMain.xml이
존재하는데 열어보면 내용은 차이가 있다. webtob를 셋팅을 하지 않기로 했으니 주석처리가 되어있
으며 1번에서 설명한 WEBMain.xml의 web-context-group/name과 개별 엔진의 WEBMain.xml의 group-name이 같은지 확인하고 사용할 port 번호를 port에 설정한다. 보통 80이지만 개발임으로 8091로 셋팅했다.


3. 소스의 WEB-INF의 jeus-web-dd.xml  설정
보통 JEUS WebAdmin에서 디플로이 시키면 자동으로 소스의 WEB-INF에 jeus-web-dd.xml가 생기는거 같은데 JEUS WebAdmin을 사용하지 않는다면 아래를 참조해서 만들어주면 된다.

<?xml version="1.0" encoding="UTF-8"?>
<jeus-web-dd xmlns="http://www.tmaxsoft.com/xml/ns/jeus">
    <context-path>/portal</context-path>
    <enable-jsp>true</enable-jsp>
    <auto-reload>
        <enable-reload>false</enable-reload>
        <check-on-demand>false</check-on-demand>
    </auto-reload>
</jeus-web-dd>


여러 옵션이 있지만 기본적으로 두고 사용 될 context path를 context-path에 지정해 준다.




4. 소스의 WEB-INF의 web.xml 설정
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
  <display-name>iKEP Portal</display-name>
                               .
                               .
                               .
   <resource-ref>
      <description>iKEP portal DB Connection</description>
      <res-ref-name>jdbc/oracle</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
    <jsp-config>
      <jsp-property-group>
      <url-pattern>*.jsp</url-pattern>
      <el-ignored>true</el-ignored>
      </jsp-property-group>
    </jsp-config>

</web-app>

보통 시작이 <web-app>로 되어있는데 JEUS에서 사용하려면 <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"> 라고 해줘야 한다. 그렇지 않으면 jboot 시에 web-app 어쩌구 저쩌구 에러 메세지를 발견할 수 있다. res-ref-name는 1번 설명에서 data-source/database/export-name 에서 같은 이름인지 확인을 해야 하고 jsp에서 jstl을 이용해서 코딩한 경우 낮은 버전을 호환하도록 하기 위해 jsp-config 이하 부분을 모두 추가해 주도록 한다.




5. lib 확인
Tomcat>lib 에서 사용했던 라이브러리 파일들은 그대로 복사하여서 JEUS 폴더의 lib>application 폴더로 복사해 주면 되고 나머지 사용된 라이브러리 파일들은 소스의 WEB-INF>lib로 모두 위치시켜 주면 된다. 소스의 WEB-INF>lib의 라이브러리 파일과 JEUS 폴더의 lib>application의 라이브러리 파일들이 서로 겹치지 않는지 확인해 주면 된다.

>>>당연한 이야기지만 ojdbc14.jar파일이 있어야 한다.



이정도면 어느정도 기본적인 셋팅 방법이라고 할 수 있겠는데 그래도 안된다 싶으면 JEUS의 로그 파일을 살펴봐서 에러에 따라 처리를 해주는 것이 좋을 것이다. 그 이외의 문제는 정말 정말 정말 검색 또는 아는 사람에게 물어보는게 현명할 듯. 정 안되면 티맥스소프트에 문의하면 원격으로도 지원이 된다고 하나. 어디까지나 제우스를 구입해야지 지원이 가능할거라 예상된다. -ㅅ-a
[출처] Eclipse+Tomcat 셋팅에서 JEUS 셋팅 갈아타기|작성자 이루



추가적인 오류해결법 >>>
http://openwdev.blogspot.kr/2013/09/jeus-jeusmainxml-jsp-compile.html

jeus에서 JEUSMain.xml 잘못 세팅으로 인한 jsp compile 안되는 현상 발생

War배포시 잘되는제 프로젝트를 직접 배포 할경우 다음과 같은 오류 발생.
War배포가 아닌 직접 프로젝트로 배포 할경우 WebContent까지 경로를 잡아줘야 한다.

[2013.09.12 11:03:04][1][b068] [container1-10] fail to parse jsp file : /WebContent/main.jsp

--------------JEUSMain.xml-----------
<application>
      <name>test_web</name>
      <path>D:\test_web\</path>   <===== 여기를       <path>D:\test_web\WebContent</path> 잡아줘야 한다.(난 아마추어다 -_-)
      <deployment-type>COMPONENT</deployment-type>
      <web-component/>
      <deployment-target>
         <target>
            <engine-container-name>XXX_container1</engine-container-name>
            <web-context-group>
               <name>MyGroup</name>
            </web-context-group>
         </target>
      </deployment-target>
   </application>
---------------------------------------

2015년 1월 27일 화요일

centos nfs server 설정 MacOSX client 설정

centos 7 서버
 
[root@dlp ~]#yum -y install nfs-utils
[root@dlp ~]#vi /etc/idmapd.conf
# line 5: uncomment and change to your domain name
Domain =server.world
 
[root@dlp ~]#vi /etc/exports 
 
# write settings for NFS exports
/home 10.0.0.0/24(rw,no_root_squash)
 
[root@dlp ~]#restart rpcbind
[root@dlp ~]#start nfs-server
[root@dlp ~]#start nfs-lock
[root@dlp ~]#start nfs-idmap
[root@dlp ~]#enable rpcbind
[root@dlp ~]#enable nfs-server
[root@dlp ~]#enable nfs-lock
[root@dlp ~]#enable nfs-idmap  
 
 클라이언트 마운트
리눅스에 마운트한다면 링크를 참조 http://www.server-world.info/en/note?os=CentOS_7&p=nfs&f=2
 
맥에 nfs를 마운트하기 위해서 간단한 명령어를 사용하면 가능하다.
 
sudo mount -t nfs -o resvport 서버아이피-호스트네임:/data /Users/폴더/

sudo diskutil unmount /Users/폴더/

하지만 centos 7이라면 방화벽을 오픈해야 정상적으로 동작한다.

firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p tcp --dport 2049 -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p udp --dport 2049 -j ACCEPT

firewall-cmd --permanent --zone=public --add-port=2049/tcp
firewall-cmd --permanent --zone=public --add-port=2049/udp

firewall-cmd --reload

난 방화벽이 필요없다면 이것이 답이다.

systemctl stop firewalld