한국어
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 86406
159 Qt 스마트 포인터 (QSharedPointer, QScopedPointer, QPointer) makersweb 2022.08.18 1177
158 Qt 6.4에 추가될 Qt Quick 3D Physics file makersweb 2022.08.07 347
157 HTTPS URL을 연결할 때 SslHandshakeFailedError 오류 makersweb 2022.07.31 366
156 단일 인스턴스 Qt 응용 프로그램(Single-instance Application) makersweb 2022.06.23 712
155 Qt로 작성된 iOS 앱에서 시리얼 통신 file makersweb 2022.04.30 878
154 VirtualKeyboard 스타일 커스터 마이징 makersweb 2022.03.13 474
153 성능 고려 및 제안 사항 makersweb 2022.03.07 514
152 Binding 타입으로 객체 속성 간 묶기 makersweb 2022.03.04 434
151 Qt Bluetooth Low Energy 개요 makersweb 2022.02.13 680
150 Qt Android 앱에 AdMob 배너달기 file makersweb 2021.12.04 396
149 Qt 6의 C++ 프로퍼티 바인딩 예제 makersweb 2021.11.01 866
148 QML에서 앵커(anchors)로 위치 지정 file makersweb 2021.10.05 3932
147 안드로이드용 Qt 6.2 makersweb 2021.10.02 512
146 Qt 응용프로그램에서 PDF 문서 렌더링 file makersweb 2021.09.23 687
145 QML에서 Websocket 서버와 통신 file makersweb 2021.09.18 837
144 QML 코딩 규칙 makersweb 2021.09.05 3301
143 QML 에서 QR코드 생성 file makersweb 2021.08.20 907
142 앱을 종료할 때 QML 바인딩 오류를 피하는 방법 makersweb 2021.08.08 501
141 Qt 응용프로그램에서 Lottie Animation사용 file makersweb 2021.05.30 885
140 싱글 샷(Single-Shot) 시그널/슬롯 연결 makersweb 2021.05.12 762