한국어
Qt
 

온라인 설치프로그램(Online Installer)만드는 방법

 

온라인 설치는 설치패키지를 웹서버에 두고 설치프로그램의 런타임 시에 다운로드 받아 설치한다. 

 

온라인 설치프로그램을 제작하는 과정은 오프라인 설치프로그램과 비슷하며 온라인 Repository 용 디렉토리 구성을 해준다는 점이 약간다르다.

 

이 문서에서는 명령줄에서 설치프로그램을 만드는 방법을 설명한다. 

 

테스트를 위해 웹서버는 파이썬을 이용한 로컬 웹서버를 구축한다. (웹서버 구축 방법은 자유다.)

 

Qt Installer Framework가 설치되어 있지않다면 QtMaintenanceTool을 실행해서 Qt Installer Framework를 설치한다.

install_IFW.png

 

작업 디렉터리를 만들고 다음과 같은 구조의 폴더 트리를 만든다. 아래 예제는 A, B의 두개의 컴포넌트로 구성된 경우를 나타낸다.

directorytree.png

 

config디렉토리에는 설치프로그램을 만들때 기본으로 사용되는 정보들이 지정된 config.xml이 있어야 한다.

config.xml은 다음과 같이 작성되며 RemoteRepositories 는 온라인 설치프로그램에만 적용된다. Repository는 컴포넌트가 있는 서버의 위치를 포함한다.

<?xml version="1.0" encoding="UTF-8"?>
<Installer>
    <Name>Online Installer Example</Name>
    <Version>1.0.0</Version>
    <Title>Online Installer Example</Title>
    <Publisher>The Qt Company</Publisher>
    <!-- Directory name is used in component.xml -->
    <StartMenuDir>Qt IFW Examples</StartMenuDir>
    <TargetDir>@HomeDir@/IfwExamples/online</TargetDir>
    <RemoteRepositories>
        <Repository>
            <Url>http://localhost/repository</Url>
        </Repository>
    </RemoteRepositories>
</Installer>

 

 

각 컴포넌트의 data 에는 설치대상이되는 파일들을 넣는다. meta에는 컴포넌트의 세부 정보들을 설명하는 package.xml이 있어야 한다.

package.xml의 예는 다음과 같다.

<?xml version="1.0" encoding="UTF-8"?>
<Package>
    <DisplayName>A</DisplayName>
    <Description>Example component A</Description>
    <Version>1.0.2-1</Version>
    <ReleaseDate>2015-01-01</ReleaseDate>
    <Default>true</Default>
</Package>

 

명령프롬프트 실행 후 환경 변수 설정

C:\Users\User>set path=%path%;C:\Qt\Tools\QtInstallerFramework\3.1\bin;

 

 

작업 디렉터리로 이동 후 

 

온라인 Repository 폴더 생성

 

repogen -p packages repository

 

온라인 설치 프로그램 생성

 

binarycreator.exe --online-only -c config\config.xml -p packages installer.exe

 

repogen.png

 

작업 디렉토리에 다음과 같이 Repository 디렉토리와 설치프로그램이 만들어 졌다.

working_directory.png

 

이제 이 Repository를 위한 웹서버를 구축해줘야한다. (파이썬을 이용한 웹서버 구축)

작업 디렉토리에서 80포트로 지정해줬다.

http.server.png

 

웹브라우저로 http://localhost/Repository 를 접속해보면 다음과 같이 목록이 나온다면 준비가 된것이다.

localhost_repository.png

 

이제 installer.exe 를 실행해서 기본위치에 설치 해본다. 

downloads.png

 

A, B 컴포넌트 data 파일들과 maintenancetool.exe 도 잘 설치되었다.

install_directory.png

번호 제목 글쓴이 날짜 조회 수
공지 Qt프로그래밍(QtQuick) Beginner를 위한 글 읽는 순서 운영자 2019.01.05 86034
79 OpenGL 렌더링을 QtQuick과 통합하는 방법 file makersweb 2019.10.01 2184
78 Qt Creator에서 임베디드 장치로 deploy설정(Custom Process Step) file makersweb 2019.06.15 2204
77 main함수 명령줄 옵션 해석 makersweb 2020.09.01 2238
76 QOpenVirtualkeyboard(Qt 5용 한글 및 영문, 숫자 가상키보드) file makersweb 2019.11.27 2247
75 [Qt News] Qt6 Git 개발 초기 단계 시작하기 j2doll 2019.08.02 2335
74 QtWayland와 ivi-compositor file makersweb 2018.12.27 2410
73 리눅스에서 Qt4.8기반 어플리케이션의 한글입력 file makersweb 2018.11.29 2443
72 Qt3D의 QML 타입으로 3D렌더링 file makersweb 2019.11.20 2532
71 구글 클라우드 Speech-To-Text API를 Qt기반(C++, Qml)테스트 [7] file makersweb 2019.01.20 2620
70 Qt5기반 독립 프로세스(out-of-process)로 동작하는 가상키보드(virtual keyboard) file makersweb 2019.02.24 2629
69 QML에서 멀티 스레드(multithreading) 프로그래밍 file makersweb 2019.05.25 2667
68 UI 폼(Form)작성 시 탭 순서(Tab Order) 설정 file makersweb 2020.08.24 2797
67 컨테이너 클래스 - QVector makersweb 2020.03.17 2852
66 QTextCodec클래스를 사용하여 유니코드와 EUC-KR 변환 makersweb 2019.03.25 2894
65 다국어 지원 어플리케이션 개발 file makersweb 2018.01.27 2979
64 QString 문자열에서 숫자만 추출해서 QString으로 반환 makersweb 2017.01.10 3078
63 qbs 사용 방법(Helloworld) file makersweb 2019.10.23 3095
62 QML 코딩 규칙 makersweb 2021.09.05 3256
61 임의의 메모리 영역(QImage)에 QPainter를 이용하여 그리기 file makersweb 2017.12.19 3446
60 QML, 이미지, 폰트등을 바이너리 리소스로 만들기 makersweb 2019.06.24 3518